/* ============================================================
   HOMEWORKS — Swiss / editorial design
   Type: Helvetica grotesque + serif headlines + Johnston ITC labels
   Color: paper white, ink, brand blue (primary), brand green (secondary)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&display=swap');

@font-face {
  font-family: 'Johnston ITC';
  src: url('assets/JohnstonITC-Medium.otf') format('opentype');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --green: #55BC5A;
  --blue: #3F4C9B;

  /* Accent */
  --accent: #3F4C9B;

  /* Surfaces */
  --paper: #F6F4EF;
  --paper-2: #EFEDE6;
  --white: #FCFBF8;
  --ink: #16160F;
  --ink-2: #4A4A40;
  --hair: #D9D5CA;
  --hair-strong: #B7B2A4;

  /* Silver ruler motif */
  --silver-1: #EDEEF0;
  --silver-2: #C9CCD2;
  --silver-3: #9CA0A8;
  --silver-tick: #7E828B;

  /* Type */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Johnston ITC', 'Space Mono', 'SFMono-Regular', ui-monospace, monospace;

  /* Rhythm */
  --gut: clamp(20px, 5vw, 64px);
  --maxw: 1440px;
  --ruler-h: 22px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

::selection { background: var(--accent); color: #fff; }

/* ---------- Type scale ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.04; letter-spacing: -0.01em; }

.display {
  font-size: clamp(44px, 11vw, 132px);
  line-height: 0.96;
  letter-spacing: -0.025em;
}
.h-sec {
  font-size: clamp(30px, 6vw, 64px);
  letter-spacing: -0.02em;
}
.h-sub {
  font-size: clamp(22px, 4vw, 34px);
}

p { margin: 0 0 1em; text-wrap: pretty; }
.lead {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.38;
  font-weight: 400;
  color: var(--ink);
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

section { position: relative; }

.section-pad { padding: clamp(72px, 11vw, 160px) 0; }

/* ===========================================================
   RULER MOTIF — brushed silver
   =========================================================== */
.ruler {
  position: relative;
  height: var(--ruler-h);
  width: 100%;
  background-color: transparent;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='20'><path fill='%23A7A8AC' d='M0 0H80V20H73.4V13.4H70.6V20H57.4V13.4H54.6V20H41.4V13.4H38.6V20H25.4V13.4H22.6V20H9.4V6.8H6.6V20H0Z'/></svg>");
  background-repeat: round;
  background-size: 80px 100%;
}
.rule-line {
  height: 1px; width: 100%;
  background: var(--ink);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(.16,1,.3,1);
}
.js .rule-line { transform: scaleX(0); }
.rule-line.in-view, .in-view .rule-line { transform: scaleX(1); }

.annot {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.annot::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
}

/* ===========================================================
   HEADER
   =========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  transition: transform .4s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.site-header.hide { transform: translateY(calc(-100% + 20px)); }
.header-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px var(--gut) 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; width: -moz-fit-content; width: fit-content; }
.brand img { height: 42px; width: auto; }
.header-ruler { --ruler-h: 20px; height: 20px; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav a {
  font-family: var(--mono);
  font-size: 14px; letter-spacing: .02em; color: var(--ink);
  position: relative; padding: 4px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--accent); transition: width .28s ease;
}
.nav a:hover::after { width: 100%; }
.nav .nav-links { display: flex; gap: clamp(18px, 2.4vw, 38px); }

.burger { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 28px; position: relative; }
.burger span { position: absolute; left: 3px; right: 3px; height: 2px; background: var(--ink); transition: transform .3s, opacity .3s; }
.burger span:nth-child(1) { top: 7px; } .burger span:nth-child(2) { top: 13px; } .burger span:nth-child(3) { top: 19px; }
.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===========================================================
   HERO
   =========================================================== */
.hero { padding-top: clamp(40px, 7vw, 96px); padding-bottom: 0; }
.hero-head { position: relative; }
.hero-tag {
  display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: clamp(20px, 4vw, 40px);
}
.display .word { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.14em 0; margin: -0.14em 0; }
.display .word > span { display: inline-block; }
.js .display .word > span { transform: translateY(110%); }
.in-view .display .word > span { transform: translateY(0); transition: transform 1s cubic-bezier(.16,1,.3,1); }
.in-view .display .word:nth-child(2) > span { transition-delay: .08s; }
.in-view .display .word:nth-child(3) > span { transition-delay: .16s; }
.in-view .display .word:nth-child(4) > span { transition-delay: .24s; }
.accent-word { color: var(--accent); font-style: italic; }

.hero-foot {
  display: grid; grid-template-columns: 1fr; gap: 22px;
  margin-top: clamp(28px, 5vw, 56px);
  padding-top: 22px; border-top: 1px solid var(--hair-strong);
}
.hero-foot .lead { max-width: 46ch; }
.hero-meta { display: flex; flex-direction: column; gap: 12px; }
.hero-meta .annot { justify-content: flex-start; }

.hero-figure {
  position: relative; margin-top: clamp(40px, 6vw, 80px);
  aspect-ratio: 16 / 8; width: 100%;
}

/* masked image wipe reveal */
.reveal-img { position: relative; overflow: hidden; background: var(--paper-2); }
.reveal-img > .ph, .reveal-img > img { transition: transform 1.4s cubic-bezier(.16,1,.3,1); width: 100%; height: 100%; object-fit: cover; }
.js .reveal-img > .ph, .js .reveal-img > img { transform: scale(1.12); }
.reveal-img::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform: scaleY(0); transform-origin: bottom; transition: transform 1.1s cubic-bezier(.76,0,.24,1);
}
.js .reveal-img::after { transform: scaleY(1); }
.in-view .reveal-img::after { transform: scaleY(0); }
.in-view .reveal-img > .ph, .in-view .reveal-img > img { transform: scale(1); }

