/* ============================================
   SurfaceTek, Inc. — surfacetek-inc.com
   Design system
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  /* Palette — high desert: pumice, basalt, machine paint */
  --base:   #EAEBE8;   /* pale concrete */
  --paper:  #F3F3F1;   /* raised surfaces */
  --ink:    #16181A;   /* basalt */
  --slate:  #55595D;   /* muted text */
  --line:   #C6C6C0;   /* hairline */
  --rust:   #B85C1E;   /* machine orange */
  --rust-d: #96471399;

  /* Spacing scale — 8pt */
  --s1: 4px;  --s2: 8px;  --s3: 16px; --s4: 24px;
  --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px; --s9: 128px;

  --measure: 66ch;
  --gutter: 24px;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 720px) { body { font-size: 18px; } }

img { max-width: 100%; display: block; }

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: 'Archivo', system-ui, sans-serif;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.018em;
}

h3 {
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.008em;
}

p { margin: 0 0 var(--s4); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

/* Eyebrow / data labels — survey-callout register */
.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 var(--s3);
  display: block;
}

.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  line-height: 1.5;
  color: var(--slate);
  max-width: 54ch;
}

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

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: var(--s7); }
@media (min-width: 720px) { section { padding-block: var(--s8); } }

.band-dark {
  background: var(--ink);
  color: var(--base);
}
.band-dark .eyebrow { color: #E08A4A; }
.band-dark .lede { color: #A8ADB1; }

/* ---------- Signature: the grade line ----------
   A stepped horizontal profile, like a cross-section.
   Marks the top of every major section.            */

.grade {
  display: flex;
  align-items: flex-end;
  gap: 0;
  height: 22px;
  margin-bottom: var(--s5);
  max-width: 360px;
}
.grade span {
  display: block;
  border-top: 2px solid var(--rust);
  flex: 1;
}
.grade span:nth-child(1) { height: 22px; }
.grade span:nth-child(2) { height: 15px; }
.grade span:nth-child(3) { height: 9px; }
.grade span:nth-child(4) { height: 4px; }
.band-dark .grade span { border-top-color: #E08A4A; }

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

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--base);
  position: sticky;
  top: 0;
  z-index: 50;
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s3);
}

.brand {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1.1;
}
.brand em {
  font-style: normal;
  color: var(--rust);
}
.brand small {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 3px;
}

.nav {
  display: none;
  gap: var(--s5);
  align-items: center;
}
@media (min-width: 900px) { .nav { display: flex; } }

.nav a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  position: relative;
  padding-block: 4px;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--rust);
  transition: width 250ms ease;
}
.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after { width: 100%; }

.head-cta {
  display: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--ink);
  color: var(--base);
  padding: 11px 20px;
  white-space: nowrap;
}
@media (min-width: 620px) { .head-cta { display: inline-block; } }
.head-cta:hover { background: var(--rust); }

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

.btn {
  display: inline-block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 16px 32px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--base);
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.btn:hover { background: var(--rust); border-color: var(--rust); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--base); border-color: var(--ink); }

.band-dark .btn {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.band-dark .btn:hover { background: #CE6A25; border-color: #CE6A25; }
.band-dark .btn-ghost {
  background: transparent;
  border-color: #4A4F53;
  color: var(--base);
}
.band-dark .btn-ghost:hover { background: var(--base); color: var(--ink); border-color: var(--base); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

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

.hero {
  padding-block: var(--s7) var(--s7);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .hero { padding-block: var(--s8) var(--s8); }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: var(--s8);
    align-items: center;
  }
}

.hero h1 { margin-bottom: var(--s4); }

/* Cross-section illustration — stands in until real photos arrive,
   and stays as a design element afterward. */
.section-figure {
  margin-top: var(--s6);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: var(--s4);
}
@media (min-width: 900px) { .section-figure { margin-top: 0; } }
.section-figure svg { width: 100%; height: auto; display: block; }
.section-figure figcaption {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: var(--s3);
}

/* ---------- Credential strip ---------- */

.creds {
  background: var(--ink);
  color: var(--base);
  padding-block: var(--s4);
}
.creds ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.creds li { display: flex; align-items: center; gap: 10px; }
.creds li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--rust);
  flex: none;
}

/* ---------- Service / card grids ---------- */

.grid {
  display: grid;
  gap: var(--s5);
  margin-top: var(--s6);
}
@media (min-width: 680px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 680px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: var(--s5);
}
.card h3 { margin-bottom: var(--s3); }
.card p { font-size: 0.97rem; color: var(--slate); }
.card .tags {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}

/* ---------- Process (a real sequence, so numbered) ---------- */

.steps { margin-top: var(--s6); border-top: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: var(--s4);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
@media (min-width: 780px) {
  .step { grid-template-columns: 80px 260px 1fr; gap: var(--s5); align-items: baseline; }
}
.step-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rust);
  letter-spacing: 0.08em;
  padding-top: 5px;
}
.step h3 { margin-bottom: var(--s2); }
@media (min-width: 780px) { .step h3 { margin-bottom: 0; } }
.step p { font-size: 0.97rem; color: var(--slate); margin: 0; }

/* ---------- Projects ---------- */

.project {
  border-top: 1px solid var(--line);
  padding-block: var(--s6);
}
.project:first-of-type { border-top: none; padding-top: var(--s4); }

@media (min-width: 860px) {
  .project-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: var(--s7); }
}

