/* =========================================================================
   Loop Data theme - NAVY + ORANGE, light-first.
   Deep navy carries the structure (header, hero, band, footer, one dark
   section band); white and a faint blue tint carry the reading sections;
   orange is the rare highlight (calls to action, hero headline, reticles).
   Typefaces: Space Grotesk (headings), Inter (body), IBM Plex Mono (labels).
   Sections are LIGHT by default; add class "dark" for a navy band.
   ========================================================================= */

:root {
  /* Navy structure */
  --navy:        #0E1A2B;
  --navy-2:      #0A1321;   /* the slim band under the hero */
  --navy-line:   rgba(255,255,255,0.10);
  --on-navy:     #E8EEF5;   /* text on navy */
  --on-navy-2:   #C9D4E2;   /* secondary text on navy */
  --on-navy-dim: #93A3B8;   /* muted text on navy */

  /* Light surfaces */
  --bg:          #FFFFFF;
  --bg-tint:     #EEF3F8;   /* alternating light sections */
  --line:        #E2E9F1;
  --line-2:      #CBD5E1;

  /* Text on light */
  --ink:         #102A43;   /* headings + strong text (dark blue) */
  --text:        #3F4B5C;   /* body copy */
  --text-dim:    #6B7A8E;   /* muted */
  --silver:      #cad4df;   /* hero sub-line */

  /* Orange accent */
  --orange:      #ff7a18;   /* primary accent (logo "DATA") */
  --orange-soft: #ff9b47;
  --orange-deep: #C2500A;   /* small orange text on light backgrounds (readable) */
  --orange-glow: rgba(255,122,24,0.45);

  --radius:      12px;
  --maxw:        1120px;
  --measure:     760px;     /* shared reading width for body copy + band blurb */

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 .5em; color: var(--ink); }

a { color: var(--orange-deep); text-decoration: none; }
a:hover { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }

p { margin: 0 0 1.1em; }

strong { color: var(--ink); font-weight: 600; }

.wrap { --pad: 24px; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.04em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: .76rem;
  color: var(--orange-deep);
  margin: 0 0 1rem;
}

.hot { color: var(--orange); }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .01em;
  color: #140a02;
  background: linear-gradient(180deg, var(--orange-soft), var(--orange));
  border: 0;
  border-radius: 999px;
  padding: .35em .7em;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 6px 20px -8px var(--orange-glow);
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); text-decoration: none; color: #140a02; box-shadow: 0 10px 28px -8px var(--orange-glow); }
.btn:active { transform: translateY(0); }
.btn-sm { font-size: .84rem; padding: .22em calc(.48em + 4px); white-space: nowrap; }
.btn-lg { font-size: 1.1rem; padding: .42em .9em; }

/* ---- Header (navy) ----------------------------------------------------- */
.site-header {
  background: var(--navy);
  border-bottom: 1px solid var(--navy-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand-logo { height: 52px; width: auto; display: block; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.header-actions .btn { color: #140a02; }
.cta-short { display: none; }

/* Hamburger */
.hamburger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 40px; padding: 0 10px; background: transparent; border: 1px solid rgba(255,255,255,0.18); border-radius: 9px; cursor: pointer; flex: none; }
.hamburger span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.site-header.menu-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.menu-open .hamburger span:nth-child(2) { opacity: 0; }
.site-header.menu-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown menu opened by the hamburger */
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; display: none; background: var(--navy); border-top: 1px solid var(--navy-line); box-shadow: 0 14px 34px rgba(10,19,33,.35); }
.site-header.menu-open .menu-panel { display: block; }
.menu-panel .wrap { display: flex; flex-direction: column; }
.menu-panel a { padding: 15px 2px; color: var(--on-navy-2); font-weight: 500; border-bottom: 1px solid var(--navy-line); }
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a:hover { color: #fff; text-decoration: none; }

/* ---- Hero (navy) ------------------------------------------------------- */
.hero { position: relative; background: var(--navy); }
.hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 1;             /* ~4:1 on desktop; min-height gives phones room for the overlaid text */
  min-height: 360px;
  background: var(--navy) url("/assets/img/skyline.jpg") center center / cover no-repeat;
  overflow: hidden;
}
/* No full-banner scrim: the image stays clear above and below the text band. */

/* Sniper-target reticles, placed by lib/helpers.php (percent of banner). */
.reticle {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--orange);
  pointer-events: none;
  /* Entrance flashes bright white then settles to orange (runs once); the
     orange pulse starts right after. Per-reticle timing via the two vars. */
  animation-name: reticle-in, reticle-pulse;
  animation-duration: 1.2s, 3.2s;
  animation-timing-function: ease-out, ease-in-out;
  animation-fill-mode: both, none;
  animation-iteration-count: 1, infinite;
  animation-delay: var(--in-delay, 0s), var(--pulse-delay, 1.2s);
  filter: drop-shadow(0 0 6px rgba(255,130,20,0.8));
  z-index: 1;                       /* always under the hero text band */
}
.reticle-svg { display: block; width: 100%; height: auto; }
.r-ring { fill: none; stroke: currentColor; stroke-width: 3.5; opacity: 1; }
.r-tick { stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; }
.r-dot  { fill: currentColor; }

/* Flash bright white on arrival, then fade into the orange. */
@keyframes reticle-in {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4);  color: #ffffff; }
  45%  { opacity: 1; transform: translate(-50%, -50%) scale(1.18); color: #ffffff; }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1);   color: var(--orange); }
}
@keyframes reticle-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .reticle { animation: none; opacity: 1; color: var(--orange); }
}

