/* Southern Window Systems: site styles. Mobile first, no framework. */

:root {
  /* Brand colours taken from the shop sign: navy lettering, red strip, Union Jack. */
  --ink: #151d36;
  --ink-soft: #4a536d;
  --navy: #1d2b64;
  --navy-dark: #131d47;
  --navy-tint: #eaeef7;
  --mist: #f4f5f8;
  --red: #c8102e;
  --red-dark: #a30c25;
  --line: #dde1ea;
  --white: #fff;

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Noto Serif", serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(.84rem, .82rem + .1vw, .9rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + .4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + .75vw, 1.9rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.7rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.5rem);

  --space: clamp(1rem, .8rem + 1vw, 1.5rem);
  --section: clamp(3rem, 2rem + 5vw, 6rem);
  --radius: 14px;
  --wrap: 72rem;
  --shadow: 0 1px 2px rgb(15 39 51 / .06), 0 8px 24px rgb(15 39 51 / .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font: 400 var(--step-0)/1.6 var(--font);
  color: var(--ink);
  background: var(--white);
  padding-bottom: 4.5rem; /* room for the mobile call bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: .2em; }
a:hover { color: var(--navy-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 750; }
h2 { font-size: var(--step-3); font-weight: 720; }
h3 { font-size: var(--step-1); font-weight: 680; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--space), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.section--tint { background: var(--navy-tint); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy a:not(.btn) { color: var(--white); }
.eyebrow { font-size: var(--step--1); font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); margin-bottom: .6em; }
.section--navy .eyebrow { color: rgb(255 255 255 / .75); }
.lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 40em; }
.section--navy .lead { color: rgb(255 255 255 / .85); }
.skip { position: absolute; left: -999px; top: 0; background: var(--red); color: var(--white); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 3rem; padding: .7em 1.3em; border-radius: 999px;
  font: 650 var(--step-0)/1.1 var(--font); text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--call { background: var(--red); color: var(--white); }
.btn--call:hover { background: var(--red-dark); color: var(--white); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-dark); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.section--navy .btn--ghost, .hero .btn--ghost { color: var(--white); }
.section--navy .btn--ghost:hover, .hero .btn--ghost:hover { background: var(--white); border-color: var(--white); color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.actions--stack { flex-direction: column; }
.actions--stack .btn { width: 100%; }

/* Top bar and header */
.topbar { display: none; background: var(--navy-dark); color: rgb(255 255 255 / .85); font-size: var(--step--1); }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; }
.topbar a { color: var(--white); }
.header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .97); border-bottom: 3px solid var(--red); backdrop-filter: blur(6px); }
.header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); margin-right: auto; }
.logo__name { display: grid; font: 700 1.42rem/.95 var(--font-brand); letter-spacing: -.01em; }
.logo__flag { width: 4.4rem; height: auto; flex: none; margin-block: -.4rem; }
.header__call { display: none; }
.menu-btn {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 .9rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font: 600 var(--step--1) var(--font); cursor: pointer;
}
.menu-btn svg { width: 1.2rem; height: 1.2rem; }
.nav { display: none; }
.nav.is-open { display: block; position: absolute; inset: 100% 0 auto; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100dvh - 4.5rem); overflow-y: auto; overscroll-behavior: contain; }
.nav ul { list-style: none; margin: 0; padding: .5rem var(--space) 1rem; }
.nav a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--navy); }

/* Hero */
.hero { position: relative; color: var(--white); background: var(--navy-dark); isolation: isolate; overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(19 29 71 / .5) 0%, rgb(19 29 71 / .88) 70%); }
.hero .wrap { padding-block: clamp(3.5rem, 2rem + 9vw, 8rem) clamp(2.5rem, 2rem + 4vw, 4.5rem); }
.hero h1 { max-width: 15em; }
.hero .lead { color: rgb(255 255 255 / .9); }
.hero .actions { margin-top: 1.75rem; }
.hero__meta { margin-top: 1.5rem; font-size: var(--step--1); color: rgb(255 255 255 / .85); }
.hero__meta a { color: var(--white); }
.hero .eyebrow { color: rgb(255 255 255 / .8); }

/* Trust strip */
.trust { background: var(--white); border-bottom: 1px solid var(--line); }
.trust ul { list-style: none; margin: 0 auto; padding: 1rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.6rem; }
.trust li { display: inline-flex; align-items: center; gap: .45rem; font-weight: 650; font-size: var(--step--1); color: var(--ink-soft); }
.trust li svg { width: 1.2rem; height: 1.2rem; color: var(--navy); flex: none; }

