/* ==========================================================================
   Dennis Fichman — Architecture Design Services
   Design system: drafting sheet — hairline frame, corner registration marks,
   sheet-number labels, serif display + mono annotation face.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #FAFAF7;
  --paper-dim: #F2F1EA;
  --ink: #1A1A18;
  --graphite: #6B6B65;
  --line: #D8D6CE;
  --line-strong: #B8B6AC;
  --redline: #B23A2F;
  --redline-dim: #B23A2F1a;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', monospace;

  --frame-gap: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

/* ---------- Drafting sheet frame ---------- */

.sheet {
  position: relative;
  background: var(--paper);
  min-height: 100vh;
  margin: var(--frame-gap);
  border: 1px solid var(--ink);
}

.sheet::before,
.sheet::after,
.sheet .tick-tr,
.sheet .tick-bl {
  content: '';
  position: fixed;
  width: 22px;
  height: 22px;
  z-index: 40;
  pointer-events: none;
}
.sheet::before { top: calc(var(--frame-gap) - 1px); left: calc(var(--frame-gap) - 1px); border-top: 2px solid var(--redline); border-left: 2px solid var(--redline); }
.sheet::after { bottom: calc(var(--frame-gap) - 1px); right: calc(var(--frame-gap) - 1px); border-bottom: 2px solid var(--redline); border-right: 2px solid var(--redline); }
.tick-tr { top: calc(var(--frame-gap) - 1px); right: calc(var(--frame-gap) - 1px); border-top: 2px solid var(--redline); border-right: 2px solid var(--redline); position: fixed; }
.tick-bl { bottom: calc(var(--frame-gap) - 1px); left: calc(var(--frame-gap) - 1px); border-bottom: 2px solid var(--redline); border-left: 2px solid var(--redline); position: fixed; }

.sheet-label {
  position: fixed;
  bottom: calc(var(--frame-gap) + 10px);
  right: calc(var(--frame-gap) + 34px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--graphite);
  z-index: 40;
  text-align: right;
  pointer-events: none;
}
.sheet-label span { display: block; }
.sheet-label .num { color: var(--redline); font-weight: 500; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.brand small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--graphite);
  text-transform: uppercase;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  gap: 34px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.main-nav a {
  position: relative;
  padding-bottom: 3px;
  color: var(--graphite);
  transition: color 0.2s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--redline);
}

.nav-toggle { display: none; }

/* ---------- Layout helpers ---------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

section { padding: 110px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
.tight { padding: 70px 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--redline);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--redline);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; }
h1 { font-size: clamp(42px, 6vw, 78px); font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 3.6vw, 44px); }
h3 { font-size: 21px; }

p.lede {
  font-size: 19px;
  color: var(--graphite);
  max-width: 620px;
  line-height: 1.6;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-3 > * { background: var(--paper); padding: 40px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-accent {
  border-color: var(--redline);
  background: var(--redline);
  color: var(--paper);
}
.btn-accent:hover { background: var(--ink); border-color: var(--ink); }
.btn-arrow { transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding-top: 90px;
  padding-bottom: 90px;
}
.hero-drawing { position: relative; }
.hero-drawing svg { width: 100%; height: auto; }
.draw-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 2.4s ease forwards 0.3s;
}
.draw-line.accent { stroke: var(--redline); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-meta {
  display: flex;
  gap: 34px;
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--graphite);
}
.hero-meta div span { display: block; color: var(--ink); font-size: 14px; margin-top: 4px; }

/* ---------- Pipeline / process ---------- */

.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.pipeline > div {
  padding: 34px 26px;
  border-right: 1px solid var(--line);
  position: relative;
}
.pipeline > div:last-child { border-right: none; }
.pipeline .step-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--redline);
  margin-bottom: 18px;
}
.pipeline h3 { font-size: 18px; margin-bottom: 10px; }
.pipeline p { color: var(--graphite); font-size: 14.5px; }
.pipeline-connector {
  display: flex;
  justify-content: space-between;
  padding: 0 26px;
  margin-top: -1px;
}
.pipeline-connector span { font-family: var(--mono); font-size: 10px; color: var(--line-strong); }

/* ---------- Cards ---------- */

.card {
  border: 1px solid var(--line);
  padding: 36px;
  transition: border-color 0.2s ease;
}
.card:hover { border-color: var(--ink); }
.card .eyebrow { margin-bottom: 14px; }

/* ---------- Portfolio ---------- */

.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project {
  background: var(--paper);
  padding: 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-thumb {
  aspect-ratio: 4/3;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--line-strong);
}
.project-thumb svg { width: 46%; opacity: 0.5; }
.project-tags { display: flex; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--graphite); text-transform: uppercase; letter-spacing: 0.05em; }
.project-tags span { border: 1px solid var(--line); padding: 3px 9px; }
.project p { color: var(--graphite); font-size: 14.5px; }

.note-box {
  border: 1px dashed var(--line-strong);
  padding: 24px 28px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--graphite);
  line-height: 1.7;
}
.note-box strong { color: var(--ink); }

/* ---------- Table (services scope) ---------- */

.scope-table { width: 100%; border-collapse: collapse; }
.scope-table th, .scope-table td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.scope-table th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
}
.scope-table td:first-child { font-family: var(--serif); font-size: 16px; }
.check { color: var(--redline); font-family: var(--mono); }

/* ---------- Quote / about ---------- */

.pull-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.45;
  max-width: 780px;
  color: var(--ink);
}
.pull-quote::before { content: '"'; color: var(--redline); }
.pull-quote::after { content: '"'; color: var(--redline); }

.credentials { display: flex; flex-direction: column; gap: 22px; }
.credentials .row { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.credentials .row span:first-child { font-family: var(--mono); font-size: 12px; color: var(--graphite); text-transform: uppercase; letter-spacing: 0.05em; }
.credentials .row span:last-child { text-align: right; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--graphite);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 10px 2px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-bottom-color: var(--redline);
}
.field textarea { resize: vertical; min-height: 100px; }
.form-status { margin-top: 18px; font-family: var(--mono); font-size: 12.5px; color: var(--graphite); min-height: 18px; }

.contact-info .row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 30px; }
.contact-info .row span:first-child { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--graphite); }
.contact-info .row span:last-child { font-size: 17px; font-family: var(--serif); }

/* ---------- Footer ---------- */

.site-footer {
  padding: 44px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--graphite);
  letter-spacing: 0.03em;
}
.site-footer a:hover { color: var(--ink); }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--redline);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  :root { --frame-gap: 10px; }
  .site-header { padding: 18px 22px; }
  .main-nav { position: fixed; top: 66px; left: 10px; right: 10px; background: var(--paper); border: 1px solid var(--ink); flex-direction: column; gap: 0; padding: 8px 0; display: none; z-index: 35; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 22px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; font-family: var(--mono); font-size: 12px; text-transform: uppercase; background: none; border: 1px solid var(--ink); padding: 8px 14px; letter-spacing: 0.06em; }
  .wrap { padding: 0 22px; }
  section { padding: 64px 0; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-drawing { order: -1; }
  .grid-2, .grid-3, .project-grid, .contact-grid { grid-template-columns: 1fr; }
  .grid-3 { border: none; background: none; }
  .grid-3 > * { border: 1px solid var(--line); }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline > div { border-right: none; border-bottom: 1px solid var(--line); }
  .pipeline-connector { display: none; }
  .sheet-label { right: calc(var(--frame-gap) + 26px); font-size: 9px; bottom: calc(var(--frame-gap) + 8px); }
}
