/* =========================================================
   Aelius Design — "The Drawing Sheet"
   Graphite ink on warm vellum. Grotesque display (Archivo),
   serif body (Spectral), technical mono utility (IBM Plex Mono).
   Plain CSS. No build step, no dependencies.
   ========================================================= */

:root {
  --paper:    #edece8;   /* vellum — warm-neutral, desaturated */
  --paper-2:  #e4e3dd;   /* recessed panel / hover */
  --ink:      #1b1c19;   /* graphite near-black */
  --graphite: #5a5c54;   /* secondary text */
  --rule:     #c7c6bf;   /* hairlines */
  --accent:   #3c5060;   /* slate — used sparingly */

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Spectral", Georgia, "Times New Roman", serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --frame-inset: 20px;
  --page-max: 1180px;
  --pad-x: clamp(20px, 5vw, 72px);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.72;
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* =========================================================
   The Sheet — a measured frame around the whole page
   ========================================================= */
.sheet {
  min-height: calc(100vh - var(--frame-inset) * 2);
  margin: var(--frame-inset);
  border: 1px solid var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: relative;
}
/* faint corner ticks, like registration marks */
.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid var(--graphite);
  opacity: .5;
}
.sheet::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.sheet::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; }

/* =========================================================
   Masthead
   ========================================================= */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--pad-x) 22px;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .96rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .reg { color: var(--graphite); font-weight: 500; }

.nav {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.nav a {
  text-decoration: none;
  color: var(--graphite);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover { color: var(--ink); border-color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--accent); }

.nav-toggle { display: none; }

/* =========================================================
   Page body grows to fill; footer pins to bottom
   ========================================================= */
.page { flex: 1 0 auto; }
.wrap { padding-inline: var(--pad-x); }

/* section rhythm */
.section { padding-block: clamp(48px, 8vw, 96px); }
.section + .section { border-top: 1px solid var(--rule); }

/* eyebrow / sheet-reference label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* =========================================================
   Hero
   ========================================================= */
.hero { padding-block: clamp(56px, 11vw, 128px) clamp(40px, 6vw, 72px); }
.hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.7rem, 9.2vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.hero__lede {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2.3vw, 1.55rem);
  line-height: 1.55;
  color: var(--graphite);
  max-width: 30ch;
  margin: 26px 0 0;
}
.hero__lede em { font-style: italic; color: var(--ink); }

/* scale-ruler divider — the signature element */
.measure {
  height: 15px;
  margin: clamp(34px, 5vw, 56px) 0;
  border-top: 1px solid var(--ink);
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 45px);
  background-size: 100% 6px, 100% 13px;
  background-position: top left, top left;
  background-repeat: repeat-x, repeat-x;
}

/* titleblock data row */
.titleblock {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px 40px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
}
.titleblock dt {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .66rem;
  margin-bottom: 6px;
}
.titleblock dd { margin: 0; color: var(--ink); line-height: 1.5; }

/* =========================================================
   Generic prose + headings
   ========================================================= */
.h-lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(22px, 3vw, 34px);
  max-width: 20ch;
}
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.35em; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--ink); }

/* two-column: text + figure (about) */
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.figure { margin: 0; }
.figure img {
  border: 1px solid var(--ink);
  filter: grayscale(12%);
}
.figure figcaption {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--graphite);
  margin-top: 12px;
  line-height: 1.5;
}

/* =========================================================
   Services — indexed capability list
   ========================================================= */
.caps { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.caps li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 8px 24px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}
.caps li:last-child { border-bottom: 1px solid var(--rule); }
.caps .idx {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .05em;
  padding-top: .35em;
}
.caps .cap-h {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.caps .cap-b { margin: 0; color: var(--graphite); max-width: 56ch; }

/* focus tags */
.tags {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  margin: 28px 0 0; padding: 0;
  list-style: none;
}
.tags li {
  border: 1px solid var(--rule);
  padding: 7px 13px;
  color: var(--graphite);
}

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.contact-item .lab {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.contact-item a, .contact-item span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.18rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color .2s ease;
  word-break: break-word;
}
.contact-item a:hover { border-color: var(--ink); }

/* call-to-action link */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  margin-top: 36px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5px;
  transition: gap .2s ease, color .2s ease;
}
.cta:hover { gap: 20px; color: var(--accent); }
.cta::after { content: "\2192"; }

/* =========================================================
   Footer / titleblock strip
   ========================================================= */
.foot {
  flex-shrink: 0;
  border-top: 1px solid var(--ink);
  padding: 22px var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--graphite);
  text-transform: uppercase;
}
.foot a { color: var(--graphite); text-decoration: none; border-bottom: 1px solid transparent; }
.foot a:hover { color: var(--ink); border-color: var(--ink); }
.foot .foot-social { display: flex; gap: 24px; }

/* =========================================================
   Motion — subtle, and fully optional
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .7s ease;
}
.hero__name, .hero__lede { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero__lede { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 720px) {
  :root { --frame-inset: 10px; }
  .split { grid-template-columns: 1fr; }
  .figure { order: -1; max-width: 320px; }
  .caps li { grid-template-columns: 1fr; gap: 6px; }
  .caps .idx { padding-top: 0; }

  .nav-toggle {
    display: inline-block;
    background: none; border: 1px solid var(--rule);
    font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ink);
    padding: 8px 12px; cursor: pointer;
  }
  .nav {
    position: absolute; top: 100%; right: var(--pad-x); left: var(--pad-x);
    flex-direction: column; gap: 0;
    background: var(--paper); border: 1px solid var(--ink); border-top: none;
    z-index: 20;
    max-height: 0; overflow: hidden;
    transition: max-height .28s ease;
  }
  .nav.open { max-height: 320px; }
  .nav a { padding: 15px 18px; border-bottom: 1px solid var(--rule); }
  .nav a:last-child { border-bottom: none; }
  .masthead { position: relative; flex-wrap: wrap; }
}

/* keyboard focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
