/*
 * Mikan Software — the site's only stylesheet (source).
 *
 * Hand-written on purpose: there is no Tailwind or any other build dependency,
 * so nothing third-party runs to produce the site. ./assets/build-css.sh copies
 * this file to assets/site.<hash>.css and repoints every page at it; edit this
 * file, never the hashed copy.
 *
 * Fonts are self-hosted from assets/fonts/ (no Google Fonts / CDN requests,
 * which the privacy page promises):
 *   headings — Cartridge Soft (SimpleBits), Bold 700 + Semibold 600
 *   body     — Atkinson Hyperlegible Next, Regular/Italic 400, SemiBold 600, Bold 700
 *
 * Palette comes from MikanMessage's app icon layers: cream tile
 * (#FFF7EC → #FFE2C0), mikan peel (#FF8A1E / #EA5A08 / #C24705), leaf green
 * (#2F7A3E). Button orange is the darker peel #C24705 rather than #EA5A08
 * because white text on #EA5A08 is ~3.6:1, under WCAG AA's 4.5:1.
 */

/* ---------- fonts ---------- */
@font-face { font-family: "Cartridge"; src: url("/assets/fonts/Cartridge-BoldSoft.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cartridge"; src: url("/assets/fonts/Cartridge-SemiboldSoft.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/assets/fonts/AtkinsonHyperlegibleNext-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/assets/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/assets/fonts/AtkinsonHyperlegibleNext-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/assets/fonts/AtkinsonHyperlegibleNext-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --font-head: "Cartridge", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #FFF8EE;
  --hero-top: #FFF7EC;
  --hero-bottom: #FFE6C8;
  --surface: #FFFFFF;
  --surface-2: #FFF3E3;
  --border: #F0DCC1;
  --border-strong: #E2C3A0;
  --text: #2E1A0B;
  --text-muted: #6B4A33;
  --text-soft: #86644A;
  --accent: #C24705;          /* buttons */
  --accent-hover: #A33B03;
  --on-accent: #FFFFFF;
  --accent-text: #B44204;     /* links, taglines on light surfaces */
  --leaf: #2F7A3E;
  --badge-soon-bg: #FFE3C2;
  --badge-soon-text: #8F3604;
  --badge-free-bg: #DCEFD8;
  --badge-free-text: #245E30;
  --nav-bg: rgba(255, 248, 238, 0.82);
  --shadow: 0 10px 30px -12px rgba(138, 61, 0, 0.28);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1009;
    --hero-top: #24160B;
    --hero-bottom: #1A1009;
    --surface: #23160C;
    --surface-2: #2C1C10;
    --border: #3F2A19;
    --border-strong: #5A3D25;
    --text: #FBEBD8;
    --text-muted: #D9C2A9;
    --text-soft: #B39A80;
    --accent: #FF9A3C;
    --accent-hover: #FFB065;
    --on-accent: #2A1404;
    --accent-text: #FFAA5C;
    --leaf: #82C772;
    --badge-soon-bg: #4A2A10;
    --badge-soon-text: #FFC48A;
    --badge-free-bg: #1F3A22;
    --badge-free-text: #A6DD98;
    --nav-bg: rgba(26, 16, 9, 0.82);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.1; letter-spacing: 0.005em; }
h1, h2 { font-weight: 700; }
h3 { font-weight: 600; }
p, ul, ol { margin: 0; }
a { color: inherit; }
a.link, .prose a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.link:hover, .prose a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- layout ---------- */
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 48rem; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 480px) { .wrap, .wrap-narrow { padding: 0 1rem; } }

.section { padding: 5rem 0; }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.center { text-align: center; }

.section-title { font-size: clamp(2rem, 4vw, 2.6rem); }
.section-lede { margin: 1rem auto 0; max-width: 36rem; color: var(--text-muted); font-size: 1.15rem; }
.center .section-lede { text-align: center; }

/* ---------- nav ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; white-space: nowrap; }
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--text-muted); }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; padding: 0.5rem; color: var(--text-muted); cursor: pointer; }
.nav-toggle svg { width: 1.5rem; height: 1.5rem; }
.mobile-menu { display: none; border-top: 1px solid var(--border); background: var(--surface); }
.mobile-menu .wrap { display: flex; flex-direction: column; gap: 1rem; padding-top: 1rem; padding-bottom: 1.25rem; }
.mobile-menu a:not(.btn) { text-decoration: none; font-weight: 600; color: var(--text-muted); }
.mobile-menu.open { display: block; }
/* Pages with a short nav (product, about, privacy) keep it visible on phones;
   only the home page, with .has-toggle, collapses into the menu button. */
@media (max-width: 767px) {
  .has-toggle .nav-links { display: none; }
  .has-toggle .nav-toggle { display: block; }
  .nav-links { gap: 1rem; }
  .nav-links .hide-sm { display: none; }
}
@media (min-width: 768px) { .mobile-menu.open { display: none; } }

/* ---------- buttons & badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.4rem; border-radius: 0.75rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.92rem; border-radius: 0.65rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.center .btn-row { justify-content: center; }

.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.badge-soon { background: var(--badge-soon-bg); color: var(--badge-soon-text); }
.badge-free { background: var(--badge-free-bg); color: var(--badge-free-text); }

/* ---------- hero ---------- */
.hero { padding: 9rem 0 5rem; background: linear-gradient(var(--hero-top), var(--hero-bottom)); }
.hero-mark { margin: 0 auto; width: 9rem; filter: drop-shadow(0 18px 22px rgba(138, 61, 0, 0.25)); }
.hero h1 { margin-top: 1.75rem; font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 1.02; }
.hero .lede { margin: 1.5rem auto 0; max-width: 40rem; font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--text-muted); }
.hero .sublede { margin: 1rem auto 0; max-width: 40rem; color: var(--text-soft); font-size: 1.1rem; }
.hero .btn-row { margin-top: 2.5rem; }
.tagline { margin-top: 0.75rem; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.3rem, 3vw, 1.75rem); color: var(--accent-text); }
.app-icon-lg { margin: 0 auto; width: 8rem; height: 8rem; border-radius: 1.75rem; box-shadow: var(--shadow); }
.release-line { margin-top: 1rem; font-size: 0.92rem; color: var(--text-soft); }
.hero .note { margin: 0.75rem auto 0; max-width: 28rem; font-size: 0.92rem; color: var(--text-soft); }

