/* ==========================================================================
   Doom's Digital Services — base.css
   Shared on EVERY page: design tokens, reset, typography, buttons,
   header, footer, utilities, reveal animations.
   Page-specific styles live in home.css / inner.css.
   ========================================================================== */

:root {
  /* Brand */
  --orange: #ff6a00;
  --orange-600: #e85d00;
  --orange-400: #ff8a33;
  --orange-100: #fff1e6;
  --orange-glow: rgba(255, 106, 0, 0.35);
  --blue: #2563ff;
  --blue-600: #1747d6;
  --blue-100: #e8efff;
  --navy: #0a1230;
  --navy-2: #101b4a;

  /* Neutrals */
  --white: #ffffff;
  --bg: #fafafb;
  --bg-soft: #f4f4f6;
  --dark: #0b0b0f;
  --dark-2: #14141a;
  --dark-3: #1d1d25;
  --ink: #15151b;
  --muted: #5d6170;
  --line: #e7e7ec;
  --line-dark: rgba(255, 255, 255, 0.1);

  /* Type */
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(18px, 4vw, 40px);
  --header-h: 84px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Effects */
  --shadow-sm: 0 2px 10px rgba(20, 20, 30, 0.06);
  --shadow: 0 10px 30px rgba(20, 20, 30, 0.08);
  --shadow-orange: 0 3px 10px rgba(255, 106, 0, 0.18);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--orange); color: #fff; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--orange); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 118px); position: relative; }
.section--soft { background: var(--bg); }
.section--dark { background: var(--dark); color: #fff; }
.section--dark .muted { color: rgba(255, 255, 255, 0.66); }
.muted { color: var(--muted); }
.center { text-align: center; }
.text-orange { color: var(--orange); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  background: var(--white); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #3a3d49;
  box-shadow: var(--sh-eyebrow, none);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-100); }
.section--dark .eyebrow { background: rgba(255, 255, 255, 0.06); border-color: var(--line-dark); color: #fff; }
.section--dark .eyebrow::before { box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.2); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 48px); margin-top: 18px; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 17px; }
.section--dark .section-head p { color: rgba(255, 255, 255, 0.66); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 14.5px; line-height: 1; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-orange); }
.btn--primary:hover { background: var(--orange-600); transform: translateY(-2px); }
.btn--dark { background: var(--dark); color: #fff; }
.btn--dark:hover { background: var(--orange); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--orange-600); }
.btn--light:hover { background: var(--dark); color: #fff; transform: translateY(-2px); }
.btn--sm { padding: 12px 22px; font-size: 14px; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(20, 20, 30, 0.06); background: rgba(255, 255, 255, 0.94); }
.topbar { background: var(--dark); color: rgba(255, 255, 255, 0.78); font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar a { display: inline-flex; align-items: center; gap: 8px; transition: color 0.2s; }
.topbar a:hover { color: var(--orange-400); }
.topbar svg { width: 14px; height: 14px; color: var(--orange); }
.topbar__links { display: flex; gap: 24px; }
.topbar__tag { display: flex; align-items: center; gap: 8px; }
.topbar__tag b { color: var(--orange-400); font-weight: 600; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 54px; width: auto; }

.nav__menu { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; font-weight: 500; font-size: 15px; color: #3a3d49; border-radius: 10px;
  transition: color 0.2s;
}
.nav__link::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px;
  background: var(--orange); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--ink); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { font-weight: 600; }
.nav__link .chev { width: 14px; height: 14px; transition: transform 0.25s; }
.has-dropdown { position: relative; }
.has-dropdown:hover .chev, .has-dropdown:focus-within .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: 100%; left: 50%; width: 560px; padding: 14px; margin-top: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  opacity: 0; visibility: hidden; transform: translate(-50%, 10px);
  transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dropdown a { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; transition: background 0.2s; }
.dropdown a:hover { background: var(--orange-100); }
.dropdown .ic { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--orange-100); color: var(--orange); display: grid; place-items: center; }
.dropdown a:hover .ic { background: var(--orange); color: #fff; }
.dropdown .ic svg { width: 19px; height: 19px; }
.dropdown strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.dropdown small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

.nav__cta { display: flex; align-items: center; gap: 12px; }
/* (header phone removed — number lives in the top bar) */
.nav__phone { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.nav__phone .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--orange-100); color: var(--orange); display: grid; place-items: center; }
.nav__phone svg { width: 18px; height: 18px; }
.nav__phone small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); line-height: 1.2; }

.burger { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; place-items: center; }
.burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, background 0.3s; content: ""; position: relative; }
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 99; visibility: hidden; }
.drawer__bg { position: absolute; inset: 0; background: rgba(11, 11, 15, 0.55); opacity: 0; transition: opacity 0.3s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 400px); background: #fff; padding: 22px 22px 28px;
  transform: translateX(100%); transition: transform 0.4s var(--ease); display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.drawer.is-open { visibility: visible; }
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer__top img { height: 44px; width: auto; }
.drawer__close { width: 42px; height: 42px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-size: 22px; line-height: 1; }
.drawer a.d-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 6px; font-weight: 500; font-size: 17px; border-bottom: 1px solid var(--line); }
.drawer a.d-link.is-active { color: var(--orange); font-weight: 600; }
.drawer .d-sub { padding: 6px 0 10px 12px; display: grid; gap: 2px; }
.drawer .d-sub a { padding: 9px 8px; font-size: 15px; color: var(--muted); border-radius: 8px; }
.drawer .d-sub a:hover { color: var(--orange); background: var(--orange-100); }
.drawer .d-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 14px 6px 4px; font-weight: 600; }
.drawer .d-cta { margin-top: auto; padding-top: 20px; display: grid; gap: 10px; }

