:root {
  --paper: #070404;
  --paper-2: #110808;
  --paper-3: #1a0f0f;
  --ink: #f5f1ef;
  --ink-2: #cfc7c3;
  --ink-3: #8f8580;
  --rule: rgba(245, 241, 239, 0.14);
  --rule-soft: rgba(245, 241, 239, 0.07);
  --red: #ff5f56;
  --red-deep: #c72c41;
  --red-glow: #ff4f3b;
  --amber: #ffb347;
  --amber-deep: #b8741a;
  --green: #7fe3c8;
  --warm: #ffd1c4;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  --glow: 0 0 60px rgba(255, 95, 86, 0.25);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); color: var(--ink); font-family: var(--font); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 95, 86, 0.16), transparent 26rem),
    radial-gradient(circle at 82% 12%, rgba(199, 44, 65, 0.14), transparent 22rem),
    var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.panel-open { overflow: hidden; }

a { color: inherit; }
img, canvas, video { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 12px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  transform: translateY(-160%);
  background: var(--red);
  color: var(--paper);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.28;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: radial-gradient(circle at 52% 38%, transparent 12rem, rgba(5, 2, 2, 0.92) 92%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  background: rgba(7, 4, 4, 0.78);
  backdrop-filter: blur(18px);
}
.site-header.compact { background: rgba(7, 4, 4, 0.82); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-height: 44px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 95, 86, 0.44);
  border-radius: 14px;
  background: rgba(199, 44, 65, 0.22);
  color: var(--warm);
  font-weight: 900;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 0.95rem; }
.brand small { color: var(--ink-3); font-size: 0.72rem; margin-top: 0.12rem; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.1rem);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}
.nav a:hover { color: var(--ink); background: rgba(245, 241, 239, 0.08); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.62fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(4.4rem, 10vw, 8.1rem) clamp(1.25rem, 5vw, 6rem) clamp(5rem, 9vw, 7rem);
  overflow: hidden;
}
.hero-copy, .exposure-panel { position: relative; z-index: 2; }

.eyebrow, .section-kicker {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-block-start: 0; }
h1 {
  max-width: 14ch;
  margin-block-end: 1.3rem;
  font-size: clamp(3.1rem, 7.8vw, 7.6rem);
  line-height: 0.91;
  letter-spacing: -0.052em;
}
h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.06; margin-block-end: 0.7rem; }

.lede {
  max-width: 68ch;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 1.55vw, 1.3rem);
  line-height: 1.56;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }

.button, .ghost-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0.85rem 1.05rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.button:hover, .ghost-button:hover { transform: translateY(-2px); }
.button.primary { background: var(--red); color: var(--paper); box-shadow: var(--glow); }
.button.secondary, .ghost-button { border: 1px solid var(--rule); color: var(--ink); background: rgba(245, 241, 239, 0.06); }
.ghost-button { cursor: pointer; font: inherit; font-size: 0.87rem; }
.ghost-button.full { width: 100%; justify-content: center; }

.artifact-rail {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0;
  margin: 1.25rem 0 0;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.artifact-rail li {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--rule-soft);
  border-radius: 999px;
  background: rgba(245, 241, 239, 0.045);
}

.exposure-panel {
  width: min(100%, 430px);
  border: 1px solid rgba(255, 95, 86, 0.22);
  border-radius: 22px;
  background: rgba(17, 8, 8, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.95rem 1rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.dot.red { background: var(--red); box-shadow: 0 0 14px rgba(255, 95, 86, 0.7); }
.dot.amber { background: var(--amber); }
.dot.green { background: var(--green); }
.panel-bar strong { margin-left: auto; color: var(--ink-2); font-weight: 700; }

.exposure-list { padding: 1rem; display: grid; gap: 0.9rem; }
.exposure { display: grid; gap: 0.4rem; }
.exposure label {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.exposure input {
  width: 100%;
  accent-color: var(--red);
  background: rgba(245, 241, 239, 0.06);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font: inherit;
}
.exposure input[type="number"] { font-family: var(--mono); }

.section { padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 6rem); }

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.54fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
  margin-top: 0.85rem;
  margin-bottom: 2.2rem;
}
.split-heading p { max-width: 68ch; color: var(--ink-2); line-height: 1.65; font-size: 1.02rem; }

.tier-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.4rem;
}
.tier-chip {
  border: 1px solid var(--rule);
  border-radius: 22px;
  background: rgba(245, 241, 239, 0.05);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}
