/* Adtention Media — public site.
   Same palette and type as the client portal, so the two read as one thing. */

:root {
  --ground:      #0C1826;
  --ground-deep: #08111C;
  --card:        #142333;
  --card-hi:     #182A3D;
  --edge:        rgba(255, 255, 255, 0.075);
  --edge-strong: rgba(255, 255, 255, 0.14);
  --ink:         #EDF3F9;
  --ink-soft:    #9CB2C9;
  --ink-faint:   #64809D;
  --accent:      #4C9DE0;
  --accent-soft: #82C5F4;
  --good:        #4FBE8F;
  --r:    14px;
  --r-lg: 20px;
  --maxw: 68rem;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:    "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Archivo, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground-deep);
  background-image:
    radial-gradient(88% 44% at 78% -8%, rgba(37, 110, 172, 0.26) 0%, rgba(37,110,172,0) 62%),
    radial-gradient(66% 38% at 6% 2%, rgba(76, 157, 224, 0.10) 0%, rgba(76,157,224,0) 60%),
    linear-gradient(180deg, var(--ground) 0%, var(--ground-deep) 58%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(var(--maxw), calc(100% - 2.5rem)); margin-inline: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.015em; }

/* ---------- header ---------- */

header.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(8, 17, 28, 0.72);
  border-bottom: 1px solid var(--edge);
}
header.top .wrap { display: flex; align-items: center; gap: 1.5rem; padding: 0.95rem 0; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: #101E2E; border: 1px solid var(--edge-strong);
  display: grid; place-items: center;
}
.brand .mark span { width: 13px; height: 13px; border-radius: 50%; border: 2.3px solid var(--accent); }
.brand strong { font-family: var(--display); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }

nav.links { display: flex; align-items: center; gap: 1.4rem; }
nav.links a {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--ink-faint); text-decoration: none;
}
nav.links a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.62rem 1.15rem; border-radius: 999px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.11em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.btn-primary { background: var(--accent); color: #08111C; font-weight: 700; }
.btn-primary:hover { background: var(--accent-soft); transform: translateY(-1px); }
.btn-ghost { border-color: var(--edge-strong); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }

/* ---------- hero ---------- */

.hero { padding: clamp(4rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 5rem); }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  max-width: 19ch;
  margin-bottom: 1.4rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede {
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 2.2rem;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- shared section furniture ---------- */

/* Clear the sticky header when a nav link jumps to a section. */
section { padding: clamp(3rem, 8vh, 5.5rem) 0; scroll-margin-top: 4.5rem; }
section > .wrap > h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 20ch; }
section > .wrap > p.intro { color: var(--ink-soft); max-width: 54ch; margin: 1rem 0 0; }

.rule { height: 1px; background: var(--edge); border: 0; margin: 0; }

/* ---------- cards ---------- */

.grid { display: grid; gap: 1rem; margin-top: 2.4rem; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.card {
  padding: 1.6rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.card:hover { border-color: var(--edge-strong); background: var(--card-hi); transform: translateY(-2px); }
.card h3 { font-size: 1.06rem; margin-bottom: 0.55rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.card .num {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  color: var(--accent); display: block; margin-bottom: 0.9rem;
}

/* ---------- the weekly rhythm ---------- */

.steps { counter-reset: step; margin-top: 2.4rem; display: grid; gap: 0; }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: 3.4rem 1fr; gap: 1.4rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--edge);
}
.step:last-child { border-bottom: 1px solid var(--edge); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
  padding-top: 0.28rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; max-width: 60ch; }

/* ---------- portal feature ---------- */

.feature {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
}
.feature h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 1rem; }
.feature p { color: var(--ink-soft); margin: 0 0 1.6rem; }
.feature ul { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; gap: 0.6rem; }
.feature li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-soft); font-size: 0.95rem; }
.feature li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: none; margin-top: 0.55rem; }

/* A suggestion of the portal rather than a screenshot of a client's numbers. */
.mock {
  background: var(--ground-deep);
  border: 1px solid var(--edge-strong);
  border-radius: var(--r);
  padding: 1.1rem;
  box-shadow: 0 26px 60px -20px rgba(0,0,0,0.8);
}
.mock .bar { display: flex; gap: 0.35rem; margin-bottom: 1rem; }
.mock .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--edge-strong); }
.mock .tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.mock .tile { background: var(--card); border: 1px solid var(--edge); border-radius: 9px; padding: 0.75rem 0.85rem; }
.mock .tile span {
  display: block; font-family: var(--mono); font-size: 0.52rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.25rem;
}
.mock .tile b { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.mock .spark { margin-top: 0.8rem; height: 54px; }

/* ---------- contact ---------- */

.contact { text-align: center; }
.contact h2 { margin-inline: auto; }
.contact p { color: var(--ink-soft); max-width: 46ch; margin: 1rem auto 2rem; }
.contact .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

/* ---------- footer ---------- */

footer.page {
  border-top: 1px solid var(--edge);
  padding: 2.2rem 0 3rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--ink-faint);
}
footer.page .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
footer.page a { color: var(--ink-faint); text-decoration: none; }
footer.page a:hover { color: var(--ink-soft); }

