/* Teal to indigo with an amber accent */
:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #0b1220;
  --text-muted: #5a6478;
  --border: rgba(15, 23, 42, 0.09);
  --accent: #0d9488;
  --accent-2: #6366f1;
  --accent-3: #f59e0b;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --gradient-from: #0d9488;
  --gradient-to: #6366f1;
  --on-accent: #ffffff;
  --glow-1: rgba(20, 184, 166, 0.35);
  --glow-2: rgba(99, 102, 241, 0.28);
  --glow-3: rgba(245, 158, 11, 0.22);
  --wave: rgba(13, 148, 136, 0.16);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 40px -16px rgba(15, 23, 42, 0.2);
  --icon-sun: none;
  --icon-moon: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #060a13;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-solid: #0e1524;
    --text: #e8ecf4;
    --text-muted: #8b96ab;
    --border: rgba(255, 255, 255, 0.09);
    --accent: #2dd4bf;
    --accent-2: #818cf8;
    --accent-3: #fbbf24;
    --accent-soft: rgba(45, 212, 191, 0.12);
    --gradient-from: #2dd4bf;
    --gradient-to: #818cf8;
    --on-accent: #04201c;
    --glow-1: rgba(45, 212, 191, 0.22);
    --glow-2: rgba(129, 140, 248, 0.22);
    --glow-3: rgba(251, 191, 36, 0.12);
    --wave: rgba(45, 212, 191, 0.14);
    --shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.7);
    --icon-sun: block;
    --icon-moon: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060a13;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-solid: #0e1524;
  --text: #e8ecf4;
  --text-muted: #8b96ab;
  --border: rgba(255, 255, 255, 0.09);
  --accent: #2dd4bf;
  --accent-2: #818cf8;
  --accent-3: #fbbf24;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --gradient-from: #2dd4bf;
  --gradient-to: #818cf8;
  --on-accent: #04201c;
  --glow-1: rgba(45, 212, 191, 0.22);
  --glow-2: rgba(129, 140, 248, 0.22);
  --glow-3: rgba(251, 191, 36, 0.12);
  --wave: rgba(45, 212, 191, 0.14);
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --icon-sun: block;
  --icon-moon: none;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

h1, h2 {
  font-family: "Inter Tight", "Inter", system-ui, sans-serif;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.5rem, 7.5vw, 4.6rem); font-weight: 800; }
/* The heading keeps its tallest headline's height (main.js); a shorter one sits in the middle of it. */
[data-headline] { display: flex; align-items: center; justify-content: center; transition: opacity 0.6s ease, transform 0.6s ease; }
[data-headline].is-fading { opacity: 0; transform: translateY(0.15em); }
h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 700; letter-spacing: -0.025em; }
p { margin: 0; }
a { color: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Section headings wear the brand's gradient; they shrink to their words, so it spans the words. */
.about-section h2, .about-cta h2, .link-card h1, .gradient-heading {
  width: fit-content;
  background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-text {
  background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.85em 1.6em; border: 0; border-radius: 999px;
  background: linear-gradient(120deg, var(--gradient-from), var(--gradient-to));
  color: var(--on-accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 24px -8px var(--glow-1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px var(--glow-1); }
.button:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* Header: transparent at the top, a compact frosted pill once the page scrolls */
.site-header { position: fixed; inset: 0 0 auto; z-index: 20; padding: 14px 16px; }
.header-bar {
  display: flex; align-items: center; gap: 12px; height: 60px; max-width: 1148px; margin: 0 auto;
  padding: 0 8px 0 10px; border: 1px solid transparent; border-radius: 999px;
  transition: max-width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled .header-bar {
  max-width: 820px;
  background: var(--surface); border-color: var(--border); box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
}

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; }
.brand img { border-radius: 10px; box-shadow: 0 6px 16px -6px var(--glow-1); transition: transform 0.3s; }
.brand:hover img { transform: rotate(-8deg) scale(1.05); }
.wordmark { font-family: "Inter Tight", sans-serif; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; }
.wordmark b { font-weight: 800; background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to) 60%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.beta-badge {
  padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--accent-3) 45%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--accent-3) 14%, transparent); color: var(--text);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
}
@media (max-width: 560px) { .beta-badge { display: none; } }
@media (max-width: 560px) { .wordmark { display: none; } }

.nav-link {
  padding: 8px 14px; border-radius: 999px; font-size: 0.92rem; font-weight: 500; white-space: nowrap;
  color: var(--text-muted); text-decoration: none; transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

.control-group {
  display: flex; align-items: center; height: 42px; padding: 0 3px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.control-divider { width: 1px; height: 20px; background: var(--border); }
.control-group button {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px;
  border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; cursor: pointer;
  transition: background-color 0.2s;
}
.control-group button:hover { background: var(--accent-soft); }
.control-group svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.language-menu { position: relative; }
.language-button { padding: 0 8px 0 10px; font-size: 0.82rem !important; font-weight: 700 !important; letter-spacing: 0.05em; }
.language-button svg { width: 17px; height: 17px; }
.language-button .chevron { width: 14px; height: 14px; transition: transform 0.2s; }
.language-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.language-list {
  position: absolute; top: calc(100% + 12px); right: -4px; min-width: 190px; margin: 0; padding: 6px;
  list-style: none; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: pop 0.18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.flag {
  display: inline-flex; flex: none; width: 20px; height: 14px; border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}
.control-group .flag svg { display: block; width: 100%; height: 100%; stroke: none; }
.language-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 12px; font-size: 0.92rem; cursor: pointer;
}
.language-list li:hover, .language-list li:focus { background: var(--accent-soft); outline: none; }
.language-list li[aria-selected="true"] { font-weight: 600; }
.language-list li[aria-selected="true"]::after { content: "✓"; margin-left: auto; color: var(--accent); font-weight: 700; }

.theme-toggle { width: 34px; }
.theme-toggle svg { width: 18px; height: 18px; transition: transform 0.4s; }
.theme-toggle:hover svg { transform: rotate(-20deg); }
.theme-toggle .icon-moon { display: var(--icon-moon); }
.theme-toggle .icon-sun { display: var(--icon-sun); }

.nav-cta { height: 42px; padding: 0 18px; font-size: 0.9rem; }
@media (max-width: 680px) { .nav-cta { display: none; } }
/* One row on the narrowest phones, whatever the language calls the About page. */
@media (max-width: 400px) { .nav-link { padding: 8px 8px; font-size: 0.85rem; } }

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh; display: grid; place-items: center; padding: 120px 0 140px;
}
.aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora span { position: absolute; width: 560px; height: 560px; border-radius: 50%; filter: blur(90px); animation: drift 18s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { background: var(--glow-1); top: -160px; left: -120px; }
.aurora span:nth-child(2) { background: var(--glow-2); top: 10%; right: -160px; animation-delay: -6s; }
.aurora span:nth-child(3) { background: var(--glow-3); bottom: -200px; left: 30%; animation-delay: -12s; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }

.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 760px; text-align: center; }

.hero-icon {
  width: clamp(104px, 22vw, 132px); height: auto; border-radius: 30px;
  box-shadow: 0 24px 50px -18px var(--glow-1), 0 0 0 1px var(--border);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px) rotate(2deg); } }