@media (max-width: 1100px) {
  .nav__phone small, .nav__phone span.num { display: none; }
  .nav__phone .ic { width: 44px; height: 44px; }
}
@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .nav__menu, .nav__cta .btn { display: none; }
  .burger { display: grid; }
  .brand img { height: 46px; }
  .topbar__tag { display: none; }
  .topbar .container { justify-content: center; }
}
@media (max-width: 520px) {
  .topbar__links a:not(:first-child) { display: none; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: #fff; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1.25fr 1fr 1.25fr; }
.footer__col { padding: 56px 36px 52px; border-right: 1px solid var(--line); }
.footer__col:first-child { padding-left: 0; }
.footer__col:last-child { border-right: 0; padding-right: 0; }
.footer__brand img { height: 66px; width: auto; margin-bottom: 22px; }
.footer__brand p { color: var(--muted); font-size: 14.5px; max-width: 320px; }
.footer__contact { margin-top: 22px; display: grid; gap: 12px; }
.footer__contact a { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; font-size: 15px; transition: color 0.2s; }
.footer__contact a:hover { color: var(--orange); }
.footer__contact svg { width: 18px; height: 18px; color: var(--orange); flex: none; }
.footer__social { display: flex; gap: 10px; margin-top: 24px; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: all 0.25s var(--ease); }
.footer__social a:hover { background: var(--orange); border-color: var(--orange); color: #fff; transform: translateY(-3px); }
.footer__social svg { width: 17px; height: 17px; }
.footer__title { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #6b6e7a; margin-bottom: 22px; }
.footer__links { display: grid; gap: 14px; }
.footer__links a { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-size: 15.5px; transition: color 0.2s, transform 0.25s var(--ease); }
.footer__links a svg { width: 11px; height: 11px; color: #9a9ca8; transition: transform 0.25s var(--ease), color 0.2s; }
.footer__links a:hover { color: var(--orange); transform: translateX(3px); }
.footer__links a:hover svg { color: var(--orange); transform: translate(2px, -2px); }

.footer__bar { border-top: 1px solid var(--line); }
.footer__bar .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 20px; font-size: 14px; color: var(--muted); }
.footer__bar nav { display: flex; gap: 22px; }
.footer__bar a:hover { color: var(--orange); }

/* Footer face-drop (canvas, see footer-drop.js) */
.ft__drop { position: relative; width: 100%; height: clamp(280px, 32vw, 440px); overflow: hidden; touch-action: pan-y; border-top: 1px solid var(--line); background: #fff; }
.ft__drop canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Footer accent: single colour (blue) so the face pile and links agree */
.site-footer { --ft-accent: var(--blue); }
.site-footer .footer__contact svg, .site-footer .footer__links a:hover, .site-footer .footer__links a:hover svg, .site-footer .footer__contact a:hover, .footer__bar a:hover { color: var(--ft-accent); }
.site-footer .footer__social a:hover { background: var(--ft-accent); border-color: var(--ft-accent); }
.site-footer .btn--primary { background: var(--ft-accent); box-shadow: none; }
.site-footer .btn--primary:hover { background: var(--blue-600); }

/* ---------- Closing CTA (shared, sits above the footer) ---------- */
.ctaw { background: #fff; padding-top: clamp(64px, 8vw, 110px); overflow: hidden; }
.ctaw__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
.ctaw__text { padding-bottom: clamp(54px, 7vw, 104px); }
.ctaw h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.12; margin: 18px 0; }
.ctaw h2 em { font-style: normal; color: var(--orange); }
.ctaw p { color: var(--muted); max-width: 46ch; margin-bottom: 28px; }
.ctaw__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ctaw__art { justify-self: end; max-width: 540px; width: 100%; margin-bottom: -1px; }
.ctaw__art img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
@media (max-width: 860px) {
  .ctaw__in { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .ctaw__art { justify-self: center; max-width: 340px; order: 2; margin-bottom: 0; }
  .ctaw__text { padding-bottom: 30px; }
}

@media (max-width: 960px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col { padding: 40px 24px; border-bottom: 1px solid var(--line); }
  .footer__col:nth-child(2n) { border-right: 0; padding-right: 0; }
  .footer__col:nth-child(2n+1) { padding-left: 0; }
  .footer__col:nth-child(2n+1) { border-right: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__col, .footer__col:nth-child(n) { border-right: 0; padding: 34px 0; }
}

/* Floating call button (mobile quick action) */
.fab-call {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 56px; height: 56px; border-radius: 50%;
  background: var(--orange); color: #fff; display: none; place-items: center; box-shadow: var(--shadow-orange);
}
.fab-call svg { width: 24px; height: 24px; }
@media (max-width: 960px) { .fab-call { display: grid; } }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* wrappers must not clip the sticky header's containing block */
#site-header, #site-footer { display: contents; }