.tier-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 0.4rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px currentColor;
}
.real .tier-dot { background: var(--green); color: var(--green); }
.concept .tier-dot { background: var(--amber); color: var(--amber); }
.built .tier-dot { background: var(--red); color: var(--red); }
.tier-chip strong { display: block; font-size: 1rem; }
.tier-chip small { color: var(--ink-2); font-size: 0.82rem; line-height: 1.45; }

.contact-sheet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.sheet-cell { border-radius: 22px; border: 1px solid var(--rule); overflow: hidden; }
.darkroom-frame { position: relative; min-height: 290px; display: flex; flex-direction: column; }

.negative {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  flex: 1;
  cursor: pointer;
  background:
    repeating-linear-gradient(0deg, rgba(60, 18, 18, 0.88), rgba(60, 18, 18, 0.88) 1px, rgba(28, 8, 8, 0.95) 1px, rgba(28, 8, 8, 0.95) 4px),
    linear-gradient(180deg, rgba(28, 8, 8, 0.98), rgba(12, 4, 4, 0.98));
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  border: 1px solid rgba(255, 95, 86, 0.12);
}
.negative-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 30% 35%, rgba(255, 95, 86, 0.18), transparent 14rem),
    radial-gradient(circle at 74% 68%, rgba(255, 179, 71, 0.14), transparent 12rem);
}
.negative-text {
  color: rgba(255, 209, 196, 0.7);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sheet-cell.revealed .negative {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.positive {
  padding: 1rem;
  border-top: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(17, 8, 8, 0.92), rgba(7, 4, 4, 0.96));
}

.process {
  background: linear-gradient(180deg, rgba(17, 8, 8, 0.86), rgba(7, 4, 4, 0.92));
}
.process-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.process-list li {
  border: 1px solid var(--rule);
  border-radius: 22px;
  background: rgba(245, 241, 239, 0.04);
  padding: 1rem;
  min-height: 180px;
}
.process-list strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.55rem;
  color: var(--warm);
}
.process-list p { color: var(--ink-2); line-height: 1.55; margin-top: 0; }

.closing {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(280px, 0.54fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  background:
    radial-gradient(circle at 76% 20%, rgba(199, 44, 65, 0.18), transparent 24rem),
    var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.closing p { max-width: 72ch; margin-top: 1rem; color: var(--ink-2); line-height: 1.65; font-size: 1.05rem; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding: 1.4rem clamp(1.25rem, 5vw, 6rem);
  color: var(--ink-3);
}
.footer p { margin: 0; }
.footer a { color: var(--amber); text-decoration: none; font-weight: 700; }

.guide-body { background: var(--paper); }
.guide-main { padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 6rem); }
.guide-article { width: min(920px, 100%); margin: 0 auto; }
.guide-article h1 { max-width: 12ch; font-size: clamp(3rem, 8vw, 7rem); }
.guide-article section { border-top: 1px solid var(--rule); padding-top: 2rem; margin-top: 2rem; }
.guide-article code { background: rgba(245, 241, 239, 0.08); color: var(--amber); padding: 0.1rem 0.28rem; border-radius: 6px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }
.pass-list { color: var(--ink-2); line-height: 1.65; }

@media (max-width: 980px) {
  .hero, .split-heading, .closing, .process-list, .tier-legend { grid-template-columns: 1fr; }
  .exposure-panel { width: 100%; justify-self: stretch; }
  .contact-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .hero { padding-top: 3.2rem; }
  h1 { font-size: clamp(2.9rem, 17vw, 4.4rem); }
  .contact-sheet, .process-list { grid-template-columns: 1fr; }
  .darkroom-frame { min-height: unset; }
  .hero-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
