:root {
  --bg: #050505;
  --bg-2: #0C0C0C;
  --ink: #F5F5F4;
  --ink-dim: rgba(245, 245, 244, 0.62);
  --ink-faint: rgba(245, 245, 244, 0.32);
  --rule: rgba(245, 245, 244, 0.10);
  --rule-strong: rgba(245, 245, 244, 0.26);
  --copper: #FFFFFF;
  --copper-soft: #D6D6D4;
  --emerald: #B4B4B2;
  --status: #FFFFFF;
  --silver-grad: linear-gradient(135deg, #FFFFFF 0%, #C8C8C6 45%, #7A7A78 100%);
  --silver-grad-soft: linear-gradient(135deg, #FFFFFF 0%, #E0E0DE 60%, #9A9A98 100%);

  --serif: "Iowan Old Style", "Apple Garamond", Garamond, "Times New Roman", ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Menlo", Consolas, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1480px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }

::selection { background: var(--ink); color: var(--bg); }

/* Texture layers */

.grain {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(80rem 60rem at 70% -10%, rgba(255, 255, 255, 0.10), transparent 70%),
    radial-gradient(60rem 50rem at 0% 110%, rgba(255, 255, 255, 0.05), transparent 70%),
    radial-gradient(140% 100% at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.55) 100%);
}

body > *:not(.grain):not(.vignette) { position: relative; z-index: 1; }

/* Typography */

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.display em {
  font-style: italic;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Top nav */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--gutter);
  animation: fade-down 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 28px; height: 28px;
  color: var(--ink);
}

.brand-word {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.top-nav a {
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 6px 0;
  transition: color 200ms ease;
}

.top-nav a:hover { color: var(--ink); }

.top-nav a::after {
  position: absolute;
  left: 0; bottom: -1px;
  width: 0; height: 1px;
  content: "";
  background: var(--silver-grad);
  transition: width 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.top-nav a:hover::after { width: 100%; }

.contact {
  display: inline-flex; align-items: center; gap: 8px;
}

.contact-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}

/* Hero */

.hero {
  position: relative;
  display: block;
  padding: 0 var(--gutter) 64px;
}

.hero > * + * { margin-top: 26px; }
.hero h1.display:first-of-type { margin-top: 14px; }
.hero h1.display + .hero-sub { margin-top: 56px; }

.hero-monogram {
  position: absolute;
  top: -8%;
  right: -8%;
  width: min(72vmin, 880px);
  height: min(72vmin, 880px);
  color: var(--ink);
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
}

.hero-monogram .mono-svg,
.hero-monogram .mono-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-monogram .mono-svg {
  animation: drift-rotate 60s linear infinite;
  transform-origin: 50% 50%;
}

.hero-monogram .mono-rings {
  animation: drift-rotate-rev 80s linear infinite;
  transform-origin: 50% 50%;
  opacity: 0.5;
}

.hero > *:not(.hero-monogram) { position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: fit-content;
  color: var(--ink-dim);
  background: rgba(244, 236, 218, 0.02);
  animation: fade-up 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
  animation: pulse 2.6s ease-in-out infinite;
}

h1.display {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 88px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  max-width: 28ch;
}

h1.display .line {
  display: block;
  opacity: 1;
  animation: line-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

h1.display .line:nth-child(1) { animation-delay: 40ms; }
h1.display .line:nth-child(2) { animation-delay: 120ms; }
h1.display .line:nth-child(3) { animation-delay: 200ms; }
h1.display .line:nth-child(4) { animation-delay: 280ms; }

.cycle {
  position: relative;
  display: inline-grid;
  vertical-align: baseline;
  justify-items: start;
  font-style: italic;
  color: #DCDCDA;
  padding: 0 0.14em;
}

.cycle-word {
  grid-column: 1;
  grid-row: 1;
  white-space: nowrap;
  padding: 0 0.18em 0.05em;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@supports not (-webkit-background-clip: text) {
  .cycle-word { -webkit-text-fill-color: currentColor; color: #DCDCDA; background: none; }
}

.cycle-word {
  opacity: 0;
  transform: translateY(0.28em);
  filter: blur(6px);
  transition: opacity 460ms ease, transform 460ms cubic-bezier(0.16, 1, 0.3, 1), filter 460ms ease;
  pointer-events: none;
}

.cycle-word.is-active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.cycle-trail {
  display: inline-block;
  margin-left: -0.05em;
  color: var(--ink);
  font-style: normal;
}

.hero-sub {
  max-width: 56ch;
  margin: 0;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--ink-dim);
  animation: fade-up 900ms 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  animation: fade-up 900ms 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: rgba(244, 236, 218, 0.02);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), background 200ms ease, border-color 200ms ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero-cta-arrow {
  display: inline-block;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-cta:hover .hero-cta-arrow { transform: translateY(3px); }

.hero-stamp {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 0;
  color: var(--ink-faint);
  letter-spacing: 0.16em;
}

.bullet { opacity: 0.5; }

#clock { color: var(--ink-dim); min-width: 5ch; }

/* Sections */

section, footer { padding-left: var(--gutter); padding-right: var(--gutter); }

.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: end;
  padding-top: 120px;
  padding-bottom: 56px;
  border-top: 1px solid var(--rule);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--ink-dim);
  letter-spacing: 0.22em;
}

.section-eyebrow .rule {
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--silver-grad);
}

.section-title {
  margin: 0;
  font-size: clamp(40px, 6vw, 100px);
  letter-spacing: -0.035em;
  max-width: 18ch;
}

/* Index / positions */

.positions {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.position {
  border-bottom: 1px solid var(--rule);
  position: relative;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.position.is-in { opacity: 1; transform: translateY(0); }

.position[data-color="copper"] { --tint: #FFFFFF; --tint-soft: #DCDCDA; }
.position[data-color="emerald"] { --tint: #C8C8C6; --tint-soft: #ECECEA; }

.position-link {
  position: relative;
  display: grid;
  grid-template-columns: 90px 140px minmax(0, 1fr) auto;
  gap: 36px;
  align-items: center;
  padding: 44px 8px;
  color: var(--ink);
  text-decoration: none;
  transition: padding 480ms cubic-bezier(0.16, 1, 0.3, 1), color 220ms ease;
  overflow: hidden;
}

.position-link::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02));
  opacity: 0;
  transition: opacity 520ms ease;
  pointer-events: none;
}

.position-link::after {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0%;
  height: 1px;
  content: "";
  background: var(--tint);
  transition: width 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

.position-link:hover { padding-left: 28px; padding-right: 28px; }
.position-link:hover::before { opacity: 1; }
.position-link:hover::after { width: 100%; }

.position-idx {
  color: var(--ink-faint);
  letter-spacing: 0.2em;
  align-self: start;
  padding-top: 12px;
  transition: color 220ms ease;
}

.position-link:hover .position-idx { color: var(--tint); }

.position-motif {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  color: var(--ink-dim);
  transition: color 320ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.position-motif svg { width: 100%; height: 100%; }

.position-link:hover .position-motif {
  color: var(--tint);
  transform: scale(1.08) rotate(-2deg);
}

.motif-pulse {
  transform-origin: center;
  animation: motif-pulse 2.4s ease-in-out infinite;
}

.position-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.position-cat {
  margin: 0;
  color: var(--ink-faint);
  letter-spacing: 0.2em;
  transition: color 220ms ease;
}

.position-link:hover .position-cat { color: var(--tint-soft); }

.position-name {
  font-size: clamp(46px, 7.4vw, 124px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.position-link:hover .position-name { transform: translateX(6px); }

.position-line {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 56ch;
  margin-top: 6px;
}

.position-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: start;
  padding: 12px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--ink-dim);
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.position-link:hover .position-meta {
  color: var(--ink);
  border-color: var(--tint);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-4px);
}

.position-go { font-size: 14px; transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1); }
.position-link:hover .position-go { transform: translate(3px, -3px); }

/* Manifest */

.manifest {
  padding-top: 140px;
  padding-bottom: 140px;
  border-top: 1px solid var(--rule);
}

.manifest .section-eyebrow { margin-bottom: 36px; }

.manifest-title {
  margin: 0 0 64px;
  font-size: clamp(40px, 6.4vw, 108px);
  max-width: 18ch;
}

.manifest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  max-width: 1100px;
}

.manifest-grid p {
  margin: 0;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.6;
  color: var(--ink-dim);
}

/* Record */

.record {
  padding-top: 120px;
  padding-bottom: 96px;
  border-top: 1px solid var(--rule);
}

.record .section-eyebrow { margin-bottom: 28px; }

.record-title {
  margin: 0 0 24px;
  font-size: clamp(40px, 6vw, 96px);
}

.record-lede {
  max-width: 60ch;
  margin: 0 0 56px;
  color: var(--ink-dim);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.record-cell {
  padding: 28px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background 320ms ease;
}

.record-cell:hover { background: rgba(244, 236, 218, 0.02); }

.record-cell dt {
  margin: 0 0 14px;
  color: var(--ink-faint);
  letter-spacing: 0.18em;
}

.record-cell dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.015em;
}

.record-cell dd a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  transition: color 220ms ease, border-color 220ms ease;
}
.record-cell dd a:hover { color: #FFFFFF; border-color: #FFFFFF; }

.status-dot {
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: 10px;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
  vertical-align: 2px;
  animation: pulse 2.4s ease-in-out infinite;
}

/* Megafooter wordmark */

.megafoot {
  position: relative;
  margin-top: 40px;
  padding-top: 64px;
  padding-bottom: 8px;
  border-top: 1px solid var(--rule);
  overflow: hidden;
}

.megafoot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  padding-bottom: 24px;
  color: var(--ink-faint);
}

.megafoot-meta .mono { color: var(--ink-faint); letter-spacing: 0.18em; }

.megafoot-mark {
  margin-top: 16px;
  line-height: 0.78;
  white-space: nowrap;
}

.megafoot-letters {
  display: flex;
  align-items: flex-end;
  gap: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(120px, 28vw, 460px);
  letter-spacing: -0.06em;
  color: var(--ink);
  line-height: 0.78;
}

.megafoot-letters span {
  display: inline-block;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1), opacity 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.megafoot.is-in .megafoot-letters span { transform: translateY(0); opacity: 1; }
.megafoot.is-in .megafoot-letters span:nth-child(1) { transition-delay: 0ms; }
.megafoot.is-in .megafoot-letters span:nth-child(2) { transition-delay: 60ms; }
.megafoot.is-in .megafoot-letters span:nth-child(3) { transition-delay: 120ms; }
.megafoot.is-in .megafoot-letters span:nth-child(4) { transition-delay: 180ms; }
.megafoot.is-in .megafoot-letters span:nth-child(5) { transition-delay: 240ms; }
.megafoot.is-in .megafoot-letters span:nth-child(6) { transition-delay: 300ms; }
.megafoot.is-in .megafoot-letters span:nth-child(7) {
  transition-delay: 360ms;
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.megafoot-dot {
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Animations */

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes line-rise {
  from { transform: translateY(22px); filter: blur(6px); }
  to { transform: translateY(0); filter: blur(0); }
}
@keyframes drift-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes drift-rotate-rev {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22); }
  50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.04); }
}
@keyframes motif-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.6); }
}

