/* mydump.app — derived from the app's design system.
 *
 * Every value below is ported from lib/app/theme/. Do not invent new colours,
 * radii, spacing or motion here: change the Dart tokens and mirror them.
 *   colours   -> lib/app/theme/color_tokens.dart   (AppColorTokens)
 *   surfaces  -> lib/app/theme/surface_tokens.dart (AppSurfaceTokenSets)
 *   radii     -> lib/app/theme/surface_tokens.dart (AppRadiusTokens)
 *   spacing   -> lib/app/theme/spacing_tokens.dart (AppSpacingTokens)
 *   motion    -> lib/app/theme/motion_tokens.dart  (AppMotionTokens)
 *   type      -> lib/app/theme/typography_tokens.dart
 *
 * The app bundles no font and renders in the platform default, so this
 * stylesheet does the same. No webfont is loaded anywhere.
 *
 * The site CSP is `default-src 'none'; style-src 'self'`, so there are no
 * inline styles, no scripts and no <img>; artwork is inline SVG.
 */

:root {
  /* AppSpacingTokens */
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 40px;

  /* AppRadiusTokens */
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-card-feed: 22px;
  --radius-pill: 999px;

  /* AppStrokeTokens */
  --stroke-hairline: 1px;
  --stroke-emphasis: 1.5px;

  /* AppMotionTokens — easeOutCubic */
  --motion-quick: 180ms;
  --motion-standard: 280ms;
  --ease-emphasized: cubic-bezier(0.215, 0.61, 0.355, 1);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* AppColorTokens.dark */
  --background: #171110;
  --background-top: #261817;
  --surface: #2d2220;
  --surface-raised: #3d2d28;
  --surface-highlight: #4a3832;
  --stroke: #5a4640;
  --stroke-strong: #74564c;
  --accent: #f3a35c;
  --accent-soft: rgba(243, 163, 92, 0.25);
  --insight: #79c8a0;
  --text-primary: #f9e8da;
  --text-secondary: #d3c0b1;
  --text-muted: #b8a293;
  --error: #e88080;
  --brand-wordmark: #e8c98a;
  --brand-wordmark-dot: #b07a3a;
  --navigation-active: #c8924a;

  /* AppSurfaceTokenSets.dark */
  --panel-gradient: linear-gradient(135deg, #3d2d28, #2d2220);
  --panel-border: #5a4640;
  --panel-shadow: rgba(0, 0, 0, 0.33);
  --hero-gradient: linear-gradient(135deg, #261e14 0%, #1e1710 60%, #221a0f 100%);
  --hero-glow: rgba(180, 110, 40, 0.12);
  --hero-title: #e8d0a0;
  --hero-shadow: rgba(0, 0, 0, 0.33);
  --button-gradient: linear-gradient(135deg, #c8873a, #a06428, #8a5420);
  --button-shadow: rgba(180, 100, 30, 0.35);
  --button-foreground: #fff8ec;
  --pill-border: rgba(180, 130, 60, 0.2);
  --pill-background: rgba(255, 255, 255, 0.03);
  --pill-text: #c9a97a;
  --author-accent: #c9a97a;
  --avatar-fill: #3d2e1a;

  /* Mascot ink — fixed, not themed: must stay legible on both accent shades */
  --mascot-ink: #2f211d;

  /* AppElevationTokens */
  --elevation-card: 0 12px 20px var(--panel-shadow);
  --elevation-action: 0 4px 20px var(--button-shadow);
}

/* AppColorTokens.light + AppSurfaceTokenSets.light */
@media (prefers-color-scheme: light) {
  :root {
    --background: #f6efe8;
    --background-top: #fffaf5;
    --surface: #f0e5db;
    --surface-raised: #e5d5c8;
    --surface-highlight: #ddcab9;
    --stroke: #d0bbaa;
    --stroke-strong: #b99f8c;
    --accent: #c67a36;
    --accent-soft: rgba(198, 122, 54, 0.15);
    --insight: #4d8e69;
    --text-primary: #2f211d;
    --text-secondary: #5c4a43;
    --text-muted: #7a645b;
    --error: #b65555;
    --brand-wordmark: #8a5420;
    --brand-wordmark-dot: #c67a36;
    --navigation-active: #c67a36;

    --panel-gradient: linear-gradient(135deg, #f4ece4, #e9ddd2);
    --panel-border: #d0bbaa;
    --panel-shadow: rgba(0, 0, 0, 0.08);
    --hero-gradient: linear-gradient(135deg, #f2e3d4 0%, #eadbcb 55%, #f7efe5 100%);
    --hero-glow: rgba(198, 122, 54, 0.12);
    --hero-title: #6c4528;
    --hero-shadow: rgba(0, 0, 0, 0.08);
    --button-gradient: linear-gradient(135deg, #c67a36, #ad632a, #8c4f1f);
    --button-shadow: rgba(164, 93, 31, 0.12);
    --button-foreground: #fffbf7;
    --pill-border: rgba(198, 122, 54, 0.15);
    --pill-background: rgba(198, 122, 54, 0.06);
    --pill-text: #8e5a2f;
    --author-accent: #a3622c;
    --avatar-fill: #e2d3c6;
  }
}

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

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, var(--hero-glow) 0, transparent 38rem),
    var(--hero-gradient) fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(960px, calc(100% - var(--space-xl)));
  margin-inline: auto;
}

/* ---------- Wordmark: mirrors lib/shared/ui/dump_wordmark.dart ---------- */
.wordmark {
  display: inline-block;
  color: var(--brand-wordmark);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none;
}

.wordmark .dot {
  color: var(--brand-wordmark-dot);
}

/* ---------- Dumpling mascot ----------
 * Drawn from the "fellow dumplings" language already used in the app
 * (lib/features/rooms/presentation). Fills come from the theme tokens so the
 * character follows light/dark with everything else. The ink tone is fixed
 * because it has to stay legible on both accent shades.
 */
.m-body {
  fill: var(--accent);
}

.m-pleat {
  fill: none;
  stroke: var(--mascot-ink);
  stroke-width: 3.5;
  stroke-linecap: round;
  opacity: 0.4;
}

.m-eye {
  fill: var(--mascot-ink);
}

.m-glint {
  fill: var(--button-foreground);
}

.m-mouth,
.m-brow {
  fill: none;
  stroke: var(--mascot-ink);
  stroke-width: 3.4;
  stroke-linecap: round;
}

.m-blush {
  fill: var(--mascot-ink);
  opacity: 0.16;
}

.m-shadow {
  fill: var(--mascot-ink);
  opacity: 0.14;
}

/* ---------- Navigation ---------- */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding-block: var(--space-lg);
}

.site-nav .wordmark {
  margin-right: auto;
  font-size: 1.5rem;
}

.site-nav a:not(.wordmark) {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: color var(--motion-quick) var(--ease-emphasized);
}

.site-nav a:not(.wordmark):hover {
  color: var(--navigation-active);
}

/* ---------- Type: AppTypographyTokens ratios, scaled for viewport ---------- */
.eyebrow {
  margin: 0 0 var(--space-sm);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

h1 {
  /* headlineLarge: w700, height 1.05, letterSpacing -0.6 */
  margin: 0 0 var(--space-md);
  color: var(--hero-title);
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.0375em;
  text-wrap: balance;
}

h2 {
  /* headlineMedium: w700, height 1.1, letterSpacing -0.4 */
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.625rem, 4.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.0225em;
  text-wrap: balance;
}

h3 {
  /* titleLarge: w700, height 1.15 */
  margin: 0 0 var(--space-xs);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.15;
}

p {
  margin: 0 0 var(--space-md);
  max-width: 62ch;
  color: var(--text-secondary);
  line-height: 1.45;
}

p:last-child {
  margin-bottom: 0;
}

.lede {
  max-width: 48ch;
  font-size: 1.0625rem;
}

a {
  color: var(--accent);
}

/* ---------- Sections ---------- */
.band {
  padding-block: clamp(var(--space-xl), 6vw, 4rem);
  border-top: var(--stroke-hairline) solid var(--stroke);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: var(--space-xl);
  align-items: center;
  padding-block: clamp(var(--space-lg), 5vw, 3.5rem)
    clamp(var(--space-xl), 7vw, 4.5rem);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art svg {
  width: min(100%, 240px);
  height: auto;
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .hero-art svg {
    width: min(60%, 180px);
  }
}

/* ---------- Buttons: AppSurfaceTokens.primaryButtonGradient ---------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.btn {
  display: inline-block;
  padding: 0.75rem var(--space-lg);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--button-gradient);
  box-shadow: var(--elevation-action);
  color: var(--button-foreground);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.1px;
  text-decoration: none;
  transition: filter var(--motion-quick) var(--ease-emphasized);
}

.btn:hover {
  filter: brightness(1.08);
}

.cta-note {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ---------- Pills: AppSurfaceTokens pill* ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border: var(--stroke-hairline) solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-background);
  color: var(--pill-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ---------- Panels: AppSurfaceTokens.panelGradient ---------- */
.panel {
  padding: var(--space-lg);
  border: var(--stroke-hairline) solid var(--panel-border);
  border-radius: var(--radius-xl);
  background: var(--panel-gradient);
  box-shadow: var(--elevation-card);
}

/* ---------- D.U.M.P. axis grid ---------- */
.axes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
}

.axes li {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  border: var(--stroke-hairline) solid var(--panel-border);
  border-radius: var(--radius-md);
  background: var(--panel-gradient);
}

.axes .letter {
  color: var(--accent);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.0375em;
}

.axes .name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.axes .detail {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.punchline {
  margin: var(--space-lg) 0 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.punchline strong {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Two-column split ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: var(--space-xl);
  align-items: center;
}

@media (max-width: 720px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  gap: var(--space-sm);
  align-items: baseline;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.feature-list .marker {
  color: var(--accent);
  font-weight: 700;
}

.feature-list b {
  color: var(--text-primary);
  font-weight: 700;
}

/* ---------- Device frame for real app screenshots ----------
 * Captures are light-theme (the emulator's default) and the site is dark for
 * most visitors, so the frame is doing real work: it reads as a phone held
 * against the page rather than a mismatched image pasted onto it.
 */
.device {
  display: flex;
  justify-content: center;
}

.device img {
  display: block;
  width: min(100%, 268px);
  height: auto;
  padding: var(--space-sm);
  border: var(--stroke-emphasis) solid var(--stroke-strong);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
  box-shadow: var(--elevation-card);
}

/* ---------- Insight callout (AppColorTokens.insight) ---------- */
.insight-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  color: var(--insight);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ---------- Long-form content pages ---------- */
.content h2 {
  margin-top: var(--space-xl);
}

.content ul {
  margin: 0 0 var(--space-md);
  max-width: 62ch;
  padding-left: var(--space-lg);
  color: var(--text-secondary);
}

.content li + li {
  margin-top: var(--space-sm);
}

/* ---------- Closing CTA ---------- */
.final {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding-block: clamp(var(--space-xxl), 8vw, 4.5rem);
  border-top: var(--stroke-hairline) solid var(--stroke);
  text-align: center;
}

.final svg {
  width: 88px;
  height: auto;
}

.final p {
  max-width: 38ch;
}

/* ---------- Footer ---------- */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
  padding-block: var(--space-lg) var(--space-xxl);
  border-top: var(--stroke-hairline) solid var(--stroke);
  color: var(--text-muted);
  font-size: 0.875rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--navigation-active);
}

footer .spacer {
  margin-left: auto;
}

/* ---------- Focus + motion ---------- */
a:focus-visible,
.btn:focus-visible {
  outline: var(--stroke-emphasis) solid var(--accent);
  outline-offset: var(--space-xs);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
