/* ==========================================================================
   3D SOFT TECH — Design tokens
   Palette drawn from the logo (pure black/white pixel mark + one accent
   dot). Amber stands in for that dot as a CRT-phosphor glow — the single
   accent, used sparingly for the one active thing per screen.
   ========================================================================== */
:root {
  --ink: #0a0a0a;
  --paper: #faf9f6;
  --amber: #ffb000;
  --slate: #6b6b6b;
  --hairline: #e4e2dc;

  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-sans: 'Montserrat', system-ui, sans-serif;
  --font-pixel: 'Press Start 2P', var(--font-mono);

  --step: 4px; /* base pixel unit — spacing snaps to multiples of this */
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 1.05rem;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  margin-bottom: 0.8em;
}
a { color: var(--ink); }
::selection { background: var(--amber); color: var(--ink); }

/* Focus states stay visible everywhere — no outline: none */
a:focus-visible, button:focus-visible, .form-control:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

/* ==========================================================================
   Eyebrow / terminal-prompt label — the recurring "cursor dot" motif
   ========================================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--slate);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--amber);
  display: inline-block;
  animation: blink 1.6s steps(1) infinite;
}
.section--dark .eyebrow { color: var(--paper); opacity: 0.8; }
@keyframes blink { 50% { opacity: 0.15; } }

/* Pixel tagline — mirrors the logo's own "Designing / Developing /
   Digital Marketing" line, set in the same pixel display face */
.tagline-pixel {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  line-height: 2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}

/* Small inline tag — used to preview sub-services on hub/pillar cards */
.tag-pixel {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid currentColor;
  padding: 3px 10px;
  margin: 0 6px 6px 0;
}

/* ==========================================================================
   Custom pixel icon set (inline SVG sprite, retro 8x8 bitmap glyphs)
   ========================================================================== */
.icon-pixel-svg {
  width: 26px;
  height: 26px;
  shape-rendering: crispEdges;
}

/* ==========================================================================
   Banner graphic — ONE big icon per page, matched to what that page is
   about, in a bordered frame styled like the logo. Idle "press-and-release"
   animation reuses the same shadow-offset language as buttons/cards
   elsewhere on the site, so it reads as intentional rather than random.
   ========================================================================== */
.hero-icon {
  width: 230px;
  aspect-ratio: 1;
  border: 3px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 9px 9px 0 var(--amber);
  animation: pressBreathe 2.6s steps(5) infinite;
}
.hero-icon svg {
  width: 58%;
  height: 58%;
}
.hero-icon::after {
  content: attr(data-label);
  position: absolute;
  bottom: -34px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}
@keyframes pressBreathe {
  0%, 100% { box-shadow: 9px 9px 0 var(--amber); transform: translate(0, 0); }
  50% { box-shadow: 3px 3px 0 var(--amber); transform: translate(6px, 6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-icon { animation: none; }
}

/* Rotating fact ticker — pure CSS crossfade carousel, no JS required */
.fact-ticker {
  position: relative;
  min-height: 3.2em;
  margin-top: 8px;
}
.fact-ticker span {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  animation: factCycle 24s infinite;
}
.fact-ticker span:nth-child(1) { animation-delay: 0s; }
.fact-ticker span:nth-child(2) { animation-delay: 4s; }
.fact-ticker span:nth-child(3) { animation-delay: 8s; }
.fact-ticker span:nth-child(4) { animation-delay: 12s; }
.fact-ticker span:nth-child(5) { animation-delay: 16s; }
.fact-ticker span:nth-child(6) { animation-delay: 20s; }
@keyframes factCycle {
  0%      { opacity: 0; }
  2%      { opacity: 1; }
  15%     { opacity: 1; }
  17%     { opacity: 0; }
  100%    { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fact-ticker span { animation: none; opacity: 0; }
  .fact-ticker span:nth-child(1) { opacity: 1; }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  background: var(--ink);
  padding: calc(var(--step) * 2) 0;
  border-bottom: 4px solid var(--amber);
}
.navbar-brand img { height: 58px; width: auto; display: block; }
.navbar .nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 10px 16px !important;
  transition: color 0.15s steps(2);
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--amber); }
.navbar .btn-pixel { --btn-shadow: var(--paper); } /* shadow visible on dark bar */
.navbar-toggler { border: 2px solid var(--paper); border-radius: 0; }
.navbar-toggler-icon { filter: invert(1); }

.dropdown-menu {
  background: var(--ink);
  border: 2px solid var(--amber);
  border-radius: 0;
  padding: 4px 0;
  margin-top: 4px;
}
.dropdown-item {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--paper);
  padding: 10px 20px;
}
.dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active {
  background: var(--amber);
  color: var(--ink);
}

