/* Silveira Design website · brand tokens match the silveira-docs kit ("Paper" theme) */
@font-face { font-family: "Mona Sans"; src: url("fonts/MonaSansExpanded-Black.ttf") format("truetype"); font-weight: 900; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Mona Sans"; src: url("fonts/MonaSansExpanded-Bold.ttf") format("truetype"); font-weight: 700; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --surface: #FFFFFF;
  --field: #F5F1E6;
  --band: #111111;
  --text: #111111;
  --muted: #4F4A40;
  --on-band: #FFFFFF;
  --on-band-muted: #E2DCCB;
  --red: #C8102E;
  --red-text: #A50F2A;
  --gold: #D4AF37;
  --rule: #111111;
  --hairline: #C9CDD2;
  --steel: #6B7079;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--surface); color: var(--text);
  font: 400 17px/1.6 "IBM Plex Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.ph { color: var(--steel); }

/* ---------- labels / type ---------- */
.lbl { font: 600 12px/1.4 "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lbl.red { color: var(--red-text); }
h1, h2, h3 { font-family: "Archivo", Arial, sans-serif; text-transform: uppercase; margin: 0; }
h1 span { display: block; }
h1 span + span { margin-top: .12em; }
h1 { font-weight: 900; font-size: clamp(32px, 5vw, 60px); line-height: .98; letter-spacing: -.01em; text-wrap: balance; }
h3 { font-weight: 800; font-size: 19px; line-height: 1.25; letter-spacing: .02em; }
.bar { display: block; width: 72px; height: 6px; background: var(--red); margin: 22px 0 20px; }
.lead { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.55; color: var(--muted); max-width: 40em; margin: 0; }

/* section heading: red square + letter-spaced title + rule */
.sec { display: flex; align-items: center; gap: 14px; margin: 0 0 36px; }
.sec .mk { width: 12px; height: 12px; background: var(--red); flex: none; }
.sec h2 { font-weight: 900; font-size: 17px; letter-spacing: .18em; white-space: nowrap; }
.sec .rl { flex: 1; height: 2px; background: var(--rule); }
.sec .no { font: 600 12px "IBM Plex Mono", monospace; letter-spacing: .12em; color: var(--muted); }

/* ---------- header band ---------- */
.band { background: var(--band); color: var(--on-band); border-bottom: 6px solid var(--gold); position: sticky; top: 0; z-index: 10; }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.logo { display: inline-flex; flex-direction: column; gap: 6px; text-decoration: none; color: #fff; font-family: "Mona Sans", Arial, sans-serif; font-stretch: 125%; }
.wm { display: inline-flex; align-items: baseline; font-weight: 900; font-size: 30px; line-height: .78; letter-spacing: -.02em; white-space: nowrap; }
.wm i { display: inline-block; width: .16em; height: .16em; margin-left: .06em; background: var(--red); }
.wm2 { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 9.5px; letter-spacing: .24em; margin-right: -.24em; white-space: nowrap; }
.wmr { flex: 1; height: 2px; background: var(--gold); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { white-space: nowrap; font: 600 12.5px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--on-band-muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a:focus-visible { color: #fff; border-bottom-color: var(--gold); outline: none; }
.nav a.cta { color: var(--band); background: var(--gold); padding: 10px 16px; border: 0; }
.nav a.cta:hover, .nav a.cta:focus-visible { background: #fff; }
.menu-btn { display: none; text-transform: uppercase; background: none; border: 2px solid var(--on-band-muted); color: #fff; font: 600 12px "IBM Plex Mono", monospace; letter-spacing: .12em; padding: 8px 12px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); border-bottom: 2px solid var(--rule); position: relative; overflow: hidden; }
.hero::after { /* faint drafting grid */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(var(--hairline) 1px, transparent 1px), linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 32px 32px; opacity: .35;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%); mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
}
.hero .lbl { margin-bottom: 22px; display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 13px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: 15px 22px; border: 2px solid var(--rule); }
.btn.primary { background: var(--band); color: #fff; }
.btn.primary::before { content: ""; width: 8px; height: 8px; background: var(--red); }
.btn.primary:hover, .btn.primary:focus-visible { background: var(--red); }
.btn.primary:hover::before, .btn.primary:focus-visible::before { background: #fff; }
.btn.ghost:hover, .btn.ghost:focus-visible { background: var(--field); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--rule); margin-top: clamp(48px, 7vw, 80px); background: var(--surface); }
.facts > div { padding: 14px 18px; border-right: 1.5px solid var(--rule); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.facts > div:last-child { border-right: 0; }
.facts .val { font-weight: 600; overflow-wrap: anywhere; }

/* ---------- sections ---------- */
section.block { padding: clamp(64px, 9vw, 112px) 0; }
section.block.field { background: var(--field); border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }

/* services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--rule); }
.svc { padding: 32px 32px 36px 0; border-bottom: 1.5px solid var(--hairline); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px 12px; }
.svc:nth-child(odd) { border-right: 1.5px solid var(--hairline); }
.svc:nth-child(even) { padding-left: 32px; }
.num { font: 900 30px/1 "Archivo", sans-serif; color: var(--red); font-variant-numeric: tabular-nums; }
.svc p { margin: 10px 0 14px; color: var(--muted); }
.bul { margin: 0; padding: 0; list-style: none; }
.bul li { position: relative; padding-left: 20px; margin-bottom: 6px; font-size: 15.5px; }
.bul li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: var(--red); }

/* process */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 2px solid var(--rule); background: var(--surface); }
.step { padding: 26px 24px 30px; border-right: 1.5px solid var(--rule); }
.step:last-child { border-right: 0; }
.step .num { font-size: 26px; display: block; margin-bottom: 16px; }
.step p { margin: 10px 0 0; color: var(--muted); font-size: 15.5px; }

.svc:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.svc:last-child:nth-child(odd) > div { max-width: 640px; }

/* project experience */
.projects { display: flex; flex-direction: column; gap: 56px; }
.proj { border: 2px solid var(--rule); }
.proj-img { margin: 0; background: var(--band); position: relative; aspect-ratio: 21 / 8; border-bottom: 2px solid var(--rule); overflow: hidden; }
.proj-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.proj-img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--gold); }
.proj-body { padding: 28px 30px 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); column-gap: 36px; align-content: start; }
.proj-head, .pf { grid-column: 1 / -1; }
.proj-body .kpis { grid-column: 1; grid-row: 3 / span 3; grid-template-columns: 1fr; align-self: start; }
.proj-body .kpis > div + div { border-left: 0; border-top: 1.5px solid #444; }
.proj-body > p, .proj-body .bul, .proj-body .outcome { grid-column: 2; }
.proj-body > p { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.proj-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px; align-items: start; margin-bottom: 18px; }
.proj-head h3 { font-weight: 900; font-size: 24px; line-height: 1.12; margin-top: 4px; }
.pf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--rule); border-left: 1.5px solid var(--hairline); margin-bottom: 22px; }
.pf > div { padding: 8px 10px; border-right: 1.5px solid var(--hairline); border-bottom: 1.5px solid var(--hairline); display: flex; flex-direction: column; gap: 1px; font-size: 14.5px; font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.pf .lbl { font-size: 10.5px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--band); color: #fff; margin-bottom: 18px; }
.kpis > div { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpis > div + div { border-left: 1.5px solid #444; }
.kpis b { font: 900 24px/1.05 "Archivo", sans-serif; text-transform: uppercase; }
.kpis .lbl { color: var(--gold); font-size: 10.5px; }
.proj-body .bul { margin-bottom: 16px; }
.outcome { margin: 0; padding-top: 14px; border-top: 2px solid var(--rule); font-size: 15.5px; }
.outcome .lbl { margin-right: 8px; }

.sec-lead { margin: -8px 0 40px; }
.contact-lead { margin-bottom: 28px; }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.about h3.name { font-size: clamp(24px, 3vw, 32px); font-weight: 900; line-height: 1.05; }
.about-text .bar { margin: 16px 0 18px; }
.about-text p { margin: 0 0 16px; }
.portrait { margin: 0; border: 2px solid var(--rule); background: var(--surface); }
.portrait img, .portrait-ph { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-bottom: 6px solid var(--gold); }
.portrait-ph { display: grid; place-items: center; background: var(--band); color: var(--steel); font: 600 12px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 12px 14px; }
.about-foot { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); margin-top: clamp(36px, 5vw, 56px); align-items: start; }
.creds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--rule); border-left: 1.5px solid var(--hairline); background: var(--surface); }
.creds > div { padding: 12px 14px; border-right: 1.5px solid var(--hairline); border-bottom: 1.5px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; font-size: 15px; font-weight: 600; line-height: 1.4; min-width: 0; }
.note { background: var(--field); border-top: 6px solid var(--red); padding: 22px 24px 24px; }
.note .bul { margin-top: 14px; }
.note .bul li { font-size: 16px; }
/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.fields { display: grid; grid-template-columns: 1fr; border: 2px solid var(--rule); background: var(--surface); }
.fc { padding: 14px 18px; display: flex; flex-direction: column; gap: 3px; border-bottom: 1.5px solid var(--rule); min-width: 0; }
.fc:last-child { border-bottom: 0; }
.fc .val { font-weight: 600; font-size: 18px; overflow-wrap: anywhere; text-decoration: none; }
.fc a.val:hover { color: var(--red-text); }
form { display: grid; gap: 18px; }
label { display: grid; gap: 6px; }
input, textarea, select {
  font: 400 16px/1.5 "IBM Plex Sans", sans-serif; color: var(--text); background: var(--surface);
  border: 0; border-bottom: 2px solid var(--rule); padding: 10px 12px; border-radius: 0; width: 100%;
}
.field input, .field textarea, .field select { background: #fff; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 0; }
textarea { min-height: 140px; resize: vertical; }
button.btn { cursor: pointer; justify-self: start; }
.form-note { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- footer: drawing title block ---------- */
.foot { background: var(--band); color: var(--on-band-muted); border-top: 6px solid var(--gold); padding: 40px 0 28px; }
.foot .tb { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; border: 1.5px solid #4a4a4a; }
.foot .tb > div { padding: 14px 18px; border-right: 1.5px solid #4a4a4a; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.foot .tb > div:last-child { border-right: 0; }
.foot .tb .lbl { color: #A39D8E; font-size: 11px; }
.foot .tb .v { font: 500 14px "IBM Plex Mono", monospace; letter-spacing: .04em; color: #fff; overflow-wrap: anywhere; }
.foot .tb .sheet { color: var(--gold); font-weight: 600; letter-spacing: .12em; }
.foot .logo { align-self: flex-start; }
.foot .logo .wm { font-size: 24px; }
.foot .small { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: .06em; margin-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1.5px solid var(--rule); }
  .about, .contact, .about-foot { grid-template-columns: 1fr; }
  .portrait { max-width: 360px; }
  .proj-img { aspect-ratio: 16 / 9; }
  .proj-body { grid-template-columns: 1fr; }
  .proj-body .kpis, .proj-body > p, .proj-body .bul, .proj-body .outcome { grid-column: 1; grid-row: auto; }
  .proj-body .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-body .kpis > div + div { border-top: 0; border-left: 1.5px solid #444; }
  .pf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot .tb { grid-template-columns: 1fr 1fr; }
  .foot .tb > div:nth-child(2) { border-right: 0; }
  .foot .tb > div:nth-child(-n+2) { border-bottom: 1.5px solid #4a4a4a; }
}
@media (max-width: 1120px) { .nav { gap: 18px; } }
@media (max-width: 1040px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--band); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; border-bottom: 6px solid var(--gold); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid #333; }
  .nav a.cta { margin-top: 14px; text-align: center; padding: 14px; }
}
@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
  .svc, .svc:nth-child(even) { padding: 28px 0 30px; border-right: 0; }
  .svc:nth-child(odd) { border-right: 0; }
  .wm { font-size: 24px; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1.5px solid var(--rule); }
  .step:last-child { border-bottom: 0; }
  .facts, .foot .tb { grid-template-columns: 1fr; }
  .facts > div, .foot .tb > div { border-right: 0 !important; border-bottom: 1.5px solid var(--rule); }
  .foot .tb > div { border-bottom-color: #4a4a4a; }
  .facts > div:last-child, .foot .tb > div:last-child { border-bottom: 0; }
  .svc { grid-template-columns: 48px minmax(0, 1fr); }
  .pf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creds { grid-template-columns: 1fr; }
  .proj-body { padding: 22px 18px 24px; }
  .proj-head { grid-template-columns: 44px minmax(0, 1fr); }
  .kpis b { font-size: 20px; }
  .sec h2 { font-size: 15px; letter-spacing: .14em; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.kpis > div:only-child { grid-column: 1 / -1; }

/* ---------- dark theme (switch in the header; choice is remembered per visitor) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #131313;
  --field: #1C1A16;
  --band: #0A0A0A;
  --text: #F3F0E8;
  --muted: #BDB6A7;
  --red: #D5193A;          /* shapes: markers, bullets, bars */
  --red-text: #FF7083;     /* small red text, lifted to read on black */
  --rule: #DCD5C5;
  --hairline: #36332D;
  --steel: #8E949D;
}
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .field select { background: var(--surface); }
:root[data-theme="dark"] .kpis { outline: 1.5px solid var(--hairline); }
:root[data-theme="dark"] .kpis > div + div { border-color: var(--hairline); }
:root[data-theme="dark"] .btn.primary { background: var(--text); color: var(--band); border-color: var(--text); }
:root[data-theme="dark"] .btn.primary:hover, :root[data-theme="dark"] .btn.primary:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
:root[data-theme="dark"] .hero::after { opacity: .55; }
:root[data-theme="dark"] .num { color: var(--red); }

/* header: theme switch */
.band .wrap { justify-content: flex-start; }
.logo { margin-right: auto; }
.nav { order: 1; }
.theme-btn { order: 2; background: none; border: 2px solid #4a4a4a; color: var(--on-band-muted); font: 600 12px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.theme-btn:hover, .theme-btn:focus-visible { color: #fff; border-color: var(--gold); outline: none; }
.menu-btn { order: 3; }
