/* Maximum Windows & Doors - design system
   Reference: the triplicate work-order pad. Paper field, blue carbon boards, ink cover. */

@font-face { font-family:'Barlow Condensed'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/BarlowCondensed-600.woff2') format('woff2'); }
@font-face { font-family:'Barlow Condensed'; font-style:normal; font-weight:700; font-display:swap; src:url('fonts/BarlowCondensed-700.woff2') format('woff2'); }
@font-face { font-family:'Public Sans'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/PublicSans-400.woff2') format('woff2'); }
@font-face { font-family:'Public Sans'; font-style:italic; font-weight:400; font-display:swap; src:url('fonts/PublicSans-400i.woff2') format('woff2'); }
@font-face { font-family:'Public Sans'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/PublicSans-500.woff2') format('woff2'); }
@font-face { font-family:'Public Sans'; font-style:normal; font-weight:700; font-display:swap; src:url('fonts/PublicSans-700.woff2') format('woff2'); }
:root {
  --ink: #101215;
  --ink-soft: #1c2126;
  --blue: #204879;
  --blue-deep: #17365d;
  --paper: #f4f5f6;
  --white: #ffffff;
  --line: #d7dade;
  --line-strong: #b9bec4;
  --text: #1c2126;
  --text-soft: #4c5761;
  --on-blue-soft: #c7d5e8;
  --on-ink-soft: #b9c4cf;
  --on-blue-line: rgba(255,255,255,0.28);
  --on-ink-line: rgba(255,255,255,0.16);
  --focus: #8fb4e4;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Public Sans', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  z-index: 200;
  font-weight: 500;
}
.skip-link:focus { left: 0; }

/* Focus states */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Type */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0 0 0.5em; color: var(--ink); }

h1 {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  font-size: clamp(2.5rem, 5.4vw, 4rem);
}

.h1-page { font-size: clamp(2.4rem, 5vw, 3.6rem); }

h2 { font-size: clamp(1.85rem, 3.2vw, 2.5rem); }

h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; max-width: 62ch; }

.lead { font-size: 1.13rem; color: var(--ink-soft); }



a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:not(.btn):hover { color: var(--blue-deep); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border: 1px solid var(--blue);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

.btn--paper { background: var(--white); color: var(--blue); border-color: var(--white); }
.btn--paper:hover { background: #e8eef5; border-color: #e8eef5; color: var(--blue-deep); }

.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn--ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }

.btn--line { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--line:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Header */
.site-head {
  background: var(--ink);
  border-bottom: 1px solid var(--on-ink-line);
  position: sticky;
  top: 0;
  z-index: 200;
  will-change: transform;
}
.site-head.is-shrunk .head-inner { padding-top: 7px; padding-bottom: 7px; }
.site-head.is-shrunk .brand img { height: 42px; }
.site-head .head-inner,
.site-head .brand img { transition: padding .18s ease, height .18s ease; }
@media (prefers-reduced-motion: reduce) {
  .site-head .head-inner, .site-head .brand img { transition: none; }
}
/* anchor jumps must clear the sticky bar */
html { scroll-padding-top: 96px; }
.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 56px; width: auto; display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
}
.site-nav a {
  color: #dfe6ec;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--focus); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 2px;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 9px 14px;
  cursor: pointer;
}

/* Hero */
.hero {
  background: var(--ink);
  color: #fff;
  padding: 72px 0 84px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero h1 { color: #fff; margin-bottom: 0.35em; }
.hero__sub {
  font-size: 1.16rem;
  color: var(--on-ink-soft);
  max-width: 46ch;
  margin-bottom: 1.6em;
}
.hero .plate { max-width: 460px; margin-left: auto; }

/* Photo plate */
.plate {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 12px 12px 10px;
}
.plate img { width: 100%; height: auto; }
.plate__cap {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-soft);
  margin: 9px 2px 0;
}

/* Sections */
.section { padding: 76px 0; }
.section--tight { padding: 56px 0; }

.section-head { margin-bottom: 40px; max-width: 700px; }
.section-head 

.rule {
  height: 1px;
  background: var(--line-strong);
  margin-top: 18px;
}

/* Boards */
.board-blue { background: var(--blue); color: #fff; }
.board-blue h2, .board-blue h3 { color: #fff; }
.board-blue p { color: var(--on-blue-soft); }
.board-blue .section-head 
.board-blue .rule { background: var(--on-blue-line); }
.board-blue a:not(.btn) { color: #fff; text-decoration-color: rgba(255,255,255,0.5); }
.board-blue a:not(.btn):hover { color: #fff; text-decoration-color: #fff; }

.board-ink { background: var(--ink); color: #fff; }
.board-ink h2, .board-ink h3 { color: #fff; }
.board-ink p { color: var(--on-ink-soft); }
.board-ink .section-head 
.board-ink .rule { background: var(--on-ink-line); }
.board-ink a:not(.btn) { color: #fff; }

/* Work-order line items */
.order-list { list-style: none; margin: 0; padding: 0; }
.line-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.line-item:first-child { border-top: 0; padding-top: 6px; }
.board-blue .line-item { border-top-color: var(--on-blue-line); }

.line-item__no {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--blue);
  padding-top: 4px;
}
.board-blue .line-item__no { color: rgba(255,255,255,0.55); }

.line-item h3 { margin-bottom: 0.3em; }
.line-item p { margin-bottom: 0.6em; }
.line-item p:last-child { margin-bottom: 0; }

.line-item 
.board-blue .line-item 

/* Photo placeholder panel */
.photo-gap {
  border: 2px dashed rgba(32,72,121,0.45);
  background: #eceff3;
  padding: 34px 30px;
  height: 100%;
}
.photo-gap .tag {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue);
  display: block;
  margin-bottom: 12px;
}
.photo-gap p { color: var(--text-soft); margin-bottom: 0.5em; }
.photo-gap p:last-child { margin-bottom: 0; }

/* Two-column figure rows (frames hug their image) */
.fig-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.fig-row--wide-left { grid-template-columns: 1.15fr 0.85fr; }

/* Split content rows */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* Grid blowout guard: items must be allowed to shrink below content width */
.hero__grid > *, .split > *, .fig-row > *, .foot-grid > * { min-width: 0; }

/* Contact details card */
.details-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 30px;
}
.details-card dl { margin: 0; }
.details-card dt {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 18px;
}
.details-card dt:first-child { margin-top: 0; }
.details-card dd { margin: 4px 0 0; font-weight: 500; }
.details-card .quiet { font-weight: 400; color: var(--text-soft); font-size: 0.92rem; }

/* The work-order form ticket */
.ticket {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(16,18,21,0.06);
}
.ticket__head 
.ticket__head .office-box {
  border: 1px solid var(--line-strong);
  padding: 14px 16px 10px;
  margin-bottom: 34px;
  max-width: 340px;
}
.office-box 
.office-box .blank { height: 1px; background: var(--line); margin: 14px 0; }

.field { margin-bottom: 26px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field .req {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--blue);
  margin-left: 8px;
}
.field .opt {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-soft);
  margin-left: 8px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: #fbfcfd;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 12px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(32,72,121,0.25);
  outline-offset: 0;
}
.field .help {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 6px 0 0;
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Facts strip on about */
.facts {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.facts div { padding: 20px 24px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts 
.facts strong { font-weight: 700; color: var(--ink-soft); }

/* Footer */
.site-foot {
  background: var(--ink);
  color: var(--on-ink-soft);
  padding: 60px 0 30px;
  margin-top: 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.6fr;
  gap: 48px;
  align-items: start;
}
.foot-grid img { height: 84px; width: auto; margin-bottom: 16px; }
.foot-h {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #8fa0b2;
  margin: 0 0 14px;
}
.site-foot p { color: var(--on-ink-soft); font-size: 0.95rem; }
.site-foot a:not(.btn) { color: #e6ecf2; text-decoration-color: rgba(255,255,255,0.4); }
.site-foot a:not(.btn):hover { color: #fff; text-decoration-color: #fff; }
.foot-nav { list-style: none; margin: 0; padding: 0; }
.foot-nav li { margin-bottom: 8px; }
.foot-nav a { text-decoration: none; font-size: 0.95rem; }
.credit {
  border-top: 1px solid var(--on-ink-line);
  margin-top: 44px;
  padding-top: 20px;
  font-size: 0.84rem;
  color: #7d8b9a;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.credit a { color: #9fb2c5; text-decoration: none; }
.credit a:hover { color: #fff; }

/* Mobile sticky bar: links to the form, not a call bar */
.mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--blue);
  border-top: 1px solid rgba(255,255,255,0.25);
  text-align: center;
}
.mobile-cta a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 20px;
}

/* Motion: the ticket gets ruled up on scroll */
html.js .rule-draw {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.js .rule-draw.ruled { transform: scaleX(1); }

html.js [data-settle] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js [data-settle].settled {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero .plate { margin-left: 0; max-width: 420px; }
  .split, .fig-row, .fig-row--wide-left { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .facts { grid-template-columns: 1fr; }
  .facts div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .facts div:first-child { border-top: 0; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; }
  .site-head.nav-open .site-nav {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--ink);
    border-top: 1px solid var(--on-ink-line);
    border-bottom: 1px solid var(--on-ink-line);
    z-index: 150;
  }
  .site-head { position: relative; }
  .site-head.nav-open .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .site-head.nav-open .site-nav a {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid var(--on-ink-line);
  }
  .site-head.nav-open .site-nav li:last-child a { border-bottom: 0; }
  .mobile-cta { display: block; }
  body { padding-bottom: 54px; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .section { padding: 56px 0; }
  .hero { padding: 52px 0 60px; }
  .line-item { grid-template-columns: 52px 1fr; gap: 16px; }
  .line-item__no { font-size: 1.9rem; }
  .details-card { padding: 24px 20px; }
}


/* Contact form card (replaces the retired ticket framing) */
.form-card {
  background: #fff;
  border: 1px solid var(--rule, #d9d6d0);
  border-radius: 2px;
  padding: 30px 30px 34px;
}
.form-card__body { margin: 0; }
@media (max-width: 760px) {
  .form-card { padding: 22px 18px 26px; }
}