/* Retro buttons — pixel-notched corners (same 8-bit language as the logo),
   hard offset shadow via drop-shadow so it follows the notched shape.
   Hover = color invert (no jumpy movement); :active = the "press". */
.btn-pixel {
  --btn-bg: var(--amber);
  --btn-fg: var(--ink);
  --btn-shadow: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 14px 26px;
  clip-path: polygon(
    0 6px, 6px 6px, 6px 0,
    calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px,
    100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%,
    6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px)
  );
  filter: drop-shadow(5px 5px 0 var(--btn-shadow));
  transition: background 0.12s steps(2), color 0.12s steps(2);
}
.btn-pixel:hover, .btn-pixel:focus-visible {
  --btn-bg: var(--ink);
  --btn-fg: var(--amber);
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn-pixel:active {
  transform: translate(4px, 4px);
  filter: drop-shadow(1px 1px 0 var(--btn-shadow));
}
.btn-pixel--ghost {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 2px currentColor; /* clipped border, notched corners */
  background: var(--btn-bg);
}
.btn-pixel--ghost:hover, .btn-pixel--ghost:focus-visible {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
}
.section--dark .btn-pixel--ghost {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-shadow: var(--paper);
}
.section--dark .btn-pixel--ghost:hover, .section--dark .btn-pixel--ghost:focus-visible {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
}
.section--dark .btn-pixel:not(.btn-pixel--ghost) { --btn-shadow: var(--paper); }
.section--dark .btn-pixel:not(.btn-pixel--ghost):hover { --btn-bg: var(--paper); --btn-fg: var(--ink); }

/* ==========================================================================
   Section rhythm — alternating paper / ink bands, echoing the logo's own
   black bar under the white tagline
   ========================================================================== */
.section { padding: 96px 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .text-muted { color: #b8b8b8 !important; }
.section--hairline { border-top: 1px solid var(--hairline); }

.display-pixel {
  font-family: var(--font-pixel);
  font-size: clamp(1.6rem, 5vw, 3.4rem);
  line-height: 1.35;
  text-transform: uppercase;
}

.headline {
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  line-height: 1.7;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Hero pixel-block decoration (pure CSS, no image) */
.pixel-cluster { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--step); max-width: 220px; }
.pixel-cluster span { display: block; padding-top: 100%; background: var(--ink); }
.pixel-cluster span:nth-child(3n) { background: var(--amber); }
.pixel-cluster span:nth-child(5n) { background: transparent; }

/* ==========================================================================
   Cards — hard pixel border + offset shadow, "presses" on hover
   ========================================================================== */
.card-pixel {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 32px 28px;
  height: 100%;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.12s steps(3), box-shadow 0.12s steps(3);
}
.card-pixel:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.section--dark .card-pixel { background: var(--ink); color: var(--paper); box-shadow: 6px 6px 0 var(--amber); border-color: var(--paper); }
.section--dark .card-pixel:hover { box-shadow: 3px 3px 0 var(--amber); }

.card-pixel h3 {
  font-size: 0.72rem;
  line-height: 1.9;
  margin-bottom: 0.9em;
}
.icon-block {
  width: 52px; height: 52px;
  background: var(--ink);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.section--dark .icon-block { background: var(--amber); color: var(--ink); }

/* Process steps — numbering justified: this is a real ordered sequence */
.step-index {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--amber);
  display: block;
  margin-bottom: 6px;
}

/* Scanline divider — dot-matrix perforation rule between bands */
.scanline {
  height: 4px;
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 14px);
}
.section--dark + .scanline, .scanline--light { background-image: repeating-linear-gradient(90deg, var(--paper) 0 6px, transparent 6px 14px); }

/* ==========================================================================
   Forms
   ========================================================================== */
/* Inputs share the buttons' retro language: pixel-notched corners, the
   border drawn as a clipped inset shadow, amber + hard offset on focus. */
.form-control, .form-select {
  border-radius: 0;
  border: 0;
  padding: 13px 16px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  clip-path: polygon(
    0 6px, 6px 6px, 6px 0,
    calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px,
    100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%,
    6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px)
  );
  box-shadow: inset 0 0 0 2px var(--ink);
  filter: drop-shadow(4px 4px 0 var(--hairline));
  transition: box-shadow 0.12s steps(2), filter 0.12s steps(2);
}
.form-control::placeholder { color: var(--slate); opacity: .75; }
.form-control:focus, .form-select:focus {
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--amber);
  filter: drop-shadow(4px 4px 0 var(--amber));
  outline: none;
}
/* Bootstrap validation states, restyled to match */
.was-validated .form-control:invalid, .was-validated .form-select:invalid { box-shadow: inset 0 0 0 2px #b3261e; }
.was-validated .form-control:valid, .was-validated .form-select:valid { box-shadow: inset 0 0 0 2px #1a7f37; }
label { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }

/* Stats row */
.stat-num { font-family: var(--font-mono); font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--amber); display: block; }
.stat-label { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate); }
.section--dark .stat-label { color: #b8b8b8; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 24px;
}
footer img { height: 52px; margin-bottom: 16px; }
footer a { color: var(--paper); text-decoration: none; }
footer a:hover { color: var(--amber); }
footer .fine-print { font-family: var(--font-mono); font-size: 0.75rem; color: #8a8a8a; margin-top: 40px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 2px solid var(--paper); margin-right: 8px;
  transition: background 0.12s steps(2), color 0.12s steps(2);
}
.social-row a:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }

/* Page header banner (About / Services / Contact) */
.page-header { background: var(--ink); color: var(--paper); padding: 72px 0 56px; }

@media (max-width: 767px) {
  .section { padding: 64px 0; }
}

/* ==========================================================================
   Shared utilities — replace repeated inline styles (one class, used many
   places; never re-declare these rules elsewhere)
   ========================================================================== */
.measure { max-width: 52ch; }            /* readable line length, left-set  */
.measure-c { max-width: 50ch; margin-inline: auto; } /* centered variant    */
.dim { opacity: .85; }                    /* softened text on dark bands     */
.headline--sub { font-size: clamp(1.05rem, 2vw, 1.5rem); } /* section h2   */
.footer-label { margin-top: 0; opacity: 1; }
.hero-icon--static { animation: none; width: 190px; }
.card-pixel--auto { height: auto; } /* for cards stacked in one column */
.normal-case { text-transform: none; }

/* Skip link — hidden until keyboard-focused (accessibility) */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 2000;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  padding: 10px 18px;
  text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ==========================================================================
   FAQ accordion — Bootstrap accordion re-skinned with existing tokens
   ========================================================================== */
.accordion-pixel .accordion-item {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  margin-bottom: 14px;
  box-shadow: 5px 5px 0 var(--ink);
}
.accordion-pixel .accordion-button {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: 0;
  box-shadow: none;
  padding: 18px 20px;
}
.accordion-pixel .accordion-button:not(.collapsed) {
  background: var(--ink);
  color: var(--paper);
}
.accordion-pixel .accordion-button:not(.collapsed)::after { filter: invert(1); }
.accordion-pixel .accordion-body { padding: 18px 20px; border-top: 2px solid var(--ink); }

/* ==========================================================================
   Cookie consent banner (injected by js/script.js)
   ========================================================================== */
.consent-banner {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 1500;
  max-width: 560px;
  margin-inline: auto;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--amber);
  box-shadow: 6px 6px 0 var(--amber);
  padding: 20px 22px;
}
.consent-banner p { font-size: 0.9rem; margin-bottom: 14px; }
.consent-banner .btn-pixel { padding: 8px 18px; font-size: 0.78rem; }

/* ==========================================================================
   Brand guidelines page
   ========================================================================== */
.swatch {
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  height: 100%;
}
.swatch__chip { height: 110px; }
.swatch__meta { padding: 14px 16px; font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--paper); }
.logo-stage {
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  height: 100%;
}
.logo-stage img { max-width: 240px; width: 100%; height: auto; }
.logo-stage--dark { background: var(--ink); }
.logo-stage--light { background: #fff; }
.type-specimen { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 28px; height: 100%; }
.brand-table { font-family: var(--font-mono); font-size: 0.82rem; }
.brand-table th { font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.brand-table th, .brand-table td { border: 2px solid var(--ink); padding: 10px 12px; background: var(--paper); }

/* ==========================================================================
   Legal pages (privacy / terms) — readable long-form prose
   ========================================================================== */
.legal-prose { max-width: 68ch; }
.legal-prose h2 { font-size: 0.85rem; line-height: 1.9; margin-top: 2.4em; }
.legal-prose p, .legal-prose li { font-size: 0.98rem; }
.legal-prose .updated { font-family: var(--font-mono); font-size: 0.78rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; }

/* Form status lines (success / error) */
.form-note { font-family: var(--font-mono); font-size: 0.85rem; }
.form-note--ok { color: #1a7f37; }
.form-note--err { color: #b3261e; }

/* 404 page */
.err-code { font-family: var(--font-pixel); font-size: clamp(3rem, 14vw, 8rem); color: var(--amber); line-height: 1.2; }

/* Swatches inside dark bands need light borders so Jet Black stays visible */
.section--dark .swatch { border-color: var(--paper); box-shadow: 5px 5px 0 var(--amber); }
