/* ————————————————————————————————————————
   FISHBED — fishbed.co
   Shared design system: tokens, chrome, components.
   Editorial paper × ink, with the studio orange.
———————————————————————————————————————— */

:root {
  --paper: #FAF7F1;
  --paper-warm: #F2EDE2;
  --ink: #171B26;
  --ink-2: #232838;
  --ink-soft: rgba(23, 27, 38, 0.6);
  --ink-faint: rgba(23, 27, 38, 0.35);
  --rule: rgba(23, 27, 38, 0.14);
  --rule-dark: rgba(250, 247, 241, 0.16);
  --orange: #E0532F;
  --orange-soft: #E8674A;
  --cream-on-ink: rgba(250, 247, 241, 0.68);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Archivo", Helvetica, Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.028 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

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

a { color: inherit; }

/* ———— custom cursor ———— */

@media (pointer: fine) {
  .cursor-dot, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 3000;
    border-radius: 50%;
    translate: -50% -50%;
  }
  .cursor-dot { width: 8px; height: 8px; background: var(--orange); }
  .cursor-ring {
    width: 34px; height: 34px;
    border: 1.5px solid var(--orange);
    opacity: 0.5;
    transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.25s;
  }
  body.cursor-hover .cursor-ring { width: 56px; height: 56px; opacity: 0.9; }
  body.cursor-hidden .cursor-dot, body.cursor-hidden .cursor-ring { opacity: 0; }
}
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ———— type helpers ———— */

.kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--orange);
}

.h-display {
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-top: 1rem;
}

.h-display em, h2 em { font-weight: 350; }

h2.h-display { margin-top: 0.9rem; }

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 36em;
}

/* ———— buttons ———— */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover { background: var(--orange); border-color: var(--orange); transform: translateY(-2px); }

.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn-small { padding: 0.6rem 1.35rem; font-size: 0.85rem; }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-2px); }

.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: var(--orange); border-color: var(--orange); color: var(--paper); }

.link-plain {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1.5px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.25s, color 0.25s;
}
.link-plain:hover { color: var(--orange); border-color: var(--orange); }

/* ———— header ———— */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding: 1.05rem var(--pad);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--rule);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  z-index: 1002;
}

.brand-mark { width: 42px; height: auto; color: var(--ink); transition: color 0.35s var(--ease); }
.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; transition: color 0.35s var(--ease); }

.site-nav { display: flex; gap: 1.9rem; }

.site-nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%;
  height: 1.5px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.active { color: var(--orange); }

/* menu button (mobile) */
.menu-btn {
  display: none;
  z-index: 1002;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  position: relative;
}
.menu-btn span {
  position: absolute;
  left: 8px; right: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease), opacity 0.3s;
}
.menu-btn span:nth-child(1) { top: 15px; }
.menu-btn span:nth-child(2) { top: 21px; }
.menu-btn span:nth-child(3) { top: 27px; }
body.menu-open .menu-btn span { background: var(--paper); }
body.menu-open .menu-btn span:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
body.menu-open .brand-mark, body.menu-open .brand-name { color: var(--paper); }

/* full-screen menu overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--pad) 3rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--ease-out), visibility 0s 0.6s;
  visibility: hidden;
}

body.menu-open .menu-overlay { clip-path: inset(0 0 0% 0); visibility: visible; transition-delay: 0s; }
body.menu-open { overflow: hidden; }

.menu-overlay nav { display: grid; gap: 0.2rem; }

.menu-overlay nav a {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(2.4rem, 9vw, 4rem);
  color: var(--paper);
  text-decoration: none;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.25s;
  transition-delay: 0s;
}

body.menu-open .menu-overlay nav a { opacity: 1; transform: none; }
body.menu-open .menu-overlay nav a:nth-child(1) { transition-delay: 0.15s; }
body.menu-open .menu-overlay nav a:nth-child(2) { transition-delay: 0.21s; }
body.menu-open .menu-overlay nav a:nth-child(3) { transition-delay: 0.27s; }
body.menu-open .menu-overlay nav a:nth-child(4) { transition-delay: 0.33s; }
body.menu-open .menu-overlay nav a:nth-child(5) { transition-delay: 0.39s; }
body.menu-open .menu-overlay nav a:nth-child(6) { transition-delay: 0.45s; }

.menu-overlay nav a:hover, .menu-overlay nav a.active { color: var(--orange-soft); }

.menu-meta {
  margin-top: auto;
  color: var(--cream-on-ink);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.menu-meta a { color: var(--paper); text-decoration: none; }
.menu-meta a:hover { color: var(--orange-soft); }

/* ———— page wipe transition ———— */

