/* ============================================================
   THE ALGO STUDIO — brand styles
   Bold, blocky, PLAYFUL. Plain CSS, no build step.
   Fonts: Baloo 2 (display/headings) + Space Grotesk (body) via Google Fonts.
   ============================================================ */

/* ---------- Official brand colours ---------- */
:root {
  --signal:     #2E2BD8; /* Signal Blue */
  --hivis:      #C6F23E; /* Hi-Vis Lime */
  --hottake:    #F5431E; /* Hot Take */
  --engagement: #FF4D8D; /* Engagement (pink) */
  --softlaunch: #BCD7F2; /* Soft Launch (pale blue) */
  --receipts:   #F4ECDD; /* Receipts (cream) */
  --blackout:   #14110F; /* Blackout (never pure black) */

  --maxw: 1140px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 44px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--receipts);          /* default page background */
  color: var(--blackout);               /* default text */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;                   /* belt + braces against tilted/overlapping decor */
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--hivis); color: var(--blackout); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
/* On dark sections, switch the focus ring to lime so it stays high-contrast. */
.cw-blackout :focus-visible,
.site-footer :focus-visible,
.phone :focus-visible { outline-color: var(--hivis); }

/* ---------- Type ---------- */
.display, h1, h2, h3 {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(54px, 10vw, 132px); }
h2 { font-size: clamp(40px, 6.5vw, 86px); }
h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.01em; }

.kicker {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}
.lead { font-size: clamp(18px, 2.1vw, 22px); line-height: 1.5; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; position: relative; }
.section { padding-block: clamp(72px, 10vw, 128px); position: relative; overflow: hidden; }
@media (min-width: 768px) { .wrap { padding-inline: 40px; } }

/* ============================================================
   COLOURWAYS — paired background + text
   ============================================================ */
.cw-signal     { background: var(--signal);     color: var(--hivis); }
.cw-softlaunch { background: var(--softlaunch);  color: var(--hottake); }
.cw-hottake    { background: var(--hottake);     color: var(--receipts); }
.cw-blackout   { background: var(--blackout);    color: var(--hivis); }
.cw-engagement { background: var(--engagement);  color: var(--signal); }
.cw-hivis      { background: var(--hivis);       color: var(--signal); }
.cw-receipts   { background: var(--receipts);    color: var(--blackout); }

.wrap > * { position: relative; z-index: 1; }

/* ---------- Buttons — chunky rectangles, never pills ---------- */
.btn {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), opacity .15s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: scale(.96); }

.btn-lime  { background: var(--hivis);    color: var(--signal); }
.btn-blue  { background: var(--signal);   color: var(--hivis); }
.btn-black { background: var(--blackout); color: var(--hivis); }
.btn-cream { background: var(--receipts); color: var(--blackout); }
.btn-hot   { background: var(--hottake);  color: var(--receipts); }
.btn-pink  { background: var(--engagement); color: var(--receipts); }

.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
/* Ghost buttons fill on hover (no opacity fade - keeps colours full strength, BRAND.md rule 3) */
.btn-ghost-lime { color: var(--hivis); }
.btn-ghost-lime:hover { background: var(--hivis); color: var(--signal); }
.btn-ghost-ink { color: var(--blackout); }
.btn-ghost-ink:hover { background: var(--blackout); color: var(--receipts); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Stickers / badges (chunky rectangles, never pills) ---------- */
.sticker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Baloo 2", sans-serif; font-weight: 800;
  font-size: 15px; line-height: 1;
  padding: 9px 16px; border-radius: 10px;
  background: var(--hivis); color: var(--signal);
  box-shadow: 3px 3px 0 var(--blackout);
  transform: rotate(-3deg);
}
.sticker--pink   { background: var(--engagement); color: var(--receipts); }
.sticker--blue   { background: var(--signal);     color: var(--hivis); }
.sticker--cream  { background: var(--receipts);   color: var(--blackout); }
.sticker:hover { animation: wiggle .5s ease; }

/* ---------- Micro-animations ---------- */
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  25% { transform: rotate(3deg); }
  50% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}
@keyframes float-soft {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--rot, 0deg)); }
}
.pop { transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease; }
.pop:hover { transform: translateY(-6px) scale(1.02); }

/* Scroll reveal (progressive enhancement — only hides when JS is on) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Header / nav — simple, bold cream bar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--receipts);
  border-bottom: 3px solid var(--blackout);
}
/* Full-width nav: brand pinned hard left, links + button pinned hard right */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px;
}
@media (min-width: 768px) { .nav { padding: 16px 28px; } }

