/* ============================================================
   DILTECH — diltech.org
   Private-bank tech journal aesthetic
   Palette: ink green-black + champagne gold + ivory
   Type: Fraunces (display) · Instrument Sans (body) · Space Mono (labels)
   ============================================================ */

:root {
  --bg: #0b0f0c;
  --bg-2: #0e1310;
  --panel: #121a15;
  --panel-2: #16201a;
  --ink: #f1ece1;
  --ink-dim: #cfc8b8;
  --muted: #8f9a8e;
  --gold: #c8a96d;
  --gold-bright: #e6cd96;
  --gold-deep: #8f7443;
  --hairline: rgba(200, 169, 109, 0.22);
  --hairline-soft: rgba(200, 169, 109, 0.12);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", sans-serif;
  --mono: "Space Mono", "Courier New", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- grain overlay ---- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

::selection { background: var(--gold); color: #14100a; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ================= HEADER ================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 15, 12, 0.78);
  border-bottom: 1px solid var(--hairline-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.brand-mark svg { display: block; width: 30px; height: 30px; }

.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.brand-name em { color: var(--gold); font-style: normal; }

nav.links { display: flex; gap: 40px; align-items: center; }

nav.links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
  position: relative;
  padding: 4px 0;
}

nav.links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}

nav.links a:hover { color: var(--ink); }
nav.links a:hover::after { width: 100%; }
nav.links a.active { color: var(--gold); }

.nav-cta {
  border: 1px solid var(--hairline);
  padding: 10px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  transition: background 0.3s, color 0.3s;
}

.nav-cta:hover { background: var(--gold); color: #14100a; }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--gold);
  width: 42px; height: 42px;
  font-size: 18px;
  cursor: pointer;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -320px; right: -180px;
  width: 760px; height: 760px;
  background: radial-gradient(circle, rgba(200,169,109,0.14) 0%, rgba(200,169,109,0.05) 38%, transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-soft) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.14;
  mask-image: radial-gradient(ellipse 90% 70% at 70% 20%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 20%, black 0%, transparent 75%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 70px; align-items: end; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.eyebrow::before { content: ""; width: 44px; height: 1px; background: var(--gold); }

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6.2vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

h1 em {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 350;
}

.hero-sub {
  margin-top: 30px;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions { margin-top: 42px; display: flex; gap: 18px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
}

.btn-solid { background: var(--gold); color: #14100a; }
.btn-solid:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(200, 169, 109, 0.25); }

.btn-ghost { border: 1px solid var(--hairline); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-2px); }

/* hero ledger card */
.hero-card {
  border: 1px solid var(--hairline);
  background: linear-gradient(160deg, var(--panel) 0%, rgba(18,26,21,0.35) 100%);
  padding: 34px 30px;
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
}

.hero-card .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.ledger-row:last-of-type { border-bottom: none; }

.ledger-row .k { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.ledger-row .v { font-family: var(--serif); font-size: 21px; color: var(--ink); }
.ledger-row .v em { color: var(--gold-bright); }

/* ================= TICKER ================= */
.ticker {
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  overflow: hidden;
  white-space: nowrap;
  padding: 15px 0;
  background: var(--bg-2);
}

.ticker-track {
  display: inline-block;
  animation: tick 36s linear infinite;
}

.ticker span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 34px;
}

.ticker span i { color: var(--gold); font-style: normal; }

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

/* ================= SECTIONS ================= */
section { padding: 100px 0; }

.sec-head { margin-bottom: 64px; }

.sec-head .eyebrow { margin-bottom: 22px; }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 em { font-style: italic; color: var(--gold-bright); font-weight: 350; }

/* ---- article ledger ---- */
.article-list { border-top: 1px solid var(--hairline); }

.article-row {
  display: grid;
  grid-template-columns: 110px 1fr 240px 60px;
  gap: 30px;
  align-items: baseline;
  padding: 34px 10px;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.35s var(--ease), padding 0.35s var(--ease);
  position: relative;
}

.article-row:hover { background: rgba(200, 169, 109, 0.045); padding-left: 24px; }

.article-num {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--gold-deep);
  letter-spacing: 0.1em;
}

.article-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 450;
  line-height: 1.2;
  background-image: linear-gradient(var(--gold-bright), var(--gold-bright));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease);
}

.article-row:hover .article-title { background-size: 100% 1px; }

.article-desc { color: var(--muted); font-size: 15px; line-height: 1.6; }

.article-meta { text-align: right; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); }