/* ---------- cards ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 1.1rem; padding: 2rem; display: flex; flex-direction: column; }
.section:not(.band) .card { background: var(--surface); }
.card h3 { font-size: 1.35rem; }
.card p { margin-top: 0.75rem; color: var(--text-muted); }
.card .grow { flex-grow: 1; }
.card .btn-row { margin-top: 1.5rem; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; }
.card-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.card-title img { width: 2.75rem; height: 2.75rem; border-radius: 0.65rem; flex-shrink: 0; }
.card-title h3 { font-size: 1.55rem; }
.card .platform { margin-top: 0.5rem; font-size: 0.9rem; color: var(--text-soft); }
/* Dashed "More on the way" card. Unused since Claude Usage filled the second
   slot (2026-10-04); kept for when the Apps grid has an odd count again. */
.card-placeholder { border-style: dashed; justify-content: center; align-items: center; text-align: center; color: var(--text-soft); min-height: 14rem; }
.card-placeholder h3 { color: var(--text-muted); }

/* ---------- callout (privacy summary on home) ---------- */
.callout { margin: 2.5rem auto 0; max-width: 48rem; background: var(--bg); border: 1px solid var(--border); border-radius: 1.1rem; padding: 2.25rem; }
.callout h3 { font-size: 1.6rem; }
.callout p { margin-top: 1rem; color: var(--text-muted); }
.callout .small { font-size: 0.95rem; color: var(--text-soft); }
.callout .btn-row { margin-top: 1.5rem; }

/* ---------- check list ---------- */
.checklist { list-style: none; padding: 0; margin-top: 2.5rem; display: grid; grid-template-columns: 1fr; gap: 1rem 2rem; color: var(--text-muted); }
@media (min-width: 640px) { .checklist { grid-template-columns: repeat(2, 1fr); } }
.checklist li { display: flex; gap: 0.75rem; }
.checklist li::before { content: "✓"; color: var(--leaf); font-weight: 700; }

/* ---------- MikanMessage HUD illustration ---------- */
/* An illustration of the app's floating HUD, not a screenshot: a dark rounded
   pill with the app icon and bold white text over a stand-in desktop. */
