/* Genora — landing page. Palette: ink + amber (amber means "approved" and "act"). */

:root {
  --bg: #0E1230;          /* page background, navy-black from the ink */
  --ink: #13183A;         /* logo, text on light, dark tiles */
  --amber: #E8B65A;       /* approval, buttons, highlights */
  --amber-ink: #8C5A00;   /* amber as text on light backgrounds */
  --cream: #F5EEE3;       /* light band */
  --text: #EEF1F4;
  --muted: #A7B1BC;
  --muted-light: #3E4954;
  --line: #2A3152;
  --line-2: #3B4468;
  --rule: #1F2747;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Sora, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo mark */
.mark .ring { fill: none; stroke: currentColor; stroke-width: 14; }
.mark .check { fill: none; stroke: var(--amber); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand svg { flex: none; }
.nav { display: flex; align-items: center; gap: 10px; }

/* Header controls: round glass buttons that open up on hover, focus or tap */
.lang-menu,
.signin {
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease;
}
.lang-menu:hover, .lang-menu:has(:focus-visible), .lang-menu[data-open="true"],
.signin:hover, .signin:focus-visible { background: rgba(255, 255, 255, 0.16); }

.lang-menu svg, .signin svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.globe {
  width: 48px;
  height: 48px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lang-options {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 0;
  padding-left: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
}
/* Opens on mouse hover only. A click never keeps it open; keyboard users (Tab) get it via
   :focus-visible, and touch screens (no hover) via a tap that sets data-open in script.js. */
.lang-menu:hover .lang-options,
.lang-menu:has(:focus-visible) .lang-options,
.lang-menu[data-open="true"] .lang-options { max-width: 100px; padding-left: 4px; opacity: 1; }
/* Just chose a language: fold back to the globe until the pointer or focus leaves */
.lang-menu.chosen .lang-options,
.lang-menu.chosen:hover .lang-options,
.lang-menu.chosen:has(:focus-visible) .lang-options { max-width: 0; padding-left: 0; opacity: 0; }
/* Flags drawn at the globe's own size (20 px circle); the current language is full strength, the other dimmed */
.flag {
  width: 40px;
  height: 48px;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.flag img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  opacity: 0.55;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: opacity 0.2s ease;
}
.flag[data-lang="fr"] img { object-position: 12% 50%; } /* show a fleur-de-lis, not just the cross */
.flag[aria-pressed="true"] img, .flag:hover img, .flag:focus-visible img { opacity: 1; }

.signin {
  min-width: 48px;
  padding: 0 12px;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, padding 0.35s ease;
}
.signin-icon { flex: none; transition: width 0.3s ease, opacity 0.2s ease; }
.signin-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  font-weight: 500;
  font-size: 15px;
  transition: max-width 0.35s ease, opacity 0.25s ease;
}
.signin:hover, .signin:focus-visible { padding: 0 20px; }
.signin:hover .signin-icon, .signin:focus-visible .signin-icon { width: 0; opacity: 0; }
.signin:hover .signin-label, .signin:focus-visible .signin-label { max-width: 200px; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .lang-options, .signin, .signin-icon, .signin-label { transition: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #F0C677; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); font-weight: 500; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* Hero */
.hero {
  padding: 104px 0 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}
.pill {
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}
.hero h1 {
  margin: 0;
  max-width: 960px;
  font-weight: 600;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.accent { color: var(--amber); }
.hero .promise { margin: -8px 0 0; font-size: clamp(19px, 2vw, 24px); font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.lede { margin: 0; max-width: 640px; font-size: 19px; line-height: 1.6; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-top: 6px; }

/* Problem / solution sections */
.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding: 24px 0 120px;
  scroll-margin-top: 24px;
}
.split-text {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.split-art { flex: 1.5 1 520px; min-width: 0; }
.split-art svg { width: 100%; height: auto; display: block; }
.tag {
  padding: 7px 14px;
  background: var(--amber);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.split h2 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.split p { margin: 0; max-width: 440px; font-size: 17px; line-height: 1.6; color: var(--muted); }

.band { background: var(--cream); color: var(--ink); scroll-margin-top: 0; }
.band .split { padding: 112px 24px; }
.band .accent { color: var(--amber-ink); }
.band .split p { color: var(--muted-light); }
.band .split p.quote {
  padding-left: 18px;
  border-left: 3px solid var(--amber);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
}

/* The problem picture: dotted lines crawl */
.crawl { stroke-dasharray: 1 7; stroke-linecap: round; animation: crawl 1.4s linear infinite; }
.crawl-slow { stroke-dasharray: 1 6; stroke-linecap: round; animation: crawl 2.6s linear infinite reverse; }
@keyframes crawl { to { stroke-dashoffset: -16; } }

/* Solution diagram: wide on desktop, tall on phones */
.flow-tall { display: none !important; }

/* Services: four cards (4 across, 2 x 2 on tablets, 1 per row on phones) */
.services {
  padding: 112px 0 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  scroll-margin-top: 24px;
}
.services h2 {
  margin: 0;
  text-align: center;
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.card {
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card svg { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 4px 0 0; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
/* five cards: one row on wide screens, 3 + 2 centred below 1180px, 2 + 2 + 1 full width below 960px */
@media (max-width: 1180px) { .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); } .card { grid-column: span 2; } .card:nth-child(4) { grid-column: 2 / span 2; } }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card, .card:nth-child(4) { grid-column: auto; } .card:last-child { grid-column: 1 / -1; } }

/* Questions: one open at a time is not forced; each answer folds on its own */
.faq { padding: 112px 0 0; display: flex; flex-direction: column; align-items: center; gap: 32px; scroll-margin-top: 24px; }
.faq h2 { margin: 0; text-align: center; font-weight: 600; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; letter-spacing: -0.03em; }
.faq-list { width: 100%; max-width: 820px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--amber); }
.faq-item summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
.faq-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: transform .2s ease; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-item p { margin: 0; padding: 0 4px 24px; max-width: 720px; font-size: 16px; line-height: 1.65; color: var(--muted); }

/* Closing call to action */
.closing {
  padding: 112px 0 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  scroll-margin-top: 24px;
}
.closing h2 {
  margin: 0;
  max-width: 760px;
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.closing p { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--muted); }
.closing .btn { margin-top: 6px; }

/* Footer: the line above it runs the full width of the page */
.foot-band { border-top: 1px solid var(--line); }
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--muted);
}

.foot-disclaimer { order: 3; flex-basis: 100%; margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.foot-right { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.foot-link { color: var(--muted); }
.foot-link:hover { color: var(--text); }

/* Terms page: French and English articles, shown by page language */
.legal-band { position: relative; background: #F7F2EA; color: var(--ink); }
/* faint dot texture behind the title, fading out downwards */
.legal-band::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 380px;
  background-image: radial-gradient(rgba(19, 24, 58, 0.10) 1px, transparent 1.4px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  pointer-events: none;
}
.legal { position: relative; max-width: 1180px; padding-top: 72px; padding-bottom: 112px; }

/* Title and date, centred */
.legal-hero { text-align: center; padding-bottom: 64px; }
.legal-hero h1 { margin: 0 0 14px; font-size: clamp(36px, 5vw, 56px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.legal-meta { margin: 0; color: var(--muted-light); font-size: 15px; }

/* Index on the left, sections on the right */
.legal-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; align-items: start; }
.legal-toc { position: sticky; top: 28px; }
.legal-toc summary {
  list-style: none;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-light);
  pointer-events: none;
}
.legal-toc summary::-webkit-details-marker { display: none; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; }
.legal .legal-toc a {
  display: block;
  padding: 9px 0 9px 18px;
  border-left: 2px solid transparent;
  color: #6A7380;
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.legal .legal-toc a:hover { color: var(--ink); }
.legal .legal-toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--amber-ink); font-weight: 500; }

.legal-intro { padding-left: 37px; margin-bottom: 40px; }
.legal-sec { border-left: 1px solid #DCD2C3; padding: 2px 0 6px 36px; margin-bottom: 44px; scroll-margin-top: 28px; }
.legal-sec h2 { margin: 0 0 18px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.75; color: #3A4450; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal h3 { margin: 22px 0 8px; font-size: 17px; font-weight: 600; }
.legal .legal-note { margin: 26px 0 0; padding: 14px 18px; border: 1px solid #DCD2C3; border-radius: 12px; background: #FFFDF9; font-size: 15px; font-weight: 500; }
.legal-table { overflow-x: auto; margin: 6px 0 18px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid #DCD2C3; }
.legal th { font-weight: 600; color: var(--ink); background: rgba(19, 24, 58, 0.05); }
.legal td { color: #2B3540; }
.legal a { color: var(--amber-ink); }

/* Tablets and phones: one column, the index becomes a collapsible box above the text */
@media (max-width: 900px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .legal-toc { position: static; border: 1px solid #DCD2C3; border-radius: 12px; background: rgba(255, 255, 255, 0.5); padding: 14px 16px; }
  .legal-toc summary { margin: 0; pointer-events: auto; cursor: pointer; display: flex; justify-content: space-between; }
  .legal-toc summary::after { content: "+"; font-size: 16px; line-height: 1; }
  .legal-toc[open] summary::after { content: "\2212"; }
  .legal-toc[open] summary { margin-bottom: 8px; }
  .legal-intro { padding-left: 0; }
  .legal-sec { padding-left: 18px; margin-bottom: 36px; }
}
html[lang^="en"] .legal-fr, html[lang^="fr"] .legal-en { display: none; }

@media (prefers-reduced-motion: reduce) {
  .crawl, .crawl-slow { animation: none; }
}

/* Phone */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .legal { padding-top: 48px; padding-bottom: 72px; }
  .legal-hero { padding-bottom: 36px; }
  .legal p, .legal li { font-size: 16px; }
  .top { padding: 20px 0; gap: 8px; }
  .brand { font-size: 18px; gap: 8px; }
  .nav { gap: 8px; }
  .hero { padding: 64px 0 72px; gap: 20px; }
  .lede { font-size: 17px; }
  .actions { width: 100%; flex-direction: column; align-items: stretch; }
  .split { gap: 32px; padding-bottom: 72px; }
  .band .split { padding: 72px 16px; }
  .split p { font-size: 16px; }
  .flow-wide { display: none !important; }
  .flow-tall { display: block !important; }
  .services { padding-top: 72px; gap: 24px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .card { padding: 22px 20px; }
  .closing { padding: 72px 0; }
  .faq { padding-top: 72px; gap: 20px; }
  .faq-item summary { font-size: 16px; padding: 18px 2px; }
  .closing .btn { align-self: stretch; }
}
