/* ==========================================================================
   Cornerstone Residential Solutions — Site Stylesheet
   Light / dark theme via [data-theme] on <html>
   ========================================================================== */

:root {
  --navy: #1b3a7a;
  --navy-deep: #122a5c;
  --navy-soft: #2a4d99;
  --red: #d7232b;
  --red-dark: #b31b22;
  --gold: #e0a43a;

  --bg: #ffffff;
  --bg-alt: #f3f5f9;
  --bg-elev: #ffffff;
  --text: #1b2233;
  --text-muted: #4d5668;
  --line: #dde2ea;
  --shadow: 0 10px 30px rgba(17, 34, 78, .10);
  --shadow-sm: 0 2px 8px rgba(17, 34, 78, .08);
  --link: var(--navy);
  --accent: var(--red);
  --accent-text: #ffffff;
  --header-bg: rgba(255, 255, 255, .92);
  --topbar-bg: var(--navy);
  --topbar-text: #ffffff;
  --hero-overlay: linear-gradient(100deg, rgba(8, 18, 44, .82) 0%, rgba(8, 18, 44, .55) 42%, rgba(8, 18, 44, .12) 75%, rgba(8, 18, 44, .05) 100%), linear-gradient(180deg, rgba(8,18,44,0) 60%, rgba(8,18,44,.55) 100%);
  --footer-bg: #0f1d3d;
  --footer-text: #c9d3e8;
  --card-grad: linear-gradient(160deg, #ffffff, #f3f5f9);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1180px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Merriweather", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c1324;
  --bg-alt: #111b33;
  --bg-elev: #172342;
  --text: #e8edf7;
  --text-muted: #a9b4cc;
  --line: #26334f;
  --shadow: 0 14px 36px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
  --link: #9fb8f5;
  --accent: #e63946;
  --header-bg: rgba(12, 19, 36, .90);
  --topbar-bg: #0a1020;
  --footer-bg: #070c18;
  --footer-text: #b3bdd4;
  --card-grad: linear-gradient(160deg, #172342, #111b33);
  --hero-overlay: linear-gradient(100deg, rgba(5, 10, 26, .88) 0%, rgba(5, 10, 26, .62) 42%, rgba(5, 10, 26, .18) 75%, rgba(5, 10, 26, .1) 100%), linear-gradient(180deg, rgba(5,10,26,0) 60%, rgba(5,10,26,.6) 100%);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .6em; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; font-family: var(--font); font-weight: 700; }
p { margin: 0 0 1.1em; }
ul { padding-left: 1.2em; }
.container { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3.2rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 2.4rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.lead { font-size: 1.15rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
  text-decoration: none !important; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--red-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-outline { border-color: currentColor; color: var(--text); background: transparent; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #eef2fb; }
.btn-ghost-light { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.08); backdrop-filter: blur(4px); }
.btn-ghost-light:hover { background: rgba(255,255,255,.18); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--topbar-bg); color: var(--topbar-text); font-size: .9rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: inherit; display: inline-flex; align-items: center; gap: .4rem; }
.topbar .topbar-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.topbar svg { width: 15px; height: 15px; }
.topbar .tag { opacity: .85; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none !important; }
.brand img { height: 50px; width: auto; }
.brand .brand-mark { height: 48px; }
.brand .brand-word { height: 46px; }
[data-theme="dark"] .brand .brand-word-light { display: block; }
[data-theme="dark"] .brand .brand-word-dark { display: none; }
.brand .brand-word-light { display: none; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { padding: .55rem .85rem; border-radius: 8px; font-weight: 600; color: var(--text); font-size: .98rem; }
.nav a:hover { background: var(--bg-alt); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a.nav-cta { background: var(--accent); color: #fff; margin-left: .5rem; }
.nav a.nav-cta:hover { background: var(--red-dark); }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.theme-toggle, .nav-toggle {
  appearance: none; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text);
  width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s ease;
}
.theme-toggle:hover, .nav-toggle:hover { background: var(--bg-alt); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.nav-toggle { display: none; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--bg-elev); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: .8rem 1.25rem 1.2rem; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .9rem; font-size: 1.05rem; }
  .nav a.nav-cta { margin: .5rem 0 0; text-align: center; justify-content: center; }
  .brand .brand-word { height: 38px; }
  .topbar .tag { display: none; }
}
@media (max-width: 420px) { .brand .brand-word { height: 34px; } .topbar .topbar-links a:last-child { display: none; } .topbar .container { justify-content: center; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden; isolation: isolate;
  min-height: min(84vh, 760px); display: grid; align-items: end;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-overlay); }
.hero .container { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-inner { max-width: 640px; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); margin-bottom: .5em; }
.hero .hero-kicker { display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1.2rem; }
.hero p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 680px; color: rgba(255,255,255,.92); text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-logo { width: min(360px, 70%); margin-bottom: 1.4rem; filter: drop-shadow(0 6px 20px rgba(0,0,0,.45)); }

/* Page hero (inner pages) */
.page-hero { background: var(--navy-deep); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(900px 400px at 80% 20%, rgba(215,35,43,.35), transparent 60%), radial-gradient(700px 400px at 10% 80%, rgba(42,77,153,.55), transparent 60%); }
.page-hero .container { padding: clamp(3rem, 6vw, 5rem) 0; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 760px; font-size: 1.1rem; }
.page-hero .eyebrow { color: #ffd08a; }
.page-hero.has-image { min-height: 420px; display: grid; align-items: end; }
.page-hero.has-image .hero-bg { position: absolute; inset: 0; z-index: -2; }
.page-hero.has-image .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,20,50,.25), rgba(10,20,50,.85)); }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: .9rem; }
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb span { margin: 0 .4rem; opacity: .6; }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--navy); color: #fff; }
.trust-strip .container { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center; padding: 1.4rem 0; }
.trust-strip img { height: 64px; width: auto; }
.trust-strip p { margin: 0; font-size: 1.02rem; }
.trust-strip strong { color: #ffd08a; }
@media (max-width: 640px) { .trust-strip .container { grid-template-columns: 1fr; text-align: center; } .trust-strip img { margin-inline: auto; } }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.4rem; }
.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: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card-grad); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; gap: .5rem;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin: .2rem 0 .3rem; }
.card p { margin: 0; color: var(--text-muted); }
.card .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; margin-bottom: .5rem; }
.card .icon svg { width: 24px; height: 24px; }
[data-theme="dark"] .card .icon { background: var(--navy-soft); }
.card-link { margin-top: auto; padding-top: .6rem; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: .3rem; }
.card-link svg, .hero-actions svg, .contact-list svg { width: 18px; height: 18px; }

