/* mahjongnearme.app — one stylesheet for every page.
   Brand tokens match the iOS app (MahjongNearMe/Design/Colors.swift):
   teal accent #2E9482, warm teal-white background #F2F8F7, Figtree type.
   Light only, like V1 of the app. Mobile-first; 16px side gutter minimum. */
:root {
  --accent: #2E9482;
  --accent-deep: #1E7A6A;
  --accent-soft: rgba(46,148,130,0.10);
  --bg: #F2F8F7;
  --card: #FFFFFF;
  --card-alt: #F4FAF9;
  --text: #1A3432;
  --sub: #3F7B73;          /* slightly darker than the app's #4E8A82 for AA contrast on the web */
  --border: #C8E4DE;
  --dragon: #9B1F1E;
  --error: #8A2A1A;
  --font: "Figtree", ui-rounded, -apple-system, "SF Pro Rounded", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(46,148,130,0.12), transparent 520px),
    radial-gradient(circle at 100% 100%, rgba(46,148,130,0.07), transparent 520px);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  padding-inline: 16px;
}
a { color: var(--accent-deep); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 720px; margin: 0 auto; }

/* ── Home ─────────────────────────────────────────────── */
.hero { text-align: center; padding-block: 72px 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero .icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 14px 36px rgba(46,148,130,0.28); }
.brand { font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; font-size: 14px; color: var(--accent-deep); margin: 10px 0 0; }
h1 { font-weight: 800; font-size: clamp(38px, 9vw, 60px); line-height: 1.05; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.lede { font-size: 19px; color: var(--sub); max-width: 38ch; margin: 4px auto 0; text-wrap: balance; }
.soon { display: inline-block; font-weight: 700; font-size: 14px; color: var(--accent-deep); background: var(--accent-soft); padding: 6px 14px; border-radius: 99px; }

.signup { width: 100%; max-width: 460px; margin: 18px auto 0; display: flex; flex-direction: column; gap: 10px; }
.signup .row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input {
  flex: 1 1 220px; min-width: 0; min-height: 56px; padding: 0 18px;
  font: 500 17px var(--font); color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
}
.signup button {
  flex: 0 0 auto; min-height: 56px; padding: 0 24px; border: 0; border-radius: 16px;
  font: 700 17px var(--font); color: #fff; background: var(--accent); cursor: pointer;
}
.signup button:hover { background: var(--accent-deep); }
.signup button[disabled] { opacity: 0.6; cursor: default; }
.signup .note { font-size: 14px; color: var(--sub); margin: 0; }
.signup .msg { font-size: 15px; margin: 0; min-height: 1.4em; }
.signup .msg.ok { color: var(--accent-deep); font-weight: 700; }
.signup .msg.err { color: var(--error); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-block: 24px 56px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feature .glyph { font-size: 26px; color: var(--dragon); font-weight: 800; line-height: 1; }
/* Visually hidden, still read by screen readers (Jordan prefers the glyphs unlabeled). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.feature h2 { font-size: 18px; font-weight: 800; margin: 6px 0 0; letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 15px; color: var(--sub); }
@media (max-width: 680px) { .features { grid-template-columns: 1fr; } .hero { padding-block: 48px 28px; } }

/* ── Legal pages ──────────────────────────────────────── */
.doc-head { padding-block: 40px 8px; display: flex; flex-direction: column; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; }
.back img { width: 36px; height: 36px; border-radius: 9px; }
.doc-head h1 { font-size: clamp(32px, 7vw, 44px); }
.dates { font-size: 14px; color: var(--sub); margin: 0; }
.summary { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 16px; padding: 18px 20px; margin-block: 18px 8px; }
.summary h2 { margin-top: 0 !important; font-size: 17px !important; }
.summary ul { margin-bottom: 0; }
.doc h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin: 36px 0 8px; }
.doc h3 { font-size: 17px; font-weight: 800; margin: 20px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin-block: 4px; }
.doc .caps { text-transform: none; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); border-radius: 12px; overflow: hidden; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.doc th { background: var(--card-alt); font-weight: 800; }
.contact { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; }

/* ── Footer ───────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding-block: 24px 40px; font-size: 14px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; text-align: center; }
footer a { color: var(--sub); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
