/* Prepare Flights — marketing site styles
   Vanilla CSS, mobile-first. Brand palette matches the app (#2980b9). */

:root {
  --color-brand: #2980b9;
  --color-brand-dark: #1f6391;
  --color-brand-light: #e8f1f8;
  --color-accent: #27ae60;
  --color-accent-dark: #1f8a4c;
  --color-warn: #e67e22;
  --color-danger: #c0392b;
  --color-text: #1c2632;
  --color-text-muted: #5b6878;
  --color-border: #e3e8ee;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fb;
  --color-bg-dark: #0f1822;

  --shadow-sm: 0 1px 2px rgba(15, 24, 34, 0.06), 0 1px 3px rgba(15, 24, 34, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 24, 34, 0.08), 0 2px 4px rgba(15, 24, 34, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 24, 34, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --max-width: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e8eef5;
    --color-text-muted: #94a3b5;
    --color-border: #1f2c3a;
    --color-bg: #0f1822;
    --color-bg-alt: #16212e;
    --color-brand-light: #15293a;
  }
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; color: var(--color-text); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-top: 1.2em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
code { font-family: "SF Mono", Menlo, Consolas, monospace; background: var(--color-bg-alt); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.9em; }

/* Skip link for accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-brand); color: #fff; padding: 0.75rem 1rem;
  z-index: 1000; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ----- Layout ----- */
.container { max-width: var(--max-width); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--alt { background: var(--color-bg-alt); }
.section--brand { background: var(--color-brand); color: #fff; }
.section--brand h2, .section--brand h3 { color: #fff; }
.section__intro { max-width: 720px; margin-bottom: 2.5rem; }
.section__intro p { color: var(--color-text-muted); font-size: 1.1rem; }
.section--brand .section__intro p { color: rgba(255,255,255,0.85); }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(15, 24, 34, 0.92); }
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.site-header__logo {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 700; font-size: 1.05rem; color: var(--color-text);
  text-decoration: none; flex-shrink: 0;
}
.site-header__logo:hover { text-decoration: none; }
.site-header__logo img, .site-header__logo svg { width: 32px; height: 32px; }
.site-nav { margin-left: auto; }
.site-nav__toggle {
  display: none; background: none; border: 1px solid var(--color-border);
  padding: 0.4rem 0.6rem; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--color-text); font-size: 1.3rem; line-height: 1;
}
.site-nav__list { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0; align-items: center; }
.site-nav__list a {
  display: inline-block; padding: 0.55rem 0.85rem;
  color: var(--color-text); font-weight: 500; border-radius: var(--radius-sm);
  font-size: 0.97rem;
}
.site-nav__list a:hover { background: var(--color-bg-alt); text-decoration: none; }
.site-nav__list a[aria-current="page"] { color: var(--color-brand); font-weight: 600; }
.lang-switcher {
  display: inline-flex; gap: 2px; margin-left: 0.5rem; padding: 3px;
  background: var(--color-bg-alt); border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.lang-switcher a { padding: 0.3rem 0.6rem; border-radius: 4px; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; }
.lang-switcher a[aria-current="true"] { background: var(--color-brand); color: #fff; }
.lang-switcher a:hover { text-decoration: none; }

@media (max-width: 760px) {
  .site-nav__toggle { display: block; }
  .site-nav__list {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: 0.5rem var(--gutter) 1rem; box-shadow: var(--shadow-md);
  }
  .site-nav.is-open .site-nav__list { display: flex; }
  .site-nav__list a { padding: 0.85rem 0.5rem; border-radius: 0; border-bottom: 1px solid var(--color-border); }
  .site-nav__list li:last-child a { border-bottom: none; }
  .lang-switcher { margin: 0.5rem 0 0; align-self: flex-start; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 0.45em;
  padding: 0.85rem 1.4rem; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-md); }
.btn--secondary { background: transparent; color: var(--color-brand); border-color: var(--color-brand); }
.btn--secondary:hover { background: var(--color-brand-light); }
.btn--on-brand { background: #fff; color: var(--color-brand); }
.btn--on-brand:hover { background: rgba(255,255,255,0.92); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,0.6); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.05rem; }

/* ----- Hero ----- */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(180deg, var(--color-brand-light) 0%, var(--color-bg) 100%);
  overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.05fr 1fr; gap: 3rem; }
}
.hero__eyebrow {
  display: inline-block; font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-brand); margin-bottom: 1rem;
  background: var(--color-bg); padding: 0.3rem 0.7rem;
  border-radius: 999px; box-shadow: var(--shadow-sm);
}
.hero h1 { margin-bottom: 0.6rem; }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--color-text-muted); margin-bottom: 1.8rem; max-width: 38em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.hero__note { margin-top: 1rem; color: var(--color-text-muted); font-size: 0.92rem; }
.hero__image {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  transform: rotate(-1.2deg);
}
.hero__image img { display: block; width: 100%; height: auto; }