/* Grids and cards */
.grid { display: grid; gap: var(--space); }
.cards { display: grid; gap: var(--space); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .2s; }
.card:hover { transform: translateY(-3px); color: var(--ink); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card__placeholder { display: grid; place-items: center; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--navy-tint), var(--mist)); color: var(--navy); }
.card__placeholder svg { width: 3rem; height: 3rem; opacity: .5; }
.card__body { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card__body p { color: var(--ink-soft); margin: 0; font-size: var(--step--1); }
.card__more { margin-top: auto; padding-top: .6rem; font-weight: 650; color: var(--navy); }
.card--plain { padding: 1.4rem 1.25rem; }
.card--plain p { color: var(--ink-soft); margin: 0; }
.cards--after { margin-top: var(--space); }
.card--plain .icon { width: 2.6rem; height: 2.6rem; color: var(--navy); margin-bottom: .4rem; }
.section__head { max-width: 46rem; margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }

/* Feature list */
.features { display: grid; gap: 1.25rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.features li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .9rem; align-items: start; }
.features .icon { width: 2.5rem; height: 2.5rem; padding: .5rem; border-radius: 10px; background: var(--navy-tint); color: var(--navy); }
.section--navy .features .icon { background: rgb(255 255 255 / .12); color: var(--white); }
.features h3 { font-size: var(--step-0); margin-bottom: .2em; }
.features p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
.section--navy .features p { color: rgb(255 255 255 / .8); }

/* Steps */
.steps { counter-reset: step; display: grid; gap: var(--space); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; background: var(--white); border-radius: var(--radius); padding: 1.4rem 1.25rem; border: 1px solid var(--line); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--red); color: var(--white); font-weight: 800; margin-bottom: .8rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }

