/* GAMAY website: the app's teal (lib/src/core/theme/app_theme.dart), Poppins headings, DM Sans text. */
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(fonts/Poppins-Medium.ttf) format("truetype"); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(fonts/Poppins-SemiBold.ttf) format("truetype"); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(fonts/Poppins-Bold.ttf) format("truetype"); }
@font-face { font-family: "DM Sans"; font-weight: 100 1000; font-display: swap; src: url(fonts/DMSans-Variable.ttf) format("truetype"); }

:root {
  --teal: #1f7a72;      /* buttons and links: the app's deep teal */
  --teal-dark: #17605a;
  --accent: #26a69a;    /* small touches only */
  --tint: #f3f8f7;      /* alternate section background */
  --tile: #e7f2f0;      /* icon tiles */
  --bg: #ffffff;
  --text: #1d1b20;
  --muted: #5b6563;
  --line: #e2e8e7;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
h1, h2, h3 { font-family: Poppins, system-ui, sans-serif; line-height: 1.2; margin: 0 0 12px; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 12px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
section { padding: 88px 0; }
.tinted { background: var(--tint); border-block: 1px solid var(--line); }
.eyebrow { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: Poppins, sans-serif; font-weight: 600; font-size: 1.15rem; letter-spacing: 0.02em; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.nav a[aria-current] { font-weight: 600; }

/* Phone menu: the same links in a drop-down (no script needed). */
.menu { position: relative; }
/* Desktop: the menu sits right after the links, before "Get the app". */
@media (min-width: 961px) { .menu { order: 1; } .top .btn { order: 2; } }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; stroke: var(--text); stroke-width: 2; stroke-linecap: round; fill: none; }
.menu nav { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 12px 32px rgba(16, 40, 37, 0.12); display: grid; }
.menu nav a { padding: 12px 14px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.menu nav a:hover, .menu nav a[aria-current] { background: var(--tint); }
@media (max-width: 960px) {
  .nav { display: none; }
  .top .btn { margin-left: auto; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 10px;
  background: var(--teal); color: #fff; font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border: 1px solid var(--teal); transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); background: #fff; color: var(--text); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .note { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 28px 0 0; font-size: 0.92rem; color: var(--muted); }
.hero .note li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 6px; }
.hero-art { margin: 0; justify-self: center; width: min(420px, 100%); background: var(--tint); border: 1px solid var(--line); border-radius: 24px; padding: 28px 28px 20px; }

/* Ga fingerspelling G-A-M-A-Y: one hand a second, mouth moving, the letter lit below. */
.stage { position: relative; aspect-ratio: 1; }
.stage .ga { position: absolute; left: 0; bottom: 0; width: 78%; }
/* Each letter holds 1.2 s (20% of the 6 s loop): the hand eases in, holds still, and fades out
   while the next one eases in, so the shapes flow into each other. Ga says each letter as it comes. */
.stage .talk { opacity: 0; animation: talk 1.2s infinite; }
.signing { position: absolute; right: -4%; bottom: 6%; width: 44%; aspect-ratio: 1; transform-origin: 50% 95%; animation: sway 2.4s ease-in-out infinite alternate; }
.signing img { position: absolute; inset: 0; width: 100%; opacity: 0; transform-origin: 50% 95%; animation: letter 6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.spelled { display: flex; justify-content: center; gap: 10px; margin-top: 14px; font-family: Poppins, sans-serif; font-weight: 600; font-size: 1.3rem; letter-spacing: 0.04em; }
.spelled span { color: #b8c4c2; animation: lit 6s ease infinite; }
.signing img:nth-child(2), .spelled span:nth-child(2) { animation-delay: 1.2s; }
.signing img:nth-child(3), .spelled span:nth-child(3) { animation-delay: 2.4s; }
.signing img:nth-child(4), .spelled span:nth-child(4) { animation-delay: 3.6s; }
.signing img:nth-child(5), .spelled span:nth-child(5) { animation-delay: 4.8s; }
@keyframes letter {
  0% { opacity: 0; transform: translateY(5%) rotate(-6deg) scale(0.95); }
  6%, 20% { opacity: 1; transform: none; }
  26%, 100% { opacity: 0; transform: translateY(-2%) rotate(4deg) scale(0.97); }
}
@keyframes lit { 0% { color: #b8c4c2; } 5%, 20% { color: var(--teal); } 26%, 100% { color: #b8c4c2; } }
@keyframes talk { 0%, 30% { opacity: 1; } 31%, 100% { opacity: 0; } }
@keyframes sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
/* Reduced motion (e.g. Windows "Animation effects" off): Ga still spells, but the hands only
   fade from one to the next: no sway, wrist turn or moving mouth. */
@media (prefers-reduced-motion: reduce) {
  .stage .talk, .signing { animation: none; }
  .signing img { animation-name: letter-fade; }
}
@keyframes letter-fade { 0% { opacity: 0; } 6%, 20% { opacity: 1; } 26%, 100% { opacity: 0; } }
@media (max-width: 860px) {
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { width: min(320px, 100%); }
}

/* Features */
.grid { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-top: 48px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-align: left; }
.card { background: #fff; padding: 28px; }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--tile); display: grid; place-items: center; margin-bottom: 16px; }
.card .icon svg { width: 22px; height: 22px; stroke: var(--teal); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* Alphabet: a strip that snaps from hand to hand, with arrows beside it and an A-Z row below. */
.carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 48px; }
.letters { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 4px 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.letters:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 12px; }
.letter { flex: 0 0 clamp(150px, 22%, 210px); scroll-snap-align: center; scroll-margin-top: 96px; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 8px; text-align: center; }
.letter:target { border-color: var(--teal); }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; transition: border-color 0.15s; }
.arrow:hover { border-color: var(--muted); }
.arrow:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.arrow svg { width: 20px; height: 20px; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.az { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 16px; }
.az a { min-width: 36px; min-height: 36px; display: grid; place-items: center; border-radius: 8px; font-family: Poppins, sans-serif; font-weight: 600; font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.az a:hover { background: var(--tint); color: var(--teal); }
/* Phones swipe the strip, so the arrows give their room to the hands. */
@media (max-width: 600px) { .carousel { grid-template-columns: minmax(0, 1fr); } .arrow { display: none; } .letter { flex-basis: 62%; } }
.letter img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.letter span { font-family: Poppins, sans-serif; font-weight: 600; color: var(--text); font-size: 1.2rem; }

/* How it works */
.screens .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.phones { display: flex; gap: 20px; justify-content: center; }
.phone { width: min(230px, 46%); border: 6px solid #1d1b20; border-radius: 28px; overflow: hidden; box-shadow: 0 20px 40px rgba(16, 40, 37, 0.12); background: #fff; }
.steps { list-style: none; padding: 0; margin: 32px 0 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 24px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--teal); color: var(--teal);
  display: grid; place-items: center; font-weight: 700; font-family: Poppins, sans-serif; font-size: 0.9rem;
}
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .screens .wrap { grid-template-columns: 1fr; } }

/* App facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 1px; margin: 48px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fact { background: #fff; padding: 20px 22px; }
.fact dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.fact dd { margin: 6px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* FAQ */
.faq .wrap { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); margin-top: 32px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Call to action */
.cta { background: var(--teal); color: #fff; border-radius: 20px; padding: 48px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.cta .btn { background: #fff; color: var(--teal); border-color: #fff; }
.cta .btn:hover { background: var(--tint); color: var(--teal-dark); }
@media (max-width: 600px) { .cta { padding: 32px 24px; } }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* Policy pages */
.doc { padding: 56px 0 88px; }
.doc .wrap { max-width: 760px; }
.doc .updated { color: var(--muted); margin-bottom: 40px; }
.doc h2 { font-size: 1.3rem; margin-top: 40px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.table-scroll { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--tint); font-weight: 600; }
code { font-size: 0.9em; background: var(--tint); padding: 1px 5px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html, .letters { scroll-behavior: auto; }
  .btn, .arrow { transition: none; }
}
