/* MindIsland — mindisland.net. No frameworks, no web fonts, no scripts.
   Palette mirrors the app (mobile/src/constants/colors.ts): cream, sage,
   the icon's sun, deep text. Layout follows the other HAM sites. */

:root {
  --bg: #F8F5EF;
  --card: #FFFFFF;
  --ink: #263238;
  --muted: #56645F;
  --soft: #66736F;
  --border: #ECE6DA;
  --sage: #A8C3A0;
  --sage-soft: #EAF1E8;
  --accent: #4A6E44;      /* sage-deep: kickers, links */
  --grad-a: #B07A1F;      /* the icon's sun, deepened for contrast on cream */
  --grad-b: #4A6E44;
  --frame: #222B2E;
  --crisis-bg: #FFF6F3;
  --crisis-border: #F1CBC3;
  --crisis-ink: #A63D33;
  --shadow: 0 10px 30px rgba(38, 50, 56, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1513;
    --card: #172019;
    --ink: #EEF2EC;
    --muted: #AAB7AF;
    --soft: #95A39B;
    --border: #26312A;
    --sage-soft: #1E2A22;
    --accent: #A8C3A0;
    --grad-a: #EBC979;
    --grad-b: #A8C3A0;
    --frame: #050807;
    --crisis-bg: #2A1714;
    --crisis-border: #4D2721;
    --crisis-ink: #F2A398;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
main a { color: var(--accent); text-underline-offset: 0.15em; }
main a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; z-index: 100; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); /* browsers without color-mix() */
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
/* min-height and wrap, not a fixed height: on a phone the links wrap onto
   a second row under the brand instead of spilling over the page. */
header.site .wrap {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px 12px; min-height: 64px; padding-top: 8px; padding-bottom: 8px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none;
}
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1px var(--border), 0 2px 6px rgba(38, 50, 56, 0.08); }
nav.main { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
nav.main a {
  text-decoration: none; color: var(--muted); font-size: 0.95rem;
  padding: 6px 12px; border-radius: 999px;
}
nav.main a:hover,
nav.main a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }

