/* ===========================
   MapInBio — Warm Editorial
   ========================= */

:root {
  --bg: #faf5eb;
  --bg-warm: #f5efe3;
  --bg-dark: #2a1f14;
  --text: #2a1f14;
  --text-secondary: #8b7d6b;
  --text-muted: #b4a898;
  --accent: #c75d3a;
  --accent-warm: #b4783c;
  --accent-light: #d4a574;
  --border: rgba(42, 31, 20, 0.08);
  --border-strong: rgba(42, 31, 20, 0.15);

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --container: 1120px;
  --gutter: 24px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- Grain overlay ---- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
  mix-blend-mode: multiply;
}

.grain::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-size: 180px;
  animation: grain-drift 8s steps(10) infinite;
}

@keyframes grain-drift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -2%); }
  20% { transform: translate(1%, 3%); }
  30% { transform: translate(-3%, 1%); }
  40% { transform: translate(3%, -1%); }
  50% { transform: translate(-1%, 2%); }
  60% { transform: translate(2%, -3%); }
  70% { transform: translate(-2%, 1%); }
  80% { transform: translate(1%, -2%); }
  90% { transform: translate(3%, 2%); }
}

/* ---- Map layer ---- */
.map-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.map-svg {
  width: 100%;
  height: auto;
  min-height: 100%;
}

.map-pin {
  opacity: 0;
  animation: pin-appear 0.8s var(--ease-out) forwards;
}

.map-pin[data-delay="0"]   { animation-delay: 0.5s; }
.map-pin[data-delay="200"] { animation-delay: 0.7s; }
.map-pin[data-delay="400"] { animation-delay: 0.9s; }
.map-pin[data-delay="600"] { animation-delay: 1.1s; }
.map-pin[data-delay="800"] { animation-delay: 1.3s; }
.map-pin[data-delay="1000"]{ animation-delay: 1.5s; }
.map-pin[data-delay="1200"]{ animation-delay: 1.7s; }