.card-photo { padding: 0; overflow: hidden; }
.card-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-photo .card-body { padding: 1.3rem 1.5rem 1.6rem; }

/* Feature split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

/* Video */
.video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Check list */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: .2rem; border-radius: 50%; background: var(--accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center/13px no-repeat; }
.checks.cols-2 { grid-template-columns: repeat(2, 1fr); }
.checks.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .checks.cols-2, .checks.cols-3 { grid-template-columns: 1fr; } }

/* Service blocks */
.service-block { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow-sm); scroll-margin-top: 110px; }
.service-block + .service-block { margin-top: 1.5rem; }
.service-block h2 { font-size: 1.55rem; display: flex; align-items: center; gap: .7rem; }
.service-block h2 .num { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--font); font-size: .95rem; font-weight: 800; }
[data-theme="dark"] .service-block h2 .num { background: var(--navy-soft); }
.service-block .sub { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.service-block .sub h3 { font-size: 1.08rem; margin-bottom: .5rem; color: var(--link); }
.service-block .sub ul { margin: 0; padding-left: 1.1em; color: var(--text-muted); }
.service-block .sub li { margin: .2rem 0; }
.service-block figure { margin: 1.2rem 0 0; }
.service-block figure img { border-radius: var(--radius-sm); width: 100%; max-width: 460px; box-shadow: var(--shadow-sm); }

/* Sticky side nav for services */
.with-sidenav { display: grid; grid-template-columns: 250px 1fr; gap: 2.5rem; align-items: start; }
.sidenav { position: sticky; top: 100px; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--bg-elev); }
.sidenav strong { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .5rem; }
.sidenav a { display: block; padding: .45rem .6rem; border-radius: 8px; font-size: .93rem; color: var(--text); }
.sidenav a:hover { background: var(--bg-alt); text-decoration: none; }
@media (max-width: 900px) { .with-sidenav { grid-template-columns: 1fr; } .sidenav { position: static; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { text-align: center; padding: 1.4rem 1rem; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--accent); line-height: 1.1; }
.stat span { color: var(--text-muted); font-size: .92rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Values strip */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.values div { text-align: center; padding: 1.2rem; }
.values h3 { color: var(--accent); margin-bottom: .3rem; font-family: var(--font-display); }
.values p { margin: 0; font-size: .95rem; color: var(--text-muted); }
@media (max-width: 760px) { .values { grid-template-columns: repeat(2, 1fr); } }
.split .values { grid-template-columns: 1fr 1fr; }
.split .values div { text-align: left; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.hero-split { align-items: center; }
.hero-split img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.45); }

/* FAQ accordion */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.1rem 0; font-weight: 700; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 500; color: var(--accent); transition: transform .2s ease; }
.faq details[open] summary::after { content: "−"; transform: rotate(180deg); }
.faq details p { color: var(--text-muted); padding: 0 0 1.2rem; max-width: 860px; }
.faq-group { margin-bottom: 2.5rem; }
.faq-group h2 { font-size: 1.4rem; margin-bottom: .4rem; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy-deep), var(--navy) 60%, #3b5fb5); color: #fff; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(215,35,43,.25); filter: blur(30px); }
.cta-band .container { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); }
.cta-band .cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 800px) { .cta-band .container { grid-template-columns: 1fr; } .cta-band .cta-actions { justify-content: flex-start; } }