.eyebrow {
  display: inline-flex; width: fit-content; align-items: center; gap: 10px; padding: 0.4em 1em; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(12px);
  font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-out infinite; }
@keyframes pulse { to { transform: scale(3); opacity: 0; } }

.lead { max-width: 34em; font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--text-muted); }

/* Sign-up form */
.waitlist-form {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; max-width: 500px; margin-top: 8px;
  padding: 6px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow);
  scroll-margin-top: 140px;
}
.waitlist-form input {
  flex: 1 1 200px; min-width: 0; padding: 0.7em 1.1em; border: 0; border-radius: 999px;
  background: transparent; color: var(--text); font: inherit;
}
.waitlist-form input:focus { outline: none; }
.waitlist-form:focus-within { border-color: var(--accent); }
@media (max-width: 480px) {
  .waitlist-form { border-radius: 24px; }
  .waitlist-form .button { flex: 1 1 100%; }
}
.turnstile-box:empty { display: none; }
.turnstile-box { display: flex; justify-content: center; margin-top: 0.75rem; }
.form-status { min-height: 1.6em; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--accent-3); }
.form-status.is-success { color: var(--accent); }
.form-note { font-size: 0.85rem; color: var(--text-muted); }

/* Photos from the trips behind the start page's hero, crossfading under a dark film. */
.hero-slides { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #0b1220; }
.slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.8s ease;
}
.slide.is-active { opacity: 1; }
/* The leaving photo keeps its drift while it fades; dropping it snaps the photo back to full size. */
.slide.is-active, .slide.is-leaving { animation: drift-in 10s ease-out forwards; }
@keyframes drift-in { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-slides::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(4, 8, 16, 0.6), rgba(4, 8, 16, 0.42) 45%, rgba(4, 8, 16, 0.55) 78%, var(--bg));
}

