/* Landing page. Same brand tokens as the app (frontend/src/index.css). */

/* Outfit, for the brand name. Self-hosted (no request to Google); SIL Open Font License,
   see Outfit-OFL.txt next to the font file. Variable font: one file for all weights. */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/outfit-latin-wght.woff2') format('woff2-variations');
}

:root {
  --brand: #0b3b5c;
  --brand-deep: #082c45;
  --brand-accent: #7cc4e8;
  --brand-font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --bg: #f5f7f9;
  --surface: #ffffff;
  --text: #1c2630;
  --muted: #5f6b77;
  --border: #d8dee4;
  --link: #0b3b5c;
  --chip-bg: #e3edf4;
  --chip-text: #0b3b5c;
  --chip-class-bg: #e6f0e9;
  --chip-class-text: #1d5a35;
  --icon-bg: #e3edf4;
  --shadow: rgb(11 59 92 / 0.18);
  --radius: 10px;

  color-scheme: light;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

:root[data-theme='dark'] {
  --bg: #0a1520;
  --surface: #112130;
  --text: #e2e9ef;
  --muted: #95a6b5;
  --border: #253a4d;
  --link: var(--brand-accent);
  --chip-bg: #15344b;
  --chip-text: #a9d8f1;
  --chip-class-bg: #173a2b;
  --chip-class-text: #93d8ab;
  --icon-bg: #15344b;
  --shadow: rgb(0 0 0 / 0.5);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
}

a {
  color: var(--link);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.1rem;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container.narrow {
  max-width: 760px;
}

section {
  padding: 5rem 0;
}

a:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}

.button-primary {
  background: var(--brand-accent);
  color: var(--brand-deep);
}

.button-primary:hover {
  background: #a3d6f0;
}

.button-ghost {
  border-color: rgb(255 255 255 / 0.4);
  color: #fff;
}

.button-ghost:hover {
  background: rgb(255 255 255 / 0.1);
}

.button-light {
  background: #fff;
  color: var(--brand);
}

.button-light:hover {
  background: #e6f0f6;
}

.button-outline-light {
  border-color: rgb(255 255 255 / 0.5);
  color: #fff;
}

.button-outline-light:hover {
  background: rgb(255 255 255 / 0.1);
}

/* Header: the same sizes as the app's topbar (frontend/src/index.css, 15px base),
   written in px because this page uses a 16px base. */
[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 22.5px;
  min-height: 56px;
  padding: 11.25px 22.5px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7.5px;
  color: #fff;
  font-family: var(--brand-font);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

/* The favicon's square matches the header colour, so only the ship shows. */
.brand img {
  width: 38px;
  height: 38px;
  margin: -6px -4px -6px -6px;
  flex: none;
}

.header-nav {
  display: flex;
  gap: 3.75px;
}

/* Like the app's nav links: a soft block on hover instead of an underline. */
.header-nav a {
  padding: 5.25px 9.75px;
  border-radius: 6px;
  color: rgb(255 255 255 / 0.8);
  text-decoration: none;
  white-space: nowrap;
}

.header-nav a:hover {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Theme and language buttons sit together as one pair, as in the app. */
.header-actions .icon-button {
  margin-right: -7.5px;
}

.icon-button,
.language-menu-button {
  display: flex;
  align-items: center;
  padding: 5.25px 6.75px;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.icon-button:hover,
.language-menu-button:hover,
.language-menu-button[aria-expanded='true'] {
  background: rgb(255 255 255 / 0.12);
}

.icon-button:focus-visible,
.language-menu-button:focus-visible,
.header-sign-in:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.flag {
  width: 24px;
  height: 16px;
  flex: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.15);
}

.language-menu {
  position: relative;
}

.language-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  min-width: 170px;
  padding: 4.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 20px var(--shadow);
}

.language-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6.75px 9px;
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
}

.language-menu-item:hover,
.language-menu-item:focus-visible {
  background: var(--bg);
  outline: none;
}

.language-menu-item[aria-checked='true'] {
  font-weight: 600;
}

/* Same size as the app's Log out button; filled, since it is the main action here. */
.header-sign-in {
  padding: 4.5px 11.25px;
  border: 1px solid #fff;
  border-radius: 6px;
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-sign-in:hover {
  background: #e6f0f6;
}

/* Takes the place of the sign-in buttons while the site is under construction
   (Site:UnderConstruction). Not a link, so it must not look clickable. Every spot
   it appears in (header, hero, contact band) has a dark brand background. */
.coming-soon,
.coming-soon:hover {
  border: 1px dashed rgb(255 255 255 / 0.6);
  background: transparent;
  color: #fff;
  cursor: default;
}

/* Hero */
.hero {
  padding: 4.5rem 0 5.5rem;
  background:
    radial-gradient(1000px 500px at 85% 10%, rgb(124 196 232 / 0.22), transparent 60%),
    linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 3.5rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--brand-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  margin: 1.25rem 0 2rem;
  max-width: 34rem;
  color: rgb(255 255 255 / 0.82);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero illustration of the search screen */
.mock {
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.35);
  overflow: hidden;
  font-size: 0.9rem;
  transform: perspective(1400px) rotateY(-6deg);
}

.mock-bar {
  display: flex;
  gap: 6px;
  padding: 0.7rem 0.9rem;
  background: var(--brand);
}

.mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.3);
}

.mock-body {
  padding: 1.25rem;
}

.mock-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.mock-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0;
}

.mock-chip {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.8rem;
  white-space: nowrap;
}

.mock-chip.class {
  background: var(--chip-class-bg);
  color: var(--chip-class-text);
}

.mock-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

.mock-export {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.mock-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.mock-rows li {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0.8rem;
}

.mock-rows li + li {
  border-top: 1px solid var(--border);
}

.mock-rows span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-rows .mock-class {
  justify-self: start;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--chip-class-bg);
  color: var(--chip-class-text);
}

.mock-rows em {
  font-style: normal;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Problem */
.problem {
  background: var(--surface);
  text-align: center;
}

.problem-list {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.problem-list li {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.problem-list li::before {
  content: '';
  position: absolute;
  left: 1.1rem;
  top: 1.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 2px solid var(--muted);
}

.problem-answer {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  text-wrap: balance;
}

/* Features */
.section-heading {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-heading p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.feature {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: var(--icon-bg);
  color: var(--chip-text);
}

.feature p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

/* Steps */
.steps {
  background: var(--surface);
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  counter-increment: step;
  padding: 1.5rem;
  border-top: 3px solid var(--brand-accent);
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.step p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

/* Sector */
.sector {
  text-align: center;
}

.sector p {
  margin: 1rem auto 1.75rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.1rem;
  text-wrap: balance;
}

.moments {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.moments li {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

/* Call to action */
.cta {
  padding: 4rem 0;
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
}

.cta p {
  margin: 0.5rem 0 0;
  color: rgb(255 255 255 / 0.8);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand img {
  border-radius: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

/* Narrow screens */
@media (max-width: 900px) {
  section {
    padding: 3.5rem 0;
  }

  .header-nav {
    display: none;
  }

  .site-header {
    gap: 7.5px 15px;
    padding: 9px 15px;
  }

  .hero {
    padding: 3rem 0 3.5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .mock {
    transform: none;
  }

  .step-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 1rem;
  }

  .header-actions {
    gap: 12px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .mock-rows li {
    grid-template-columns: 1fr auto;
  }

  .mock-rows span {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