/* ---- principles ---- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }

.principle {
  background: var(--bg-2);
  padding: 46px 38px;
  transition: background 0.35s;
}

.principle:hover { background: var(--panel); }

.principle .num { font-family: var(--mono); font-size: 13px; color: var(--gold); letter-spacing: 0.2em; margin-bottom: 26px; }

.principle h3 { font-family: var(--serif); font-size: 26px; font-weight: 450; margin-bottom: 16px; }

.principle p { color: var(--muted); font-size: 15.5px; }

/* ---- about teaser ---- */
.about-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.about-teaser .big-quote {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.25;
  font-weight: 400;
}

.about-teaser .big-quote em { color: var(--gold-bright); font-style: italic; }

/* ================= ARTICLE PAGE ================= */
.article-head { padding: 110px 0 60px; }

.article-head h1 { font-size: clamp(38px, 5vw, 68px); max-width: 900px; }

.article-lede { margin-top: 28px; font-size: 19px; color: var(--muted); max-width: 680px; line-height: 1.75; }

.article-body {
  max-width: 760px;
  padding: 30px 0 90px;
}

.article-body p { margin: 0 0 26px; color: var(--ink-dim); font-size: 17.5px; }

.article-body h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 58px 0 22px;
}

.article-body h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  margin: 40px 0 14px;
}

.article-body ul, .article-body ol { margin: 0 0 26px 22px; color: var(--ink-dim); }
.article-body li { margin-bottom: 10px; }

.article-body strong { color: var(--ink); }

.pull {
  border-left: 2px solid var(--gold);
  padding: 8px 0 8px 32px;
  margin: 44px 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.4;
  font-style: italic;
  color: var(--gold-bright);
}

.plain-box {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 30px 32px;
  margin: 44px 0;
}

.plain-box .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.plain-box p { margin: 0; color: var(--ink); font-size: 16.5px; }

.article-foot {
  border-top: 1px solid var(--hairline);
  margin-top: 70px;
  padding-top: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-foot .back { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.article-foot .back:hover { color: var(--gold-bright); }

/* ================= CONTACT / CTA ================= */
.cta-panel {
  border: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 70% 120% at 85% -10%, rgba(200,169,109,0.12), transparent 60%),
    var(--panel);
  padding: 80px 60px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 60px;
  align-items: center;
}

.cta-panel h2 { margin-bottom: 18px; }

.cta-panel p { color: var(--muted); max-width: 480px; }

.contact-lines { display: flex; flex-direction: column; gap: 16px; }

.contact-line {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline-soft);
  padding-bottom: 14px;
}

.contact-line .lbl { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep); min-width: 92px; }

/* ================= FOOTER ================= */
footer { border-top: 1px solid var(--hairline-soft); padding: 70px 0 40px; background: var(--bg-2); }

.foot-word {
  font-family: var(--serif);
  font-size: clamp(70px, 13vw, 190px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: transparent;
  -webkit-text-stroke: 1px var(--hairline);
  user-select: none;
  margin-bottom: 50px;
}

.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-end; }

.foot-grid .mono-note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.foot-links { display: flex; gap: 28px; }

.foot-links a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.foot-links a:hover { color: var(--gold); }

/* ================= REVEAL ================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.stagger > * { opacity: 0; transform: translateY(26px); animation: rise 0.9s var(--ease) forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.18s; }
.stagger > *:nth-child(3) { animation-delay: 0.31s; }
.stagger > *:nth-child(4) { animation-delay: 0.44s; }

@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .stagger > *, .reveal { opacity: 1; transform: none; animation: none; }
  .ticker-track { animation: none; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 50px; }
  .article-row { grid-template-columns: 64px 1fr; gap: 16px; }
  .article-desc, .article-meta { grid-column: 2; }
  .article-meta { text-align: left; }
  .about-teaser { grid-template-columns: 1fr; gap: 44px; }
  .principles { grid-template-columns: 1fr; }
  .cta-panel { grid-template-columns: 1fr; padding: 54px 36px; }
  nav.links {
    display: none;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: rgba(11,15,12,0.97);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    padding: 30px;
    gap: 24px;
  }
  nav.links.open { display: flex; }
  nav.links a { padding: 12px 0; font-size: 13px; }
  .burger { display: block; }
  .nav-cta { display: none; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 22px; }
  section { padding: 70px 0; }
  .hero { padding: 70px 0 60px; }
  .article-row { padding: 26px 6px; }
}