/* gutgutia.in — "dark countdown" */

:root {
  --bg: #0a0b0d;
  --surface: #14161a;
  --line: #24272d;
  --text: #ecebe6;
  --soft: #c4c3bd;
  --muted: #8a8d93;
  --accent: #e5322d;
  --accent-btn: #c9221d; /* darker than --accent so white text passes 4.5:1 */
  --plate: #ecebe6;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1180px;
  --gutter: 32px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; scrollbar-color: #2c2f36 var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
input { caret-color: var(--accent); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-stretch: 75%; font-weight: 800; line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: 1440px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ico { width: 1em; height: 1em; flex-shrink: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 11, 13, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: 0.01em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 32px; }
.nav a { text-decoration: none; font-size: 0.9375rem; color: var(--muted); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.menu-btn {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  font: 500 0.8125rem var(--sans); padding: 8px 14px; border-radius: 4px; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 4px;
  font: 600 0.9375rem/1 var(--sans); text-decoration: none;
  border: 1px solid transparent; transition: background .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.btn-primary { background: var(--accent-btn); color: #fff; box-shadow: 0 10px 24px -10px rgba(229, 50, 45, .6); }
.btn-primary:hover { background: #b01d19; transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255, 255, 255, .16); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-glow {
  position: absolute; inset: -15%; z-index: -1;
  background: url(../assets/cover.jpg) 70% 40% / cover no-repeat;
  filter: blur(80px) saturate(1.5);
  opacity: .5;
}
.hero-glow::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10, 11, 13, .1), var(--bg) 85%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center;
  padding-top: 48px; padding-bottom: 72px;
}
.title { display: flex; flex-direction: column; line-height: .82; }
.title-pre { font-size: clamp(2.5rem, 5vw, 4.25rem); font-stretch: 75%; letter-spacing: -0.01em; }
.title-65 {
  font-size: clamp(8rem, 26vw, 22rem); font-weight: 900; font-stretch: 62%;
  letter-spacing: -0.04em; color: var(--accent); margin-left: -0.04em;
}
.by { font-size: 0.9375rem; color: var(--muted); margin: 18px 0 22px; }
.premise { font-size: 1.1875rem; max-width: 46ch; color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* The book as an object: tilted, with a lit spine */
.book3d {
  position: relative; justify-self: center; width: 100%; max-width: 360px;
  transform: perspective(1800px) rotateY(-16deg) rotateX(3deg);
  transition: transform .9s var(--ease);
  border-radius: 2px 6px 6px 2px;
  box-shadow: 30px 40px 60px -20px rgba(0, 0, 0, .85), 8px 10px 18px rgba(0, 0, 0, .5);
}
.book3d img { border-radius: inherit; }
.book3d::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .45) 0, rgba(255, 255, 255, .18) 1.6%, rgba(0, 0, 0, .25) 3.4%, transparent 7%, transparent 85%, rgba(255, 255, 255, .06));
}
.book3d:hover { transform: perspective(1800px) rotateY(-6deg) rotateX(1deg); }

/* Life-clock readout bar */
.lifeclock {
  position: relative; border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 13, .55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.lifeclock-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; padding-top: 26px; padding-bottom: 26px; }
.lc-name { margin: 0; font-weight: 700; font-size: 1.125rem; }
.lc-note { margin: 2px 0 0; font-size: 0.875rem; color: var(--muted); }
.readout { display: flex; gap: clamp(20px, 4vw, 56px); justify-content: center; }
.unit { display: flex; flex-direction: column; }
.unit b {
  font: 500 clamp(2rem, 4.4vw, 3.5rem)/1 var(--mono); color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.unit i { font: normal 500 0.75rem/1 var(--sans); color: var(--muted); margin-top: 10px; text-transform: uppercase; letter-spacing: .12em; }
.readout-done { grid-column: 2; margin: 0; text-align: center; font: 500 clamp(1.25rem, 2.6vw, 1.75rem) var(--mono); color: var(--accent); }
.is-done .readout { display: none; }
.lc-input label { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 6px; }
.lc-input input {
  width: 11.5em; padding: 10px 12px; border-radius: 4px;
  background: rgba(0, 0, 0, .5); color: var(--text); border: 1px solid #3a3e46;
  font: 500 1.125rem var(--mono); transition: border-color .2s;
}
.lc-input input::placeholder { color: #7d8087; }
.lc-input input:focus { border-color: var(--accent); }
.clock-hint { margin: 8px 0 0; font-size: 0.8125rem; color: #f0a3a0; max-width: 16em; }
.lc-privacy { margin: 8px 0 0; font-size: 0.75rem; color: var(--muted); max-width: 18em; }

/* Sections */
.section { padding: 136px 0; }
.section + .section { border-top: 1px solid var(--line); }

/* The book */
.book-q { font-size: clamp(2.75rem, 7vw, 6rem); max-width: 14ch; margin-bottom: 80px; }
.book-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.book-cols h3 { font-size: 1.5rem; margin-bottom: 18px; padding-top: 22px; border-top: 1px solid var(--accent); width: fit-content; min-width: 4.5rem; }
.book-cols p { color: var(--soft); font-size: 1rem; margin: 0; }

/* The three */
.three h2 { margin-bottom: 56px; }
.three-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.three-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.who { font: 800 clamp(2.25rem, 6.5vw, 5.5rem)/1 var(--sans); font-stretch: 70%; letter-spacing: -0.01em; transition: color .35s; }
.what { color: var(--muted); font-size: 1rem; }
.three-list li:hover .who { color: #fff; }
.three-list li .who { color: #bdbcb6; }
.stakes { margin: 72px 0 0; font: 500 clamp(1.25rem, 2.5vw, 1.75rem)/1.2 var(--sans); color: var(--muted); }
.stakes strong { display: block; color: var(--text); font: 900 clamp(3.5rem, 11vw, 9rem)/.9 var(--sans); font-stretch: 62%; letter-spacing: -0.03em; margin-bottom: 8px; }

/* Trailer */
.trailer h2 { margin-bottom: 48px; }
.video-frame {
  position: relative; border-radius: 8px; overflow: hidden; background: #000; aspect-ratio: 16 / 9;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; inset: 0; display: grid; place-items: center; width: 100%;
  border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(to top, rgba(10, 11, 13, .55), rgba(10, 11, 13, .1));
}
.play svg {
  width: 96px; height: 96px; padding: 26px 22px 26px 30px; border-radius: 50%;
  background: var(--accent-btn); box-shadow: 0 16px 40px -8px rgba(229, 50, 45, .6);
  transition: transform .5s var(--ease);
}
.play:hover svg { transform: scale(1.08); }
.play[hidden] { display: none; }
.trailer-copy { margin: 40px 0 0; max-width: 64ch; color: var(--soft); font-size: 1.125rem; }

/* Author */
.author { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 80px; align-items: start; }
.author-photo { border-radius: 8px; box-shadow: 24px 30px 60px -24px rgba(0, 0, 0, .9); position: sticky; top: 96px; }
.bio h2 { margin-bottom: 28px; }
.bio p { color: var(--soft); max-width: 62ch; }
.bio .bio-lead { color: var(--text); font-size: 1.25rem; line-height: 1.55; }
.ventures { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.story-link {
  display: inline-flex; align-items: center; gap: 10px; margin: 8px 0 4px;
  font: 700 1.25rem var(--sans); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 8px; transition: gap .35s var(--ease);
}
.story-link:hover { gap: 16px; }

/* About page: his life as chapters */
.about-head-grid { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 64px; align-items: end; }
.about-head img { border-radius: 8px; box-shadow: 24px 30px 60px -24px rgba(0, 0, 0, .9); }
.page-head.about-head h1 { font-size: clamp(4rem, 9vw, 8.5rem); font-weight: 900; font-stretch: 62%; line-height: .85; letter-spacing: -0.03em; }
.about-head .page-lead { max-width: 44ch; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 0; list-style: none; padding: 0; margin: 32px 0 0; }
.facts li { font-weight: 600; font-size: 0.9375rem; padding: 0 16px; border-left: 1px solid #3a3e46; }
.facts li:first-child { padding-left: 0; border-left: 0; }

.chapters { position: relative; padding-left: 48px; }
.chapters::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); }
/* the red line fills as you read, like the life-clock running down */
@supports (animation-timeline: view()) {
  .chapters::after {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent);
    transform-origin: top; animation: chapter-fill linear both;
    animation-timeline: view(); animation-range: contain 0% contain 100%;
  }
  @keyframes chapter-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
.chapter { position: relative; display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 96px 0; }
.chapter + .chapter { border-top: 1px solid var(--line); }
.chapter::before {
  content: ""; position: absolute; left: -54px; top: 104px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.chapter-side { position: sticky; top: 112px; align-self: start; }
.chapter-no {
  display: block; font: 900 clamp(5rem, 9vw, 8rem)/.8 var(--sans); font-stretch: 62%; letter-spacing: -0.03em;
  color: transparent; -webkit-text-stroke: 1.5px #565b65;
}
.chapter-yrs { display: block; margin-top: 18px; font: 500 1.125rem var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
/* Chapter titles are film title cards, set like the hero's red 65 */
.chapter h2 {
  font: 900 clamp(3rem, 6.4vw, 5.75rem)/.92 var(--sans); font-stretch: 62%;
  letter-spacing: -0.02em; color: var(--accent); margin-bottom: 40px; padding-bottom: .04em;
}
@supports (animation-timeline: view()) {
  .chapter h2 { animation: title-in linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  @keyframes title-in { from { opacity: 0; transform: translateY(32px); filter: blur(10px); } }
}
.chapter ul { list-style: none; margin: 0; padding: 0; }
.chapter li { padding: 20px 0; border-top: 1px solid var(--line); }
.chapter li strong { display: block; font-size: 1.25rem; line-height: 1.35; }
.chapter li span { display: block; color: var(--soft); margin-top: 2px; }
.chapter li small { display: block; margin-top: 8px; font-size: 0.9375rem; line-height: 1.6; color: var(--muted); max-width: 60ch; }
.chapter li .yr { display: inline; font: 500 0.875rem var(--mono); color: var(--muted); margin-left: 8px; }
.chapter li a { color: var(--text); }
.beyond p { max-width: 60ch; color: var(--soft); font-size: 1.1875rem; }
.beyond h2 { margin-bottom: 28px; }

/* Buy */
.buy { position: relative; overflow: hidden; isolation: isolate; padding: 136px 0; border-top: 1px solid var(--line); }
.buy .hero-glow { background-position: 50% 80%; opacity: .26; }
.buy .hero-glow::after { background: radial-gradient(ellipse at 30% 50%, transparent, var(--bg) 75%); }
.buy-grid { display: grid; grid-template-columns: 0.55fr 1.45fr; gap: 80px; align-items: center; }
.book3d-sm { max-width: 280px; }
.buy h2 { font-size: clamp(3rem, 7vw, 6rem); margin-bottom: 20px; }
.buy .lead { font-size: 1.1875rem; max-width: 48ch; color: var(--soft); margin-bottom: 40px; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 14px; padding: 10px 20px 10px 10px;
  border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 1.0625rem;
  background: rgba(20, 22, 26, .8); border: 1px solid rgba(255, 255, 255, .1);
  transition: border-color .25s, transform .35s var(--ease), background .25s;
}
.store:hover { border-color: var(--text); transform: translateY(-2px); background: var(--surface); }
.plate { width: 48px; height: 48px; border-radius: 6px; background: var(--plate); display: grid; place-items: center; padding: 6px; }
.plate img { max-height: 36px; width: auto; }
.store .ico { color: var(--muted); }

/* Work page */
.page-head { position: relative; overflow: hidden; isolation: isolate; padding: 72px 0 96px; }
.page-head .hero-glow { background-position: 50% 30%; opacity: .4; }
.page-head h1 {
  font-size: clamp(6rem, 18vw, 15rem); font-weight: 900; font-stretch: 62%;
  letter-spacing: -0.04em; line-height: .82; margin-left: -0.04em;
}
.page-lead { margin: 28px 0 0; max-width: 34ch; font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.4; color: var(--soft); }
.page-head + .section { padding-top: 24px; }
.ventures-section h2 { margin-bottom: 48px; }
.ventures-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.venture {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start;
  padding: 44px 0; border-bottom: 1px solid var(--line);
}
.venture h3 {
  font: 800 clamp(2.75rem, 6vw, 5rem)/.95 var(--sans); font-stretch: 70%;
  color: #bdbcb6; transition: color .35s;
}
.venture:hover h3 { color: #fff; }
.ventures-list-sm .venture { padding: 32px 0; }
.ventures-list-sm .venture h3 { font-size: clamp(2rem, 4vw, 3.25rem); }
.venture-body p { color: var(--soft); margin: 0 0 20px; max-width: 62ch; }
.venture-body .venture-meta { font: 500 0.875rem var(--mono); color: var(--muted); margin-bottom: 12px; }
.venture-link {
  display: inline-flex; align-items: center; gap: 8px; font: 500 0.9375rem var(--mono);
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 6px;
  transition: text-decoration-color .2s;
}
.venture-link:hover { text-decoration-color: var(--accent); }
a.book3d { display: block; }

/* Footer */
.site-footer { padding: 120px 0 40px; border-top: 1px solid var(--line); }
.site-footer h2 { font-size: clamp(2.25rem, 5vw, 4rem); max-width: 18ch; margin-bottom: 28px; }
.mail { font: 500 clamp(1.25rem, 3vw, 1.75rem) var(--mono); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 8px; word-break: break-all; transition: text-decoration-color .2s; }
.mail:hover { text-decoration-color: var(--accent); }
.social { display: flex; flex-wrap: wrap; gap: 10px 32px; list-style: none; padding: 0; margin: 48px 0 88px; }
.social a { color: var(--muted); text-decoration: none; }
.social a:hover { color: var(--text); }
.legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; font-size: 0.875rem; color: var(--muted); }

/* Load moment: the hero assembles, then the clock boots (main.js scrambles the digits) */
.js .title-pre, .js .title-65, .js .by, .js .premise, .js .actions, .js .book3d:not(.book3d-sm), .js .lifeclock {
  animation: rise 1.1s var(--ease) both;
}
.js .title-65 { animation-name: rise-65; animation-delay: .08s; }
.js .by { animation-delay: .18s; }
.js .premise { animation-delay: .24s; }
.js .actions { animation-delay: .3s; }
.js .book3d:not(.book3d-sm) { animation-name: book-in; animation-duration: 1.4s; animation-delay: .1s; }
.js .lifeclock { animation-delay: .45s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-65 { from { opacity: 0; transform: translateY(40px); filter: blur(12px); } }
@keyframes book-in { from { opacity: 0; transform: perspective(1800px) rotateY(-40deg) rotateX(6deg) translateX(40px); } }

/* Phones and small tablets */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 56px; gap: 40px; }
  .hero-grid .book3d { max-width: 220px; justify-self: start; }
  .title-65 { font-size: 46vw; }
  .lifeclock-grid { grid-template-columns: 1fr; gap: 20px; }
  .readout { justify-content: flex-start; }
  .readout-done { grid-column: auto; text-align: left; }
  .book-cols, .author, .buy-grid, .venture { grid-template-columns: 1fr; }
  .venture { gap: 16px; }
  .author { gap: 40px; }
  .about-head-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-head img { max-width: 280px; }
  .chapters { padding-left: 28px; }
  .chapter { grid-template-columns: 1fr; gap: 20px; padding: 64px 0; }
  .chapter::before { left: -34px; top: 72px; }
  .chapter-side { position: static; display: flex; align-items: baseline; gap: 20px; }
  .chapter-no { font-size: 4.5rem; }
  .chapter-yrs { margin-top: 0; }
  .author-photo { position: static; max-width: 320px; }
  .buy-grid { gap: 40px; }
  .book3d-sm { max-width: 180px; justify-self: start; }
}
@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .menu-btn { display: inline-block; }
  .js .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav a { padding: 14px 16px; border-top: 1px solid var(--line); }
  .js .nav-open .nav { display: flex; }
  .title-65 { font-size: 46vw; }
  .section, .buy { padding: 88px 0; }
  .book-q { margin-bottom: 48px; }
  .book-cols { gap: 40px; }
  .three-list li { padding: 20px 0; flex-direction: column; gap: 6px; }
  .play svg { width: 72px; height: 72px; padding: 20px 16px 20px 22px; }
  .site-footer { padding-top: 88px; }
}
@media (max-width: 767px) { html:not(.js) .menu-btn { display: none; } html:not(.js) .nav { flex-wrap: wrap; gap: 12px 20px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .book3d:hover { transform: perspective(1800px) rotateY(-16deg) rotateX(3deg); }
}
