/* Excelsior Web Design — Design System */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700;9..144,900&family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --paper: #F5F1EA;
  --paper-2: #EDE6D6;
  --taupe: #E8DFCE;
  --stone: #7A6B58;
  --stone-2: #4A4138;
  --ink: #161310;
  --ink-soft: #2A241E;
  --ember: #2664EA;
  --ember-deep: #1A4BC4;
  --gold: #B58A3E;
  --accent: #2664EA;

  /* Type */
  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing scale (8pt) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 192px;

  /* Grid */
  --max-w: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* === Type primitives === */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.display-italic {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.serif-body {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 14;
  line-height: 1.5;
}
.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--stone);
}
.mono-num {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* === Layout === */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.divider-rule {
  height: 1px;
  background: var(--ink);
  opacity: 0.18;
}

/* === Buttons === */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .25s, color .25s;
  position: relative;
  overflow: hidden;
}
.btn-ink {
  background: var(--ink);
  color: var(--paper);
}
.btn-ink:hover { background: var(--ember); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow {
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  display: inline-block;
}
.btn:hover .arrow { transform: translateX(4px); }

/* === Nav === */

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  color: var(--paper);
}
.nav a, .nav .logo { color: var(--paper); }
.nav .logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 12px;
}
.nav .logo img {
  width: 36px;
  height: auto;
  display: block;
}
.nav .logo .wordmark {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  opacity: 0.85;
  transition: opacity .2s;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
}

@media (max-width: 720px) {
  .nav-links { gap: 18px; font-size: 12px; }
  .nav .logo { font-size: 18px; }
}

/* === Footer === */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-9) var(--gutter) var(--s-6);
  margin-top: var(--s-10);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: var(--s-8);
  border-bottom: 1px solid rgba(245,241,234,0.15);
}
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  opacity: 0.5;
  margin-bottom: 20px;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a { font-size: 15px; opacity: 0.85; transition: opacity .2s; }
.footer ul a:hover { opacity: 1; }
.footer .signature {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.footer .signature em { font-style: italic; color: var(--ember); }
.footer-meta {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: var(--s-5);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.5;
}
@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer .signature { font-size: 28px; }
}

/* === Section header pattern === */
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-7);
  padding-bottom: var(--s-7);
  border-bottom: 1px solid rgba(22,19,16,0.18);
  margin-bottom: var(--s-8);
  align-items: end;
}
.section-head .num {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--stone);
}
.section-head .ttl {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.section-head .ttl em { font-style: italic; }
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; }
}

/* === Cursor === */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ember);
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
  transition: transform .2s ease, width .2s ease, height .2s ease;
  mix-blend-mode: multiply;
}
.cursor.hover { width: 36px; height: 36px; opacity: 0.5; }
@media (hover: none) { .cursor { display: none; } }

/* === Reveal animation === */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Selection */
::selection { background: var(--ember); color: var(--paper); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink); }
