/* ==========================================================================
   D.E.S Doors Scotland — Modern Website Stylesheet
   Palette derived from logo: deep blue (#0d5ab7 / #063b82) + silver/steel
   ========================================================================== */

:root {
  --blue: #0d5ab7;
  --blue-dark: #063b82;
  --blue-darker: #04295a;
  --steel: #6f767d;
  --steel-light: #b9bec3;
  --steel-lighter: #f4f5f6;
  --ink: #14191e;
  --ink-soft: #283039;
  --bg: #ffffff;
  --bg-alt: #f4f5f6;
  --bg-dark: #0a1a33;
  --text: #1e2935;
  --text-muted: #5a6573;
  --border: #e2e6ea;
  --accent: #0d5ab7;
  --accent-hover: #063b82;
  --success: #1a9e6b;
  --warn: #d97706;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(20, 25, 30, .08);
  --shadow: 0 6px 24px rgba(20, 25, 30, .10);
  --shadow-lg: 0 18px 50px rgba(20, 25, 30, .16);
  --container: 1200px;
  --header-h: 76px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: #dfe6ee; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--blue { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: #fff; }
.section--blue h1, .section--blue h2, .section--blue h3 { color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }
.section--dark .section-head p, .section--blue .section-head p { color: rgba(255,255,255,.82); }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.section--dark .eyebrow, .section--blue .eyebrow { color: #9ec5ff; }
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}
.center { text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: #fff; }
.btn--lg { padding: 18px 38px; font-size: 1.1rem; }
.btn-group { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Top bar ---- */
.topbar {
  background: var(--ink);
  color: #cfd6de;
  font-size: .9rem;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #cfd6de; }
.topbar a:hover { color: #fff; }
.topbar__contact { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar__contact span { display: inline-flex; align-items: center; gap: 8px; }

/* ---- Header / Nav ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 48px; width: auto; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__text strong { font-size: 1.15rem; color: var(--ink); letter-spacing: .02em; }
.logo__text small { font-size: .72rem; color: var(--steel); letter-spacing: .18em; text-transform: uppercase; }
/* White halo so the footer logo stays visible on the dark background */
.footer .logo img,
.footer__brand img {
  filter:
    drop-shadow(0 0 5px rgba(255,255,255,.95))
    drop-shadow(0 0 12px rgba(255,255,255,.8))
    drop-shadow(0 0 22px rgba(255,255,255,.55))
    drop-shadow(0 0 36px rgba(255,255,255,.35));
}
.footer .logo__text strong { color: #fff; }
.footer .logo__text small { color: #9aa5b1; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
  padding: 10px 16px;
  border-radius: 8px;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav a:hover, .nav a.active { color: var(--blue); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav__cta { margin-left: 12px; }
.nav__portal {
  margin-left: 12px;
  padding: 9px 18px;
  border: 2px solid var(--blue);
  color: var(--blue);
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  white-space: nowrap;
}
.nav__portal:hover { background: var(--blue); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; position: relative; z-index: 300; }
.nav-toggle span {
  display: block; width: 26px; height: 3px; background: var(--ink); border-radius: 2px;
  transition: var(--transition); position: relative;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav, .nav__cta, .nav__portal { display: none; }
  /* The header's backdrop-filter creates a containing block for position:fixed
     descendants, which collapses the fixed mobile menu into the 76px header and
     leaves the links covered by the page content. Drop the blur while the menu
     is open so the menu positions against the viewport instead. */
  .header:has(.nav.open) { backdrop-filter: none; }
  .nav.open {
    display: flex;
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 20px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 200;
  }
  .nav.open a { padding: 16px; font-size: 1.1rem; border-radius: 10px; }
  .nav.open a::after { display: none; }
  .nav.open .nav__cta { display: inline-flex; margin: 12px 0 0; justify-content: center; }
  .nav.open .nav__portal { display: inline-flex; margin: 8px 0 0; justify-content: center; }
  .nav-toggle { display: block; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #04295a 0%, #063b82 45%, #0d5ab7 100%);
  color: #fff;
  overflow: hidden;
  padding: 120px 0 100px;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .35;
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.08), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(13,90,183,.4), transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 30h60M30 0v60' stroke='rgba(255,255,255,.04)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 span { color: #9ec5ff; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,.85); margin-bottom: 32px; max-width: 560px; }
.hero__badges { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 36px; }
.hero__badge { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: rgba(255,255,255,.85); }
.hero__badge svg { width: 22px; height: 22px; color: #9ec5ff; flex-shrink: 0; }
.hero__visual { display: flex; justify-content: center; align-items: center; }
.hero__visual img { max-height: 420px; filter:
  drop-shadow(0 0 6px rgba(255,255,255,.95))
  drop-shadow(0 0 14px rgba(255,255,255,.8))
  drop-shadow(0 0 26px rgba(255,255,255,.55))
  drop-shadow(0 0 42px rgba(255,255,255,.35))
  drop-shadow(0 20px 50px rgba(0,0,0,.4)); }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero__visual { order: -1; }
  .hero__visual img { max-height: 260px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero__badges { justify-content: center; }
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, #04295a, #063b82);
  color: #fff;
  padding: 80px 0 60px;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: 14px; }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 640px; margin: 0 auto; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 20px; }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: #fff; }

/* ---- Cards ---- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--steel-light); }
.card__icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  margin-bottom: 20px;
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); margin-bottom: 0; }
.card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 700; font-size: .9rem; }

/* ---- Feature list ---- */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.feature-list svg { width: 22px; height: 22px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }

/* ---- Split section ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--reverse .split__media { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split__media { order: 0; }
}
.split__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  min-height: 320px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.split__media img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.split__media--placeholder { color: rgba(255,255,255,.5); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats__num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: #fff; line-height: 1; }
.stats__label { color: rgba(255,255,255,.75); font-size: .9rem; margin-top: 8px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---- CTA banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: var(--radius-lg);
  padding: 56px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,.85); margin: 0; max-width: 540px; }
@media (max-width: 700px) { .cta-banner { padding: 36px; text-align: center; justify-content: center; } }

/* ---- Clients strip ---- */
.clients { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; opacity: .7; }
.clients span { font-weight: 700; font-size: 1.1rem; color: var(--steel); letter-spacing: .05em; }
.clients-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; }
.clients-logos img { height: 64px; width: auto; opacity: .8; filter: grayscale(.3); transition: opacity var(--transition), filter var(--transition); border-radius: 8px; }
.clients-logos img:hover { opacity: 1; filter: none; }

/* ---- Footer ---- */
.footer { background: var(--ink); color: #9aa5b1; padding: 64px 0 0; }
.footer a { color: #cfd6de; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer__brand img { height: 56px; margin-bottom: 16px; }
.footer__brand p { font-size: .9rem; color: #9aa5b1; max-width: 320px; }
.footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 10px; font-size: .92rem; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact svg { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; margin-top: 3px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .85rem;
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---- Forms ---- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-soft); }
.field label .req { color: #d33; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13,90,183,.15);
}
.field textarea { min-height: 140px; resize: vertical; }
.form__note { font-size: .85rem; color: var(--text-muted); }
.form__success {
  background: #e7f7ef;
  border: 1px solid #b7e6cf;
  color: #0a6b3f;
  padding: 16px 20px;
  border-radius: var(--radius);
  display: none;
}
.form__success.show { display: block; }

/* ---- Contact info cards ---- */
.contact-info { display: grid; gap: 20px; }
.contact-info__item {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px;
}
.contact-info__icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.contact-info__icon svg { width: 22px; height: 22px; }
.contact-info__item h4 { margin: 0 0 4px; font-size: 1rem; }
.contact-info__item p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ---- Project gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }
.gallery__item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #fff;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery__media {
  height: 220px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  overflow: hidden;
}
.gallery__media img { width: 100%; height: 100%; object-fit: cover; }
.gallery__body { padding: 20px; }
.gallery__body h4 { margin: 0 0 6px; font-size: 1.05rem; }
.gallery__body p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.gallery__tag {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--blue); background: #eaf2ff;
  padding: 4px 10px; border-radius: 50px; margin-bottom: 10px;
}

/* ---- Accordion (FAQ) ---- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion__item { border-bottom: 1px solid var(--border); }
.accordion__item:last-child { border-bottom: 0; }
.accordion__head {
  width: 100%; text-align: left; background: #fff; border: 0; cursor: pointer;
  padding: 20px 24px; font-size: 1.05rem; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: inherit;
}
.accordion__head:hover { background: var(--bg-alt); }
.accordion__icon { flex-shrink: 0; transition: transform var(--transition); color: var(--blue); }
.accordion__item.open .accordion__icon { transform: rotate(45deg); }
.accordion__body { max-height: 0; overflow: hidden; transition: max-height var(--transition); }
.accordion__body-inner { padding: 0 24px 20px; color: var(--text-muted); }

/* ---- Utilities ---- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.lead { font-size: 1.15rem; color: var(--text-muted); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
/* ---- Cookie consent banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
  z-index: 1000;
  display: flex;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--border);
}
.cookie-banner__text strong { display: block; margin-bottom: 4px; color: var(--ink); }
.cookie-banner__text p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.cookie-banner__actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.cookie-banner__accept, .cookie-banner__decline {
  border: 0; cursor: pointer; border-radius: 8px; padding: 9px 20px;
  font-weight: 600; font-size: 14px; transition: var(--transition);
}
.cookie-banner__accept { background: var(--blue); color: #fff; }
.cookie-banner__accept:hover { background: var(--blue-dark); }
.cookie-banner__decline { background: var(--steel-lighter); color: var(--text); }
.cookie-banner__decline:hover { background: var(--steel-light); }
@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-banner__actions { flex-direction: row; }
  .cookie-banner__actions button { flex: 1; }
}