/* image placeholder (striped) */
.ph {
  width: 100%; height: 100%;
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(45deg, var(--hair) 0 1px, transparent 1px 11px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.ph .ph-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  background: var(--paper); padding: 6px 12px; border: 1px solid var(--hair-strong);
  text-align: center;
}

/* corner plan tag on figures */
.plan-tag {
  position: absolute; z-index: 3; font-family: var(--mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  background: var(--paper); border: 1px solid var(--ink); padding: 5px 9px;
}
.plan-tag.tl { top: 12px; left: 12px; } .plan-tag.tr { top: 12px; right: 12px; }
.plan-tag.bl { bottom: 12px; left: 12px; } .plan-tag.br { bottom: 12px; right: 12px; }

/* ===========================================================
   HERO LOGO VARIANT
   =========================================================== */
.hero-logo {
  display: none;
  height: clamp(40px, 7vw, 86px); width: auto;
  margin-bottom: clamp(22px, 4vw, 40px);
}

/* ===========================================================
   GENERIC reveal
   =========================================================== */
.reveal { transition: opacity .9s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.js .reveal { opacity: 0; transform: translateY(28px); }
.in-view.reveal, .in-view .reveal { opacity: 1; transform: none; }
.in-view .reveal { transition-delay: var(--d, 0s); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .display .word > span, .reveal-img > .ph, .reveal-img > img { transition: none !important; transform: none !important; opacity: 1 !important; }
  .reveal-img::after { display: none; }
  .rule-line { transform: scaleX(1) !important; }
  html { scroll-behavior: auto; }
}

/* ===========================================================
   SECTION HEADER (numbered)
   =========================================================== */
.sec-head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(36px, 6vw, 72px); }
.sec-head .num { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--accent); }
.sec-head .h-sec { max-width: 20ch; }
.sec-head .sec-note { font-size: 15px; color: var(--ink-2); max-width: 40ch; }

/* ===========================================================
   INTRO / POSITIONING
   =========================================================== */
.intro .lead { max-width: 24ch; font-size: clamp(26px, 4.4vw, 52px); line-height: 1.18; }
.intro-grid { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; }
.intro-body p { color: var(--ink-2); max-width: 52ch; font-size: 17px; }
.intro-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hair-strong); border: 1px solid var(--hair-strong); margin-top: 8px; }
.stat { background: var(--paper); padding: 22px; }
.stat .n { font-family: var(--serif); font-size: clamp(34px, 6vw, 56px); line-height: 1; color: var(--accent); }
.stat .l { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-top: 8px; }