.brand { display: flex; flex-direction: column; gap: 1px; text-decoration: none; line-height: 1; }
.brand-mark {
  font-family: "Baloo 2", sans-serif; font-weight: 800;
  font-size: 36px; line-height: 1; color: var(--signal); letter-spacing: -0.02em;
}
.brand-word {
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: 12px; line-height: 1.1; color: var(--blackout); letter-spacing: 0.02em;
  margin-top: 3px;
}
.brand:hover .brand-mark { color: var(--hottake); transition: color .15s ease; }

.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: none; align-items: center; gap: 28px; }
.nav-links a {
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 16px;
  text-decoration: none; color: var(--blackout);
  padding-bottom: 3px; border-bottom: 3px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover { color: var(--hottake); border-bottom-color: var(--hottake); }
.nav-cta { font-size: 16px; padding: 12px 22px; }
.nav-cta:hover { transform: translateY(-2px) scale(1.03); }
@media (min-width: 720px) { .nav-links { display: flex; } }

/* ---------- Editorial accents (hero + studio) ---------- */
/* Lime accent: a small tag, the only place lime appears in these sections. */
.eyebrow {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em;
  background: var(--hivis); color: var(--blackout);
  padding: 7px 12px; border-radius: 6px;
}
.diff { color: var(--hottake); font-weight: 600; }          /* the one differentiator */
.brand-blue { color: var(--signal); font-weight: 600; }     /* the brand name only */

.btn-ink { background: var(--blackout); color: var(--receipts); }

/* ---------- Hero — LOCKED: Signal Blue background + Hi-Vis Lime text (BRAND.md rule 1) ---------- */
.hero {
  background: var(--signal); color: var(--hivis);
  padding-block: clamp(72px, 12vw, 150px);
  position: relative; overflow: hidden;
}
.hero-inner { max-width: none; text-align: left; }
/* Eyebrow in the hero is plain Lime text (no box / tag) */
.hero .eyebrow {
  display: inline-block; margin-bottom: 24px;
  background: none; padding: 0; border-radius: 0;
  color: var(--hivis);
}
/* Headline runs wide, left to right, on two long lines */
.hero h1 {
  color: var(--hivis); max-width: none;
  font-size: clamp(40px, 7vw, 88px); line-height: 1.0;
}
.hero .lead {
  margin-top: 28px; max-width: 60ch; color: var(--hivis);
  font-size: clamp(18px, 2vw, 21px); line-height: 1.6;
}
.hero .lead strong { color: var(--hivis); font-weight: 700; }
.hero .btn-row { margin-top: 40px; justify-content: flex-start; }

/* ---------- Marquee strip ---------- */
.strip { border-block: 3px solid var(--blackout); overflow: hidden; padding-block: 14px; }
.strip-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip-track span {
  display: flex; align-items: center; gap: 36px; padding-inline: 26px;
  font-family: "Baloo 2", sans-serif; font-weight: 800;
  font-size: clamp(20px, 2.6vw, 30px); text-transform: uppercase;
  white-space: nowrap; letter-spacing: -0.01em;
}
.strip-track .dot { color: var(--hottake); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section heads ---------- */
.section-head .kicker { display: block; margin-bottom: 16px; }
.section-head h2 { max-width: 15ch; }
.section-head p { margin-top: 18px; max-width: 52ch; font-size: 18px; }

/* ---------- Services — six bold colour-block cards ---------- */
.services-grid { display: grid; gap: 18px; margin-top: 52px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.services-grid > :nth-child(2) { transition-delay: .06s; }
.services-grid > :nth-child(3) { transition-delay: .12s; }
.services-grid > :nth-child(4) { transition-delay: .18s; }
.services-grid > :nth-child(5) { transition-delay: .24s; }
.services-grid > :nth-child(6) { transition-delay: .30s; }
.service {
  border-radius: var(--radius-lg); padding: 32px 28px;
  display: flex; flex-direction: column; min-height: 270px;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}
.service:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px rgba(20,17,15,0.28); }
.service .num { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 48px; line-height: 1; }
.service h3 { margin-top: 14px; }
.service p { margin-top: 12px; font-size: 16px; line-height: 1.55; }

/* ---------- Studio / About — cream, editorial two-column ---------- */
.about-section { background: var(--softlaunch); color: var(--blackout); }
.about { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .about { grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; } }
/* Plain-text eyebrow in the studio section (no box). Hot Take stays readable on cream. */
.about-head .eyebrow {
  margin-bottom: 22px;
  background: none; padding: 0; border-radius: 0;
  color: var(--hottake);
}
.about-head h2 { color: var(--hottake); max-width: 12ch; }
.about-body { max-width: 42ch; display: grid; gap: 24px; }
.about-body p { font-size: clamp(17px, 1.9vw, 19px); line-height: 1.7; color: var(--blackout); }

/* ---------- Pull-quote band ---------- */
.quote-band { text-align: center; }
.quote-band p {
  font-family: "Baloo 2", sans-serif; font-weight: 800;
  font-size: clamp(34px, 6.5vw, 80px); line-height: 1.0;
  letter-spacing: -0.02em; max-width: 15ch; margin-inline: auto; text-wrap: balance;
}

/* ============================================================
   SHOWREEL — CSS phone mockup (no Apple imagery)
   ============================================================ */
.showreel { margin-top: 52px; }
.showreel-copy { max-width: 60ch; }
.showreel-copy h3 { font-size: clamp(30px, 4.5vw, 52px); margin: 16px 0 14px; }
.showreel-copy p { max-width: 42ch; font-size: 17px; line-height: 1.6; }

/* Two phones: side by side on desktop, stacked on mobile */
.phones {
  display: grid; gap: 36px; margin-top: 44px;
  grid-template-columns: 1fr; justify-items: center;
}
@media (min-width: 768px) {
  .phones { grid-template-columns: repeat(2, max-content); justify-content: center; gap: 48px; align-items: start; }
}
.phone-block { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 0; }
.phone-label {
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--hivis); text-align: center;
}

/* The phone */
.phone {
  --edge: var(--hivis);
  width: clamp(232px, 74vw, 300px);
  max-width: 100%;
  margin-inline: auto;
  background: var(--blackout);
  border: 3px solid var(--edge);
  border-radius: 46px;
  padding: 12px;
  position: relative;
  box-shadow: 0 26px 60px rgba(20,17,15,0.35);
  animation: float-soft 6s ease-in-out infinite;
}
.phone::before { /* speaker bar on the top bezel — not an Apple notch */
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 5px; border-radius: 3px; background: var(--edge); z-index: 4;
}
.phone-screen {
  position: relative; aspect-ratio: 9 / 16; width: 100%;
  border-radius: 34px; overflow: hidden; background: var(--blackout);
}
.story-bars { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 5; display: flex; gap: 5px; }
.story-bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(244,236,221,0.35); overflow: hidden; }
.story-bar > i { display: block; height: 100%; width: 0; background: var(--receipts); border-radius: 3px; }