@media (max-width: 52rem) {
  .feature { grid-template-columns: 1fr; }
  nav.links { display: none; }
  .hero { padding-top: 3.5rem; }
}

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

/* ============================================================
   Motion
   Everything here is decoration. The page is complete and
   readable with all of it switched off — see the reduced-motion
   block at the end, which is not an afterthought but the point.
   ============================================================ */

/* ---------- the hero's living background ---------- */

.hero { position: relative; overflow: hidden; }

.aurora { position: absolute; inset: -30% -10% auto -10%; height: 130%; pointer-events: none; z-index: 0; }
.aurora i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(70px); opacity: 0.5;
  will-change: transform;
}
.aurora i:nth-child(1) {
  width: 46vw; height: 46vw; left: 52%; top: 2%;
  background: radial-gradient(circle, rgba(76,157,224,0.42), rgba(76,157,224,0) 70%);
  animation: drift-a 26s ease-in-out infinite;
}
.aurora i:nth-child(2) {
  width: 34vw; height: 34vw; left: 8%; top: 28%;
  background: radial-gradient(circle, rgba(37,110,172,0.34), rgba(37,110,172,0) 70%);
  animation: drift-b 32s ease-in-out infinite;
}
.aurora i:nth-child(3) {
  width: 26vw; height: 26vw; left: 34%; top: -8%;
  background: radial-gradient(circle, rgba(130,197,244,0.20), rgba(130,197,244,0) 70%);
  animation: drift-c 38s ease-in-out infinite;
}
@keyframes drift-a { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-6%, 5%, 0) scale(1.12); } }
@keyframes drift-b { 0%,100% { transform: translate3d(0,0,0) scale(1.06); } 50% { transform: translate3d(7%, -6%, 0) scale(1); } }
@keyframes drift-c { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(4%, 8%, 0) scale(1.16); } }

/* A faint grid, masked so it fades out before it competes with the text. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 80% at 30% 0%, #000 20%, transparent 72%);
          mask-image: radial-gradient(120% 80% at 30% 0%, #000 20%, transparent 72%);
}
.hero .wrap { position: relative; z-index: 1; }

/* ---------- the headline, arriving a line at a time ---------- */

.hero h1 .ln { display: block; overflow: hidden; }
.hero h1 .ln > span {
  display: block;
  transform: translateY(105%);
  animation: line-up 0.95s cubic-bezier(0.16, 0.9, 0.24, 1) forwards;
}
.hero h1 .ln:nth-child(1) > span { animation-delay: 0.05s; }
.hero h1 .ln:nth-child(2) > span { animation-delay: 0.16s; }
.hero h1 .ln:nth-child(3) > span { animation-delay: 0.27s; }
@keyframes line-up { to { transform: translateY(0); } }

.hero .lede, .hero .actions, .hero .eyebrow { opacity: 0; animation: fade-up 0.8s cubic-bezier(0.16,0.9,0.24,1) forwards; }
.hero .eyebrow { animation-delay: 0.05s; }
.hero .lede    { animation-delay: 0.42s; }
.hero .actions { animation-delay: 0.54s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- the marquee ---------- */

.strip {
  border-block: 1px solid var(--edge);
  padding: 1.1rem 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.strip .track { display: flex; width: max-content; animation: slide 42s linear infinite; }
.strip:hover .track { animation-play-state: paused; }
.strip span {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 1.6rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 1.6rem;
}
.strip span::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: 0.55; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- reveal on scroll ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16,0.9,0.24,1), transform 0.7s cubic-bezier(0.16,0.9,0.24,1);
}
[data-reveal].seen { opacity: 1; transform: none; }
[data-reveal].seen[style*="--d"] { transition-delay: var(--d); }

/* ---------- cards: a light that follows the cursor ---------- */

.card { position: relative; overflow: hidden; }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(16rem circle at var(--mx, 50%) var(--my, 0%), rgba(76,157,224,0.14), transparent 68%);
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover::after { opacity: 1; }

/* ---------- steps: the rule draws itself in ---------- */

.step { position: relative; }
.step::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width 0.5s ease;
}
.step:hover::after { width: 100%; }

/* ---------- the sparkline draws itself ---------- */

.mock .spark path.line { stroke-dasharray: 340; stroke-dashoffset: 340; }
.mock.seen .spark path.line { animation: draw 1.6s cubic-bezier(0.22,0.8,0.3,1) forwards; }
.mock .spark path.fill { opacity: 0; }
.mock.seen .spark path.fill { animation: fade-in 1.2s ease 0.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }

.mock .tile b { transition: color 0.3s ease; }
.mock.seen .tile { animation: tile-in 0.6s cubic-bezier(0.16,0.9,0.24,1) backwards; }
.mock.seen .tile:nth-child(1) { animation-delay: 0.05s; }
.mock.seen .tile:nth-child(2) { animation-delay: 0.13s; }
.mock.seen .tile:nth-child(3) { animation-delay: 0.21s; }
.mock.seen .tile:nth-child(4) { animation-delay: 0.29s; }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- nav underline ---------- */

nav.links a { position: relative; padding-bottom: 2px; }
nav.links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.16,0.9,0.24,1);
}
nav.links a:hover::after { transform: scaleX(1); }

/* ---------- buttons ---------- */

.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,0.42) 50%, transparent 68%);
  transform: translateX(-120%);
}
.btn-primary:hover::before { animation: sheen 0.85s ease; }
@keyframes sheen { to { transform: translateX(120%); } }

/* ============================================================
   Anyone who has asked their system to stop moving things gets
   a completely still page — not a slower one.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .aurora i,
  .strip .track,
  .hero h1 .ln > span,
  .hero .lede, .hero .actions, .hero .eyebrow,
  .mock.seen .spark path.line, .mock.seen .spark path.fill, .mock.seen .tile,
  .btn-primary:hover::before { animation: none !important; }
  .hero h1 .ln > span { transform: none; }
  .hero .lede, .hero .actions, .hero .eyebrow { opacity: 1; }
  .mock .spark path.line { stroke-dashoffset: 0; }
  .mock .spark path.fill { opacity: 1; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .card::after, .step::after, nav.links a::after { transition: none; }
}

/* The header tightens once the hero is behind you. */
header.top { transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease; }
header.top.scrolled { background: rgba(8, 17, 28, 0.9); border-bottom-color: var(--edge-strong); }
header.top.scrolled .wrap { padding-block: 0.68rem; }
header.top .wrap { transition: padding 0.3s ease; }
@media (prefers-reduced-motion: reduce) {
  header.top, header.top .wrap { transition: none; }
}



@media (prefers-reduced-motion: reduce) {
  .chart .area { opacity: 1; }
  .chart .line { stroke-dashoffset: 0; }
  .chart .pts circle, .chart .ends text { opacity: 1; }
  .chart.seen .area, .chart.seen .line, .chart.seen .pts circle, .chart.seen .ends text { animation: none !important; }
}

/* ---------- the hero chart ---------- */

.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy { min-width: 0; }

.hero-chart {
  margin: 0; min-width: 0;
  padding: 1.4rem 1.4rem 1.1rem;
  background: rgba(20, 35, 51, 0.55);
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
  box-shadow: 0 30px 70px -28px rgba(0,0,0,0.85);
  opacity: 0; animation: fade-up 0.9s cubic-bezier(0.16,0.9,0.24,1) 0.5s forwards;
}
.hc-head { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 1.1rem; }
.hc-title { font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.hc-note { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-faint); }

.hero-chart svg { width: 100%; height: clamp(150px, 22vh, 210px); display: block; }
.hc-grid line { stroke: rgba(255,255,255,0.06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hc-line {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 700; stroke-dashoffset: 700;
  animation: draw 2.1s cubic-bezier(0.3,0.7,0.2,1) 0.85s forwards;
}
.hc-area { opacity: 0; animation: fade-in 1.2s ease 1.5s forwards; }
.hc-dot {
  fill: var(--accent-soft); opacity: 0;
  animation: fade-in 0.5s ease 2.5s forwards;
}
.hc-dot { filter: drop-shadow(0 0 10px rgba(130,197,244,0.75)); }

@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-chart { max-width: 30rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-chart, .hc-area, .hc-dot { opacity: 1; animation: none !important; }
  .hc-line { stroke-dashoffset: 0; animation: none !important; }
}

/* ---------- the hero stats, under the chart ---------- */

.hero-right { min-width: 0; }
.hero-stats {
  margin: 1.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.hero-stats > div { padding: 0 1.1rem; border-left: 1px solid var(--edge); }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1;
  color: var(--ink);
}
.hero-stats dd {
  margin: 0.45rem 0 0;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
}
/* Compact figures keep their own rhythm rather than the body's. */
.hero-stats dt { font-variant-numeric: tabular-nums; }

.hero-stats { opacity: 0; animation: fade-up 0.8s cubic-bezier(0.16,0.9,0.24,1) 0.75s forwards; }

@media (max-width: 60rem) {
  .hero-stats { max-width: 30rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stats { opacity: 1; animation: none !important; }
}

/* The admin's own way in — present, but not competing with the client's. */
.adminlink {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); text-decoration: none; padding: 0.3rem 0;
}
.adminlink:hover { color: var(--ink-soft); }
@media (max-width: 40rem) { .adminlink { display: none; } }
