/* Moylan Roof Tiling — tokens from DESIGN.md */
:root {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-alt: #F1ECE4;
  --text: #1B1F24;
  --text-muted: #545C66;
  --border: #E2DBD0;
  --primary: #1C5BA8;
  --primary-hover: #154A8B;
  --on-primary: #FFFFFF;
  --accent: #F5C21B;
  --on-accent: #1B1F24;
  --success: #2E7D4F;
  --error: #B3261E;
  --ink: #12161C;            /* fixed dark band, same in both themes */
  --on-ink: #EEF0F3;
  --on-ink-muted: #A9B1BC;

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --fs-xs: 0.875rem;
  --fs-sm: 1rem;
  --fs-base: 1.125rem;
  --fs-lg: 1.3125rem;
  --fs-xl: 1.75rem;
  --fs-2xl: clamp(2rem, 4vw, 2.75rem);
  --fs-3xl: clamp(2.5rem, 6vw, 4.25rem);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section: var(--s-9);
  --gutter: 24px;
  --max: 1160px;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(0 0 0 / .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171C; --surface: #1C2028; --surface-alt: #202630;
    --text: #EEF0F3; --text-muted: #A9B1BC; --border: #2E3440;
    --primary: #6FA8F0; --primary-hover: #8DBBF4; --on-primary: #0E1A2B;
    --success: #5CC48A; --error: #F2867E;
    --ink: #0C0F13;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14171C; --surface: #1C2028; --surface-alt: #202630;
  --text: #EEF0F3; --text-muted: #A9B1BC; --border: #2E3440;
  --primary: #6FA8F0; --primary-hover: #8DBBF4; --on-primary: #0E1A2B;
  --success: #5CC48A; --error: #F2867E;
  --ink: #0C0F13;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-3xl); font-weight: 800; }
h2 { font-size: var(--fs-2xl); font-weight: 800; }
h3 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--alt { background: var(--surface-alt); }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--s-4); display: flex; align-items: center; gap: var(--s-3); }
.eyebrow::before { content: ""; width: 24px; height: 3px; background: var(--accent); border-radius: 2px; }
.lead { font-size: var(--fs-lg); line-height: 1.5; color: var(--text-muted); max-width: 56ch; }
.section-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); max-width: 720px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); color: var(--text); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px; padding: 0 var(--s-5); border-radius: var(--r-md);
  font: 600 var(--fs-sm)/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn--call { background: var(--accent); color: var(--on-accent); }
.btn--call:hover { background: #E2B10F; color: var(--on-accent); }
.btn--ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.header.is-scrolled { border-bottom-color: var(--border); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: 76px; }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--text); }
.brand__logo { width: 48px; height: 48px; border-radius: 10px; background: #fff; padding: 3px; object-fit: contain; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; line-height: 1.05; letter-spacing: -0.01em; }
.brand__name small { display: block; font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: var(--s-6); }
.nav__links { display: flex; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--text); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; padding: var(--s-2) 0; }
.nav__links a:hover { color: var(--primary); }
.header .btn { min-height: 44px; }
@media (max-width: 960px) { .nav__links { display: none; } }
@media (max-width: 560px) { .header .btn--call span { display: none; } .header .btn--call { padding: 0 var(--s-3); } .brand__name small { display: none; } }

/* Hero */
.hero { padding: var(--s-8) 0 var(--s-9); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-8); align-items: center; }
.hero h1 .mark { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .14em; text-underline-offset: .1em; text-decoration-skip-ink: none; }
.hero__copy { display: grid; gap: var(--s-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.hero__ticks { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); list-style: none; padding: 0; margin: var(--s-2) 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.hero__ticks li { display: flex; align-items: center; gap: var(--s-2); }
.hero__ticks .icon { color: var(--success); }
.hero__media { position: relative; }
.hero__media img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: var(--r-lg); }
.hero__labels { position: absolute; top: var(--s-4); left: var(--s-4); right: var(--s-4); display: flex; justify-content: space-between; pointer-events: none; }
.tag { font-size: var(--fs-xs); font-weight: 600; padding: 6px 10px; border-radius: 999px; background: rgb(18 22 28 / .78); color: #fff; }
.tag--after { background: var(--accent); color: var(--on-accent); }
.hero__card {
  position: absolute; left: calc(var(--s-6) * -1); bottom: var(--s-6);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: var(--s-4) var(--s-5); display: grid; gap: 2px; max-width: 260px;
}
.hero__card strong { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.1; }
.hero__card span { font-size: var(--fs-xs); color: var(--text-muted); }
@media (max-width: 900px) {
  .hero { padding-top: var(--s-6); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero__media img { aspect-ratio: 4 / 3; }
  .hero__card { left: var(--s-4); bottom: var(--s-4); }
}

/* Facts strip */
.facts { background: var(--ink); color: var(--on-ink); }
.facts__list { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0; padding: 0; }
.facts__list li { padding: var(--s-6) var(--s-5); border-left: 1px solid rgb(255 255 255 / .1); display: grid; gap: var(--s-1); }
.facts__list li:first-child { border-left: 0; padding-left: 0; }
.facts__list strong { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; color: var(--accent); line-height: 1.1; }
.facts__list span { font-size: var(--fs-sm); color: var(--on-ink-muted); }
@media (max-width: 900px) {
  .facts__list { grid-template-columns: 1fr 1fr; }
  .facts__list li { padding: var(--s-5) var(--s-4); border-left: 0; border-top: 1px solid rgb(255 255 255 / .1); }
  .facts__list li:nth-child(-n+2) { border-top: 0; }
  .facts__list li:nth-child(odd) { padding-left: 0; }
}

/* Services */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-8) var(--s-8); }
.svc-group h3 { font-size: var(--fs-xl); display: flex; align-items: baseline; gap: var(--s-3); padding-bottom: var(--s-4); border-bottom: 2px solid var(--text); margin-bottom: var(--s-2); }
.svc-group h3 span { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); letter-spacing: .06em; }
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--border); }
.svc h4 { margin: 0; font-size: var(--fs-base); font-weight: 600; }
.svc p { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--text-muted); max-width: 60ch; }
.price { align-self: start; white-space: nowrap; font-size: var(--fs-xs); font-weight: 700; background: var(--accent); color: var(--on-accent); padding: 4px 10px; border-radius: var(--r-sm); }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; gap: var(--s-7); } }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; padding-top: var(--s-6); display: grid; gap: var(--s-3); align-content: start; counter-increment: step; }
.step::before { content: "0" counter(step); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-sm); color: var(--primary); position: absolute; top: 0; left: 0; }
.step::after { content: ""; position: absolute; top: 10px; left: 36px; right: 0; height: 1px; background: var(--border); }
.step p { font-size: var(--fs-sm); color: var(--text-muted); }
.note { margin-top: var(--s-7); padding: var(--s-5); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); color: var(--text-muted); max-width: 780px; }
.note strong { color: var(--text); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-5); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 180px; gap: var(--s-3); }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--surface-alt); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; left: var(--s-3); bottom: var(--s-3); font-size: var(--fs-xs); font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgb(18 22 28 / .8); color: #fff; }
.g1 { grid-column: span 7; grid-row: span 2; }
.g2 { grid-column: span 5; grid-row: span 1; }
.g3 { grid-column: span 5; grid-row: span 1; }
.g4 { grid-column: span 4; grid-row: span 2; }
.g5 { grid-column: span 4; grid-row: span 2; }
.g6 { grid-column: span 4; grid-row: span 2; }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .g1 { grid-column: span 2; grid-row: span 2; }
  .g2, .g3, .g4, .g5, .g6 { grid-column: span 1; grid-row: span 1; }
  .g6 { display: none; }
}
.more-link { margin-top: var(--s-5); display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; }