.reel-stage { position: absolute; inset: 0; }
.reel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  display: grid; place-items: center; text-align: center; padding: 22px;
}
.reel-slide.active { opacity: 1; }
.reel-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-ph-label {
  font-family: "Baloo 2", sans-serif; font-weight: 800;
  font-size: clamp(18px, 5vw, 24px); line-height: 1.1; z-index: 1;
}
.reel-ph-tag {
  position: absolute; bottom: 22px; left: 0; right: 0;
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; z-index: 1;
}

/* ---------- Posts phone: Instagram-style swipeable carousel ---------- */
.carousel {
  position: absolute; inset: 0; overflow: hidden;
  cursor: grab; touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.carousel:active { cursor: grabbing; }
.carousel-track { display: flex; height: 100%; width: 100%; }
.carousel-slide { flex: 0 0 100%; height: 100%; }
.carousel-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none; -webkit-user-drag: none;
}
/* Subtle Instagram-style top bar (ink gradient for legibility over photos) */
.ig-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; gap: 8px; padding: 11px 13px;
  background: linear-gradient(to bottom, rgba(20,17,15,0.6), rgba(20,17,15,0));
}
.ig-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--receipts); flex: none;
}
.ig-handle {
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 12.5px;
  color: var(--receipts);
}
/* On the Reels phone the IG bar sits just below the story-progress bars */
.phone--reels .ig-bar { padding-top: 24px; }
.phone--reels .phone-screen { cursor: pointer; }
/* Dot indicators (round dots, not pills) */
.dots {
  position: absolute; bottom: 12px; left: 0; right: 0; z-index: 6;
  display: flex; justify-content: center; gap: 6px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%; padding: 0; border: 0;
  background: rgba(244,236,221,0.45); cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.dot.active { background: var(--receipts); transform: scale(1.35); }

/* ---------- Selected work — bold colour-block case cards ---------- */
.cases { display: grid; gap: 22px; margin-top: 64px; }
@media (min-width: 860px) { .cases { gap: 26px; } }
.case-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 46px);
  display: grid; gap: 16px; align-items: start;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}