/* ===========================================================
   FEATURE — SASH WINDOWS
   =========================================================== */
.feature { background: var(--ink); color: var(--paper); }
.feature .eyebrow, .feature .sec-note, .feature .annot { color: #B9B6A8; }
.feature .annot::before { background: var(--green); }
.feature .h-sec { color: var(--paper); }
.feature .sec-head .num { color: var(--green); }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.feature-figure { aspect-ratio: 4/5; }
.feature .reveal-img::after { background: var(--green); }
.feature-list { columns: 1; list-style: none; padding: 0; margin: 18px 0 0; }
.feature-list li { padding: 13px 0; border-bottom: 1px solid #2c2c22; font-size: 15px; display: flex; gap: 14px; align-items: baseline; }
.feature-list li .ix { font-family: var(--mono); font-size: 11px; color: var(--green); flex: none; }
.feature-list li:hover { color: #fff; }
.feature .lead { color: var(--paper); max-width: 30ch; }

/* ===========================================================
   PROCESS — DryFlex steps
   =========================================================== */
.process-track { display: grid; gap: 1px; background: var(--hair-strong); border: 1px solid var(--hair-strong); grid-template-columns: 1fr; }
.step { background: var(--paper); padding: clamp(22px, 3vw, 34px); display: grid; gap: 12px; }
.step .step-n { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .12em; }
.step h3 { font-size: clamp(20px, 2.6vw, 26px); }
.step p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* ===========================================================
   SERVICES grid (compact)
   =========================================================== */
.svc-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--hair-strong); border: 1px solid var(--hair-strong); }
.svc {
  background: var(--paper); padding: clamp(22px, 3vw, 34px);
  display: grid; gap: 10px; position: relative; transition: background .3s;
  min-height: 180px; align-content: start;
}
.svc:hover { background: var(--white); }
.svc .svc-ix { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-2); }
.svc h3 { font-size: clamp(21px, 2.4vw, 27px); }
.svc p { font-size: 14px; color: var(--ink-2); margin: 0; }
.svc .arrow { position: absolute; right: clamp(22px,3vw,34px); top: clamp(22px,3vw,34px); font-family: var(--mono); transition: transform .3s; color: var(--accent); }
.svc:hover .arrow { transform: translate(4px, -4px); }

/* ===========================================================
   PROJECTS
   =========================================================== */
.proj-list { display: grid; gap: clamp(40px, 7vw, 90px); }
.proj { display: grid; grid-template-columns: 1fr; gap: clamp(18px, 3vw, 40px); align-items: center; }
.proj-figure { aspect-ratio: 3/2; }
.proj-info .num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .12em; }
.proj-info h3 { font-size: clamp(26px, 4vw, 44px); margin: 12px 0 14px; }
.proj-info p { color: var(--ink-2); max-width: 46ch; }
.proj-specs { display: flex; flex-wrap: wrap; gap: 10px 8px; margin-top: 18px; }
.spec { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--hair-strong); padding: 6px 11px; }

/* ===========================================================
   TESTIMONIALS
   =========================================================== */
