/* Cornerstone Private Builders */
/* Brand: Dark Slate and Light Slate from the Cornerstone Studio logo. */
/* Font: Circular Std (licensed). Until the web font files are added in /assets/fonts, DM Sans stands in. */

@font-face {
  font-family: "Circular Std";
  src: url("/assets/fonts/CircularStd-Book.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Circular Std";
  src: url("/assets/fonts/CircularStd-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --navy: #1b385b;
  --slate: #507e9f;
  --slate-light: #a9c3d8;
  --slate-text: #457192; /* slate deepened for small text, meets WCAG AA contrast */
  --mist: #eef2f5;
  --paper: #ffffff;
  --ink: #1d2733;
  --muted: #56636f;
  --line: #d8e0e7;
  --font: "Circular Std", "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--slate-text); }
h1, h2, h3 { color: var(--navy); font-weight: 400; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-weight: 300; }
h1 { font-size: 2.6rem; font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: 1.8rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--slate-text); margin-bottom: .8rem; font-weight: 500; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 112px 0; }
@media (max-width: 900px) { .section { padding: 72px 0; } }
.section.tint { background: var(--mist); }
.section.navy { background: var(--navy); color: #fff; }
.section.navy h2, .section.navy h3 { color: #fff; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46em; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
h2.h3 { font-size: 1.2rem; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 32px; border-radius: 0; font: inherit;
  background: var(--navy); color: #fff; text-decoration: none; font-weight: 400;
  text-transform: uppercase; letter-spacing: .14em; font-size: .82rem;
  border: 1px solid var(--navy); transition: background .15s, color .15s; cursor: pointer;
}
.btn:hover { background: var(--slate-text); border-color: var(--slate-text); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; }
.section.navy .btn { background: #fff; color: var(--navy); border-color: #fff; }
.section.navy .btn.ghost { background: transparent; color: #fff; border-color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.textlink { font-weight: 400; text-decoration: none; text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; border-bottom: 1px solid var(--slate-light); padding-bottom: 3px; }
.textlink:hover { border-bottom-color: var(--navy); }
.more { margin: 40px 0 0; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 128px; gap: 24px; }
.brand img { height: 88px; width: auto; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--ink); font-weight: 400; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--slate-text); }
.nav .inquire { color: var(--navy); border-bottom: 1px solid var(--navy); padding-bottom: 3px; }
.nav .call { color: var(--muted); }
.nav .login { color: var(--muted); font-size: .72rem; padding-left: 26px; border-left: 1px solid var(--line); }
.call-icon { display: none; }
.menu { display: none; }

@media (max-width: 900px) {
  .site-header .wrap { min-height: 92px; }
  .brand img { height: 64px; }
  .nav { display: none; }
  .call-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1px solid var(--line); border-radius: 50%; color: var(--navy);
  }
  .menu { display: block; position: relative; }
  .menu summary {
    list-style: none; cursor: pointer; padding: 10px 14px; border: 1px solid var(--line);
    border-radius: var(--radius); font-weight: 500; color: var(--navy);
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .menu-panel {
    position: absolute; right: 0; top: 52px; background: #fff; border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(27, 56, 91, .12); padding: 12px; width: 240px; display: grid; gap: 2px;
  }
  .menu-panel a { padding: 10px 12px; text-decoration: none; color: var(--ink); border-radius: var(--radius); }
  .menu-panel a:hover { background: var(--mist); }
  .header-actions { display: flex; align-items: center; gap: 10px; }
}
@media (min-width: 901px) { .header-actions { display: none; } }
@media (min-width: 901px) and (max-width: 1100px) { .nav { gap: 22px; } .nav .login { padding-left: 18px; } }

/* Hero */
.hero { background: #fff; padding: 136px 0 96px; text-align: center; }
.hero .wrap > * { margin-left: auto; margin-right: auto; }
.hero h1 { font-size: 3rem; font-size: clamp(2.3rem, 5.4vw, 4rem); max-width: 14em; }
.hero p.lead { color: var(--muted); max-width: 34em; margin-bottom: 40px; }
.hero-image { margin-top: 96px; }
.hero-image img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; background: var(--mist); }
@media (max-width: 900px) { .hero { padding: 72px 0 56px; } .hero-image { margin-top: 56px; } .hero-image img { aspect-ratio: 3 / 2; } }

/* Home */
.principles h3 { font-size: 1.25rem; }
.principles p { color: var(--muted); margin: 0; }
.quiet h2 { font-size: 1.5rem; }
.quiet p { color: var(--muted); }
.closing { text-align: center; border-top: 1px solid var(--line); }
.closing p:not(.eyebrow) { font-size: 1.3rem; color: var(--navy); font-weight: 300; margin-bottom: 32px; }

/* Page header */
.page-head { background: #fff; padding: 96px 0 56px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .page-head { padding: 56px 0 40px; } }
.page-head .lead { margin-bottom: 0; }

/* Grids */
.grid { display: grid; gap: 40px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* Cards */
.card { display: block; text-decoration: none; color: inherit; }
.card:hover { color: inherit; }
.card:hover h3, .card:hover h2 { color: var(--slate-text); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; background: #fff; border: 1px solid var(--line); }
.card .body { padding: 18px 0 0; }
.card h3, .card h2 { margin-bottom: .3em; }
.card h2 { font-size: 1.2rem; }
.card .meta { color: var(--muted); font-size: .95rem; margin: 0; }
.status { display: inline-block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate-text); font-weight: 500; margin-bottom: .5rem; }

/* Diamond list (standards) */
.standards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 40px; }
.standards li { position: relative; padding-left: 34px; }
.standards li::before {
  content: ""; position: absolute; left: 4px; top: 9px; width: 12px; height: 12px;
  border: 3px solid var(--slate); transform: rotate(45deg);
}
.standards strong { display: block; color: var(--navy); font-weight: 500; font-size: 1.05rem; }
@media (max-width: 760px) { .standards { grid-template-columns: 1fr; } }
/* Standards page: a main standard on the left, a shorter one beside it, in compact rows */
.standards.paired { grid-template-columns: 3fr 2fr; gap: 22px 64px; margin-top: 16px; max-width: 1040px; }
.standards.paired li { line-height: 1.6; }
.standards.paired strong { margin-bottom: 2px; }
.standards-head { margin-top: 44px; }
.standards.single { grid-template-columns: 1fr; gap: 16px; margin: 18px 0 24px; }
.standards.single li { line-height: 1.6; }
.standards.single strong { margin-bottom: 2px; }
@media (max-width: 760px) { .standards.paired { grid-template-columns: 1fr; gap: 20px; } .standards-head { margin-top: 36px; } }

/* Process steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; background: #fff; border: 1px solid var(--line); padding: 22px; }
.steps li::before {
  content: counter(step); width: 44px; height: 44px; display: grid; place-items: center;
  border: 2px solid var(--slate); color: var(--navy); font-weight: 500; border-radius: 50%;
}
.steps li { grid-template-columns: 56px 1fr 300px; gap: 24px; }
.step-img { margin: 0; }
.step-img img { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .steps li { grid-template-columns: 56px 1fr 220px; } }
@media (max-width: 640px) { .steps li { grid-template-columns: 44px 1fr; } .step-img { grid-column: 1 / -1; } }
.steps strong { color: var(--navy); font-weight: 500; display: block; font-size: 1.1rem; margin-bottom: .2em; }

.checklist { padding-left: 1.2em; margin: 0 0 1em; }
.checklist li { margin-bottom: .4em; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 500; color: var(--navy); font-size: 1.08rem; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 1.4rem; color: var(--slate-text); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 12px 0 0; }

/* Project page */
.facts { border-top: 2px solid var(--navy); margin: 0; }
.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: .9rem; color: var(--muted); padding-top: 6px; }
.gallery img { border: 1px solid var(--line); }
.gallery figure.tall { grid-row: span 2; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery figure.tall img { height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } .gallery figure.tall { grid-row: auto; } .gallery figure.tall img { height: auto; } .gallery figure.wide { grid-column: auto; } }
.lead-photo img { width: 100%; border: 1px solid var(--line); }

/* Stage timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 0; }
.timeline li { position: relative; text-align: center; font-size: .82rem; color: var(--muted); padding-top: 30px; }
.timeline li::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  border: 2px solid var(--slate); background: #fff; transform: rotate(45deg); z-index: 1;
}
.timeline li::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.timeline li:first-child::after { display: none; }
.timeline li.done::before { background: var(--slate); }
.timeline li.done::after, .timeline li.now::after { background: var(--slate); }
.timeline li.now { color: var(--navy); font-weight: 500; }
.timeline li.now::before { background: var(--navy); border-color: var(--navy); width: 18px; height: 18px; margin-left: -9px; top: 4px; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline li { text-align: left; padding: 8px 0 8px 36px; }
  .timeline li::before { top: 13px; left: 8px; margin-left: 0; }
  .timeline li.now::before { top: 11px; left: 6px; margin-left: 0; }
  .timeline li::after { left: 15px; top: -50%; width: 2px; height: 100%; }
}
.now-note { margin-top: 18px; color: var(--navy); }

/* Info list (job sites) */
.info { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--navy); }
.info li { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info li > span:first-child { color: var(--muted); font-size: .92rem; }
@media (max-width: 600px) { .info li, .facts div { grid-template-columns: 1fr; gap: 2px; } }
.rules { padding-left: 1.2em; }
.rules li { margin-bottom: .35em; }
.notice { background: var(--mist); border-left: 3px solid var(--slate); padding: 16px 20px; }

/* Forms */
form .field { margin-bottom: 20px; }
label, legend { display: block; font-weight: 500; color: var(--navy); margin-bottom: 6px; }
legend { padding: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
input[type=text], input[type=email], input[type=tel], input[type=url], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #8494a3; border-radius: var(--radius);
  font: inherit; color: var(--ink); background: #fff;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--navy); outline-offset: 3px;
}
.site-footer a:focus-visible, .section.navy a:focus-visible, .section.navy .btn:focus-visible { outline-color: #fff; }
[aria-invalid="true"] { border-color: #9b2c2c; }
textarea { min-height: 140px; resize: vertical; }
.choices { display: grid; gap: 8px; }
.choices label { font-weight: 400; color: var(--ink); display: flex; gap: 10px; align-items: center; margin: 0; }
.choices input { width: 18px; height: 18px; accent-color: var(--navy); }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .92rem; color: var(--muted); }
.form-status { margin-top: 16px; font-weight: 500; }
.form-status.ok { color: #23613b; }
.form-status.err { color: #9b2c2c; }
[hidden] { display: none !important; }

/* Footer */
.site-footer { background: var(--navy); color: #d6e1ea; font-size: .95rem; padding: 56px 0 32px; }
.site-footer a { color: #fff; }
.site-footer .top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.site-footer img { height: 70px; width: auto; margin-bottom: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: flex-end; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; color: #fff; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 36px; padding-top: 20px; font-size: .85rem; color: #b7c7d5; }
@media (max-width: 760px) { .site-footer .top { grid-template-columns: 1fr; } .site-footer nav { justify-content: flex-start; } }
.card.boxed { border: 1px solid var(--line); padding: 4px 24px 24px; }

/* Call or text choice, opened by tapping a call link */
.contact-sheet { position: fixed; inset: 0; z-index: 100; background: rgba(29, 39, 51, .35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.contact-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 320px; box-shadow: 0 12px 40px rgba(29, 39, 51, .18); }
.contact-panel .eyebrow { margin: 0 0 12px; }
.contact-choice { display: block; text-align: center; text-decoration: none; text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; color: var(--paper); background: var(--navy); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.contact-choice + .contact-choice { background: var(--paper); color: var(--navy); border: 1px solid var(--navy); }
.contact-close { display: block; width: 100%; background: none; border: 0; color: var(--muted); font: inherit; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; padding: 8px; cursor: pointer; }
@media (max-width: 640px) { .contact-sheet { align-items: flex-end; } .contact-panel { max-width: none; } }

/* Privacy page */
.prose h2 { font-size: 1.3rem; margin: 40px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose .checklist li { margin-bottom: .6em; }
.muted { color: var(--muted); font-size: .92rem; margin-top: 32px; }
.site-footer .legal a { color: inherit; }

/* Standards and Inquire images */
.page-photo { margin: 0 0 56px; }
.page-photo img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; background: var(--mist); }
@media (max-width: 900px) { .page-photo { margin-bottom: 40px; } .page-photo img { aspect-ratio: 3 / 2; } }
.detail-row { margin-top: 48px; max-width: 1040px; gap: 24px; }
.detail-row figure { margin: 0; }
.detail-row img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: var(--mist); border: 1px solid var(--line); }
.detail-row figcaption { font-size: .9rem; color: var(--muted); padding-top: 8px; }
@media (max-width: 900px) { .detail-row { margin-top: 36px; gap: 28px; } }
.side-photo { margin: 40px 0 0; }
.side-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: var(--mist); border: 1px solid var(--line); }
@media (max-width: 900px) { .side-photo { display: none; } }

/* Photographs fill their frames */
img.photo { object-fit: cover !important; background: none !important; }