/* Copy overlays the skyline, centered, on a band only as tall as the text. */
.hero-copy { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 0; z-index: 3; --hero-fs: clamp(1.3rem, 6.6vw, 3.3rem); }
.hero-band { width: 100%; background: rgba(10,19,33,0.64); padding: 1.1rem 0; }
.hero-title { font-family: var(--font-mono); font-weight: 500; font-size: var(--hero-fs); color: var(--orange); margin: 0; text-align: center; text-transform: uppercase; white-space: nowrap; text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.hero-sub { font-size: calc(var(--hero-fs) * 0.72); color: var(--silver); margin: .4rem 0 0; font-family: var(--font-head); font-weight: 500; text-align: center; text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.hero-sub .nb { white-space: nowrap; }
.hero-sub .nb:first-child { margin-right: .55em; }   /* extra gap between the two sentences */
.hero-sub .w { color: #fff; }

/* Mobile hero: a square, zoomed crop with its own fewer, larger reticles. */
.reticle-m { display: none; }
@media (max-width: 640px) {
  .hero-banner { background-image: url("/assets/img/skyline-mobile.jpg"); aspect-ratio: 1 / 1; min-height: 0; }
  .reticle-d { display: none; }
  .reticle-m { display: block; }
}

/* ---- Content sections (LIGHT by default) ------------------------------- */
/* Slim navy band between the hero and the page body */
.band { background: var(--navy-2); padding: clamp(16px, 2.6vw, 26px) 0; border-bottom: 1px solid var(--navy-line); }
.band p { max-width: var(--measure); margin: 0 auto; text-align: justify; color: var(--on-navy); font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.5; }

.pitch { background: var(--bg); padding: clamp(48px, 7vw, 92px) 0; border-bottom: 1px solid var(--line); }
.pitch.pitch-short-bottom { padding-bottom: clamp(24px, 3.5vw, 46px); }   /* half the usual gap, above the clients strip */
/* A heading with style="--fit:N" (N = its one-line width in em, +5%) shrinks on narrow phones to stay on one line. */
.pitch > .wrap, .contact-section > .wrap { container-type: inline-size; }   /* cqi = the text column width */
.pitch-h1 { font-size: min(clamp(2rem, 4.5vw, 3.1rem), calc((100vw - 2 * var(--pad)) / var(--fit, .01))); font-size: min(clamp(2rem, 4.5vw, 3.1rem), calc(100cqi / var(--fit, .01))); color: var(--ink); text-align: center; }
.pitch-sub { color: var(--orange-deep); font-size: min(1rem, calc((100vw - 2 * var(--pad)) / 30.3)); font-size: min(1rem, calc(100cqi / 30.3)); text-transform: uppercase; letter-spacing: .18em; margin: 0 0 2rem; text-align: center; }

.prose { max-width: var(--measure); margin: 0 auto; }
.prose p { color: var(--text); margin-bottom: 1.3em; text-align: justify; }
/* Closing callout lines: one line each at every width - the size scales with the
   viewport (sized so the longest line, ~44 characters, fits a 320px phone). */
.prose .prose-callout { text-align: center; color: var(--ink); font-weight: 700; font-family: var(--font-head); font-size: clamp(.68rem, 3.4vw, 1.3rem); white-space: nowrap; margin-top: 1.4em; }
.prose .prose-callout { margin-bottom: 0; }
.prose .prose-callout-gap { margin-top: .8em; }    /* closing line sits close under "We build..." */
.svc-list + .prose { margin-top: 3rem; }           /* more room between the bullets and "We build..." */
.prose strong { color: var(--ink); }
.prose em { font-style: italic; }

/* Services list - two centered, left-aligned columns on large screens */
.svc-list { max-width: 680px; margin: 26px auto 0; columns: 2; column-gap: 44px; list-style: none; padding: 0; }
.svc-list li { break-inside: avoid; position: relative; padding: 10px 0 10px 24px; color: var(--text); border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.svc-list li::before { content: "\25B8"; position: absolute; left: 2px; color: var(--orange-deep); }
@media (max-width: 640px) { .svc-list { columns: 1; max-width: 420px; } }

/* Navy band variant of a section */
.pitch.dark { background: var(--navy); border-bottom-color: var(--navy); }
.pitch.dark .pitch-h1 { color: #fff; }
.pitch.dark .pitch-sub { color: var(--orange-soft); }
.pitch.dark .prose p { color: var(--on-navy-2); }
.pitch.dark .prose strong, .pitch.dark .prose-callout { color: #fff; }
.pitch.dark .svc-list li { color: #D6E0EC; border-bottom-color: rgba(255,255,255,0.12); }
.pitch.dark .svc-list li::before { color: var(--orange-soft); }

.page-head { background: var(--bg); padding: clamp(46px, 7vw, 88px) 0 8px; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--ink); }
.page-head-center { text-align: center; }
.page-head-center .btn { margin-top: 10px; }

.section-title { font-size: min(clamp(1.7rem, 3.4vw, 2.3rem), calc((100vw - 2 * var(--pad)) / var(--fit, .01))); font-size: min(clamp(1.7rem, 3.4vw, 2.3rem), calc(100cqi / var(--fit, .01))); color: var(--ink); }
.section-lead { color: var(--text); max-width: 640px; font-size: 1.08rem; }
.page-head-center .section-lead { margin-left: auto; margin-right: auto; }

/* ---- Client logos (slim navy strip, infinite marquee) ------------------ */
/* The track holds the logo list twice and slides left by exactly one copy
   (-50%), so the loop is seamless. Edges fade out via a mask; hovering
   pauses the scroll and lights up the logo under the pointer. */
.clients { background: var(--navy-2); border-bottom: 1px solid var(--navy-line); padding: 22px 0; overflow: hidden; }
.clients-inner { display: flex; align-items: center; gap: 28px; }
.clients-label {
  flex: none;
  margin: 0;
  padding-right: 28px;
  border-right: 1px solid var(--navy-line);
  color: var(--orange-soft);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  line-height: 1.5;
  white-space: nowrap;
}
.marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li { flex: none; height: 54px; display: flex; align-items: center; padding: 0 30px; }  /* padding (not gap) keeps both copies equal width */
.marquee-track img {
  display: block;
  height: var(--h, 30px);
  width: auto;
  opacity: .58;
  transition: opacity .25s ease, transform .25s ease, filter .25s ease;
}
.marquee-track li:hover img { opacity: 1; transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(255,155,71,.45)); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (max-width: 720px) {
  .clients { padding: 16px 0 12px; }
  .clients-inner { flex-direction: column; gap: 8px; }
  .clients-label { padding-right: 0; border-right: 0; font-size: .7rem; }
  .marquee { width: 100%; }
  .marquee-track { animation-duration: 30s; }
  .marquee-track li { padding: 0 20px; height: 46px; }
  .marquee-track img { height: calc(var(--h, 30px) * .82); }
}
/* No motion: show one static, wrapped row of logos. */
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: 6px; }
  .marquee-track .dup { display: none; }
}

/* ---- Contact (blue-tint band, white form card) ------------------------- */
.contact-section { padding: clamp(48px, 7vw, 92px) 0; background: var(--bg-tint); text-align: center; }
.contact-section .section-title { color: var(--ink); }
.contact-section .section-lead { color: #4A5A6E; margin-left: auto; margin-right: auto; }
.contact-form {
  max-width: 340px;
  margin: 26px auto 0;
  background: #fff;
  border: 1px solid #D9E2EC;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(14,26,43,.10);
  text-align: center;
}
.field { margin-bottom: 18px; }
.contact-form .field { text-align: left; margin-bottom: 12px; }   /* labels/inputs left; heading, button, note centered */
.field label { display: block; font-weight: 600; font-size: .92rem; color: var(--text); margin-bottom: 7px; }
.contact-form .field label { font-size: .82rem; margin-bottom: 5px; }
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 12px 13px;
}
.contact-form .field input, .contact-form .field textarea { font-size: .95rem; padding: 9px 11px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,122,24,0.18); }
.field textarea { resize: vertical; }
.field-captcha strong { color: var(--orange-deep); }
.field label .opt { font-weight: 400; color: var(--text-dim); }

.form-errors { background: #FDECE8; border: 1px solid #F0B7AB; border-radius: 9px; padding: 10px 14px; margin-bottom: 18px; }
.form-errors p { margin: .2em 0; color: #B3301A; font-size: .95rem; }
.form-note { color: var(--text-dim); font-size: .85rem; margin: 12px 0 0; }
.contact-form button[type="submit"] { margin: 18px 0; }   /* extra breathing room above and below the submit button */

/* Honeypot: off-screen, never seen by humans. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Blog teaser (blue-tint band) -------------------------------------- */
.teaser { background: var(--bg-tint); color: var(--text); padding: clamp(48px, 7vw, 84px) 0; }
.teaser .eyebrow { color: var(--orange-deep); text-align: center; }
.teaser-h2 { color: var(--ink); font-size: clamp(1.7rem, 3.4vw, 2.4rem); text-align: center; }
.teaser-lead { color: var(--text); max-width: 620px; margin: 0 auto; text-align: center; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.teaser-card { background: #fff; border: 1px solid #D9E2EC; border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 3px rgba(14,26,43,.05); }
.teaser-card h3 { color: var(--ink); font-size: 1.15rem; margin: 0 0 8px; }
.teaser-card p { color: var(--text); font-size: .95rem; margin: 0 0 14px; }
.teaser-card a { color: var(--orange-deep); font-weight: 600; }
.teaser-card a:hover { color: var(--orange); text-decoration: none; }
@media (max-width: 760px) { .teaser-grid { grid-template-columns: 1fr; } }

/* ---- "Who's getting hacked?" wall (white band, tiles + modal) ---------- */
.hacks { background: var(--bg); padding: clamp(48px, 7vw, 84px) 0; border-top: 1px solid var(--line); }
.hacks-eyebrow { text-align: center; display: flex; align-items: center; justify-content: center; gap: 9px; color: #C0392B; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #E0352B; box-shadow: 0 0 0 0 rgba(224,53,43,.55); animation: live-ping 1.8s ease-out infinite; }
@keyframes live-ping { 0% { box-shadow: 0 0 0 0 rgba(224,53,43,.55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(224,53,43,0); } }
.hacks-h2 { color: var(--ink); font-size: clamp(1.7rem, 3.4vw, 2.4rem); text-align: center; }
.hacks-lead { color: var(--text); max-width: 620px; margin: 0 auto; text-align: center; }
.hacks-note { color: var(--text-dim); font-size: .8rem; text-align: center; margin: 22px 0 0; }

.hacks-wrap { max-width: none; padding: 0 clamp(14px, 2.5vw, 48px); }   /* full browser width */
/* Fixed-height rows; columns grow a little on big screens (about 16 across at 4K). */
.hack-grid {
  --th: 184px; --gap: 12px;
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 7vw, 220px), 1fr));
  grid-auto-rows: var(--th);
}
/* Home page: at most four rows (8 tiles on a phone). The 6px pad keeps hover lift/shadow unclipped. */
.hack-grid-clip { max-height: calc(4 * var(--th) + 3 * var(--gap) + 12px); overflow: hidden; padding: 6px; margin: 26px -6px 0; }
.hack-item { display: flex; min-width: 0; }
.hacks-more { text-align: center; margin: 28px 0 0; }
.hack-item[hidden] { display: none; }
/* /hacks search box */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hack-filter { max-width: 520px; margin: 26px auto 0; text-align: center; }
.hack-filter input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--navy);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352627A' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.6-4.6'/%3E%3C/svg%3E") no-repeat 15px 50% / 18px;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 12px 18px 12px 44px;
  box-shadow: 0 1px 3px rgba(14,26,43,.05); transition: border-color .2s ease, box-shadow .2s ease;
}
.hack-filter input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,122,24,0.18); }
.hack-count { margin: 9px 0 0; font-size: .74rem; letter-spacing: .06em; color: var(--text-dim); }
.hack-none { text-align: center; color: var(--text); margin: 30px 0 0; }
.hack-clear { font: inherit; color: var(--orange-deep); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hacks-full { border-top: 0; }
.hacks-cta { background: var(--bg-tint); padding: clamp(36px, 5vw, 60px) 0; text-align: center; border-top: 1px solid var(--line); }
.hacks-cta p { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.2rem, 2.2vw, 1.5rem); color: var(--ink); margin: 0 0 16px; }
.hack-tile {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 30px 12px 14px;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #D9E2EC;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(14,26,43,.05);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* A red scan line sweeps the tile on hover. */
.hack-tile::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(224,53,43,.10), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.hack-tile:hover, .hack-tile:focus-visible { transform: translateY(-3px); border-color: #F0B7AB; box-shadow: 0 12px 26px -12px rgba(14,26,43,.28); outline: none; }
.hack-tile:hover::after, .hack-tile:focus-visible::after { animation: hack-scan .7s ease-out; }
@keyframes hack-scan { to { left: 120%; } }

.hack-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  color: #B3261E;
  background: #FDECEA;
}
.hack-tag.ai { color: var(--orange-deep); background: #FFF0E3; }
.hack-tile > .hack-tag { position: absolute; top: 10px; left: 10px; }

.hack-logo { height: 52px; display: flex; align-items: center; justify-content: center; width: 100%; }
.hack-logo-img { height: var(--h, 30px); max-width: 100%; width: auto; object-fit: contain; filter: grayscale(1); opacity: .72; transition: filter .25s ease, opacity .25s ease; }
.hack-tile:hover .hack-logo-img, .hack-tile:focus-visible .hack-logo-img { filter: none; opacity: 1; }

/* Agency tiles: building glyph + initials, no seals. */
.hack-mark { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; letter-spacing: .04em; }
.hack-mark svg { width: 26px; height: 26px; fill: currentColor; }
.hack-mark.mark-l { font-size: 1.1rem; gap: 6px; }
.hack-mark.mark-xl { font-size: .92rem; gap: 5px; }
.hack-mark.mark-l svg, .hack-mark.mark-xl svg { width: 20px; height: 20px; flex: none; }
.hack-mark.hack-logo-img { height: auto; filter: none; color: #52627A; }
.hack-tile:hover .hack-mark.hack-logo-img { color: var(--ink); }

.hack-title { font-family: var(--font-head); font-weight: 600; font-size: .86rem; line-height: 1.25; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hack-date { margin-top: auto; padding-top: 4px; font-size: .72rem; color: var(--text-dim); }

/* Cascade in (JS adds .hack-animate, then .is-in when scrolled into view). */
.hack-animate .hack-item { opacity: 0; transform: translateY(14px) scale(.97); }
.hack-animate.is-in .hack-item { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); transition-delay: calc(min(var(--i), 48) * 35ms); }

/* Modal */
.hack-modal {
  width: min(540px, calc(100vw - 32px));
  padding: 26px 26px 22px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 30px 80px rgba(10,19,33,.45);
}
.hack-modal::backdrop { background: rgba(10,19,33,.62); backdrop-filter: blur(3px); }
.hack-modal[open] { animation: hm-in .28s cubic-bezier(.2,.7,.2,1); }
.hack-modal[open]::backdrop { animation: hm-fade .28s ease; }
@keyframes hm-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes hm-fade { from { opacity: 0; } }
.hack-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--text-dim); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.hack-close:hover { background: var(--bg-tint); color: var(--ink); }
.hm-head { display: flex; align-items: center; gap: 16px; padding-right: 30px; margin-bottom: 14px; }
.hm-logo { height: calc(var(--h, 30px) * 1.1); max-width: 160px; width: auto; flex: none; }
.hm-head .hack-mark { font-size: 1.6rem; flex: none; }
.hm-org { margin: 0 0 4px; font-size: 1.25rem; color: var(--ink); }
.hm-meta { margin: 0; font-size: .78rem; color: var(--text-dim); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-title { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--ink); margin: 0 0 8px; }
.hm-story { font-size: .97rem; line-height: 1.6; margin: 0 0 14px; }
.hm-sources { font-size: .85rem; color: var(--text-dim); margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.hm-sources a { font-weight: 600; }

@media (max-width: 480px) {
  .hack-grid { grid-template-columns: repeat(2, 1fr); --gap: 10px; --th: 176px; }
  .hack-tile { padding: 28px 8px 12px; }
  .hack-title { font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot, .hack-tile:hover::after, .hack-modal[open], .hack-modal[open]::backdrop { animation: none; }
  .hack-tile:hover { transform: none; }
}

/* ---- Footer (navy) ----------------------------------------------------- */
.site-footer { background: var(--navy); border-top: 1px solid var(--navy-line); padding: 54px 0 26px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer-logo { height: 40px; width: auto; display: block; margin-bottom: 14px; }
.footer-tag { color: var(--on-navy-dim); max-width: 320px; margin: 0; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--on-navy-dim); font-family: var(--font-mono); font-weight: 500; margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { color: var(--on-navy-2); margin-bottom: 8px; font-size: .96rem; }
.footer-col a { color: var(--on-navy-2); }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--navy-line); color: var(--on-navy-dim); font-size: .85rem; }
.footer-bottom .mono { color: var(--on-navy-dim); }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
/* Compact header on phones (design floor 360px; still usable at 320). */
@media (max-width: 480px) {
  .wrap { --pad: 14px; }
  .pitch-sub { letter-spacing: .06em; font-size: min(1rem, calc((100vw - 2 * var(--pad)) / 25.6)); font-size: min(1rem, calc(100cqi / 25.6)); }
  .header-inner { gap: 8px; }
  .brand-logo { height: 42px; }
  .header-actions { gap: 8px; }
  .btn-sm { font-size: .8rem; padding: .21em calc(.4em + 4px); }
  .cta-full { display: none; }
  .cta-short { display: inline; }
  .hamburger { width: 40px; height: 36px; gap: 4px; padding: 0 9px; }
  .site-header.menu-open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-header.menu-open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ---- /hacked/<story> pages ---------------------------------------------- */
.hm-more { margin: 16px 0 0; }
.story { background: var(--bg); padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 7vw, 84px); }
.story-wrap { max-width: 760px; }
.story-crumbs { font-size: .74rem; letter-spacing: .04em; color: var(--text-dim); margin: 0 0 26px; }
.story-crumbs a { color: var(--text-dim); }
.story-crumbs span[aria-hidden] { margin: 0 6px; opacity: .6; }
.story-head { text-align: center; margin-bottom: 26px; }
.story-logo { height: 76px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.story-logo-img { height: calc(var(--h, 30px) * 1.6); max-width: 260px; width: auto; object-fit: contain; }
.story-logo .hack-mark { font-size: 2rem; color: var(--ink); }
.story-logo .hack-mark svg { width: 34px; height: 34px; }
.story-meta { display: flex; gap: 12px; align-items: center; justify-content: center; font-size: .8rem; color: var(--text-dim); margin: 16px 0 0; }
.story-title { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin: 0 0 6px; }
.story-org { color: var(--text-dim); margin: 0; }
.story-label { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 8px; }
.story-summary { background: var(--bg-tint); border-left: 3px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 0 0 28px; }
.story-summary p:last-child { margin: 0; font-size: 1.04rem; color: var(--ink); }
.story-body p { margin: 0 0 1.1em; line-height: 1.7; }
.story-sources { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 20px; }
.story-sources ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.story-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.story-nav-link { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: .92rem; }
.story-nav-link .mono { font-size: .7rem; color: var(--text-dim); letter-spacing: .06em; }
.story-nav-older { text-align: right; grid-column: 3; }
.story-nav-all { font-size: .78rem; grid-column: 2; }
@media (max-width: 560px) {
  .story-nav { grid-template-columns: 1fr; text-align: center; }
  .story-nav-older, .story-nav-all { grid-column: auto; text-align: center; }
}