/* About */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: center; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); }
.about__copy { display: grid; gap: var(--s-4); }
.about__copy p { color: var(--text-muted); max-width: 62ch; }
.about__copy blockquote { margin: var(--s-2) 0; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; color: var(--text); padding-left: var(--s-5); border-left: 4px solid var(--accent); }
.about__sig { font-weight: 600; color: var(--text) !important; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: var(--s-6); } .about__photo img { aspect-ratio: 4 / 3; } }

/* Reviews (placeholders) */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.review { margin: 0; background: var(--surface); border: 1.5px dashed var(--border); border-radius: var(--r-md); padding: var(--s-5); display: grid; gap: var(--s-3); align-content: start; }
.review p { color: var(--text-muted); font-size: var(--fs-sm); }
.review cite { font-style: normal; font-weight: 600; font-size: var(--fs-sm); }
.placeholder-flag { font-size: var(--fs-xs); font-weight: 700; color: var(--error); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 860px) { .reviews { grid-template-columns: 1fr; } }

/* Area */
.area { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; }
.area__chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.area__chips li { font-size: var(--fs-sm); padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.area__map { aspect-ratio: 4 / 3; border-radius: var(--r-lg); background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; display: grid; place-items: center; }
.area__map svg { width: 100%; height: 100%; }
@media (max-width: 860px) { .area { grid-template-columns: 1fr; gap: var(--s-6); } }

/* Quote */
.quote { background: var(--ink); color: var(--on-ink); }
.quote .eyebrow, .quote .lead { color: var(--on-ink-muted); }
.quote__grid { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-2); }
.contact-list a { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-md); border: 1px solid rgb(255 255 255 / .12); color: var(--on-ink); text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.contact-list a:hover { border-color: var(--accent); background: rgb(255 255 255 / .04); color: var(--on-ink); }
.contact-list .icon { color: var(--accent); width: 22px; height: 22px; }
.contact-list small { display: block; font-size: var(--fs-xs); color: var(--on-ink-muted); }
.contact-list b { font-weight: 600; }
.quote :focus-visible { outline-color: var(--accent); }
.form { background: var(--surface); color: var(--text); border-radius: var(--r-lg); padding: var(--s-6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-4); box-shadow: var(--shadow); }
.form h3 { grid-column: 1 / -1; font-size: var(--fs-xl); }
.form .full { grid-column: 1 / -1; }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field label span { font-weight: 400; color: var(--text-muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4); font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field .err { font-size: var(--fs-xs); color: var(--error); min-height: 0; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); justify-content: space-between; margin-top: var(--s-2); }
.form__foot p { font-size: var(--fs-xs); color: var(--text-muted); max-width: 40ch; }
.form__status { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--success); font-weight: 600; }
@media (max-width: 900px) { .quote__grid { grid-template-columns: 1fr; gap: var(--s-7); } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; padding: var(--s-5); } }

/* Footer */
.footer { background: var(--ink); color: var(--on-ink-muted); border-top: 1px solid rgb(255 255 255 / .08); padding: var(--s-7) 0 var(--s-7); font-size: var(--fs-sm); }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-5); }
.footer a { color: var(--on-ink); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; gap: var(--s-5); flex-wrap: wrap; }

/* Mobile action bar */
.action-bar { display: none; }
@media (max-width: 760px) {
  :root { --section: var(--s-8); --gutter: 16px; }
  .action-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .action-bar .btn { min-height: 48px; }
  body { padding-bottom: 72px; }
}
