/* Voyalog landing. Colours, type and surfaces mirror the app (frontend/src/index.css)
   and the brand book: sand only for "now", coral only for errors, navy on teal buttons. */

@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #0B2545;
  --navy-deep: #081B34;
  --ocean: #13497B;
  --sky: #14508A;
  --teal: #2A9D8F;
  --teal-soft: #9FD2CB;
  --foam: #E9F1F7;
  --sand: #E9C46A;
  --coral: #E76F51;

  /* app tokens (index.css, light) */
  --bg: #F7FAFC;
  --card: #FFFFFF;
  --fg: var(--navy);
  --muted: #56677F;
  --border: #DDE5EE;
  --accent: #E3F2F0;     /* sea glass, icon tiles */
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ocean); text-underline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.025em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }
.ico { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons & signup ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .9375rem; line-height: 1;
  height: 48px; padding: 0 20px;
  border: 0; border-radius: var(--radius);
  background: var(--teal); color: var(--navy-deep);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: #35ac9d; color: var(--navy-deep); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--foam); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-sm { height: 36px; padding: 0 14px; font-size: .875rem; }
.btn-ghost { background: transparent; color: var(--foam); }
.btn-ghost:hover { background: rgba(233, 241, 247, .08); color: var(--foam); }

.signup {
  display: flex; gap: 6px; padding: 6px;
  max-width: 540px;
  background: rgba(233, 241, 247, .08);
  border: 1px solid rgba(233, 241, 247, .16);
  border-radius: calc(var(--radius) + 6px);
  backdrop-filter: blur(8px);
}
.signup input[type=email] {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1rem;
  height: 48px; padding: 0 14px;
  border: 0; border-radius: var(--radius);
  background: transparent; color: var(--foam);
  outline: none;
}
.signup input[type=email]::placeholder { color: rgba(233, 241, 247, .55); }
.signup:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42, 157, 143, .3); }
@media (max-width: 480px) {
  .signup { flex-direction: column; }
  .signup input[type=email] { flex: none; background: rgba(233, 241, 247, .07); }
  .signup .btn { width: 100%; }
}
/* Turnstile box: takes space only while a challenge is actually shown */
.ts { display: flex; justify-content: center; }
.ts.show { margin-top: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: .8125rem; color: rgba(233, 241, 247, .6); margin-top: 14px; }
.fine a { color: rgba(233, 241, 247, .85); }
.msg { margin-top: 14px; font-weight: 500; font-size: .9375rem; color: var(--foam); display: none; align-items: center; gap: 8px; }
.msg.show { display: flex; }
.msg::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.msg.ok::before { background: var(--teal); }
.msg.err::before { background: var(--coral); }
.msg.info::before { background: rgba(233, 241, 247, .55); } /* a step still to do: neither success nor error */

/* ---------- hero (navy, icon gradient) ---------- */
.hero {
  position: relative; overflow: hidden;
  color: var(--foam);
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(42, 157, 143, .22) 0, transparent 70%),
    radial-gradient(50% 60% at 0% 30%, rgba(20, 80, 138, .55) 0, transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding-bottom: 0;
}
.nav { position: relative; z-index: 2; padding: 20px 0; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav img { height: 30px; width: auto; display: block; }
.nav .links { display: flex; gap: 4px; align-items: center; }
@media (max-width: 640px) { .nav .btn-ghost { display: none; } }

.hero-copy { position: relative; z-index: 2; text-align: center; padding-top: 56px; padding-bottom: 24px; display: flex; flex-direction: column; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  font-size: .8125rem; font-weight: 500; color: var(--foam);
  background: rgba(233, 241, 247, .08); border: 1px solid rgba(233, 241, 247, .14);
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.hero h1 {
  margin: 24px 0 20px;
  font-size: clamp(2.5rem, 6.4vw, 4.75rem); line-height: 1.02; letter-spacing: -.035em;
  max-width: 14ch;
}
.hero h1 span { color: var(--teal-soft); }
.hero .lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: rgba(233, 241, 247, .75); max-width: 38em; margin-bottom: 36px; }
.hero .signup { width: 100%; }
.hero .msg { justify-content: center; }

/* animated wake (the app's own motif) */
.wake { position: absolute; left: 0; right: 0; top: 46%; height: 180px; opacity: .16; pointer-events: none; }
.wake svg { width: 200%; height: 100%; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .wake svg { animation: wake-drift 30s linear infinite; }
}
@keyframes wake-drift { to { transform: translateX(-50%); } }

/* ---------- voyage: the mark's track and "now" dot, drawn across the hero ---------- */
.hero { padding-bottom: 0; }
.voyage { position: relative; z-index: 1; margin-top: -8px; }
.voyage svg { display: block; width: 100%; height: clamp(120px, 17vw, 240px); }
.draw { stroke-dasharray: 1800; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .draw { animation: track-draw 3s .3s cubic-bezier(.4, 0, .2, 1) both; }
  .now-dot { animation: dot-in .5s 3.1s ease-out both; }
}
@keyframes track-draw { from { stroke-dashoffset: 1800; } }
@keyframes dot-in { from { opacity: 0; } }

/* ---------- sections ---------- */
section { padding: 120px 0; }
@media (max-width: 720px) { section { padding: 80px 0; } }
.head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.eyebrow { font-size: .8125rem; font-weight: 500; color: var(--teal); letter-spacing: .01em; }
.head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.1; margin: 10px 0 14px; }
.head p { font-size: 1.125rem; color: var(--muted); }

