/* Hallmark · page: parafield.studio landing (placeholder; Justin redesigns it)
 * tone: austere · theme: Studio chrome (green-black floor, warm-white mark) · enrichment: chapter bar (CSS)
 * critique: P4 H5 E5 S4 R5 V4
 */
:root {
  --color-paper: oklch(18.6% 0.011 158);   /* Studio theme-color #101512 */
  --color-paper-2: oklch(21.5% 0.012 158);
  --color-ink: oklch(98.6% 0.006 40);      /* Parafield mark #FFFAF8 */
  --color-ink-2: oklch(80% 0.012 150);
  --color-ink-3: oklch(66% 0.012 150);
  --color-press: oklch(88% 0.008 60);
  --color-hover: oklch(93% 0.007 50);
  --color-seg: oklch(98.6% 0.006 40 / 0.16);
  --color-seg-final: oklch(98.6% 0.006 40 / 0.78);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --text-sm: 0.8125rem;
  --text-md: 1rem;
  --text-lg: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
  --text-display: clamp(2.125rem, 1.2rem + 5vw, 5.5rem);

  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 56px;
  --gutter: clamp(20px, 5vw, 64px);

  --radius-control: 999px;
  --dur-fast: 140ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { background: var(--color-paper); }
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  padding: var(--space-md) var(--gutter) var(--space-lg);
  background: linear-gradient(180deg, var(--color-paper-2), var(--color-paper) 70%);
  color: var(--color-ink);
  font: 400 var(--text-md)/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 4px; border-radius: 6px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 48px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-sm); font-weight: 600; white-space: nowrap; }
.brand img { display: block; width: 36px; height: auto; }
.login { color: var(--color-ink-2); font-weight: 500; white-space: nowrap; padding: var(--space-xs) 2px; transition: color var(--dur-fast) var(--ease-out); }
.login:hover { color: var(--color-ink); }

.hero { align-self: center; padding: var(--space-xl) 0; max-width: 1100px; min-width: 0; }
.hero h1 {
  margin: 0;
  max-width: 21ch;
  font-size: var(--text-display);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hero p { margin: var(--space-md) 0 0; max-width: 46ch; color: var(--color-ink-2); font-size: var(--text-lg); line-height: 1.5; }

.signup {
  display: inline-flex;
  align-items: center;
  margin-top: var(--space-lg);
  padding: 14px 28px;
  border-radius: var(--radius-control);
  background: var(--color-ink);
  color: var(--color-paper);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.signup:hover { background: var(--color-hover); }
.signup:active { background: var(--color-press); }
.signup:focus-visible { outline-offset: 3px; border-radius: var(--radius-control); }

/* Signature: a book's chapters, each sized by its length, reaching final mix one by one. */
.book { display: flex; gap: 3px; height: 8px; margin: 0 0 var(--space-lg); }
.book span { position: relative; flex: var(--w) 1 0; min-width: 4px; border-radius: 2px; background: var(--color-seg); }
.book span:first-child { border-radius: 4px 2px 2px 4px; }
.book span:last-child { border-radius: 2px 4px 4px 2px; }
.book span::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--color-seg-final); opacity: 0; animation: mix 21s var(--ease-in-out) infinite; animation-delay: calc(var(--i) * 1s); }
@keyframes mix { 0%, 4% { opacity: 0; } 9%, 78% { opacity: 1; } 86%, 100% { opacity: 0; } }
.book span:nth-child(1) { --i: 0; --w: 31; }
.book span:nth-child(2) { --i: 1; --w: 24; }
.book span:nth-child(3) { --i: 2; --w: 38; }
.book span:nth-child(4) { --i: 3; --w: 27; }
.book span:nth-child(5) { --i: 4; --w: 33; }
.book span:nth-child(6) { --i: 5; --w: 19; }
.book span:nth-child(7) { --i: 6; --w: 41; }
.book span:nth-child(8) { --i: 7; --w: 29; }
.book span:nth-child(9) { --i: 8; --w: 35; }
.book span:nth-child(10) { --i: 9; --w: 22; }
.book span:nth-child(11) { --i: 10; --w: 30; }
.book span:nth-child(12) { --i: 11; --w: 26; }
.book span:nth-child(13) { --i: 12; --w: 37; }
.book span:nth-child(14) { --i: 13; --w: 21; }

.foot { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); font-size: var(--text-sm); color: var(--color-ink-3); }
.foot a { color: var(--color-ink-2); white-space: nowrap; transition: color var(--dur-fast) var(--ease-out); }
.foot a:hover { color: var(--color-ink); }

@media (max-width: 480px) {
  .hero { padding: var(--space-lg) 0; }
  .book { gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .book span::after { animation: none; }
  .book span:nth-child(-n + 9)::after { opacity: 1; }
  .login, .signup, .foot a { transition: none; }
}
