/* Gouge Quality Roofing: design system. Two colours, Anton + Vollkorn, scallops from the gutter radius, mechanical steps only. */

/* Tokens: palette, type, scallop radius, directory width, step timing */
:root {
  --deep: #1b1247;
  --pale: #dfd9ff;
  --ink: var(--deep);
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --text: 'Vollkorn', Georgia, 'Times New Roman', serif;
  --sc: 0.875rem;               /* scallop radius, taken from the hero gutter */
  --rule: 0.1875rem solid currentColor;
  --inset: clamp(1rem, 4vw, 3.5rem);
  --dir-w: 8.75rem;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --band-pad: clamp(2.5rem, 9vh, 6.5rem);
  --step: 0.36s steps(3, end);
  --t-body: 1rem;
  --t-row: 0.95rem;
  --t-h1: clamp(1.75rem, 5.6vw, 5.25rem);
  --t-h2: clamp(1.625rem, 3.2vw, 3rem);
  --t-h3: clamp(1.25rem, 2vw, 1.75rem);
}
@media (min-width: 48em) { :root { --t-body: 1.125rem; --t-row: 1rem; --dir-w: 14rem; } }
@media (min-width: 75em) { :root { --dir-w: 16rem; } }
@media (max-width: 47.99em) { :root { --dir-w: 5.75rem; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--deep); color: var(--pale); font: 400 var(--t-body)/1.55 var(--text); overflow-x: hidden; }
img, svg, video { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 0.9em; }
a { color: inherit; text-decoration-thickness: 0.09em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 0.19rem solid currentColor; outline-offset: 0.19rem; }
button { font: inherit; color: inherit; cursor: pointer; }
address { font-style: normal; }
.skip { position: absolute; left: 0.5rem; top: -4rem; z-index: 60; background: var(--pale); color: var(--deep); padding: 0.6rem 1rem; }
.skip:focus { top: 0.5rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Headings: Anton, mixed case, flush left, tight. Use h1/.h1, h2/.h2, h3/.h3 */
h1, h2, h3, .h1, .h2, .h3 { font-family: var(--display); font-weight: 400; line-height: 0.98; letter-spacing: 0; margin: 0 0 0.4em; text-transform: none; }
h1, .h1 { font-size: var(--t-h1); }
h2, .h2 { font-size: var(--t-h2); }
h3, .h3 { font-size: var(--t-h3); line-height: 1.05; }
.h1 span, h1 span, .h2 span, h2 span { display: block; }   /* one or two words per line: wrap each line in <span> */
.lead { font-size: calc(var(--t-body) * 1.2); line-height: 1.45; max-width: 36em; }

/* Scallop edges: .scallop-b (bottom), .scallop-r (right), .scallop-t (top). Shallow half-ellipses at the gutter radius */
.scallop-b {
  -webkit-mask: radial-gradient(farthest-side at 50% 0, #000 97%, #0000) 0 100% / calc(var(--sc) * 2.4) var(--sc) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--sc) + 1px) no-repeat;
          mask: radial-gradient(farthest-side at 50% 0, #000 97%, #0000) 0 100% / calc(var(--sc) * 2.4) var(--sc) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--sc) + 1px) no-repeat;
  padding-bottom: calc(var(--sc) + 0.5rem);
}
.scallop-r {
  -webkit-mask: radial-gradient(farthest-side at 0 50%, #000 97%, #0000) 100% 0 / var(--sc) calc(var(--sc) * 2.4) repeat-y, linear-gradient(#000 0 0) 0 0 / calc(100% - var(--sc) + 1px) 100% no-repeat;
          mask: radial-gradient(farthest-side at 0 50%, #000 97%, #0000) 100% 0 / var(--sc) calc(var(--sc) * 2.4) repeat-y, linear-gradient(#000 0 0) 0 0 / calc(100% - var(--sc) + 1px) 100% no-repeat;
  padding-right: calc(var(--sc) + 0.75rem);
}
.scallop-t {
  -webkit-mask: radial-gradient(farthest-side at 50% 100%, #000 97%, #0000) 0 0 / calc(var(--sc) * 2.4) var(--sc) repeat-x, linear-gradient(#000 0 0) 0 100% / 100% calc(100% - var(--sc) + 1px) no-repeat;
          mask: radial-gradient(farthest-side at 50% 100%, #000 97%, #0000) 0 0 / calc(var(--sc) * 2.4) var(--sc) repeat-x, linear-gradient(#000 0 0) 0 100% / 100% calc(100% - var(--sc) + 1px) no-repeat;
  padding-top: calc(var(--sc) + 0.4rem);
}

/* Directory (header): tall Anton column at top-left; JS adds .is-compact to snap it to a pinned name + one link line */
.dir { position: absolute; z-index: 30; top: 0; left: 0; width: var(--dir-w); padding: 1rem 0.5rem 1rem var(--inset); color: var(--pale); }
.dir__name { display: flex; gap: 0.5rem; align-items: flex-start; text-decoration: none; font-size: var(--t-row); line-height: 1.25; margin-bottom: 0.9rem; }
.mark { width: 2.25rem; height: 2.25rem; flex: none; }
.dir__nav ul { list-style: none; margin: 0; padding: 0; }
.dir__nav a { display: inline-block; font-family: var(--display); font-size: clamp(1.4rem, 4.3vh, 2.75rem); line-height: 1.08; text-decoration: none; padding: 0.06em 0; min-height: 2.75rem; }
/* Phone: the directory stays the same narrow column at the top-left, beside the ticket, as on the desk screen - it never becomes a full-width stack that pushes the h1 and the still life out of the window. */
@media (max-width: 47.99em) {
  .dir { position: absolute; width: var(--dir-w); padding: 0.7rem 0.4rem 0.5rem var(--inset); }
  .dir__name { display: block; margin-bottom: 0.55rem; }
  .dir__name span { font-size: 0.8rem; line-height: 1.15; }
  .mark { width: 1.7rem; height: 1.7rem; margin-bottom: 0.3rem; }
  .dir__nav ul { display: block; }
  /* The gap under each link is padding, not leftover min-height, so a link that wraps to two lines keeps the same space below it as the one-line links. */
  .dir__nav a { font-size: 1.0625rem; line-height: 1.05; width: 100%; min-height: 2.5rem; padding: 0.12em 0 1.2rem; white-space: normal; }
}
.dir__nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 0.12em; text-underline-offset: 0.14em; }
.dir__nav a:hover { text-decoration: underline; }
.dir.is-compact { position: fixed; width: 100%; right: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.5rem; padding: 0.35rem var(--inset); background: var(--deep); border-bottom: 0.125rem solid var(--pale); }
.dir.is-compact .dir__name { margin: 0; align-items: center; display: flex; }
.dir.is-compact .dir__name span { font-size: var(--t-row); }
.dir.is-compact .mark { width: 1.6rem; height: 1.6rem; margin-bottom: 0; }
.dir.is-compact .dir__nav { min-width: 0; flex: 1 1 20rem; }
.dir.is-compact .dir__nav ul { display: flex; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; padding: 0.2rem 0.2rem; }
.dir.is-compact .dir__nav ul::-webkit-scrollbar { display: none; }
.dir.is-compact .dir__nav a { font-family: var(--text); font-size: var(--t-row); line-height: 1.2; white-space: nowrap; display: flex; align-items: center; min-height: 2.75rem; padding: 0.06em 0; }
body.on-pale .dir:not(.is-compact) { color: var(--deep); }   /* add body class on-pale when a page opens on a pale ground */

/* Bands: full-width rows of unequal height. .band (deep) / .band--pale; inner copy in .band__in; picture to the right edge in .band__pic */
.band { position: relative; background: var(--deep); color: var(--pale); padding-block: var(--band-pad); }
.band--pale { background: var(--pale); color: var(--deep); }
.band--tight { padding-block: clamp(2.5rem, 6vh, 4rem); }
.band__in { padding-inline: var(--inset); }
.band--split { display: grid; gap: var(--gap); align-items: center; }
@media (min-width: 48em) {
  .band--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); padding-right: 0; }
  .band__pic { align-self: stretch; }
}
.band__pic { margin: 0; }
.band__pic img { width: 100%; height: 100%; min-height: 16rem; max-height: 34rem; object-fit: cover; }

/* Page opening: on a phone the plate sits beside the directory column, the picture runs the full width under both; from 48em the directory column holds the left, the plate beside it, the picture to the right edge. Wrapper .opening[data-opening], .opening__plate, .opening__pic */
.opening { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); padding: 0.5rem 0 0; min-height: 0; }
.opening__plate { grid-column: 1; margin: 0 var(--inset) 0 calc(var(--dir-w) + 0.35rem); align-self: start; position: relative; z-index: 2; }
.opening__pic { grid-column: 1 / -1; margin: 1.25rem 0 0; }
.opening__pic img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (min-width: 48em) {
  .opening { grid-template-columns: var(--dir-w) minmax(22rem, 34rem) minmax(0, 1fr); min-height: 70vh; padding: 1.5rem 0 0; }
  .opening__plate { grid-column: 2; margin: 0; }
  .opening__pic { grid-column: 3; grid-row: 1; margin: 0 0 0 -5rem; position: relative; z-index: 1; align-self: stretch; }
  .opening__pic img { height: 100%; aspect-ratio: auto; max-height: 70vh; }
}
/* Phone, while the cookie slip is up: the slip owns the top-right corner, so the ticket starts beneath it and the h1 never sits under the notice. Once the choice is made the slip is gone and the ticket rises. */
@media (max-width: 47.99em) {
  body:has(#consent:not([hidden])) .opening { padding-top: 7.5rem; }
}

/* The plate: bordered pale ticket with straight rows. .plate > h1 (first row), .plate__row rows, .plate__foot under them; add .scallop-b */
.plate { background: var(--pale); color: var(--deep); border: 0.1875rem solid var(--deep); border-bottom: 0; padding: 0 0 calc(var(--sc) + 0.75rem); }
.plate > :first-child { padding: 0.9rem 1rem 0.5rem; margin: 0; }
.plate__row { border-top: var(--rule); padding: 0.55rem 1rem; margin: 0; font-size: var(--t-row); line-height: 1.35; }
.plate__foot { border-top: var(--rule); padding: 0.75rem 1rem 0.25rem; }
.plate__foot p { font-size: calc(var(--t-body) * 1.1); }
.plate--wide { width: 100%; }

/* Edge section (the recurring device): three stacked rows roof / gutter / wall with hard gaps. .section3 > .section3__row[data-row]; .is-on fills a row */
.section3 { display: grid; gap: 0.35rem; width: 7rem; color: inherit; }
.section3__row { display: flex; align-items: center; gap: 0.5rem; min-height: 1.6rem; padding: 0 0.5rem; border: 0.1875rem solid currentColor; font-size: var(--t-row); box-shadow: 0.3rem 0.3rem 0 0 currentColor; }
.section3__row[data-row="roof"] { transform: skewY(-8deg); }
.section3__row[data-row="gutter"] { border-radius: 0 0 var(--sc) var(--sc); width: 70%; margin-left: 30%; }
.section3__row[data-row="wall"] { width: 45%; }
.section3__row.is-on { background: currentColor; }
.section3__row.is-on > * { color: var(--pale); }
.band--pale .section3__row.is-on > *, .plate .section3__row.is-on > * { color: var(--pale); }
.band:not(.band--pale) .section3__row.is-on > * { color: var(--deep); }
.section3--labelled { width: auto; max-width: 18rem; }

/* Figure + caption: .fig > img + figcaption. Caption sits on its picture's left edge */
.fig { margin: 0; }
.fig img { width: 100%; object-fit: cover; }
.fig figcaption { font-size: var(--t-row); line-height: 1.4; padding-top: 0.5rem; max-width: 34em; }
.fig--scallop img { -webkit-mask: radial-gradient(farthest-side at 50% 0, #000 97%, #0000) 0 100% / calc(var(--sc) * 2.4) var(--sc) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--sc) + 1px) no-repeat; mask: radial-gradient(farthest-side at 50% 0, #000 97%, #0000) 0 100% / calc(var(--sc) * 2.4) var(--sc) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--sc) + 1px) no-repeat; }

/* Rule: firm straight divider. <hr class="rule"> */
.rule { border: 0; border-top: var(--rule); margin: 1.25rem 0; color: inherit; }

/* Fact rows: straight-ruled two-column list for specs. <dl class="rows"><div><dt><dd></div></dl> */
.rows { margin: 0; border-bottom: var(--rule); }
.rows > div { display: grid; grid-template-columns: minmax(7rem, 1fr) 2fr; gap: 1rem; border-top: var(--rule); padding: 0.6rem 0; font-size: var(--t-row); }
.rows dt { font-family: var(--display); font-size: 1.05rem; line-height: 1.3; }
.rows dd { margin: 0; }

/* Links in running text: .link (stronger underline); service lists use .tolink (Anton line with arrow) */
.link { text-decoration-thickness: 0.12em; }
.tolink { font-family: var(--display); font-size: var(--t-h3); text-decoration: none; display: inline-flex; min-height: 2.75rem; align-items: center; }
.tolink::after { content: "\2192"; margin-left: 0.4em; font-family: var(--text); }
.tolink:hover { text-decoration: underline; }

/* Call action: scalloped Anton button. .btn (pale on deep), .btn--deep (deep on pale) */
.btn { display: inline-flex; align-items: center; min-height: 3rem; padding: 0.55rem 1.4rem calc(var(--sc) + 0.4rem); background: var(--pale); color: var(--deep); font-family: var(--display); font-size: 1.35rem; text-decoration: none; border: 0; }
.btn--deep { background: var(--deep); color: var(--pale); }
.btn:focus-visible { outline-offset: -0.45rem; }
.btn:hover { text-decoration: underline; text-decoration-thickness: 0.08em; }

/* Quote strip: full-width pale Anton line, the call link. .strip > a; home animates it via .strip--steps */
.strip { background: var(--pale); color: var(--deep); }
.strip a { display: block; padding: 0.7rem var(--inset) calc(var(--sc) + 0.5rem); font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2.75rem); line-height: 1.1; text-decoration: none; }
.strip a:hover { text-decoration: underline; text-decoration-thickness: 0.06em; }
html.js .strip--steps { clip-path: inset(0 100% 0 0); animation: strip-in 0.9s steps(3, end) 0.2s forwards; }
@keyframes strip-in { to { clip-path: inset(0 0 0 0); } }

/* Reveal: decoration only, never essential text. .reveal gets .is-in in view (hard 3-step wipe) */
html.js .reveal { clip-path: inset(0 100% 0 0); transition: clip-path var(--step); }
html.js .reveal.is-in { clip-path: inset(0 0 0 0); }

/* Cross-the-middle switch: [data-cross] gets .is-on as it passes the middle of the window (for ticked rows, filled segments) */
[data-cross] { transition: none; }

/* Footer: same ground as the last band; three unequal columns. Add body class ends-pale when the last band is pale */
.foot { display: grid; gap: 1.5rem; padding: clamp(2.5rem, 7vh, 4.5rem) var(--inset) 5.5rem; background: var(--deep); color: var(--pale); border-top: 0.1875rem solid var(--pale); font-size: var(--t-body); }
body.ends-pale .foot { background: var(--pale); color: var(--deep); border-top-color: var(--deep); }
@media (min-width: 48em) { .foot { grid-template-columns: 1.1fr 0.9fr 1.6fr; padding-bottom: clamp(2.5rem, 7vh, 4.5rem); } }
.foot p { margin: 0 0 0.6rem; }
.foot__name { font-weight: 400; }
.foot__tel { font-size: 1.25em; }
.foot__line { font-size: var(--t-row); line-height: 1.9; }
.foot__line a { display: inline-block; }
.foot__btn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.18em; font-size: inherit; min-height: 2.75rem; }
.foot__small { font-size: var(--t-row); opacity: 0.85; }

/* Consent slip: narrow pale receipt hanging from the upper right, scalloped foot, ruled full-width buttons */
.slip { position: fixed; z-index: 50; top: 0; right: var(--inset); width: min(19rem, 92vw); background: var(--pale); color: var(--deep); border: 0.1875rem solid var(--deep); border-top: 0; font-size: var(--t-row); line-height: 1.4; }
.slip[hidden], .promo[hidden] { display: none; }
.slip__text { padding: 0.9rem 1rem 0.7rem; margin: 0; }
.slip__short { display: none; }
.slip__btn { display: block; width: 100%; min-height: 2.75rem; padding: 0.5rem 1rem; text-align: left; background: var(--pale); color: var(--deep); border: 0; border-top: var(--rule); font-size: var(--t-row); }
.slip__btn:hover { background: var(--deep); color: var(--pale); }
.slip__btn:focus-visible { outline-offset: -0.35rem; }
/* Phone: a narrow slip tucked into the upper right corner - short wording, its two choices side by side, a fifth of the window at most, never across the headline. */
@media (max-width: 47.99em) {
  .slip { top: 0; right: 0; left: auto; width: min(13rem, 64vw); display: flex; flex-wrap: wrap; font-size: 0.9rem; line-height: 1.3; padding-bottom: calc(var(--sc) * 0.7 + 0.3rem); }
  .slip__text { flex: 1 1 100%; padding: 0.5rem 0.65rem 0.45rem; }
  .slip__long { display: none; }
  .slip__short { display: inline; }
  .slip__btn { flex: 1 1 50%; width: auto; display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.3rem 0.45rem; font-size: 0.9rem; line-height: 1.15; text-align: center; }
  .slip__btn + .slip__btn { border-left: var(--rule); }
}

/* Offer band: fixed pale band along the bottom edge, scalloped top, the line carrying across the band's width to the phone at its right end; arrives left to right in three hard jumps */
.promo { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: clamp(0.75rem, 2vw, 2.5rem); padding: calc(var(--sc) + 0.35rem) var(--inset) 0.5rem; background: var(--pale); color: var(--deep); border-bottom: 0.1875rem solid var(--deep); transform: translateX(-101%); opacity: 0; transition: transform var(--step), opacity var(--step); }
.promo.is-in { transform: translateX(0); opacity: 1; }
.promo__text { flex: 1 1 auto; font-family: var(--display); font-size: clamp(1.15rem, 2.3vw, 1.95rem); line-height: 1.2; text-decoration: none; min-height: 2.75rem; display: flex; align-items: center; }
.promo__text:hover { text-decoration: underline; text-decoration-thickness: 0.06em; }
.promo__call { flex: none; display: inline-flex; align-items: center; min-height: 2.75rem; padding-left: clamp(0.9rem, 2vw, 1.9rem); border-left: var(--rule); font-family: var(--display); font-size: clamp(1.15rem, 2.3vw, 1.95rem); line-height: 1.2; text-decoration: none; white-space: nowrap; }
.promo__call:hover { text-decoration: underline; text-decoration-thickness: 0.06em; }
.promo__x { flex: none; width: 2.75rem; height: 2.75rem; background: var(--deep); color: var(--pale); border: 0; font-size: 1.1rem; }
/* Phone: the band runs the full width and stays slim; the phone number leaves it, so the lettering has the whole band to itself. */
@media (max-width: 47.99em) {
  .promo { gap: 0.5rem; padding: calc(var(--sc) + 0.2rem) 0.75rem 0.4rem; }
  .promo__text { font-size: 1rem; min-height: 2.5rem; }
  .promo__call { display: none; }
}

/* Phone call pin: small solid control on its own ground at the bottom right. While the offer band is showing the pin is hidden, so the corner never stacks three controls; it returns when the band is closed. */
.callpin { display: none; }
@media (max-width: 47.99em) {
  .callpin { display: flex; position: fixed; z-index: 45; right: 0; bottom: 5rem; width: 4.25rem; height: 3.25rem; align-items: center; justify-content: center; background: var(--deep); color: var(--pale); border: 0.1875rem solid var(--pale); font-family: var(--display); font-size: 1.25rem; text-decoration: none; }
  .promo.is-in ~ .callpin { display: none; }
}

/* Reduced motion: everything whole and instant */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html.js .reveal, html.js .strip--steps { clip-path: none; }
  .promo, .promo.is-in { transform: none; }
}

/* A page never scrolls sideways. */
html, body { overflow-x: clip; }
/* Past a full-HD window the whole page grows with the window - type, gaps and pictures
   together - so a very wide screen (or a page zoomed far out) shows the same composition,
   not a small column of text lost in an enormous picture. */
@media (min-width: 1921px) { html { font-size: calc(100vw / 120); } }
/* What can be pressed in the chrome lies above the page: a huge headline's line box reaching
   into the navigation must not swallow the clicks meant for the links. */
header a, header button, nav a, nav button { position: relative; z-index: 2; }
/* A visitor who asked the system for less motion gets none, whatever a page forgot. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