/* On the photos, the hero's text is light whatever the theme, and the gradient takes its bright form. */
.hero.has-photos h1 { color: #ffffff; text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35); }
.hero.has-photos .gradient-text { background-image: linear-gradient(90deg, #2dd4bf, #818cf8 60%, #fbbf24); text-shadow: none; }
.hero.has-photos .lead, .hero.has-photos .form-note { color: rgba(255, 255, 255, 0.88); }
.hero.has-photos .eyebrow { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.28); color: #ffffff; }
.hero.has-photos .form-status.is-success { color: #5eead4; }
.hero.has-photos .form-status.is-error { color: #fda4af; }
.hero.has-photos .hero-icon { box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2); }

/* The header is see-through until the page scrolls, so on the photos it is light too. */
body[data-hero="photos"] .site-header:not(.is-scrolled) .wordmark { color: #ffffff; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.45)); }
body[data-hero="photos"] .site-header:not(.is-scrolled) .wordmark b { background-image: linear-gradient(90deg, #2dd4bf, #818cf8 60%, #fbbf24); }
body[data-hero="photos"] .site-header:not(.is-scrolled) .nav-link { color: rgba(255, 255, 255, 0.86); }
body[data-hero="photos"] .site-header:not(.is-scrolled) .nav-link:hover { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
body[data-hero="photos"] .site-header:not(.is-scrolled) .beta-badge { color: #ffffff; }
body[data-hero="photos"] .site-header:not(.is-scrolled) .control-group { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.28); }
body[data-hero="photos"] .site-header:not(.is-scrolled) .control-group button { color: #ffffff; }

.waves { position: absolute; left: 0; bottom: 0; z-index: -1; width: 100%; height: 120px; }
.waves path { fill: none; stroke: var(--wave); stroke-width: 3; }

/* About page: one centred column */
.about { position: relative; isolation: isolate; overflow: hidden; padding: 130px 0 96px; }
.about-inner { display: flex; flex-direction: column; align-items: center; gap: 64px; max-width: 820px; text-align: center; }
.about-head { display: flex; flex-direction: column; align-items: center; gap: 18px; }
/* The tight heading letter-spacing pulls words together too; this gives them their room back. */
.about-head h1, .about-section h2, .about-cta h2 { word-spacing: 0.18em; }
.about-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.about-head .lead { max-width: 36em; }
.about-icon {
  width: clamp(88px, 18vw, 104px); height: auto; border-radius: 26px;
  box-shadow: 0 24px 50px -18px var(--glow-1), 0 0 0 1px var(--border);
  animation: float 6s ease-in-out infinite;
}
.about-section { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
.about-section h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.about-note { max-width: 60ch; color: var(--text-muted); font-size: 1.02rem; }

.feature-grid {
  display: grid; gap: 14px; width: 100%; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.feature-card {
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 22px;
  border-radius: 22px; background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-weight: 500; line-height: 1.45; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.feature-icon {
  width: 52px; height: 52px; padding: 12px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 14%, transparent));
  fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.about-quote {
  position: relative; max-width: 640px; margin: 22px 0 0; padding: 40px clamp(24px, 5vw, 48px) 36px;
  border-radius: 26px; background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: "Inter Tight", "Inter", system-ui, sans-serif; font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 600; letter-spacing: -0.015em; line-height: 1.45;
}
.about-quote::before {
  content: "\201C"; position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  font-size: 4.5rem; line-height: 1; font-family: Georgia, serif;
  background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.flag-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.flag-row .flag { width: 34px; height: 24px; border-radius: 5px; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.flag-row .flag svg { display: block; width: 100%; height: 100%; }

.about-cta {
  display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%;
  padding: clamp(36px, 7vw, 56px) 24px; border-radius: 30px; border: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 20% 0%, var(--glow-1), transparent 60%),
    radial-gradient(ellipse at 80% 100%, var(--glow-2), transparent 60%),
    var(--surface);
}
.about-cta h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }

/* The honeypot: out of sight and out of the tab order, so only a bot fills it in. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* Confirm and unsubscribe pages */
.link-page { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: 80svh; padding: 140px 0 80px; }
.link-card {
  display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 560px; margin: 0 auto;
  padding: clamp(32px, 6vw, 56px) 24px; border-radius: 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.link-card [data-show] { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.link-card [data-show][hidden] { display: none; }
.link-card h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.link-icon { border-radius: 22px; box-shadow: 0 18px 40px -16px var(--glow-1); }
.link-card[data-state="working"] .link-icon { animation: float 2.4s ease-in-out infinite; }
.small-link { font-size: 0.9rem; color: var(--text-muted); text-underline-offset: 3px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--text-muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 32px; }
.site-footer a { color: var(--text); text-underline-offset: 3px; }
.disclaimer { max-width: 36em; font-size: 0.8rem; opacity: 0.85; }

/* Hide the English text until a saved or detected language has been applied */
.i18n-pending body { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .slide.is-active, .slide.is-leaving { animation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* The privacy page: running text, so left-aligned and narrower than the About page */
.policy-inner { gap: 40px; }
.policy-date { color: var(--text-muted); font-size: 0.9rem; }
.policy { display: flex; flex-direction: column; gap: 14px; max-width: 65ch; text-align: left; }
.policy h2 { margin: 18px 0 0; font-size: 1.25rem; }
.policy p, .policy ul { margin: 0; color: var(--text-muted); line-height: 1.65; }
.policy ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.policy strong { color: var(--text); }
.policy a { color: var(--accent); }
/* The page holds every language; the one <html lang> names is shown (set before first paint). */
.policy-lang { display: none; }
html[lang="en"] .policy-lang[lang="en"], html[lang="sv"] .policy-lang[lang="sv"], html[lang="nb"] .policy-lang[lang="nb"],
html[lang="da"] .policy-lang[lang="da"], html[lang="fi"] .policy-lang[lang="fi"], html[lang="is"] .policy-lang[lang="is"],
html[lang="fr"] .policy-lang[lang="fr"], html[lang="es"] .policy-lang[lang="es"] { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.form-note a { color: inherit; }