.project h2 { margin-bottom: var(--s4); }

.meta {
  list-style: none;
  margin: 0 0 var(--s5);
  padding: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--slate);
  display: grid;
  gap: var(--s2);
}
.meta strong {
  color: var(--ink);
  font-weight: 500;
  display: inline-block;
  min-width: 84px;
}

.photo-slot {
  background: var(--paper);
  border: 1px dashed var(--line);
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s4);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--slate);
  text-transform: uppercase;
  overflow: hidden;
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.photo-slot:hover img { transform: scale(1.04); }

.caption {
  font-size: 0.87rem;
  color: var(--slate);
  margin-top: var(--s3);
  max-width: 46ch;
}

/* ---------- Form ---------- */

.form { margin-top: var(--s6); max-width: 620px; }
.field { margin-bottom: var(--s4); }
.field label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.73rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--s2);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--rust);
  outline-offset: 1px;
  border-color: var(--rust);
}

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

.contact-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: var(--s4);
}
.contact-list dt,
.contact-list .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 4px;
}
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--rust); }
.contact-list .big {
  font-family: 'Archivo', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

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

.site-foot {
  background: var(--ink);
  color: var(--base);
  padding-block: var(--s7) var(--s5);
}
.foot-grid {
  display: grid;
  gap: var(--s6);
  padding-bottom: var(--s6);
  border-bottom: 1px solid #2E3236;
}
@media (min-width: 780px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.site-foot h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E08A4A;
  margin-bottom: var(--s3);
}
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.site-foot a { color: var(--base); text-decoration: none; }
.site-foot a:hover { color: #E08A4A; }
.site-foot p { color: #A8ADB1; font-size: 0.95rem; }

.legal {
  margin-top: var(--s5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #797F84;
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--base);
  padding: 12px 20px; z-index: 100;
}
.skip:focus { left: var(--gutter); top: 8px; }

/* ---------- Contact two-column ---------- */
.contact-grid { display: grid; gap: var(--s7); grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1.2fr 1fr; gap: var(--s8); }
}

/* Five-item nav needs a bit less gap */
@media (min-width: 900px) and (max-width: 1100px) {
  .nav { gap: var(--s4); }
  .nav a { font-size: 0.88rem; }
}

/* ============================================
   Photo banner hero
   ============================================ */

.banner {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}

.banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* Scrim — dark at bottom-left where the headline sits,
   lighter at top-right behind the logo. */
.banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,11,12,0.92) 0%, rgba(10,11,12,0.55) 38%, rgba(10,11,12,0.10) 70%, rgba(10,11,12,0.35) 100%);
  pointer-events: none;
}

.banner-inner {
  position: relative;
  z-index: 2;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: var(--s6) var(--s7);
}
@media (min-width: 900px) {
  .banner-inner { min-height: 560px; padding-block: var(--s7) var(--s8); }
}


.banner-copy { max-width: 30ch; }

.banner-copy h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}
.banner-copy .eyebrow { color: #F0A15E; }
.banner-copy .lede {
  color: #DDE0E2;
  max-width: 46ch;
  text-shadow: 0 1px 14px rgba(0,0,0,0.7);
}
.banner-copy .btn-row { margin-top: var(--s5); }
.banner-copy .btn {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.banner-copy .btn:hover { background: #CE6A25; border-color: #CE6A25; }
.banner-copy .btn-ghost {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  backdrop-filter: blur(2px);
}
.banner-copy .btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* Cross-section figure moves below the banner on the home page */
.figure-strip {
  border-bottom: 1px solid var(--line);
  padding-block: var(--s7);
}
@media (min-width: 900px) {
  .figure-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s8);
    align-items: center;
  }
}

/* Header logo */
.brand-logo { display: block; }
.brand-logo img { width: 168px; height: auto; }
@media (min-width: 720px) { .brand-logo img { width: 200px; } }
.brand-logo small { margin-top: 4px; }

/* ============================================
   Gallery
   ============================================ */

.gallery {
  display: grid;
  gap: var(--s3);
  grid-template-columns: 1fr;
  margin-top: var(--s6);
}
@media (min-width: 620px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: var(--s4); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

.shot {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}
.shot .frame {
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--ink);
}
.shot .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.shot:hover .frame img { transform: scale(1.04); }

.shot figcaption {
  padding: var(--s3) var(--s4) var(--s4);
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.5;
}
.shot figcaption strong {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 6px;
  font-weight: 500;
}

/* Wide feature shot */
.shot-wide { grid-column: 1 / -1; }
.shot-wide .frame { aspect-ratio: 16 / 7; }

/* Project photo replaces the dashed placeholder */
.photo-slot { border-style: solid; padding: 0; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }

/* About portrait */
.portrait {
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  aspect-ratio: 3/2;
}
.portrait img { width:100%; height:100%; object-fit: cover; }

/* Scope list on service pages */
.scope {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s2);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--slate);
}
.scope li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding-block: var(--s2);
  border-bottom: 1px solid var(--line);
}
.scope li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--rust);
  flex: none;
  transform: translateY(-1px);
}

/* Clickable service cards */
a.card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 200ms ease, background 200ms ease;
}
a.card:hover { border-color: var(--rust); background: #fff; }
a.card h3 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
a.card h3::after {
  content: '\2192';
  color: var(--rust);
  font-size: 0.9em;
  transition: transform 250ms ease;
}
a.card:hover h3::after { transform: translateX(4px); }