/* Contact */
.contact-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.contact-card h3 { margin-top: 0; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.contact-list li { display: flex; gap: .8rem; align-items: flex-start; }
.contact-list .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; }
[data-theme="dark"] .contact-list .ic { background: var(--navy-soft); }
.contact-list .ic svg { width: 20px; height: 20px; }
.contact-list small { display: block; color: var(--text-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.contact-list a, .contact-list span.v { font-weight: 600; font-size: 1.05rem; }
.form { display: grid; gap: 1rem; }
.form label { font-weight: 600; font-size: .92rem; display: grid; gap: .35rem; }
.form input, .form select, .form textarea {
  width: 100%; padding: .8rem .95rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 1rem;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--navy-soft); outline-offset: 1px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form small { color: var(--text-muted); }

/* Social */
.social { display: flex; gap: .6rem; flex-wrap: wrap; }
.social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); transition: background .2s ease, color .2s ease; }
.social a:hover { background: var(--navy); color: #fff; text-decoration: none; }
.social svg { width: 19px; height: 19px; }

/* Quote / portrait */
.portrait { width: 100%; max-width: 360px; border-radius: var(--radius); box-shadow: var(--shadow); }
.portrait-wrap { position: relative; width: fit-content; }
.portrait-wrap .badge { position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: .45rem 1rem; border-radius: 999px; font-weight: 700; font-size: .85rem; white-space: nowrap; box-shadow: var(--shadow-sm); }
.role-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; padding: 0; list-style: none; }
.role-tags li { font-size: .85rem; padding: .35rem .75rem; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--text-muted); }

/* Pull quote */
.pullquote { border-left: 4px solid var(--accent); padding: .6rem 0 .6rem 1.3rem; font-family: var(--font-display); font-size: 1.3rem; color: var(--text); margin: 1.5rem 0; }
.pullquote cite { display: block; font-family: var(--font); font-style: normal; font-size: .9rem; color: var(--text-muted); margin-top: .5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 3.5rem 0 1.5rem; }
.site-footer a { color: #fff; }
.site-footer .social a { color: var(--navy); background: #fff; border-color: transparent; }
.site-footer .social a:hover { background: var(--accent); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: #fff; font-family: var(--font); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer .footer-brand img { height: 54px; width: auto; margin-bottom: 1rem; }
.site-footer .footer-brand p { font-size: .95rem; max-width: 380px; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; }
.footer-bottom .tagline { color: #ffd08a; font-family: var(--font-display); font-style: italic; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Back to top */
.to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 90; border: 0; cursor: pointer; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* 404 */
.notfound { text-align: center; padding: 6rem 0; }
.notfound h1 { font-size: 5rem; color: var(--accent); }

@media (max-width: 700px) {
  .hero::after { background: linear-gradient(180deg, rgba(8,18,44,.55) 0%, rgba(8,18,44,.7) 50%, rgba(8,18,44,.9) 100%); }
  .hero-logo { width: min(280px, 80%); }
}
