/* ============================================================================
 * justin.dom.vin
 *
 * Editorial-manifesto aesthetic. Steel-blue hero with Justin's dot eyes
 * (palette + geometry pulled from .justin/core/app/avatar/Avatar.tsx).
 * Below the fold: warm cream paper, alternating two-column entries with
 * hand-built SVG illustrations. Fraunces display serif + Geist body sans +
 * JetBrains Mono labels.
 * ========================================================================== */

:root {
  /* Justin palette — matches PALETTE in Avatar.tsx */
  --justin-bg: #6383C4;
  --justin-fg: #16294F;

  /* Paper palette — warm, designed off-white, never pure white */
  --paper: #FAFAF6;
  --paper-tint: #F1EFE7;
  --ink: #16294F;
  --ink-soft: #2F3D5E;
  --ink-faint: #7A8198;
  --rule: rgba(22, 41, 79, 0.10);
  --accent: #6383C4;

  --measure: 64rem;

  /* Type families */
  --display: "Fraunces", "GT Sectra", ui-serif, Georgia, serif;
  --body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--justin-bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(99, 131, 196, 0.32); color: var(--ink); }

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: color 160ms ease;
}

/* ============================== Hero ============================== */

.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--justin-bg);
}

.face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.eye-shape {
  transform-box: fill-box;
  transform-origin: center;
  transform: translate(0, 0) scaleY(1);
  will-change: transform;
}

.hero-foot {
  position: absolute;
  left: 50%;
  bottom: max(env(safe-area-inset-bottom, 0px), 28px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250, 250, 246, 0.66);
  pointer-events: none;
  animation: nudge 2.6s ease-in-out infinite;
}
.hero-foot svg { display: block; }

@keyframes nudge {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.55; }
  50%      { transform: translate(-50%, 6px); opacity: 1; }
}

/* ============================== Paper ============================== */

.paper {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(72px, 12vw, 144px) clamp(24px, 5vw, 72px) clamp(96px, 14vw, 168px);
  position: relative;
}

/* Sublte top rule between hero and paper — a hairline shadow of authority */
.paper::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: rgba(22, 41, 79, 0.10);
}

/* ============================== Entry ============================== */

.entry {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 120px) 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.2, .8, .2, 1), transform 700ms cubic-bezier(.2, .8, .2, 1);
}
.entry:last-of-type { border-bottom: none; }
.entry.is-visible { opacity: 1; transform: none; }

@media (min-width: 880px) {
  .entry {
    grid-template-columns: 1.15fr 1fr;
  }
  /* Alternating layout: even-numbered entries flip text and art */
  .entry:nth-of-type(even) .entry-text { order: 2; }
  .entry:nth-of-type(even) .entry-art  { order: 1; }
}

.entry-text {
  max-width: 38rem;
}

.entry-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.entry-title {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 96, "wght" 420, "SOFT" 60, "WONK" 0;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 24px;
  /* italic 'a' / soft serifs feel less generic at this weight */
}

.entry-title a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.12em;
}
.entry-title a:hover {
  color: var(--ink);
}

.entry-body {
  font-family: var(--body);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 32em;
}

.entry-art {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-art svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 48px rgba(22, 41, 79, 0.06));
  transition: transform 480ms cubic-bezier(.2, .8, .2, 1);
}

.entry:hover .entry-art svg {
  transform: translateY(-4px);
}

/* The first entry's art is a face — make it feel like an avatar tile */
.entry:first-of-type .entry-art svg {
  max-width: 240px;
  border-radius: 24px;
}

/* ============================== Footer ============================== */

.foot {
  max-width: var(--measure);
  margin: clamp(56px, 10vw, 96px) auto 0;
  padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.foot a {
  color: var(--ink-faint);
  text-decoration: none;
}
.foot a:hover { color: var(--ink); }
.foot-sep { color: var(--rule); }

/* ============================== Reduced motion ============================== */

@media (prefers-reduced-motion: reduce) {
  .eye-shape { transform: none !important; animation: none !important; }
  .hero-foot { animation: none !important; }
  .entry {
    opacity: 1;
    transform: none;
    transition: none;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .entry:hover .entry-art svg { transform: none; }
  rect animate, [animate] { animation: none !important; }
}

/* ============================== Mobile tightening ============================== */

@media (max-width: 600px) {
  .entry { padding: 56px 0; }
  .entry-title { line-height: 1.08; }
  .entry-art svg { max-width: 200px; }
  .entry:first-of-type .entry-art svg { max-width: 160px; }
}
