/* NomadTwin website. Brand color matches the app theme (#004D45, src/config/app.json). */
:root {
  --brand: #004d45;
  --brand-soft: #e3efed;
  --bg: #ffffff;
  --surface: #f5f8f7;
  --text: #13201e;
  --muted: #55625f;
  --border: #dde6e4;
  --link: #00695f;
  --todo: #fff3bf;
  /* One content width for the whole site: header, pages, footer. */
  --max-width: 1080px;
  --text-width: 760px;
  color-scheme: light dark;
}
/* Dark theme: follows the system unless the visitor picked a theme with the header switch
   (saved as data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4fb3a6;
    --brand-soft: #12302c;
    --bg: #0e1413;
    --surface: #151d1c;
    --text: #e8efed;
    --muted: #9fb0ad;
    --border: #25302e;
    --link: #6cc9bc;
    --todo: #4a3f10;
  }
}
:root[data-theme="dark"] {
  --brand: #4fb3a6;
  --brand-soft: #12302c;
  --bg: #0e1413;
  --surface: #151d1c;
  --text: #e8efed;
  --muted: #9fb0ad;
  --border: #25302e;
  --link: #6cc9bc;
  --todo: #4a3f10;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* Noto Color Emoji: flag emojis render on Windows too (it has no flag glyphs). */
  font-family: "Urbanist", "Noto Color Emoji", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--link); }
img { max-width: 100%; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }

/* Legal / content pages */
.doc { padding: 40px 20px 0; }
.doc > * { max-width: var(--text-width); }
.doc h1 { font-size: 36px; line-height: 1.2; margin: 0 0 8px; }
.doc .meta { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 40px 0 8px; }
.doc h3 { font-size: 18px; margin: 24px 0 4px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.callout { background: var(--brand-soft); border-radius: 14px; padding: 16px 18px; margin: 20px 0; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.toc ol { margin: 0; padding-left: 20px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); padding: 8px 10px 8px 0; }
th { color: var(--muted); font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* Placeholders still to be filled in before publishing (see web/README.md). */
mark.todo { background: var(--todo); color: inherit; padding: 0 3px; border-radius: 4px; }

/* Landing */
/* Hero fills exactly the first screen below the header (64px + 1px border), content centered. On very tall
   (huge / landscape) monitors it stops at --hero-max so it doesn't turn into a wall of space;
   on very short screens it grows to fit its content instead. */
.hero { --hero-max: 1100px; display: flex; align-items: center; min-height: min(calc(100svh - 65px), var(--hero-max)); padding: 48px 0; text-align: center; background: radial-gradient(120% 90% at 50% 0%, var(--brand-soft) 0%, var(--bg) 70%); }
.hero-inner { position: relative; width: 100%; }
.floaters span { position: absolute; font-size: 26px; opacity: 0.55; animation: float 7s ease-in-out infinite; }
.floaters span:nth-child(2n) { animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .floaters span { animation: none; } }
@media (max-width: 640px) { .floaters { display: none; } }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px; padding: 8px 16px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--muted); max-width: 100%; }
.dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
.hero h1 { font-size: clamp(40px, 8vw, 76px); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 18px; font-weight: 800; }
.hero h1 em { color: var(--brand); font-style: italic; }
.hero .lead { font-size: clamp(17px, 2.4vw, 21px); color: var(--muted); max-width: 560px; margin: 0 auto 32px; }
.badges { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-weight: 700; font-size: 16px; text-decoration: none; }
.badge svg { width: 20px; height: 20px; fill: currentColor; }
.badge small { font-weight: 600; opacity: 0.7; }
.badge.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 30px -10px var(--brand); }
.badge.light { background: #fff; border-color: #fff; color: #004d45; }
.badge.ghost { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.badge.soon { cursor: default; }

.section-title { text-align: center; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.02em; margin: 64px 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 20px; max-width: 520px; }
.band { background: var(--surface); border-block: 1px solid var(--border); padding: 8px 0 40px; }
.band .section-title { margin-top: 40px; }

.scroller { position: relative; margin: 0 -20px; }
.track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; padding: 6px 20px 14px; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; flex: none; }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 18px; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.arrow.prev { left: 4px; }
.arrow.next { right: 4px; }
@media (hover: none) { .arrow { display: none; } }

.trip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.trip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.trip .flag { font-size: 28px; }
.trip div { display: flex; flex-direction: column; line-height: 1.3; }
.trip div span { color: var(--muted); font-size: 14px; }
.tag { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700; white-space: nowrap; }

.activity { width: 220px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.activity .emoji { font-size: 34px; }
.activity h3 { font-size: 17px; margin: 10px 0 4px; }
.activity p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.activity .when { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700; }

.steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li { padding: 22px; border-radius: 18px; border: 1px solid var(--border); }
.steps .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.steps h3 { margin: 12px 0 4px; font-size: 19px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-top: 48px; padding-bottom: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.card .emoji { font-size: 30px; }
.card h3 { margin: 8px 0 4px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.cta { position: relative; overflow: hidden; margin-top: 72px; padding: 72px 0; text-align: center; color: #fff; background: linear-gradient(135deg, #004d45, #00796b); }
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.cta::before { width: 420px; height: 420px; top: -180px; right: -120px; }
.cta::after { width: 300px; height: 300px; bottom: -150px; left: -80px; }
.cta h2 { position: relative; font-size: clamp(26px, 4.5vw, 36px); line-height: 1.15; margin: 0 0 10px; }
.cta p { position: relative; margin: 0 0 24px; opacity: 0.85; }
.cta .badges { position: relative; }

/* Header button + footer columns */
.header-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--brand); color: #fff !important; font-weight: 700; text-decoration: none; }
.nav { align-items: center; }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid .about { grid-column: 1 / -1; } }
.footer-grid h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid .brand { margin-bottom: 8px; }
.copyright { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; font-size: 14px; }
.header-cta { white-space: nowrap; }
.brand { white-space: nowrap; }
@media (max-width: 420px) { .site-header .brand span { display: none; } }
.arrow[hidden] { display: none; }
.landing + .site-footer { margin-top: 0; border-top: 0; }

/* Google Play links: shown as "coming soon" and not clickable until data-live="true". */
.play[data-live="false"] { pointer-events: none; cursor: default; }
.play[data-live="false"] .when-live, .play[data-live="true"] .when-soon { display: none; }

/* Theme switch (header) */
.theme-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; }
.theme-toggle:hover { background: var(--surface); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
/* Show the icon of the theme you'd switch to: moon in light mode, sun in dark mode. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .moon { display: none; } }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