@media (min-width: 760px) {
  .case-card { grid-template-columns: auto 1fr; gap: 14px 40px; }
  .case-card > :nth-child(n+2) { grid-column: 2; }
}
.case-card:nth-child(odd)  { transform: rotate(-0.8deg); }
.case-card:nth-child(even) { transform: rotate(0.8deg); }
.case-card:hover { transform: rotate(0deg) translateY(-6px) scale(1.01); box-shadow: 0 24px 50px rgba(20,17,15,0.25); }
.js .case-card.reveal.in:nth-child(odd)  { transform: rotate(-0.8deg); }
.js .case-card.reveal.in:nth-child(even) { transform: rotate(0.8deg); }
.case-index {
  font-family: "Baloo 2", sans-serif; font-weight: 800;
  font-size: clamp(56px, 9vw, 120px); line-height: 0.8;
  grid-row: span 4; align-self: start;
}
@media (max-width: 759px) { .case-index { font-size: 64px; } }
.case-client { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(28px, 4vw, 46px); line-height: 1; }
.case-meta {
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em;
}
.case-card .desc { font-size: 16.5px; line-height: 1.55; max-width: 60ch; }
.result {
  display: block; margin-top: 4px;
  background: var(--blackout); color: var(--hivis);
  border-radius: 16px; padding: 16px 20px; font-size: 16px; line-height: 1.5;
  box-shadow: 4px 4px 0 rgba(20,17,15,0.25);
}
.result b { font-family: "Baloo 2", sans-serif; font-weight: 800; }

/* ---------- Credentials strip ---------- */
.creds { text-align: center; }
.creds .kicker { display: block; color: var(--hottake); }
.creds-line {
  max-width: 72ch; margin: 14px auto 0;
  font-size: 15px; line-height: 1.8; font-weight: 600;
  color: var(--blackout);
}

/* ---------- Contact / form ---------- */
.contact-grid { display: grid; gap: 44px; margin-top: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label {
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em;
}
.field input, .field textarea {
  font-family: "Space Grotesk", sans-serif; font-size: 16px;
  padding: 14px 16px; border-radius: 14px;
  border: 2px solid var(--blackout);
  background: var(--receipts); color: var(--blackout); width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--signal); outline-offset: 1px; }
.form button { margin-top: 6px; justify-self: start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blackout); color: var(--receipts); }
.footer-inner { padding-block: 56px 40px; }
.footer-top {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-end; gap: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 56px; border-radius: 14px; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.footer-brand:hover img { transform: rotate(-6deg) scale(1.06); }
.footer-brand .display { font-size: 30px; color: var(--hivis); }
/* Email + the two social icons sit together in one aligned, evenly-spaced row */
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; color: var(--receipts); font-weight: 500; }
.footer-links a:hover { color: var(--hivis); }
.footer-meta {
  margin-top: 36px; padding-top: 20px;
  border-top: 2px solid var(--hottake);
  font-size: 13px; color: var(--receipts);
}
.footer-copy {
  margin-top: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  color: rgba(244, 236, 221, 0.55); /* slightly muted cream (Receipts) - a neutral, not a vivid brand colour */
}

/* ---------- Social icons (TikTok + Instagram) ---------- */
.socials { display: flex; align-items: center; gap: 12px; }
.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; text-decoration: none;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), color .15s ease;
}
.social svg { width: 24px; height: 24px; display: block; }
.social:hover { transform: translateY(-2px) scale(1.1); }
/* Footer (dark): cream icons, lime on hover - matches the footer links */
.site-footer .social { color: var(--receipts); }
.site-footer .social:hover { color: var(--hivis); }
/* Contact (Engagement pink): Signal Blue icons, Ink on hover */
#contact .social { color: var(--signal); }
#contact .social:hover { color: var(--blackout); }

/* ---------- a11y ---------- */
.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;
}
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--hivis); color: var(--blackout);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; z-index: 100;
}
.skip:focus { left: 16px; top: 16px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip-track, .phone { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .sticker:hover { animation: none; }
  *, *::before, *::after { transition-duration: .001ms !important; }
}