/* Split layout */
.split { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.photo { margin: 0; }
.photo figcaption { margin-top: .5rem; font-size: var(--step--1); color: var(--ink-soft); }

.photo img { border-radius: var(--radius); }

/* Visit block */
.visit { display: grid; gap: var(--space); }
.visit__box { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.hours { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.hours th, .hours td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.hours td { text-align: right; }
.hours caption { text-align: left; padding-top: 1rem; }
address { font-style: normal; }

/* Areas */
.areas { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.areas a, .areas span { display: inline-block; padding: .5rem 1rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); text-decoration: none; font-weight: 600; color: var(--ink); }
.areas a:hover { border-color: var(--navy); color: var(--navy); }

/* Page header and breadcrumbs (inner pages) */
.page-head { background: var(--navy-tint); padding-block: clamp(1.5rem, 1rem + 3vw, 3.5rem); }
.crumbs { font-size: var(--step--1); margin-bottom: 1rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.page-head .split img { aspect-ratio: 3 / 2; }

/* Prose */
.prose { max-width: 44rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.layout { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); }
.aside { display: grid; gap: var(--space); align-content: start; }
.aside .visit__box h2 { font-size: var(--step-1); }

/* CTA band */
.cta-band { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: clamp(1.5rem, 1rem + 3vw, 3rem); display: grid; gap: 1rem; }
.cta-band h2 { font-size: var(--step-2); margin: 0; }
.cta-band p { margin: 0; color: rgb(255 255 255 / .85); }
.cta-band .btn--ghost { color: var(--white); }
.cta-band .btn--ghost:hover { background: var(--white); border-color: var(--white); color: var(--navy); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding-block: .9rem; }
.faq summary { cursor: pointer; font-weight: 650; list-style-position: outside; }
.faq details p { margin: .6rem 0 0; color: var(--ink-soft); }

/* Footer */
.footer { background: var(--navy-dark); color: rgb(255 255 255 / .78); font-size: var(--step--1); padding-block: 3rem 1.5rem; }
.footer a { color: var(--white); overflow-wrap: anywhere; }
.footer .logo { color: var(--white); }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.footer__about { margin-top: 1rem; }
.footer h2 { font-size: var(--step-0); color: var(--white); margin-bottom: .8rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer__base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .15); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* Notice (draft pages, 404) */
.notice { background: var(--navy-tint); border-left: 4px solid var(--red); padding: 1rem 1.25rem; border-radius: 8px; }
.links { columns: 2 14rem; padding: 0; list-style: none; }
.links li { margin-bottom: .5rem; break-inside: avoid; }

/* Contact page */
.contact-cards { display: grid; gap: var(--space); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.contact-card .icon { width: 2.5rem; height: 2.5rem; padding: .5rem; border-radius: 10px; background: var(--navy-tint); color: var(--navy); }
.contact-card h2 { font-size: var(--step-1); margin: 0; }
.contact-card p { margin: 0; color: var(--ink-soft); }
.contact-card .btn { margin-top: auto; align-self: flex-start; }
.contact-card__detail { font-weight: 600; overflow-wrap: anywhere; }

/* Mobile call bar */
.callbar { position: fixed; inset: auto 0 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .55rem .75rem calc(.55rem + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .97); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgb(15 39 51 / .08); }
.callbar .btn { width: 100%; }

@media (min-width: 48rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .visit { grid-template-columns: 1.1fr .9fr; align-items: center; }
  .cta-band { grid-template-columns: 1fr auto; align-items: center; }
  .layout { grid-template-columns: minmax(0, 1fr) 20rem; }
  .aside { position: sticky; top: 6rem; }
}

@media (min-width: 64rem) {
  body { padding-bottom: 0; }
  .callbar { display: none; }
  .topbar { display: block; }
  .header__call { display: inline-flex; }
}

/* Full desktop menu from 75rem (1200px); below that the Menu button opens it. */
@media (min-width: 75rem) {
  .menu-btn { display: none; }
  .nav { display: block; position: static; }
  .nav ul { display: flex; gap: .25rem; padding: 0; }
  .nav a { border: 0; padding: .6rem .75rem; border-radius: 8px; font-size: var(--step--1); }
  .nav a:hover, .nav a[aria-current="page"] { background: var(--navy-tint); color: var(--navy); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Wide banner strip under a page head */
.banner img { width: 100%; aspect-ratio: 16 / 4; object-fit: cover; }
@media (max-width: 40rem) { .banner img { aspect-ratio: 16 / 7; } }
.prose figure { margin: 1.5rem 0; }
.prose figure img { border-radius: var(--radius); }
.prose figcaption { margin-top: .5rem; font-size: var(--step--1); color: var(--ink-soft); }

/* Gallery */
.gallery { display: grid; gap: var(--space); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.gallery figure { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: .8rem 1rem 1rem; font-size: var(--step--1); color: var(--ink-soft); }

/* Cookie consent */
.consent {
  position: fixed; z-index: 70; inset: auto .75rem calc(4.6rem + env(safe-area-inset-bottom)) .75rem;
  background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: 0 8px 32px rgb(15 39 51 / .25);
  padding: 1rem 1.1rem; display: grid; gap: .75rem; font-size: var(--step--1); max-width: 40rem;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.prose code { font-size: .9em; background: var(--mist); padding: .1em .3em; border-radius: 4px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--white); text-decoration: underline; cursor: pointer; }
@media (min-width: 64rem) {
  .consent { inset: auto auto 1.25rem 1.25rem; grid-template-columns: 1fr auto; align-items: center; }
  .consent__actions { grid-template-columns: auto auto; }
}

/* Dropdown menus (Windows, Doors, Conservatories) */
.nav .has-sub { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.sub-btn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 8px; }
.sub-btn svg { width: 1.1rem; height: 1.1rem; transition: transform .15s; }
.has-sub.is-open > .sub-btn svg { transform: rotate(180deg); }
.nav .sub { display: none; grid-column: 1 / -1; list-style: none; margin: 0; padding: 0 0 .5rem 1rem; }
.has-sub.is-open > .sub { display: block; }
.nav .sub a { font-weight: 500; padding: .6rem 0; }
@media (min-width: 75rem) {
  .nav .has-sub { position: relative; display: flex; }
  .sub-btn { width: 1.6rem; height: 2rem; margin-left: -.35rem; }
  .nav .sub {
    position: absolute; top: 100%; left: 0; z-index: 60; min-width: 15rem; padding: .5rem;
    background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.is-open > .sub { display: block; }
  .nav .sub a { display: block; padding: .55rem .75rem; border-radius: 6px; white-space: nowrap; }
  .nav .sub a:hover { background: var(--navy-tint); }
}

/* Before / after pair */
.before-after { display: grid; gap: var(--space); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin: 1.5rem 0; }
.before-after figure { margin: 0; }
.before-after img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
