/* Marshallese Translator website
   Colors come from the extension icon: ocean blue #004C91, red #FF0000, white.
   System fonts only, so the site loads nothing from other servers. */

:root {
  --blue: #004C91;
  --blue-mid: #0A5BA8;
  --red: #FF0000;
  --red-text: #C40000;      /* #FF0000 is too light for small text on white */
  --highlight: #FFE36E;

  --bg: #F5F8FC;
  --surface: #FFFFFF;
  --fg: #142033;
  --muted: #4D5C71;
  --line: #D6DFEA;
  --link: #004C91;
  --panel: #EAF1FA;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --radius: 12px;
  --max: 68rem;
  --read: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1624;
    --surface: #142139;
    --fg: #E7EDF6;
    --muted: #A2B0C5;
    --line: #26354F;
    --link: #8DB8F2;
    --panel: #18294A;
    --red-text: #FF7A7A;
    color-scheme: dark;
  }
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--font);
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--highlight); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h2 { font-size: 1.6rem; margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }
code { font-size: 0.92em; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--surface); color: var(--fg); padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; z-index: 10; }

/* ---- Header ---- */
.site-header { background: var(--blue); color: #FFFFFF; }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; padding-block: 0.85rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: #FFFFFF; text-decoration: none; font-weight: 700; font-size: 1.1rem;
}
.brand img { width: 36px; height: 36px; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a { color: #FFFFFF; text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: #FFFFFF; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }

/* ---- Hero (home) ---- */
.hero {
  background: var(--blue) url("../images/waves.svg") no-repeat bottom center / 100% 90px;
  color: #FFFFFF;
  padding-block: 3rem 6.5rem;
}
.hero .wrap {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem 3rem;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 0 0 0.75rem; }
.hero .lead { font-size: 1.2rem; max-width: 34rem; color: #DCE8F7; }
.hero .menu-label {
  display: inline-block; background: #FFFFFF; color: #142033; /* fixed: sits on the blue hero in both themes */
  border-radius: 6px; padding: 0.15rem 0.5rem; font-weight: 600;
}
.hero-art { width: clamp(150px, 22vw, 240px); }
.hero-note { font-size: 0.95rem; color: #C3D6EE; margin-top: 0.75rem; }

.button {
  display: inline-block; background: #D10000; color: #FFFFFF; /* darker than the icon red so white text passes contrast */
  font-weight: 700; text-decoration: none;
  padding: 0.8rem 1.5rem; border-radius: 999px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}
.button:hover { background: #B00000; text-decoration: none; }

/* ---- Page heading (inner pages) ---- */
.page-head {
  background: var(--blue) url("../images/waves.svg") no-repeat bottom center / 100% 60px;
  color: #FFFFFF; padding-block: 2.25rem 4.5rem;
}
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 0.4rem; }
.page-head p { margin: 0; color: #DCE8F7; max-width: var(--read); }

/* ---- Sections ---- */
.section { padding-block: 3.5rem; }
.section + .section { padding-top: 0; }
.section-intro { color: var(--muted); max-width: var(--read); margin-bottom: 2rem; }
.reading { max-width: var(--read); }
.reading h2 { font-size: 1.3rem; margin-top: 2.5rem; color: var(--link); }
.reading h2:first-child { margin-top: 0; }

/* How it works */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem; list-style: none; margin: 0; padding: 0; counter-reset: step;
}
.steps li {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1rem 1.25rem; counter-increment: step;
}
.steps img { display: block; width: 100%; border-radius: 8px; margin-bottom: 1rem; }
.steps h3::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; margin-right: 0.5rem; border-radius: 50%;
  background: var(--blue); color: #FFFFFF; font-size: 0.95rem;
}
.steps p { color: var(--muted); margin: 0; }

/* Features */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem 2rem; list-style: none; margin: 0; padding: 0;
}
.features li { margin: 0; padding-left: 1rem; border-left: 3px solid var(--red); }
.features p { color: var(--muted); margin: 0; }

/* Callout */
.callout {
  background: var(--panel); border-radius: var(--radius);
  padding: 1.5rem 1.75rem; max-width: var(--read);
}
.callout h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

/* ---- Support: questions ---- */
.faq { max-width: var(--read); }
.faq h2 { font-size: 1.3rem; margin: 2.5rem 0 1rem; color: var(--link); }
.faq h2:first-child { margin-top: 0; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 1rem 1.25rem; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--link); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.25rem 1rem; }
.faq details > div > :last-child { margin-bottom: 0; }

.contact {
  margin-top: 3rem; padding: 1.5rem 1.75rem; border-radius: var(--radius);
  background: var(--panel); max-width: var(--read);
}
.contact h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.contact p:last-child { margin-bottom: 0; }

.mh { font-weight: 600; }
.note { color: var(--muted); font-size: 0.95rem; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.5rem 2rem;
}
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0; }

/* ---- Small screens ---- */
@media (max-width: 640px) {
  .hero { padding-block: 2rem 5rem; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