/* ----- Feature cards (etusivu) ----- */
.cards { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.section--alt .card { background: var(--color-bg); }
.card:hover { border-color: var(--color-brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--color-brand-light); color: var(--color-brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--color-text-muted); margin: 0; font-size: 0.97rem; }

/* ----- Feature row (ominaisuudet-sivu) ----- */
.feature-row {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  padding: 2rem 0; border-bottom: 1px solid var(--color-border);
}
.feature-row:last-child { border-bottom: none; }
@media (min-width: 800px) {
  .feature-row { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
  .feature-row--reverse .feature-row__media { order: 2; }
}
.feature-row h2 { font-size: 1.6rem; margin-top: 0; }
.feature-row__media {
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-md); border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}
.feature-row__list { color: var(--color-text-muted); }
.feature-row__list li { margin-bottom: 0.5em; }

/* ----- Steps (aloitusopas) ----- */
.steps { display: grid; gap: 1.5rem; counter-reset: step; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem;
  padding: 1.25rem 1.5rem; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); background: var(--color-bg);
}
.step__num {
  counter-increment: step;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem; flex-shrink: 0;
}
.step__num::before { content: counter(step); }
.step h3 { margin: 0 0 0.4rem; }
.step p { margin: 0; color: var(--color-text-muted); }
.step p + p { margin-top: 0.5em; }

/* ----- FAQ ----- */
.faq { max-width: 760px; }
.faq details {
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 0.4rem 1.25rem;
  margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 0.85rem 0;
  list-style: none; position: relative; padding-right: 2rem;
}
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%); font-size: 1.4rem; color: var(--color-brand);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--color-text-muted); margin-top: 0.2rem; }

/* ----- CTA banner ----- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
  color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255, 255, 255, 0.9); max-width: 600px; margin: 0 auto 1.5rem; font-size: 1.1rem; }
.cta-banner__ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

/* ----- Notice / disclaimer boxes ----- */
.notice {
  border-left: 4px solid var(--color-warn);
  background: var(--color-bg-alt);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}
.notice strong { color: var(--color-warn); }
.notice--danger { border-left-color: var(--color-danger); }
.notice--danger strong { color: var(--color-danger); }

/* ----- Data source / list grid ----- */
.source-list {
  display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  list-style: none; padding: 0;
}
.source-list li {
  background: var(--color-bg-alt); padding: 0.7rem 1rem;
  border-radius: var(--radius-sm); font-size: 0.95rem;
  border: 1px solid var(--color-border);
}

/* ----- Footer ----- */
.site-footer {
  background: var(--color-bg-dark); color: #c9d4e0;
  padding: 3rem 0 1.5rem; margin-top: 0;
  font-size: 0.95rem;
}
.site-footer a { color: #c9d4e0; }
.site-footer a:hover { color: #fff; }
.site-footer__grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr; margin-bottom: 2rem;
}
@media (min-width: 700px) {
  .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.site-footer h4 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4em; }
.site-footer__about { max-width: 320px; color: #94a3b5; }
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; color: #6b7d92; font-size: 0.85rem;
}
.site-footer__brand-mark {
  display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.8rem;
  font-weight: 700; color: #fff; font-size: 1.05rem;
}
.site-footer__brand-mark img, .site-footer__brand-mark svg { width: 28px; height: 28px; }

/* Tally embed */
.tally-embed { width: 100%; min-height: 540px; border: 0; border-radius: var(--radius-md); }

/* Utility */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