/* icon tile, as on the app's stat cards */
.tile { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--teal); display: grid; place-items: center; flex: none; }
.tile .ico { font-size: 16px; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; transition: border-color .2s ease, box-shadow .2s ease; }
.feature:hover { border-color: #C9D6E3; box-shadow: 0 12px 32px -20px rgba(11, 37, 69, .25); }
.feature .tile { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 20px; }
.feature .tile .ico { font-size: 20px; }
.feature h3 { font-size: 1.1875rem; letter-spacing: -.015em; margin-bottom: 8px; }
.feature p { color: var(--muted); }
@media (max-width: 920px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* audiences */
.audience { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.person .tile { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 18px; }
.person .tile .ico { font-size: 20px; }
.person h3 { font-size: 1.125rem; margin-bottom: 8px; letter-spacing: -.01em; }
.person p { color: var(--muted); font-size: .96875rem; }
@media (max-width: 920px) { .people { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .people { grid-template-columns: 1fr; gap: 28px; } }

/* final CTA */
.final { padding: 120px 0; }
.final .box {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 72px 32px;
  text-align: center; color: var(--foam);
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(42, 157, 143, .25) 0, transparent 70%),
    linear-gradient(160deg, var(--sky) 0%, var(--navy) 60%);
  display: flex; flex-direction: column; align-items: center;
}
.final h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.08; max-width: 16ch; margin-bottom: 14px; position: relative; }
.final p.sub { color: rgba(233, 241, 247, .75); font-size: 1.125rem; margin-bottom: 32px; max-width: 34em; position: relative; }
.final .signup { width: 100%; position: relative; }
.final .wake { top: auto; bottom: 0; height: 120px; }
@media (max-width: 720px) { .final { padding: 80px 0; } }
@media (max-width: 560px) { .final .box { padding: 56px 20px; border-radius: 20px; } }

/* footer */
footer { padding: 0 0 48px; font-size: .8125rem; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
footer .inner { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 28px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--fg); }

/* ---------- legal pages ---------- */
.legal-nav { background: var(--navy); }
.doc { max-width: 720px; padding-top: 56px; padding-bottom: 96px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 8px 0 12px; }
.doc h2 { font-size: 1.25rem; letter-spacing: -.015em; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ol, .doc ul { padding-left: 1.25em; display: grid; gap: 8px; margin: 12px 0 0; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc .updated { font-size: .875rem; }
.doc .label { font-size: .8125rem; font-weight: 500; color: var(--teal); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.qa { background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; font-size: 1.375rem; line-height: 1; color: var(--teal); transition: transform .2s ease; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 14px; }
.qa h3 { font-size: 1.0625rem; letter-spacing: -.01em; }
.qa p { color: var(--muted); padding: 0 24px 22px; }
#pytania { padding-bottom: 0; }
