/* The Horizon Line — shared stylesheet */
:root {
  --bg: #0A0A0B;
  --bg-alt: #141416;
  --ink: #F5F0E8;
  --ink-soft: #C8C4B8;
  --muted: #6B6B70;
  --rule: #23232A;
  --rule-strong: #34343D;
  --accent: #2563EB;
  --accent-ink: #FFFFFF;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1320px;
  --pad: clamp(20px, 4vw, 56px);
}

[data-theme="dark"] {
  --bg: #0A0A0B;
  --bg-alt: #141416;
  --ink: #FAFAF7;
  --ink-soft: #D4D3CD;
  --muted: #8A8A8F;
  --rule: #23232A;
  --rule-strong: #34343D;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mono-sm { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  line-height: 0;
}
.wordmark .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}
.wordmark img { height: 15px !important; width: auto; display: block; }
footer .wordmark img { height: 18px !important; }
.wordmark-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; gap: 28px; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.nav-links a {
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}
.wordmark, .wordmark > span { white-space: nowrap; }
@media (max-width: 1180px) {
  .nav-links { gap: 22px; }
  .wordmark-sub { display: none; }
}
@media (max-width: 1060px) {
  .nav-links a[data-optional] { display: none; }
}
@media (max-width: 960px) {
  .nav-links { gap: 18px; }
  .nav-links a[data-secondary] { display: none; }
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px; background: var(--accent);
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--ink); }
.btn-arrow {
  width: 16px; height: 16px;
  display: inline-block;
  transition: transform .2s ease;
}
.btn:hover .btn-arrow { transform: translate(2px, -2px); }

/* Hairline row */
.hairline { height: 1px; background: var(--rule); }
.hairline-strong { height: 1px; background: var(--rule-strong); }

/* Section */
section { padding: clamp(64px, 9vw, 120px) 0; }
.sec-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}
.sec-head .index { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }
.sec-head h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
}
.sec-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.015em; }

/* Placeholder artwork */
.ph {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  overflow: hidden;
  color: var(--muted);
}
.ph.stripes {
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in oklab, var(--ink) 7%, transparent) 14px 15px);
}
.ph.photo {
  background:
    radial-gradient(120% 80% at 30% 30%, color-mix(in oklab, var(--ink) 12%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in oklab, var(--ink) 8%, var(--bg-alt)), var(--bg-alt));
}
.ph .ph-label {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  padding: 4px 8px;
  border: 1px solid var(--rule);
}

/* Utility */
.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .sec-head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
}

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 64px 0 40px;
  background: var(--bg);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.foot-grid h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; font-weight: 400; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-grid a { font-size: 14px; color: var(--ink-soft); }
.foot-grid a:hover { color: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; padding-top: 28px; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Tweaks panel */
.tweaks {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 300px;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  box-shadow: 0 20px 60px -20px rgba(10,10,11,0.25);
  padding: 18px;
  z-index: 100;
  font-size: 13px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 { margin: 0 0 14px; font-family: var(--serif); font-style: italic; font-size: 20px; font-weight: 400; }
.tweaks-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.tweaks-row:first-of-type { border-top: none; }
.tweaks-row label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--mono); }
.swatches { display: flex; gap: 6px; }
.sw { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--rule-strong); cursor: pointer; padding: 0; }
.sw.active { outline: 2px solid var(--ink); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 999px; overflow: hidden; }
.seg button { background: transparent; border: none; padding: 6px 10px; font-size: 12px; color: var(--muted); }
.seg button.active { background: var(--ink); color: var(--bg); }

/* ── Mobile hamburger nav ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: 64px;
  background: var(--bg);
  z-index: 99;
  padding: 40px var(--pad);
  flex-direction: column;
  border-top: 1px solid var(--rule);
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.mobile-menu a.btn {
  margin-top: 24px;
  border-radius: 999px;
  font-size: 16px;
  display: flex;
  justify-content: center;
  padding: 16px 24px;
  border-bottom: none;
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
