/* ============================================================
   WESTDOC — design tokens
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root{
  --void:        #0a0a0b;
  --panel:       #141416;
  --panel-2:     #1a1a1d;
  --line:        #2a2a2e;
  --line-soft:   #1f1f22;
  --bone:        #ece7de;
  --bone-dim:    #a29c92;
  --bone-faint:  #6d6a64;
  --bronze:      #b08d57;
  --gold:        #d9b877;
  --ember:       #4a2a1e;

  --display: 'Instrument Serif', serif;
  --body: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --container: 1180px;
  --edge: clamp(24px, 5vw, 72px);
}

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

html{ scroll-behavior:smooth; }

body{
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle grain / vignette so black doesn't feel flat */
body::before{
  content:"";
  position: fixed; inset:0;
  pointer-events:none;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(176,141,87,0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(74,42,30,0.15), transparent 60%);
}

a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
img{ max-width:100%; display:block; }

::selection{ background: var(--bronze); color: var(--void); }

:focus-visible{
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

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

.eyebrow{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before{
  content:"";
  width: 16px; height: 1px;
  background: var(--bronze);
}

/* ============================================================
   Blueprint corner marks — the recurring signature device
   ============================================================ */
.spec{
  position: relative;
  border: 1px solid var(--line);
}
.spec::before, .spec::after,
.spec .corner-tl, .spec .corner-br{ content:""; }

.corner{
  position:absolute;
  width: 14px; height: 14px;
  pointer-events:none;
}
.corner::before, .corner::after{
  content:"";
  position:absolute;
  background: var(--bronze);
}
.corner.tl{ top:-1px; left:-1px; }
.corner.tr{ top:-1px; right:-1px; }
.corner.bl{ bottom:-1px; left:-1px; }
.corner.br{ bottom:-1px; right:-1px; }
.corner::before{ width:100%; height:1px; top:0; left:0; }
.corner::after{ width:1px; height:100%; top:0; left:0; }
.corner.tr::before{ left:auto; right:0; }
.corner.tr::after{ left:auto; right:0; }
.corner.bl::before{ top:auto; bottom:0; }
.corner.bl::after{ top:auto; bottom:0; }
.corner.br::before{ top:auto; bottom:0; left:auto; right:0; }
.corner.br::after{ top:auto; bottom:0; left:auto; right:0; }

/* ============================================================
   Nav
   ============================================================ */
.nav{
  position: fixed; top:0; left:0; right:0;
  z-index: 100;
  background: rgba(10,10,11,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px var(--edge);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.logo{
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  font-weight: 500;
}
.logo span{ color: var(--bronze); }

.nav-links{
  display:flex;
  gap: 40px;
}
.nav-links a{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
  position: relative;
  padding-bottom: 4px;
  transition: color .25s ease;
}
.nav-links a::after{
  content:"";
  position:absolute; left:0; right:100%; bottom:0;
  height:1px;
  background: var(--gold);
  transition: right .3s ease;
}
.nav-links a:hover, .nav-links a.active{ color: var(--bone); }
.nav-links a:hover::after, .nav-links a.active::after{ right:0; }
.nav-links a.active{ color: var(--gold); }

.nav-cta{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--bronze);
  padding: 9px 18px;
  color: var(--bone);
  transition: all .25s ease;
}
.nav-cta:hover{ background: var(--bronze); color: var(--void); }

.nav-toggle{
  display:none;
  flex-direction:column;
  gap:5px;
  background:none; border:none; cursor:pointer;
  padding: 8px;
}
.nav-toggle span{ width:22px; height:1px; background: var(--bone); }

/* ============================================================
   Sections / type
   ============================================================ */
main{ position: relative; z-index: 2; }

section{ padding: 120px var(--edge); }
.section-inner{ max-width: var(--container); margin: 0 auto; }

h1,h2,h3{ font-family: var(--display); font-weight: 400; line-height: 1.05; }
h1{ font-size: clamp(48px, 7vw, 96px); }
h2{ font-size: clamp(32px, 4vw, 52px); }
h3{ font-size: clamp(22px, 2.4vw, 28px); }
em, .italic{ font-style: italic; color: var(--gold); }

p.lede{
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--bone-dim);
  max-width: 640px;
  line-height: 1.7;
}

.mono-tag{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.btn{
  display:inline-flex;
  align-items:center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 28px;
  transition: all .25s ease;
}
.btn-primary{
  background: var(--bronze);
  color: var(--void);
}
.btn-primary:hover{ background: var(--gold); transform: translateY(-2px); }
.btn-ghost{
  border: 1px solid var(--line);
  color: var(--bone);
}
.btn-ghost:hover{ border-color: var(--bronze); color: var(--gold); }

hr.rule{
  border:none; height:1px;
  background: var(--line);
  margin: 0;
}

footer{
  border-top: 1px solid var(--line-soft);
  padding: 48px var(--edge) 40px;
  position: relative; z-index:2;
}
.footer-inner{
  max-width: var(--container); margin:0 auto;
  display:flex; justify-content:space-between; align-items:flex-end;
  flex-wrap: wrap; gap: 24px;
}
.footer-links{ display:flex; gap:28px; }
.footer-links a{ font-family: var(--mono); font-size:11px; letter-spacing:.08em; color: var(--bone-dim); text-transform:uppercase; }
.footer-links a:hover{ color: var(--gold); }
.footer-meta{ font-family: var(--mono); font-size: 11px; color: var(--bone-faint); letter-spacing:.05em; }

@media (max-width: 860px){
  .nav-links, .nav-cta{ display:none; }
  .nav-toggle{ display:flex; }
  section{ padding: 90px var(--edge); }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   HOME — hero
   ============================================================ */
.hero{ padding-top: 180px; padding-bottom: 100px; }
.hero-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items:center;
}
.hero-copy h1{ margin: 22px 0 26px; }
.hero-actions{ display:flex; gap:16px; margin-top:36px; flex-wrap:wrap; }

.hero-diagram svg{ width:100%; height:auto; }

.bp-line{
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 2.2s ease forwards;
}
.bp-main{ animation-delay: 0s; }
circle.bp-line{ animation-duration: .8s; }
.bp-annot line, .bp-annot circle{
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: draw 1s ease forwards;
  animation-delay: 1.6s;
}
#blueprint text{ opacity:0; animation: fadeIn .8s ease forwards; animation-delay: 2s; }

@keyframes draw{ to{ stroke-dashoffset:0; } }
@keyframes fadeIn{ to{ opacity:1; } }

/* stagger a few children for a drafted, sequential feel */
.hero-diagram rect:nth-of-type(1){ animation-delay: 0s; }
.hero-diagram rect:nth-of-type(2){ animation-delay: .3s; }
.hero-diagram rect:nth-of-type(n+7){ animation-delay: .9s; }

/* ============================================================
   HOME — intro
   ============================================================ */
.intro-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items:start;
}

/* ============================================================
   HOME — pillars
   ============================================================ */
.pillars-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.pillar{
  background: var(--panel);
  padding: 44px 36px;
  border: none;
}
.pillar h3{ margin: 18px 0 14px; }
.pillar p{ color: var(--bone-dim); font-size: 15px; }

/* ============================================================
   HOME — CTA strip
   ============================================================ */
.cta-strip{
  background: linear-gradient(180deg, var(--void), var(--ember) 220%);
  border-top: 1px solid var(--line-soft);
}
.cta-strip-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap: wrap;
  gap: 30px;
}

@media (max-width: 860px){
  .hero{ padding-top:140px; }
  .hero-grid, .intro-grid{ grid-template-columns: 1fr; }
  .pillars-grid{ grid-template-columns: 1fr; }
  .hero-diagram{ order:-1; }
}

/* ============================================================
   Mobile nav panel
   ============================================================ */
.nav-links-mobile{
  max-height:0;
  overflow:hidden;
  transition: max-height .35s ease;
  background: var(--void);
  border-bottom: 1px solid var(--line-soft);
}
.nav-links-mobile.open{ max-height: 320px; }
.nav-links-mobile li{ border-top: 1px solid var(--line-soft); }
.nav-links-mobile a{
  display:block;
  padding: 18px var(--edge);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.nav-links-mobile a:hover{ color: var(--gold); }

.nav-toggle.is-active span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2){ opacity:0; }
.nav-toggle.is-active span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
.nav-toggle span{ transition: all .25s ease; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal{ opacity:0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view{ opacity:1; transform: translateY(0); }

/* ============================================================
   Page hero (Work / Services / Contact)
   ============================================================ */
.page-hero{ padding-top: 170px; padding-bottom: 60px; }
.page-hero .lede{ margin-top: 18px; }

/* ============================================================
   Work — case files
   ============================================================ */
.case{ padding: 70px var(--edge); }
.case-grid{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 50px;
  padding: 48px;
}
.case-meta h2{ margin: 14px 0 0; }
.case-tags{ display:flex; flex-wrap:wrap; gap:8px; margin-top:22px; }
.case-tags span{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid var(--line);
  padding: 6px 10px;
}
.case-body p{ color: var(--bone-dim); margin-bottom: 18px; }
.case-body p:last-child{ margin-bottom:0; }
.case-body .mono-tag{ color: var(--bronze); }

@media (max-width: 860px){
  .case-grid{ grid-template-columns: 1fr; padding: 32px 24px; gap: 28px; }
}

/* ============================================================
   Services — spec sheet rows
   ============================================================ */
.svc-list{ padding-top: 20px; }
.svc-row{
  display:grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 44px 0;
}
.svc-num{ font-size: 13px; color: var(--bronze); padding-top: 6px; }
.svc-content h3{ margin-bottom: 14px; }
.svc-content p{ color: var(--bone-dim); max-width: 640px; }
.svc-deliverables{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 20px; }
.svc-deliverables span{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 6px 12px;
}

@media (max-width: 860px){
  .svc-row{ grid-template-columns: 1fr; gap: 10px; }
}

/* ============================================================
   Contact
   ============================================================ */
.contact-section{ padding-top: 20px; padding-bottom: 140px; }
.contact-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items:start;
}
.contact-form{
  padding: 44px;
  background: var(--panel);
  display:flex;
  flex-direction:column;
  gap: 22px;
}
.field{ display:flex; flex-direction:column; gap:8px; }
.field label{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.field input, .field select, .field textarea{
  background: var(--void);
  border: 1px solid var(--line);
  color: var(--bone);
  font-family: var(--body);
  font-size: 15px;
  padding: 12px 14px;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline: none;
  border-color: var(--bronze);
}
.form-note{ text-align:center; color: var(--bone-faint); }

.contact-direct{ display:flex; flex-direction:column; gap: 40px; padding-top: 12px; }
.direct-block{ display:flex; flex-direction:column; gap:6px; }
.direct-link{
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--gold);
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.direct-link:hover{ border-color: var(--gold); }
.direct-hint{ font-family: var(--mono); font-size: 10px; color: var(--bone-faint); letter-spacing: .04em; }
.direct-block p{ color: var(--bone-dim); }

@media (max-width: 860px){
  .contact-grid{ grid-template-columns: 1fr; }
}

/* ============================================================
   Logo mark
   ============================================================ */
.logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark{
  height: 22px;
  width: auto;
  display: block;
}
footer .logo-mark{ height: 26px; }