.testimonials { background: var(--paper-2); }
.quotes { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--hair-strong); border: 1px solid var(--hair-strong); }
.quote { background: var(--paper); padding: clamp(26px, 3.5vw, 44px); display: grid; gap: 20px; align-content: space-between; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(18px, 2.2vw, 24px); line-height: 1.4; }
.quote .who { display: flex; align-items: center; gap: 12px; }
.quote .who .stars { color: var(--green); font-size: 13px; letter-spacing: 2px; }
.quote .who .name { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.quote.big { grid-column: 1 / -1; }
.quote.big blockquote { font-size: clamp(24px, 3.6vw, 40px); }

/* ===========================================================
   CONTACT
   =========================================================== */
.contact { background: var(--ink); color: var(--paper); }
.contact .eyebrow { color: #B9B6A8; }
.contact .h-sec { color: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(36px, 6vw, 72px); }
.contact-quote { font-family: var(--serif); font-size: clamp(22px, 3vw, 34px); line-height: 1.3; max-width: 22ch; }
.contact-info { display: grid; gap: 18px; margin-top: 28px; }
.contact-info a, .contact-info div { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid #2c2c22; padding-bottom: 14px; }
.contact-info .k { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #B9B6A8; flex: none; width: 88px; }
.contact-info .v { font-size: clamp(16px, 2vw, 20px); }
.contact-info a:hover .v { color: var(--green); }

/* form */
.form { display: grid; gap: 0; border: 1px solid #2c2c22; }
.field { border-bottom: 1px solid #2c2c22; position: relative; }
.field:last-of-type { border-bottom: 0; }
.field label { position: absolute; left: 18px; top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8b887c; pointer-events: none; transition: .2s; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; outline: 0; color: var(--paper);
  font-family: var(--sans); font-size: 17px; padding: 34px 18px 16px; resize: none;
}
.field textarea { min-height: 120px; }
.field input:focus + label, .field textarea:focus + label,
.field.filled label { top: 12px; font-size: 9px; color: var(--green); }
.form-submit {
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  padding: 22px; text-align: left; display: flex; justify-content: space-between; align-items: center;
  transition: filter .25s;
}
.form-submit:hover { filter: brightness(1.12); }
.form-note { font-family: var(--mono); font-size: 11px; color: var(--green); padding: 14px 4px 0; min-height: 20px; }

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer { background: var(--paper); border-top: 1px solid var(--hair-strong); }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 30px; padding: clamp(48px,7vw,84px) 0 40px; }
.footer-brand p { color: var(--ink-2); font-size: 14px; max-width: 32ch; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; font-weight: 400; }
.footer-col a { display: block; font-size: 14px; padding: 5px 0; color: var(--ink); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--hair); padding: 22px 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.footer-bottom, .footer-bottom a { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-2); text-transform: uppercase; }

.footer-mark { padding: clamp(40px, 6vw, 72px) 0 clamp(16px, 2.5vw, 28px); }
.footer-mark img { width: 100%; height: auto; opacity: .9; }

/* ===========================================================
   MOBILE MENU
   =========================================================== */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--paper);
  transform: translateY(-100%); transition: transform .5s cubic-bezier(.76,0,.24,1);
  display: flex; flex-direction: column; padding: 90px var(--gut) 40px;
}
.menu-open .mobile-menu { transform: translateY(0); }
.mobile-menu a { font-family: var(--serif); font-size: clamp(34px, 9vw, 56px); padding: 12px 0; border-bottom: 1px solid var(--hair); display: flex; justify-content: space-between; align-items: baseline; }
.mobile-menu a .mi { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.mobile-menu .mob-contact { margin-top: auto; display: grid; gap: 8px; font-family: var(--mono); font-size: 13px; }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (min-width: 760px) {
  .intro-grid { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .intro-stats { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .process-track { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: repeat(2, 1fr); }
  .hero-foot { grid-template-columns: 1.4fr 1fr; align-items: end; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-list { columns: 2; column-gap: 32px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1.4fr 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .proj { grid-template-columns: 1.3fr 1fr; }
  .proj.flip .proj-figure { order: 2; }
}
@media (min-width: 1080px) {
  .svc-grid { grid-template-columns: repeat(4, 1fr); }
  .process-track { grid-template-columns: repeat(3, 1fr); }
  .intro-stats { grid-template-columns: repeat(4, 1fr); }
  .hero-figure { aspect-ratio: 16/7; }
}
@media (max-width: 759px) {
  .nav .nav-links { display: none; }
  .burger { display: block; }
  .feature-list { columns: 1; }
}