.desk {
  position: relative; overflow: hidden;
  border-radius: 1.1rem; border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 15% 10%, #FFC27A 0%, transparent 55%),
    radial-gradient(90% 80% at 85% 90%, #E0592A 0%, transparent 60%),
    linear-gradient(135deg, #F7A04B, #B9481C);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.desk::before { /* the menu bar */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1.6rem;
  background: rgba(255, 255, 255, 0.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hud {
  display: flex; align-items: center; gap: 0.9rem;
  max-width: 100%;
  padding: 0.9rem 1.5rem 0.9rem 1rem; border-radius: 1.4rem;
  background: rgba(24, 20, 18, 0.84);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
  color: #fff; font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.35rem); line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  animation: hud-cycle 6s ease-in-out infinite;
}
.hud img { width: 2.6rem; height: 2.6rem; border-radius: 0.6rem; flex-shrink: 0; }
@keyframes hud-cycle {
  0%, 8% { opacity: 0; transform: scale(0.96); }
  16%, 76% { opacity: 1; transform: scale(1); }
  88%, 100% { opacity: 0; transform: scale(0.98); }
}
@media (prefers-reduced-motion: reduce) { .hud { animation: none; } }
/* Taller on phones so a wrapped two-line message still fits the "desktop". */
@media (max-width: 560px) { .desk { aspect-ratio: 4 / 3; } }
.section-illustration { padding-top: 3.5rem; }
.caption { margin-top: 1rem; text-align: center; font-size: 0.92rem; color: var(--text-soft); }

/* Shortcuts action parameters */
.params { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 3rem; }
@media (min-width: 768px) { .params { grid-template-columns: repeat(3, 1fr); } }
.card .param-name { margin-top: 0; color: var(--text); font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; }
.card .param-default { margin-top: 0.25rem; font-size: 0.88rem; color: var(--text-soft); }
.positions { margin-top: 1rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; width: 7.5rem; aspect-ratio: 16 / 10; padding: 0.5rem; border: 1px solid var(--border-strong); border-radius: 0.6rem; }
.positions span { border-radius: 0.3rem; background: var(--surface-2); border: 1px solid var(--border); }
.positions span.on { background: var(--accent); border-color: var(--accent); }

/* ---------- Claude Usage ---------- */
/* Its icon.png is a macOS-style tile with transparent margin and a baked-in
   shadow, so it must not get the square-crop radius and box-shadow that
   .app-icon-lg gives full-bleed icons like MikanMessage's. Drawn a little
   larger to make up for the margin. */
.app-icon-lg.shaped { width: 9.5rem; height: 9.5rem; border-radius: 0; box-shadow: none; }

/* Popover screenshots: three tall PNGs, side by side from 768px. */
.shots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
@media (min-width: 768px) { .shots { grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: start; } }
.shots figure, .strips figure { margin: 0; }
.shots figure { max-width: 26rem; margin: 0 auto; width: 100%; }
.shots img, .strips img { width: 100%; border-radius: 1rem; border: 1px solid var(--border); box-shadow: var(--shadow); }
.shots figcaption, .strips figcaption { margin-top: 1rem; text-align: center; font-size: 0.92rem; color: var(--text-soft); }
/* Wide statusline crops under "How it works". */
.strips { margin-top: 4rem; display: grid; gap: 3rem; }
.strips img { border-radius: 0.75rem; }

/* Numbered steps */
.steps { list-style: none; padding: 0; margin-top: 3rem; counter-reset: step; display: grid; gap: 2rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.75rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.steps h3 { font-size: 1.3rem; }
.steps p { margin-top: 0.4rem; color: var(--text-muted); }
.steps strong { color: var(--text); font-weight: 600; }

.checklist code { font-size: 0.92em; }
.disclaimer { margin-top: 3rem; text-align: center; font-size: 0.85rem; color: var(--text-soft); }

/* ---------- prose (privacy, about) ---------- */
.prose { color: var(--text-muted); font-size: 1.1rem; }
.prose h2 { color: var(--text); font-size: clamp(1.6rem, 3vw, 2rem); margin-top: 3rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: var(--text); font-size: 1.3rem; margin-top: 1.75rem; }
.prose p, .prose ul { margin-top: 1rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.5rem; }
.prose strong { color: var(--text); font-weight: 600; }
.page-head { padding: 8.5rem 0 3.5rem; background: linear-gradient(var(--hero-top), var(--hero-bottom)); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.page-head p { margin-top: 1rem; color: var(--text-muted); font-size: 1.15rem; }
.page-head .meta { font-size: 0.92rem; color: var(--text-soft); }

/* brand asset tiles (about) */
.asset-preview { height: 10rem; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--border); border-radius: 0.8rem; }
.asset-preview.dark { background: #2E1A0B; border-color: #2E1A0B; }
.asset-preview img { max-height: 7rem; width: auto; }
.asset-preview img.tile { width: 6rem; height: 6rem; border-radius: 1.4rem; box-shadow: var(--shadow); }
.card .asset-preview + h3 { margin-top: 1.5rem; }

/* ---------- footer ---------- */
.site-footer { padding: 2.5rem 0; background: var(--surface); border-top: 1px solid var(--border); font-size: 0.92rem; color: var(--text-soft); }
.site-footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
@media (min-width: 640px) { .site-footer .wrap { flex-direction: row; justify-content: space-between; text-align: left; } }
.site-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
