/* Lumo's website, shared by every page (D-184): the fonts, the tokens, the navigation pill, the
   buttons and the footer. landing.css adds the landing page (its hero unchanged since D-156),
   style.css the Support, Privacy and Terms pages. Static and self-hosted: nothing from outside. */

@font-face {
  font-family: 'Fredoka';
  src:
    url('fonts/Fredoka_400Regular.woff2') format('woff2'),
    url('fonts/Fredoka_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Fredoka';
  src:
    url('fonts/Fredoka_600SemiBold.woff2') format('woff2'),
    url('fonts/Fredoka_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Fredoka';
  src:
    url('fonts/Fredoka_700Bold.woff2') format('woff2'),
    url('fonts/Fredoka_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* The app's tokens (src/ui/theme.ts): sky top, dusk, indigo, gold, cream, mist; then the site's
   one radius, one border, one highlight and one shadow tint. */
:root {
  --deep: #10133a;
  --night: #1b1f4b;
  --night-light: #20255f;
  --dusk: #2e2f78;
  --theme: #141843;
  --cream: #fff8ec;
  --paper: #fffdf8;
  --moonlight: #fff4c2;
  --lavender: #c4c0de;
  --gold: #ffc83d;
  --gold-light: #ffd45e;
  --gold-muted: #c9a54f;
  --ink: #1b1f4b;

  --radius: 24px;
  --pill: 999px;
  --line: rgba(255, 248, 236, 0.1);
  --highlight: inset 0 1px 0 rgba(255, 248, 236, 0.06);
  --shadow-tint: rgba(6, 8, 30, 0.5);
  --shadow: 0 28px 64px -18px var(--shadow-tint);
  --shadow-small: 0 14px 34px -14px var(--shadow-tint);
  --gold-line: rgba(255, 200, 61, 0.3);

  --section: clamp(80px, 10vw, 140px);
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Fredoka', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------------ buttons */
/* Pills for anything pressed: a gold one for the main action. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.7em 1.35em;
  border: 0;
  border-radius: var(--pill);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.3s var(--ease),
    background-color 0.2s,
    box-shadow 0.3s var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.97);
  transition-duration: 0.08s;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 20px -6px rgba(255, 200, 61, 0.55);
}

.btn-gold:hover {
  background: var(--gold-light);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 28px -6px rgba(255, 200, 61, 0.65);
}

.btn:focus-visible,
.site-nav a:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--pill);
}

/* ------------------------------------------------------------ the nav pill */
/* One navigation on every page: Lumo, three links, the language and Get Lumo. On the landing
   page it floats in once the hero's own nav has scrolled away; on the others it sits at the top. */

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: var(--wrap);
  height: 64px;
  margin: 0 auto;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(20, 24, 67, 0.72);
  box-shadow:
    var(--highlight),
    0 18px 44px -16px var(--shadow-tint);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  font-family: var(--display);
  font-size: 0.9375rem;
  line-height: 1;
  color: var(--cream);
}

@media (prefers-reduced-transparency: reduce) {
  .site-nav {
    background: #161a49;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.site-nav-home {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 2px;
  border-radius: var(--pill);
  color: var(--cream);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav-home img {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.4s var(--ease);
}

.site-nav-home:hover img {
  transform: rotate(-6deg) scale(1.06);
}

.site-nav-links {
  display: flex;
  gap: 2px;
  margin: 0 auto 0 4px;
  padding: 0;
  list-style: none;
}

.site-nav-links a {
  display: block;
  padding: 0.75em 0.95em;
  border-radius: var(--pill);
  color: var(--lavender);
  white-space: nowrap;
  text-decoration: none;
  transition:
    color 0.2s,
    background-color 0.2s;
}

.site-nav-links a:hover,
.site-nav-links a[aria-current='page'] {
  color: var(--cream);
  background: rgba(255, 248, 236, 0.08);
}

/* English | Français (D-180): the same page in the other language, the visitor's choice. */
.site-nav .lang,
.site-footer .lang {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.45em;
  margin: 0;
  color: var(--lavender);
  white-space: nowrap;
}

.site-nav .lang {
  margin: 0 8px 0 auto;
  font-size: 0.875rem;
}

.site-nav-links + .lang {
  margin-left: 0;
}

.site-nav .lang a,
.site-footer .lang a {
  padding: 0.5em 0.15em;
  color: var(--lavender);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav .lang a:hover,
.site-footer .lang a:hover {
  color: var(--cream);
}

.site-nav .lang [aria-current],
.site-footer .lang [aria-current] {
  color: var(--gold);
}

.site-nav .lang .sep,
.site-footer .lang .sep {
  opacity: 0.5;
}

.site-nav .btn {
  flex: none;
  min-height: 44px;
  padding: 0 1.25em;
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  position: relative;
  padding: clamp(48px, 6vw, 72px) 0 clamp(40px, 5vw, 56px);
  background: var(--deep);
  color: var(--lavender);
  font-family: var(--display);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* A gold hairline, brightest in the middle, where the page ends. */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(720px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 200, 61, 0.55), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  gap: 32px 56px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px var(--line),
    0 10px 30px -8px rgba(255, 200, 61, 0.35);
}

.footer-brand p {
  margin: 0;
}

.footer-brand strong {
  display: block;
  color: var(--cream);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: block;
  padding: 0.45em 0.7em;
  border-radius: var(--pill);
  color: var(--lavender);
  text-decoration: none;
  transition:
    color 0.2s,
    background-color 0.2s;
}

.footer-links a:hover {
  color: var(--cream);
  background: rgba(255, 248, 236, 0.07);
}

/* --------------------------------------------------------- narrower screens */

@media (max-width: 1040px) {
  .site-nav-links a {
    padding: 0.75em 0.7em;
  }
}

@media (max-width: 920px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
  }

  .footer-grid .footer-links {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: -0.7em;
  }
}

@media (max-width: 820px) {
  /* The three links move to the footer's; Lumo, the language and Get Lumo stay. */
  .site-nav-links {
    display: none;
  }

  .site-nav .lang {
    margin-left: auto;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-grid .footer-links {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    grid-row: auto;
  }
}

@media (max-width: 440px) {
  .site-nav {
    height: 60px;
    padding: 0 8px 0 10px;
    gap: 4px;
  }

  /* Lumo's name stays for screen readers; the icon is enough to see. */
  .site-nav-home span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .site-nav .lang {
    margin-right: 4px;
    font-size: 0.8125rem;
  }

  .site-nav .btn {
    min-height: 42px;
    padding: 0 1em;
    font-size: 0.875rem;
  }
}

/* The narrowest phones: Lumo and the language; Get Lumo stays in the page itself. */
@media (max-width: 359px) {
  .site-nav .btn {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .site-nav-home img,
  .site-nav-links a,
  .footer-links a {
    transition: none;
  }
}
