/* Phil Rosenberg. Design Tokens
   Editorial restraint. Warm paper, deep ink, single accent.
*/

:root, [data-theme="light"] {
  /* Light theme: warm paper, ink, single accent */
  --paper: #F4F1EC;
  --paper-deep: #ECE7DF;
  --paper-line: #E1DBD0;
  --ink: #16140F;
  --ink-soft: #2A2620;
  --ink-mute: #6B6357;
  --ink-faint: #A8A092;
  /* Warm gold accent. reads as expensive editorial, not weird brown */
  --accent: oklch(0.62 0.12 70);
  --accent-soft: oklch(0.62 0.12 70 / 0.10);
  /* Theme-aware semantic helpers */
  --rule: rgba(22, 20, 15, 0.12);
  --rule-soft: rgba(22, 20, 15, 0.08);
  --shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 12px 40px rgba(0, 0, 0, .12);

  /* Type */
  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "Geist", "Söhne", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Scale (modular, not exhaustive) */
  --t-xs: 11px;
  --t-sm: 13px;
  --t-base: 15px;
  --t-md: 17px;
  --t-lg: 22px;
  --t-xl: 32px;
  --t-2xl: 48px;
  --t-3xl: 72px;
  --t-4xl: 104px;
  --t-5xl: 144px;

  /* Rhythm */
  --gutter: 24px;
  --pad-x: clamp(24px, 5vw, 80px);
  --max-w: 1480px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

[data-theme="dark"] {
  /* Dark theme: ink-on-paper inverted */
  --paper: #0F0E0B;
  --paper-deep: #181712;
  --paper-line: #28261F;
  --ink: #F4F1EC;
  --ink-soft: #D5D0C4;
  --ink-mute: #968E7F;
  --ink-faint: #5C564A;
  --accent: oklch(0.74 0.13 78);
  --accent-soft: oklch(0.74 0.13 78 / 0.12);
  --rule: rgba(244, 241, 236, 0.14);
  --rule-soft: rgba(244, 241, 236, 0.08);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 40px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

::selection { background: var(--ink); color: var(--paper); }

/* -- Layout primitives -- */

.frame {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.rule {
  height: 1px;
  background: var(--ink);
  opacity: 0.12;
}

/* -- Type -- */

.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}

.serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.serif-it { font-family: var(--serif); font-style: italic; font-weight: 400; }

.lede {
  font-family: var(--serif);
  font-size: var(--t-lg);
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}

/* -- Buttons / CTAs -- */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
/* Hover used to flash the oxblood accent. now stays in ink color, just expands gap */
.cta:hover { gap: 16px; }
.cta .arrow { transition: transform 0.3s var(--ease); }
.cta:hover .arrow { transform: translateX(2px); }

/* -- Reveal -- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* -- Image placeholder (striped) -- */

.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--paper-deep) 0 16px,
      var(--paper-line) 16px 32px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.placeholder .ph-label {
  font-family: var(--mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  background: var(--paper);
  padding: 6px 10px;
  border: 1px solid var(--paper-line);
}

/* -- Utility -- */
.hide { display: none !important; }
.row { display: flex; gap: var(--gutter); }
.col { display: flex; flex-direction: column; gap: var(--gutter); }

/* -- Mobile padding: give frames more breathing room on small screens -- */
@media (max-width: 480px) {
  :root { --pad-x: 28px; }
  .frame { padding-left: 28px; padding-right: 28px; }
}
