/* ============================================================
   Dragon Pixel Studio — shared site shell (single source of truth)
   Loaded by index.html, services.html, contact.html.
   Contains: tokens, background, header, logo, nav, footer,
   and the shared responsive rules. Page-specific styling stays
   in each page's own <style> block.
   ============================================================ */

:root {
  --bg: #05070d;
  --bg-deep: #030409;
  --panel: rgba(19, 22, 39, 0.94);
  --panel-strong: rgba(19, 22, 39, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.035);
  --panel-edge: rgba(255, 255, 255, 0.105);
  --text: #f7faff;
  --muted: #b9c3d8;        /* real secondary tier — readable but clearly quieter than text */
  --muted-strong: #d8deeb; /* for secondary copy that must stay very legible */
  --faint: #7f8ba4;        /* metadata, footnotes, copyright */
  --cyan: #18e0ff;
  --magenta: #ff3db4;
  --gold: #ffc23d;
  --green: #69ff00;
  --steam: #1b9bf0;
  --radius-xl: 24px;
  --radius-lg: 16px;
  /* One source of truth for layout width + logo size */
  --wrap: min(1120px, calc(100% - 44px));
  --logo-w: clamp(196px, 14.5vw, 248px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Reserve the scrollbar gutter on every page so navigating between a
     long page and a short page never shifts the layout sideways. */
  scrollbar-gutter: stable;
}
html, body { max-width: 100%; overflow-x: hidden; }

body {
  /* Sticky footer: page fills the viewport, footer rides at the bottom
     even on short pages, without ever overlapping content. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* Color wash + grid in one fixed layer: identical look to
     background-attachment: fixed, but reliable on mobile browsers. */
  background:
    linear-gradient(rgba(255, 255, 255, 0.017) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.017) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(rgba(24, 224, 255, 0.009) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(90deg, rgba(255, 61, 180, 0.007) 1px, transparent 1px) 0 0 / 14px 14px,
    radial-gradient(circle at 78% 45%, rgba(255, 45, 80, 0.09), transparent 30%),
    radial-gradient(circle at 20% 30%, rgba(32, 230, 255, 0.085), transparent 32%),
    linear-gradient(135deg, #05070d 0%, #0a101b 55%, #05070d 100%);
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.34) 78%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.008) 0px, rgba(255, 255, 255, 0.008) 1px, transparent 1px, transparent 4px);
  z-index: -1;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid rgba(24, 224, 255, .65);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Accessibility: skip straight to page content */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  background: var(--cyan);
  color: #05070d;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Content column. .page is the flex-growing region above the footer. */
.page {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
}
.wrap {
  position: relative;
  z-index: 1;
  width: var(--wrap);
  margin: 0 auto;
}

/* ---------- Header / brand / logo ---------- */
.site-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 0 8px;
}

.brand {
  grid-column: 2;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 18px;
}
.logo {
  width: var(--logo-w);          /* identical on every page, one definition */
  height: auto;
  object-fit: contain;
  display: block;
  transform-origin: center;
  transition: transform .2s ease;
}
.brand:hover .logo { animation: logo-soft-pulse 1.6s ease-in-out infinite; }
.brand:focus-visible .logo { transform: translateY(-1px) scale(1.025); }
.brand:active .logo { animation: none; transform: scale(.985); }

@keyframes logo-soft-pulse {
  0%, 100% { transform: translateY(-1px) scale(1.012); }
  50%      { transform: translateY(-1px) scale(1.028); }
}

/* ---------- Nav ---------- */
.nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 15px;
  min-width: 386px;               /* fixed nav footprint = no reflow between tabs */
}
.nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  min-width: 112px;
  text-align: center;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .055); }
.nav a.active,
.nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(24, 224, 255, .10);
  box-shadow: inset 0 0 0 1px rgba(24, 224, 255, .28);
}

