/* Cory Webb Media — under construction page.
   Tokens mirror the brand design system (see app/globals.css). */

:root {
  --paper: #f7f3ee;
  --surface: #ffffff;
  --hairline: #e3dcd3;
  --ink: #16120f;
  --ink-muted: #5e5650;
  --ember: #ff5a3c;
  --ember-text: #c2381a;
  --moss: #2f6b4f;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --gutter: 16px;
  color-scheme: light dark;
}

/* Dark theme: an explicit choice from the toggle, or the system setting when none is saved. */
:root[data-theme="dark"] {
  --paper: #16120f;
  --surface: #211c18;
  --hairline: #352d27;
  --ink: #f3ede6;
  --ink-muted: #a69c93;
  --ember-text: #ff7a5f;
  --moss: #7bcfa2;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16120f;
    --surface: #211c18;
    --hairline: #352d27;
    --ink: #f3ede6;
    --ink-muted: #a69c93;
    --ember-text: #ff7a5f;
    --moss: #7bcfa2;
  }
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, p { margin: 0; }
svg { display: block; }

a, .mock-a { color: var(--ember-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover, .mock-a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px var(--gutter);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 38px; height: auto; flex: none; }
.brand__name { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }

.mark-ember { fill: var(--ember); }
.mark-moss { fill: var(--moss); }
.mark-dot { fill: var(--ink); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; flex: none;
  color: var(--ink); background: transparent; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: var(--radius-md);
  transition: border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--ink); }

/* Moon shows in light mode, sun in dark mode — CSS picks, so it's right before JS runs. */
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}

/* ---------- main ---------- */

.main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px var(--gutter) 48px;
}

.card {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}
@media (min-width: 768px) {
  .card { padding: 56px; gap: 28px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--moss);
}
.eyebrow__dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--ember);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .eyebrow__dot { animation: none; }
  body { transition: none; }
}

.display {
  font-size: 34px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
@media (min-width: 768px) {
  .display { font-size: 48px; line-height: 56px; }
}

/* The brand's ember underline bar (a text decoration, so it still works if the line wraps on small phones). */
.underline-bar {
  text-decoration: underline;
  text-decoration-color: var(--ember);
  text-decoration-thickness: max(4px, 0.09em);
  text-underline-offset: 0.14em;
  text-decoration-skip-ink: none;
}

.lede {
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-muted);
  max-width: 600px;
}
@media (min-width: 768px) {
  .lede { font-size: 19px; line-height: 30px; }
}
.lede a { font-weight: 500; }

/* ---------- footer ---------- */

.foot {
  padding: 24px var(--gutter);
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-muted);
}
