/* 222 Media Group — one stylesheet for every page.
   Brand: Outfit, ink #102A2B, mint #EEF4F3, marigold #E0A21B. WeekSlice keeps its own sunset. */

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-Variable.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --ground: #EEF4F3;
  --surface: #FFFFFF;
  --sunk: #E2ECEA;
  --ink: #102A2B;
  --muted: #4D6163;
  --rule: #D3E0DE;
  --marigold: #E0A21B;
  --band: #102A2B;
  --band-ink: #EEF4F3;
  --band-muted: #A8BDBB;
  --button-ink: #FFFFFF;
  --focus: #0B6E71;
  --sunset: linear-gradient(135deg, #FF8A5B, #FF5E8A 50%, #9B5DE5);
  --shadow: 0 1px 2px rgba(16, 42, 43, 0.04), 0 12px 32px -18px rgba(16, 42, 43, 0.28);
  --font: "Outfit", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B1C1D;
    --surface: #12292A;
    --sunk: #0F2425;
    --ink: #EEF4F3;
    --muted: #A8BDBB;
    --rule: #22403F;
    --band: #12292A;
    --button-ink: #102A2B;
    --focus: #6FD0C9;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

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

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }

/* ---------- mark ---------- */
.mark .ink { fill: currentColor; }
.mark .lit { fill: var(--marigold); }

/* ---------- header ---------- */
.site-header { padding-block: 22px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { width: 34px; height: 34px; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; font-weight: 500; font-size: 0.98rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--surface); }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 16px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--marigold); }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.5; color: var(--muted); margin: 0; max-width: 38ch; }
.lead-in { margin: 0 0 20px; }
.links { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.card h2 { margin: 0 0 10px; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 8vw, 104px) clamp(48px, 8vw, 104px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 32px; align-items: center; }
.hero h1 {
  margin: 0 0 22px; font-weight: 700; letter-spacing: -0.04em; line-height: 0.98;
  font-size: clamp(2.8rem, 7.4vw, 5.4rem);
}
.hero .mark { width: min(100%, 340px); height: auto; justify-self: end; }
@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .mark { order: -1; justify-self: start; width: 120px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .mark .lit { animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) 0.2s both; transform-origin: 66px 34px; }
  .hero .mark .ink { animation: settle 1s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translate(-10px, 10px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; } to { opacity: 1; } }

/* ---------- sections ---------- */
.section { padding-block: 16px 72px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section h2 { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.025em; line-height: 1.1; }

.card { background: var(--surface); border-radius: 28px; padding: clamp(22px, 4vw, 34px); box-shadow: var(--shadow); }

/* featured app */
.showcase {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  background: var(--surface); border-radius: 36px; padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow);
}
.showcase::before {
  content: ""; position: absolute; z-index: -1; right: -12%; top: -40%; width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(255, 94, 138, 0.28), rgba(155, 93, 229, 0.12) 55%, transparent 72%);
}
.showcase h3 { margin: 0 0 10px; font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; }
.showcase p { margin: 0 0 24px; color: var(--muted); font-size: 1.15rem; max-width: 42ch; }
.showcase .icon { width: clamp(120px, 18vw, 180px); height: auto; border-radius: 22.37%; box-shadow: 0 24px 48px -20px rgba(255, 94, 138, 0.55); }
.showcase .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 720px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase .icon { order: -1; width: 112px; }
}

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--sunk); font-size: 0.9rem; font-weight: 600; color: var(--muted);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--marigold); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 24px; border-radius: 999px; background: var(--ink); color: var(--button-ink);
  font-weight: 600; text-decoration: none; border: 0;
}
.button:hover { text-decoration: underline; }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button svg { width: 18px; height: 18px; }

/* principles */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: p; }
.principles .card { counter-increment: p; }
.principles .card::before {
  content: "0" counter(p); display: block; margin-bottom: 18px;
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.08em; color: var(--muted);
}
.principles h3, .features h3 { margin: 0 0 8px; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }
.principles p, .features p { margin: 0; color: var(--muted); }

/* features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.features .ico {
  width: 44px; height: 44px; border-radius: 14px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--sunk);
}
.features .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* app page head */
.app-head { padding-block: clamp(32px, 6vw, 72px) clamp(40px, 6vw, 64px); position: relative; overflow: hidden; isolation: isolate; }
.app-head::before {
  content: ""; position: absolute; z-index: -1; left: -10%; top: -30%; width: 60%; max-width: 720px; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(255, 138, 91, 0.22), rgba(255, 94, 138, 0.1) 55%, transparent 72%);
}
.app-head .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: center; }
.app-head .icon { width: clamp(104px, 16vw, 168px); height: auto; border-radius: 22.37%; box-shadow: 0 24px 48px -20px rgba(255, 94, 138, 0.55); }
.app-head h1 { margin: 0 0 6px; font-size: clamp(2.6rem, 6.4vw, 4.4rem); letter-spacing: -0.035em; line-height: 1; }
.app-head .tagline { margin: 0 0 14px; font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.app-head .lead { margin-bottom: 22px; max-width: 46ch; }
@media (max-width: 640px) { .app-head .wrap { grid-template-columns: 1fr; } }

/* week strip illustration */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.week-strip span {
  display: grid; place-items: center; gap: 6px; padding: 12px 0 14px; border-radius: 16px;
  background: var(--surface); font-size: 0.8rem; font-weight: 600; color: var(--muted); box-shadow: var(--shadow);
}
.week-strip span::after { content: ""; width: 60%; height: 4px; border-radius: 2px; background: var(--sunk); }
.week-strip .today { background: var(--ink); color: var(--button-ink); }
.week-strip .today::after { background: var(--sunset); }

/* closing band */
.band { background: var(--band); color: var(--band-ink); border-radius: 36px; padding: clamp(28px, 5vw, 56px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.band h2 { margin: 0 0 6px; font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.02em; }
.band p { margin: 0; color: var(--band-muted); max-width: 48ch; }
.band .button { background: var(--band-ink); color: #102A2B; }

/* ---------- long-form documents ---------- */
.doc { padding-block: 24px 80px; }
.doc h1 { font-size: clamp(2.1rem, 5vw, 3rem); letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 10px; }
.doc .meta { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: 1.45rem; letter-spacing: -0.015em; margin: 48px 0 10px; line-height: 1.25; }
.doc h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 56px 0; }
.doc .summary { background: var(--surface); border-radius: 24px; padding: 6px 26px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.doc .summary h2 { margin-top: 20px; }
.doc .note { color: var(--muted); font-size: 0.95rem; }
.doc a { overflow-wrap: anywhere; }
.crumbs { font-size: 0.95rem; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: inherit; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: 36px 48px; color: var(--muted); font-size: 0.95rem; margin-top: 24px; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: start; }
.site-footer .sign { display: flex; gap: 12px; align-items: center; color: var(--ink); }
.site-footer .sign .mark { width: 28px; height: 28px; }
.site-footer .sign p { margin: 0; }
.site-footer .sign strong { display: block; font-weight: 700; }
.site-footer .sign span { color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; justify-items: end; }
.site-footer .legal { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; }
@media (max-width: 640px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer ul { justify-items: start; }
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav a, .button { transition: background-color 0.15s ease; }
}