/* ---------- Shared section title ---------- */
.section-title { margin: 16px 0 22px; text-align: center; }
.section-title h2 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: clamp(26px, 4.2vw, 40px);
  letter-spacing: .02em;
}
.section-title p {
  margin: 12px auto 0;
  max-width: 72ch;
  color: var(--muted-strong);
  font-size: 17px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ============================================================
   Footer — full-width band pinned to the bottom of the viewport.
   Brand + address on the left, link columns on the right,
   hairline-separated copyright row underneath.
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: 64px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(8, 10, 18, .78), rgba(4, 5, 10, .94));
  color: var(--muted);
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  column-gap: clamp(56px, 10vw, 128px);
  row-gap: 30px;
  padding: 42px 0 30px;
  align-items: start;
  text-align: center;
}

.footer-col {
  text-align: center;
}

.footer-col h4 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease;
}
.footer-col a:hover { color: var(--cyan); }
.footer-col svg { width: 17px; height: 17px; flex: 0 0 auto; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .065);
  padding: 18px 0 26px;
  text-align: center;
  color: var(--faint);
  font-size: 14px;
}

/* ---------- Shared entrance animation ---------- */
@keyframes fadeUp {
  from { opacity: .72; transform: translateY(12px); }
  to   { opacity: 1;   transform: translateY(0); }
}

/* ============================================================
   Responsive shell — one identical set of breakpoints for every
   page, so the header/footer never differ between tabs.
   ============================================================ */
@media (max-width: 920px) {
  .wrap { width: min(760px, calc(100% - 34px)); }
  .site-header { grid-template-columns: 1fr; gap: 16px; padding-top: 22px; }
  .brand, .nav { grid-column: 1; justify-self: center; }
  .nav { font-size: 14px; gap: 8px; flex-wrap: wrap; justify-content: center; min-width: 0; }
  .nav a { padding: 9px 12px; min-width: 0; }

  .footer-grid {
    column-gap: clamp(34px, 7vw, 72px);
    padding: 36px 0 24px;
  }
}

@media (max-width: 560px) {
  body::before {
    background:
      linear-gradient(rgba(255, 255, 255, 0.017) 1px, transparent 1px) 0 0 / 34px 34px,
      linear-gradient(90deg, rgba(255, 255, 255, 0.017) 1px, transparent 1px) 0 0 / 34px 34px,
      radial-gradient(circle at 78% 45%, rgba(255, 45, 80, 0.09), transparent 30%),
      radial-gradient(circle at 20% 30%, rgba(32, 230, 255, 0.085), transparent 32%),
      linear-gradient(135deg, #05070d 0%, #0a101b 55%, #05070d 100%);
  }
  .wrap { width: min(calc(100vw - 32px), 400px); }
  .logo { width: 220px; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .footer-col a { justify-content: center; }
}

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

/* ---------- in-card video player ---------- */
.art-frame .video-facade {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #05070d;
  cursor: pointer;
}
.art-frame .video-facade .art { display: block; width: 100%; height: auto; transition: transform .3s ease, filter .3s ease; }
.art-frame .video-facade:hover .art,
.art-frame .video-facade:focus-visible .art { transform: scale(1.03); filter: brightness(1.08); }
.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(24, 224, 255, 0.9);
  box-shadow: 0 8px 30px rgba(24, 224, 255, 0.42);
  transition: transform .2s ease, background .2s ease;
}
.video-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent #05070d;
}
.art-frame .video-facade:hover .video-play,
.art-frame .video-facade:focus-visible .video-play { transform: scale(1.08); background: #18e0ff; }
.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

/* ---------- services: how it works ---------- */
.how-it-works { margin-top: 56px; }
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.step {
  position: relative;
  background: var(--panel-soft);
  border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--cyan);
  border-radius: 16px;
  padding: 24px 28px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  color: var(--cyan);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
}
.step h3 { margin: 0 0 8px; font-size: 19px; font-weight: 800; color: var(--text); }
.step p { margin: 0; color: var(--muted); line-height: 1.55; }
.cta-btn.secondary { background: transparent; border: 1.5px solid var(--cyan); color: var(--cyan); }
.cta-btn.secondary:hover { background: rgba(24, 224, 255, 0.12); }