/* Responsive */

@media (max-width: 1100px) {
  .position-link {
    grid-template-columns: 60px 96px minmax(0, 1fr);
    gap: 24px;
  }
  .position-meta { display: none; }
  .position-motif { width: 96px; height: 96px; }
}

@media (max-width: 760px) {
  .top { padding-top: 18px; padding-bottom: 18px; }
  .top-nav { gap: 14px; }
  .top-nav a:not(.contact) { display: none; }
  .hero { gap: 28px; padding-top: 24px; padding-bottom: 56px; min-height: auto; }
  .hero-monogram { top: 8%; right: -25%; opacity: 0.06; }
  h1.display { font-size: clamp(48px, 13vw, 84px); }
  .hero-foot { gap: 18px; flex-direction: column; align-items: flex-start; }
  .hero-stamp { font-size: 10px; letter-spacing: 0.14em; }
  .section-head { grid-template-columns: 1fr; gap: 18px; padding-top: 80px; padding-bottom: 32px; }
  .position-link {
    grid-template-columns: 56px 1fr;
    gap: 14px;
    padding: 30px 4px;
  }
  .position-link:hover { padding-left: 8px; padding-right: 8px; }
  .position-motif { grid-column: 1 / span 2; width: 80px; height: 80px; margin-bottom: 8px; }
  .position-body { grid-column: 1 / span 2; }
  .position-name { font-size: clamp(40px, 12vw, 60px); }
  .position-idx { padding-top: 4px; }
  .manifest { padding-top: 80px; padding-bottom: 80px; }
  .manifest-grid { grid-template-columns: 1fr; gap: 28px; }
  .record-grid { grid-template-columns: 1fr; }
  .megafoot-letters { font-size: clamp(72px, 30vw, 160px); }
  .megafoot-meta { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .cycle-word { opacity: 0; }
  .cycle-word.is-active { opacity: 1; }
  .hero-monogram .mono-svg,
  .hero-monogram .mono-rings { animation: none; }
  h1.display .line { opacity: 1; transform: none; filter: none; }
  .megafoot-letters span { opacity: 1; transform: none; }
  .position { opacity: 1; transform: none; }
  .motif-pulse { animation: none; }
}