.wipe {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
}
.wipe i {
  position: absolute;
  inset: 0;
  display: block;
  transform: scaleY(1);
}
.wipe i:nth-child(1) { background: var(--orange); transition: transform 0.55s var(--ease-out) 0.08s; transform-origin: top; }
.wipe i:nth-child(2) { background: var(--ink); transition: transform 0.55s var(--ease-out); transform-origin: top; }
body.loaded .wipe i { transform: scaleY(0); }
body.loaded .wipe { visibility: hidden; transition: visibility 0s 0.75s; }
body.leaving .wipe { pointer-events: auto; }
body.leaving .wipe i { transform-origin: bottom; transform: scaleY(1); }

/* ———— scroll progress + hover preview ———— */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1400;
  pointer-events: none;
}

.row-preview {
  position: fixed;
  top: 0; left: 0;
  width: min(320px, 24vw);
  aspect-ratio: 16 / 10;
  z-index: 950;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(23, 27, 38, 0.5);
  opacity: 0;
  scale: 0.85;
  transition: opacity 0.3s var(--ease), scale 0.35s var(--ease);
}
.row-preview.on { opacity: 1; scale: 1; }
.row-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ———— marquee ticker ———— */

.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: 0.95rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  width: max-content;
  animation: scroll 30s linear infinite;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-track i { font-style: normal; color: var(--orange-soft); font-size: 0.55rem; }

.ticker-light { background: transparent; color: var(--ink-faint); }
.ticker-light i { color: var(--orange); }

@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ———— sections ———— */

main { padding-top: 0; }

.section { padding: clamp(4.5rem, 11vh, 8.5rem) var(--pad); }

.section-head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }

.section-head.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .lede { color: var(--cream-on-ink); }
.section-dark .kicker { color: var(--orange-soft); }

.page-hero {
  padding: clamp(9rem, 20vh, 13rem) var(--pad) clamp(3.5rem, 8vh, 6rem);
}

.page-hero .h-display { max-width: 14em; }

/* ———— big CTA band ———— */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: clamp(5rem, 13vh, 9rem) var(--pad);
  position: relative;
  overflow: hidden;
}

.cta-band h2 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 16em;
  margin: 0.8rem auto 2.4rem;
}

.cta-band .kicker { color: var(--orange-soft); }

.cta-band::after {
  content: "";
  position: absolute;
  inset: auto -10% -55% -10%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(224, 83, 47, 0.22), transparent 65%);
  pointer-events: none;
}

/* ———— footer ———— */

.site-footer {
  background: var(--ink);
  color: var(--cream-on-ink);
  padding: clamp(3.5rem, 8vh, 6rem) var(--pad) 2rem;
  border-top: 1px solid var(--rule-dark);
}

.footer-giant {
  font-weight: 700;
  font-size: clamp(4rem, 16vw, 15rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(250, 247, 241, 0.3);
  transition: color 0.6s var(--ease);
  user-select: none;
}

.footer-giant:hover { color: var(--paper); }
.footer-giant .fdot { color: var(--orange); -webkit-text-stroke: 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin: 3.5rem 0;
}

.footer-grid h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--orange-soft);
  margin-bottom: 1rem;
}

.footer-grid a {
  display: block;
  color: var(--cream-on-ink);
  text-decoration: none;
  padding: 0.22rem 0;
  font-size: 0.95rem;
  transition: color 0.2s, transform 0.25s var(--ease);
}
.footer-grid a:hover { color: var(--paper); transform: translateX(4px); }

.footer-blurb { max-width: 26em; font-size: 0.95rem; }

.footer-legal {
  border-top: 1px solid var(--rule-dark);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: rgba(250, 247, 241, 0.42);
}

/* ———— reveal system ———— */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.09s);
}

[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .wipe { display: none; }
  html { scroll-behavior: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ———— responsive chrome ———— */

@media (max-width: 860px) {
  .site-nav { display: none; }
  .menu-btn { display: block; }
  .site-header .btn-small { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