@keyframes pin-appear {
  0% { opacity: 0; transform: scale(0) translateY(-10px); }
  60% { opacity: 1; transform: scale(1.2) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- Container ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

/* ---- Section common ---- */
.section-header {
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}

.section-title em {
  font-weight: 400;
  font-style: italic;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 245, 235, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.nav-logo-icon {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  letter-spacing: 0.2px;
}

.nav-link:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-radius: 6px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: #b5522f;
  transform: translateY(-1px);
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-mobile-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px var(--gutter) 24px;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.nav-mobile.open {
  display: flex;
}

/* ---- Hero ---- */
.hero {
  padding: 140px 0 80px;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 520px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 24px;
}

.hero-label-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(199, 93, 58, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(199, 93, 58, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 0;
}

.hero-title em {
  font-weight: 400;
  font-style: italic;
  color: var(--text);
}

.hero-divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 24px 0;
}

.hero-subtitle {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 420px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-coord {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 40px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-radius: 6px;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #b5522f;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(199, 93, 58, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

/* ---- Hero Phone Mockup ---- */
.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.hero-phone {
  width: 280px;
  height: 520px;
  background: var(--bg-dark);
  border-radius: 36px;
  padding: 12px;
  position: relative;
  transform: rotateY(-8deg) rotateX(2deg);
  box-shadow:
    0 20px 60px rgba(42, 31, 20, 0.15),
    0 0 0 1px rgba(42, 31, 20, 0.08);
  transition: transform 0.6s var(--ease-out);
}

.hero-phone:hover {
  transform: rotateY(-4deg) rotateX(1deg);
}

.hero-phone-notch {
  width: 100px;
  height: 24px;
  background: var(--bg-dark);
  border-radius: 0 0 16px 16px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.hero-phone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.hero-phone-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent));
}

.hero-phone-name {
  display: flex;
  flex-direction: column;
}

.hero-phone-handle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.hero-phone-loc {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.hero-phone-map {
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f0e8d8;
  overflow: hidden;
}

.hero-phone-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(42, 31, 20, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 31, 20, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero-phone-pin {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 2px 8px rgba(199, 93, 58, 0.3);
  animation: phone-pin-drop 0.6s var(--ease-out) both;
  transform-origin: center bottom;
}

.hero-phone-pin--active {
  width: 14px;
  height: 14px;
  z-index: 2;
  background: var(--accent);
  border: 2.5px solid var(--bg);
  box-shadow: 0 2px 12px rgba(199, 93, 58, 0.4);
}

@keyframes phone-pin-drop {
  0% { transform: translateY(-20px) scale(0); opacity: 0; }
  60% { transform: translateY(2px) scale(1.1); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.hero-phone-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(42, 31, 20, 0.12);
  white-space: nowrap;
  animation: popup-appear 0.5s var(--ease-out) 1.5s both;
  border: 1px solid var(--border);
}

.hero-phone-popup strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
}

.hero-phone-popup span {
  display: block;
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.hero-phone-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--bg);
}

@keyframes popup-appear {
  0% { opacity: 0; transform: translateX(-50%) translateY(4px) scale(0.95); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ---- Social Proof ---- */
.social-proof {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-proof-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.3px;
}

.social-proof-number {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}

/* ---- Features ---- */
.features {
  padding: 120px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
}

.feature {
  padding: 32px 28px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.4s var(--ease-out);
}

.feature:hover {
  border-color: var(--border);
  background: rgba(245, 239, 227, 0.5);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.feature:hover .feature-icon {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ---- How It Works ---- */
.how-it-works {
  padding: 120px 0;
  background: var(--bg-warm);
  position: relative;
}

.how-it-works::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.how-it-works::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
}

.step {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 0 24px;
}

.step-number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 300;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 20px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

.step-line {
  width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: 0.25;
  margin-top: 42px;
  flex-shrink: 0;
  position: relative;
}

.step-line::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
}

/* ---- FAQ ---- */
.faq {
  padding: 120px 0;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  font-size: 16px;
  text-align: left;
  transition: color 0.3s ease;
}

.faq-trigger:hover {
  color: var(--accent);
}

.faq-coord {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-warm);
  letter-spacing: 1px;
  flex-shrink: 0;
  width: 36px;
}

.faq-question {
  flex: 1;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
}

.faq-icon {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease-out), color 0.3s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out), padding 0.5s var(--ease-out);
}

.faq-item.open .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 0 24px 52px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ---- CTA ---- */
.cta {
  padding: 120px 0;
  background: var(--bg-warm);
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.cta-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin-top: 16px;
}

.cta-title em {
  font-weight: 400;
  font-style: italic;
}

.cta-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 16px;
  font-weight: 300;
}

.cta-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.cta-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 4px;
  width: 100%;
  max-width: 400px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cta-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199, 93, 58, 0.1);
}

.cta-input-prefix {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 2px 10px 14px;
  user-select: none;
  white-space: nowrap;
}

.cta-input {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  padding: 10px 14px 10px 0;
  outline: none;
  min-width: 0;
}

.cta-input::placeholder {
  color: var(--text-muted);
}

.cta-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---- Footer ---- */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-container {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 280px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 300;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===========================
   Responsive
   ========================= */

@media (max-width: 1024px) {
  .hero-container {
    gap: 40px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  .nav-links,
  .nav-cta:not(.nav-mobile .nav-cta) {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-divider {
    margin: 24px auto;
  }

  .hero-subtitle {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-coord {
    text-align: center;
  }

  .hero-phone {
    width: 240px;
    height: 440px;
    transform: rotateY(0) rotateX(0);
  }

  .hero-phone:hover {
    transform: rotateY(0) rotateX(0);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature {
    padding: 24px 20px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .step {
    max-width: 400px;
  }

  .step-line {
    width: 1px;
    height: 40px;
    margin-top: 0;
  }

  .step-line::after {
    right: -3px;
    top: auto;
    bottom: -3px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-links {
    gap: 40px;
    flex-wrap: wrap;
  }

  .cta-form {
    padding: 0 16px;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .features,
  .how-it-works,
  .faq,
  .cta {
    padding: 80px 0;
  }

  .faq-answer p {
    padding-left: 0;
  }

  .faq-coord {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 28px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .cta-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-input-prefix {
    padding: 10px 14px 0;
  }

  .cta-input {
    padding: 6px 14px 10px;
  }
}