/* Hero */
.hero { padding: 72px 0 48px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.4rem);
  line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 18px;
}
.grad {
  background: linear-gradient(100deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { font-size: 1.18rem; color: var(--muted); margin: 0 0 26px; max-width: 32em; }
.hero .sub-note { margin: 14px 0 0; font-size: 0.92rem; color: var(--soft); }
/* A soft sun-and-sage glow behind the phone; decoration only. */
.hero-art { position: relative; isolation: isolate; }
.hero-art::before {
  content: ""; position: absolute; inset: 6% -10% 6% -10%; z-index: -1;
  background:
    radial-gradient(closest-side at 35% 35%, color-mix(in srgb, #F4D58D 55%, transparent), transparent),
    radial-gradient(closest-side at 65% 65%, color-mix(in srgb, var(--sage) 45%, transparent), transparent);
  filter: blur(8px);
}

/* Store badges — dark in both themes, like the real ones. Pre-launch they
   are <span>s with .soon (dimmed, no link affordance); at launch each
   becomes an <a> to its listing and .soon goes. */
.store-cta { margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: flex; align-items: center; gap: 11px;
  width: 210px; max-width: 100%;
  background: #14161B; color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px; padding: 9px 16px 10px;
  text-decoration: none; box-shadow: var(--shadow);
}
.store-badge.soon { opacity: 0.7; cursor: default; }
.store-badge svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.store-badge svg.logo-apple { width: 26px; height: 26px; }
.badge-lines { display: flex; flex-direction: column; line-height: 1.16; min-width: 0; }
.badge-lead { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.02em; opacity: 0.82; }
.badge-name { font-size: 1.06rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }

/* Phone frame. The screenshots are Android's, whose clock sits close to the
   corner, so the screen radius stays modest enough not to clip it. */
.phone {
  width: min(300px, 76vw); margin: 0 auto; padding: 9px;
  border-radius: 38px; background: var(--frame);
  box-shadow: 0 24px 60px rgba(38, 50, 56, 0.18), var(--shadow);
}
.phone img { border-radius: 28px; width: 100%; height: auto; }
@media (prefers-color-scheme: dark) {
  .phone { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow); }
  /* Some emoji are dark glyphs (🐾, 🎧); a light tile keeps them visible. */
  .card .emoji { background: #DCE7D8; }
}

/* Sections */
section.band { padding: 64px 0; }
section.band.alt { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
/* The contact panel follows the FAQ directly; one gap between them, not two. */
section.band#contact { padding-top: 0; }
.kicker {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem;
  font-weight: 700; color: var(--accent); margin: 0 0 8px;
}
section h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 12px; }
section p.body { color: var(--muted); max-width: 44em; margin: 0 0 12px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 24px; box-shadow: var(--shadow);
}
section.band.alt .card { background: var(--bg); }
.card .emoji {
  display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 14px; background: var(--sage-soft);
  font-size: 1.5rem; line-height: 1; margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.08rem; letter-spacing: -0.005em; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Screens: a row of phones that scrolls sideways. */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(232px, 64vw);
  gap: 26px; margin-top: 34px; padding: 8px 4px 22px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shots .phone { width: 100%; padding: 7px; border-radius: 32px; box-shadow: var(--shadow); }
.shots .phone img { border-radius: 24px; }
.shots figcaption { text-align: center; margin-top: 12px; font-size: 0.92rem; font-weight: 600; color: var(--muted); }

/* Privacy */
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 18px; font-weight: 600;
}
.facts li::before {
  content: "✓"; flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sage-soft); color: var(--accent); font-weight: 800;
}

/* FAQ (home and support) */
details {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 4px 20px; margin-bottom: 10px;
}
summary { cursor: pointer; font-weight: 650; padding: 12px 0; }
details p { color: var(--muted); margin: 0 0 14px; }
.more { margin-top: 18px; }

/* Contact: the icon's sun fading into sage, the same in both themes, so the
   type on it is dark ink in both. */
.cpanel {
  border-radius: 28px; padding: 60px 24px 52px; text-align: center;
  background: linear-gradient(135deg, #F4D58D 0%, #D9D79E 48%, #A8C3A0 100%);
  color: #263238;
}
.cpanel .kicker { color: rgba(38, 50, 56, 0.78); }
.cpanel h2 { color: #263238; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cpanel p.body { color: rgba(38, 50, 56, 0.82); max-width: 32em; margin: 0 auto; }
.mail-btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px;
  background: #14161B; color: #FFFFFF; text-decoration: none; font-weight: 700;
  border-radius: 999px; padding: 15px 26px; box-shadow: 0 10px 30px rgba(20, 22, 27, 0.22);
}
.mail-btn:hover { background: #262B33; }
.mail-btn svg { width: 18px; height: 18px; flex: none; }
.cpanel .note { margin: 20px auto 0; max-width: 34em; font-size: 0.9rem; color: rgba(38, 50, 56, 0.86); }

/* Legal and support pages */
.legal { max-width: 780px; padding-top: 56px; padding-bottom: 64px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; }
.legal h2 { font-size: 1.3rem; line-height: 1.3; margin: 40px 0 10px; }
.legal h3 { font-size: 1.08rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal li { margin: 6px 0; }
.legal strong { color: var(--ink); }
.legal .updated { color: var(--soft); font-size: 0.95rem; margin-top: 0; }
.legal .card.crisis {
  background: var(--crisis-bg); border-color: var(--crisis-border);
  box-shadow: none; margin: 24px 0 8px;
}
.legal .card.crisis h2 { margin-top: 0; color: var(--crisis-ink); }
.legal .card.crisis p { margin: 0 0 10px; font-size: 1rem; }
.legal .card.crisis p:last-child { margin-bottom: 0; }
.legal .card.crisis strong { color: var(--crisis-ink); }

/* 404 */
.notfound { min-height: 64vh; display: grid; place-items: center; text-align: center; padding: 80px 20px; }
.notfound img { margin: 0 auto 20px; border-radius: 20px; }
.notfound h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); letter-spacing: -0.02em; margin: 0 0 8px; }
.notfound p { color: var(--muted); margin: 6px 0; }

/* Footer */
footer.site { border-top: 1px solid var(--border); padding: 40px 0 56px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
footer.site .brand { font-size: 1rem; }
footer.site .brand img { width: 26px; height: 26px; border-radius: 8px; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
footer.site a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
footer.site a:hover { color: var(--ink); }
footer.site .fine { width: 100%; color: var(--soft); font-size: 0.86rem; margin: 6px 0 0; }

@media (max-width: 860px) {
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 44px 0 32px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid3 { grid-template-columns: 1fr; }
  /* On a phone the header scrolls away with the page, and the links sit on
     one row under the brand (sideways-scrollable on the narrowest screens). */
  header.site { position: static; }
  nav.main {
    margin-left: -8px; width: calc(100% + 8px);
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { padding: 6px 8px; font-size: 0.88rem; white-space: nowrap; }
  section.band { padding: 52px 0; }
  .cpanel { padding: 44px 18px 40px; border-radius: 22px; }
  .store-badge { width: 100%; max-width: 260px; }
}
