/* ==========================================================
   Seb Featherstone — Portfolio
   Colours: #EBFAC2 (lime) / #2F2B36 (ink)
   Fonts: Poppins (headings) / Wix Madefor Text (body)
   ========================================================== */

:root {
  --lime: #EBFAC2;
  --ink: #2F2B36;
  --ink-soft: #43404d;
  --lime-soft: rgba(235, 250, 194, 0.65);
  --font-head: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body: 'Wix Madefor Text', system-ui, -apple-system, sans-serif;
  --radius-card: 24px;
  --pad-x: clamp(20px, 5vw, 72px);
  --max-w: 1280px;
  --panel: #14121a;
  --border: rgba(235, 250, 194, 0.16);
  --text-strong: #fff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--lime);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; }

img { max-width: 100%; display: block; }

a { color: inherit; }

/* ---------- Keyboard focus ---------- */
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible,
.page-hero :focus-visible,
.bg-lime :focus-visible,
.nav.on-lime :focus-visible { outline-color: var(--ink); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translate(-50%, -150%);
  z-index: 200;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.skip-link:focus-visible { transform: translate(-50%, 0); outline-color: var(--lime); }

.container { max-width: var(--max-w); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* ---------- Navigation ---------- */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad-x);
}
.nav.on-lime { color: var(--ink); }
.nav.on-ink { color: var(--lime); }

.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { opacity: 0.5; font-weight: 400; }

.nav-links { display: flex; gap: clamp(16px, 3vw, 40px); align-items: center; }
.nav-links a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after, .nav-links a[aria-current="page"]::after { width: 100%; }

.nav-toggle { display: none; position: relative; z-index: 2; background: none; border: none; cursor: pointer; color: inherit; padding: 9px; }
.nav-toggle svg { width: 26px; height: 26px; }
/* Hamburger becomes an X while the menu is open */
.nav.menu-open .nav-toggle svg { display: none; }
.nav.menu-open .nav-toggle::before,
.nav.menu-open .nav-toggle::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 26px; height: 2px;
  background: currentColor;
}
.nav.menu-open .nav-toggle::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav.menu-open .nav-toggle::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 32px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: none;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); opacity: 0.92; }
.btn-dark { background: var(--ink); color: var(--lime); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-outline { background: transparent; border: 2px solid currentColor; }

/* ---------- Hero (lime) ---------- */
.hero {
  background: var(--lime);
  color: var(--ink);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 120px var(--pad-x) 80px;
}
.hero-inner { max-width: var(--max-w); width: 100%; margin: 0 auto; }
.hero h1 {
  font-size: clamp(3.2rem, 10vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero-rotator {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  margin-top: 12px;
  min-height: 1.4em;
  line-height: 1.4;
}
.hero-rotator .word-wrap {
  display: inline-block;
  overflow: hidden;
  height: 1.4em;
  vertical-align: bottom;
}
.hero-rotator .word {
  display: inline-block;
  font-weight: 700;
}
.hero-rotator .word.slide-out { animation: wordOut 0.4s cubic-bezier(0.55, 0, 0.55, 1) forwards; }
.hero-rotator .word.slide-in { animation: wordTickIn 0.4s cubic-bezier(0.2, 0.6, 0.3, 1); }
@keyframes wordOut {
  to { transform: translateY(-110%); }
}
@keyframes wordTickIn {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}
.hero .btn { margin-top: 40px; }

.hero-socials {
  position: absolute;
  left: var(--pad-x);
  bottom: 36px;
  display: flex;
  gap: 14px;
}
.hero-socials a {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.hero-socials a:hover { transform: scale(1.1); }
.hero-socials svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Section basics ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-title {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.6;
  margin-bottom: 16px;
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.stat h3 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 800; }
.stat p { opacity: 0.75; margin-top: 6px; font-size: 0.95rem; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--lime-soft);
  border-radius: 999px;
  padding: 5px 14px;
  opacity: 0.85;
}
/* ---------- Testimonials ---------- */
.testimonials { background: var(--lime); color: var(--ink); }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
.testimonial {
  background: rgba(47, 43, 54, 0.05);
  border-radius: var(--radius-card);
  padding: clamp(28px, 4vw, 44px);
}
.testimonial blockquote {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
}
.testimonial figcaption { margin-top: 24px; }
.testimonial figcaption strong { font-family: var(--font-head); display: block; }
.testimonial figcaption span { opacity: 0.7; font-size: 0.9rem; }

/* ---------- CTA / footer ---------- */
.cta { text-align: left; }
.cta h2 { font-size: clamp(2.8rem, 7vw, 6rem); font-weight: 800; letter-spacing: -0.02em; }
.cta .btn { margin-top: 40px; }
.cta-meta { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 12px 40px; opacity: 0.8; font-size: 0.95rem; }
.cta-meta a { text-decoration: none; }
.cta-meta a:hover { text-decoration: underline; }

.footer {
  border-top: 1px solid rgba(235, 250, 194, 0.15);
  padding: 28px 0;
  font-size: 0.85rem;
  opacity: 0.65;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}
.footer nav { display: flex; gap: 24px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--lime);
  color: var(--ink);
  padding: clamp(140px, 22vh, 220px) 0 clamp(56px, 8vw, 96px);
}
.page-hero h1 { font-size: clamp(2.8rem, 8vw, 6.5rem); font-weight: 800; letter-spacing: -0.03em; }
.page-hero .lede {
  margin-top: 24px;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  max-width: 62ch;
}

/* ---------- Case studies ---------- */
.case { border-top: 1px solid rgba(235, 250, 194, 0.15); }
.case:first-of-type { border-top: none; }
.case-head h2 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800; }
.case-head .case-sub {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  margin-top: 10px;
  opacity: 0.85;
}
.case-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  margin-top: clamp(28px, 4vw, 48px);
  align-items: start;
}
.case-points { list-style: none; }
.case-points li {
  padding: 16px 0 16px 28px;
  position: relative;
  border-bottom: 1px solid rgba(235, 250, 194, 0.12);
}
.case-points li::before {
  content: '/';
  position: absolute;
  left: 0;
  font-family: var(--font-head);
  font-weight: 700;
  opacity: 0.5;
}
.case-points strong { color: var(--text-strong); font-weight: 600; }
.case-media { display: grid; gap: 20px; }
.video-frame {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #1f1c26;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.case-img { border-radius: var(--radius-card); overflow: hidden; }
.case-img img { width: 100%; height: auto; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.media-grid .case-img img { aspect-ratio: 4 / 3; object-fit: cover; height: 100%; }

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.about-grid .portrait {
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.about-grid .portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-copy p { margin-bottom: 20px; font-size: clamp(1rem, 1.8vw, 1.15rem); opacity: 0.92; }
.about-copy p strong { color: var(--text-strong); font-weight: 600; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.skills-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) {
  .skills-grid.cols-2 { grid-template-columns: 1fr; }
}
.stats-gap { margin-top: clamp(40px, 6vw, 72px); }
.skill-card {
  border: 1px solid rgba(235, 250, 194, 0.18);
  border-radius: var(--radius-card);
  padding: clamp(28px, 4vw, 44px);
}
.skill-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.skill-card p { opacity: 0.85; font-size: 1rem; line-height: 1.65; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.contact-list { list-style: none; margin-top: 8px; }
.contact-list li { padding: 18px 0; border-bottom: 1px solid rgba(47, 43, 54, 0.12); }
.contact-list .label {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.55;
  display: block;
  margin-bottom: 4px;
}
.contact-list a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  text-decoration: none;
}
.contact-list a:hover { text-decoration: underline; }
.contact-list .plain { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.1rem, 2.4vw, 1.5rem); }

/* ---------- Bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, clamp(100px, 13vw, 200px));
  grid-template-areas:
    "val oly oly"
    "thx oly oly"
    "tok tok soon"
    "tok tok hal";
  gap: clamp(12px, 2vw, 24px);
  margin-top: clamp(28px, 4vw, 48px);
}
.bento > div { border-radius: var(--radius-card); overflow: hidden; }
.bento img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.bento > div:hover img { transform: scale(1.04); }
.b-val { grid-area: val; }
.b-thx { grid-area: thx; }
.b-oly { grid-area: oly; }
.b-tok { grid-area: tok; }
.b-soon { grid-area: soon; }
.b-hal { grid-area: hal; }

/* ---------- Full-width scrolling gallery ---------- */
.marquee {
  overflow: hidden;
  width: 100%;
  margin-top: clamp(32px, 5vw, 56px);
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 45s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  width: clamp(260px, 28vw, 420px);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  flex-shrink: 0;
}
.marquee-item img { width: 100%; height: 100%; object-fit: cover; }
@keyframes marquee {
  to { transform: translateX(calc(-50% - 10px)); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .marquee-track { animation: none; }
}

/* ---------- Utilities ---------- */
.page-hero.short { min-height: 70svh; display: flex; align-items: center; }
.case-gap { margin-top: clamp(48px, 7vw, 96px); }
.narrow { max-width: 60ch; opacity: 0.9; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    background: var(--ink);
    color: var(--lime);
    gap: 32px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.6rem; }
  .nav.menu-open { color: var(--lime); }

  .case-body, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, clamp(160px, 28vw, 240px)) repeat(3, clamp(110px, 20vw, 180px));
    grid-template-areas:
      "oly oly"
      "tok tok"
      "val thx"
      "soon hal"
      "soon hal";
  }
  .about-grid .portrait { max-width: 420px; }
}

/* ---------- Case header game icons ---------- */
.case-title { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 24px); }
.case-title img {
  width: clamp(52px, 7vw, 84px);
  height: clamp(52px, 7vw, 84px);
  border-radius: 20px;
  object-fit: cover;
  flex-shrink: 0;
}
.marquee-rev .marquee-track { animation-direction: reverse; }

/* ---------- Project hero image strip ---------- */
.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.5vw, 32px);
  margin-top: clamp(32px, 5vw, 56px);
}
.hero-strip > div {
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.hero-strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .hero-strip { gap: 10px; }
  .hero-strip > div { border-radius: 14px; }
}

/* ---------- Skill card dates ---------- */
.skill-card .dates {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.55;
  margin-bottom: 10px;
}

/* ---------- Logo image ---------- */
.nav-logo img {
  height: clamp(34px, 4vw, 44px);
  width: auto;
  display: block;
}
.nav-toggle { position: relative; z-index: 10; }
.focus-right { object-position: 85% 50%; }


/* ---------- Toolkit ---------- */
.tool-rows { display: grid; gap: clamp(32px, 5vw, 56px); }
.tool-label { font-size: 1.05rem; margin-bottom: 18px; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(235, 250, 194, 0.22);
  border-radius: 999px;
  padding: 12px 22px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
}
.tool-chip img { width: 22px; height: 22px; }

/* ---------- Side quests ---------- */
.quest h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 12px; }
.quest .narrow { margin-bottom: 28px; }
.track-list { list-style: none; }
.track {
  display: grid;
  grid-template-columns: auto 64px 1fr auto;
  position: relative;
  gap: clamp(14px, 2.5vw, 24px);
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(235, 250, 194, 0.12);
}
.track-num { font-family: var(--font-head); font-weight: 700; opacity: 0.4; }
.track-cover { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; }
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-info { display: flex; flex-direction: column; }
.track-info strong { font-family: var(--font-head); font-weight: 600; }
.track-info span { font-size: 0.85rem; opacity: 0.6; }
.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.play-btn:hover { transform: scale(1.08); }
.play-btn svg { width: 20px; height: 20px; fill: currentColor; }
.play-btn .ic-pause { display: none; }
.track.playing .ic-play { display: none; }
.track.playing .ic-pause { display: block; }
.sc-embed {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: 0;
}
.ph { background: linear-gradient(180deg, #d9d4f2 0%, #f0f4e0 100%); }
.wood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 28px); }
.wood-img { aspect-ratio: 3 / 4; border-radius: var(--radius-card); overflow: hidden; }
.wood-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .track { grid-template-columns: 48px 1fr auto; }
  .track-num { display: none; }
  .track-cover { width: 48px; height: 48px; }
  .play-btn { width: 44px; height: 44px; }
  .wood-grid { grid-template-columns: 1fr; }
}
.track-info a { text-decoration: none; }
.track-info a:hover { text-decoration: underline; }

/* ---------- Media placeholder slots ---------- */
.media-slot {
  aspect-ratio: 16 / 9;
  border: 1px dashed rgba(235, 250, 194, 0.35);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  opacity: 0.55;
}
.case-media .tool-chips { margin-bottom: 4px; }

/* ---------- Lime section variant ---------- */
.bg-lime { background: var(--lime); color: var(--ink); }
.bg-lime .about-copy p strong { color: var(--ink); }
.page-hero.tight { padding: clamp(110px, 16vh, 150px) 0 clamp(20px, 3vw, 40px); }
.page-hero.tight + .section { padding-top: clamp(24px, 4vw, 56px); }
.page-hero .stats { margin-top: clamp(28px, 4vw, 48px); }

.strip-top img { object-position: center top; }

/* ---------- Case study closing note ---------- */
.case-note {
  margin-top: clamp(28px, 4vw, 48px);
  border-left: 3px solid var(--lime);
  padding-left: clamp(16px, 2.5vw, 28px);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
  max-width: 62ch;
}

/* ---------- Case study narrative (Sweeper UX) ---------- */
.case-narrative { max-width: 760px; }
.case-narrative.wide { max-width: 1100px; }
.case-lead {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.6;
  opacity: 0.95;
}
.case-narrative p { font-size: clamp(1rem, 1.7vw, 1.12rem); line-height: 1.7; opacity: 0.9; margin-top: 18px; }
.case-narrative p strong { color: var(--text-strong); font-weight: 600; }
.case-step {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  display: inline-block;
  margin-bottom: 14px;
}

/* Annotated UI flow (problem walkthrough) */
.flow {
  --flow-gap: clamp(40px, 4vw, 60px);
  margin-top: clamp(28px, 4vw, 48px);
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: var(--pad-x);
}
.flow-row {
  display: flex;
  align-items: flex-start;
  gap: var(--flow-gap);
  width: 100%;
  padding: 4px 0 14px;
}
.flow-step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.flow-text { display: flex; flex-direction: column; gap: 12px; }
.flow-screen {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  background: var(--panel);
}
.flow-screen img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 16px; }
/* Screen label, sits below the image */
.flow-label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--lime);
  text-align: center;
}
/* Highlight boxes pinned to UI regions */
.hl {
  display: none;
}
.hl-eq        { top: 22%;   left: 5%;  width: 89%; height: 54%; }
.hl-inv-stat  { top: 7%;    left: 9%;  width: 72%; height: 7%; }
.hl-play      { top: 63%;   left: 26%; width: 48%; height: 9%; }
.hl-char      { top: 73.5%; left: 5%;  width: 89%; height: 14%; }
.hl-level-play{ top: 90.5%; left: 5%;  width: 89%; height: 7%; }
/* Annotation callout under a screen */
.flow-note {
  border-top: 2px solid var(--lime);
  padding-top: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  opacity: 0.92;
}
.flow-note strong { color: var(--lime); font-weight: 600; }
/* Flow connector arrows (line + head) sitting in the gaps between screens */
.flow-step[data-arrow="left"] .flow-screen::before,
.flow-step[data-arrow="both"] .flow-screen::before,
.flow-step[data-arrow="right"] .flow-screen::after,
.flow-step[data-arrow="both"] .flow-screen::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 46px;
  height: 18px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 18'%3E%3Cpath d='M1 9h35' stroke='%23EBFAC2' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3Cpath d='M31 3l10 6-10 6' stroke='%23EBFAC2' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.flow-step[data-arrow="right"] .flow-screen::after,
.flow-step[data-arrow="both"] .flow-screen::after {
  left: 100%;
  margin-left: calc((var(--flow-gap) - 46px) / 2);
  transform: translateY(-50%);
}
.flow-step[data-arrow="left"] .flow-screen::before,
.flow-step[data-arrow="both"] .flow-screen::before {
  right: 100%;
  margin-right: calc((var(--flow-gap) - 46px) / 2);
  transform: translateY(-50%) scaleX(-1);
}
@media (max-width: 820px) {
  .flow { width: auto; margin-inline: 0; padding-inline: 0; }
  .flow-row { flex-direction: column; align-items: stretch; gap: 0; overflow-x: visible; }
  .flow-step {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    position: relative;
    padding-bottom: 46px;
  }
  .flow-screen { flex: 0 0 132px; width: 132px; }
  .flow-text { flex: 1 1 auto; }
  .flow-label { text-align: left; }
  /* Replace side arrows with a downward arrow between stacked steps */
  .flow-screen::before, .flow-screen::after { display: none; }
  .flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 66px;
    width: 18px;
    height: 26px;
    transform: translateX(-50%);
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cpath d='M9 1v18' stroke='%23EBFAC2' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3Cpath d='M3 14l6 10 6-10' stroke='%23EBFAC2' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

/* Competitor research 3-up */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
  margin-top: clamp(32px, 4vw, 52px);
}
.research-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: rgba(235, 250, 194, 0.04);
  display: flex;
  flex-direction: column;
}
.research-card .shots {
  display: flex;
  background: var(--panel);
}
.research-card .shots img {
  width: 100%;
  height: auto;
  display: block;
}
.research-card .body { padding: clamp(18px, 2vw, 24px); }
.research-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.research-card .platform {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  display: block;
  margin-bottom: 12px;
}
.research-card p { font-size: 0.95rem; line-height: 1.6; opacity: 0.88; }
.research-card .takeaway {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(235, 250, 194, 0.14);
  font-size: 0.92rem;
}
.research-card .takeaway strong { color: var(--lime); font-weight: 600; }
/* Full-bleed: break the comparison grid out of the 1280px container */
.research-grid--full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-inline: var(--pad-x);
  box-sizing: border-box;
}
@media (max-width: 860px) {
  .research-grid { grid-template-columns: 1fr; }
}

/* Solution screens 3-up */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(32px, 4vw, 52px);
}
.solution-item { display: flex; flex-direction: column; gap: 16px; }
.solution-item .frame {
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
}
.solution-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.solution-item figcaption h3 { font-size: 1.1rem; font-weight: 700; color: var(--lime); margin-bottom: 6px; }
.solution-item figcaption p { font-size: 0.92rem; line-height: 1.6; opacity: 0.88; }
@media (max-width: 760px) {
  .solution-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}

/* Link out to live board */
.board-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 4vw, 40px);
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--lime);
  text-decoration: none;
  border: 1px solid rgba(235, 250, 194, 0.3);
  padding: 12px 20px;
  border-radius: 999px;
  transition: background 0.25s ease;
}
.board-link:hover { background: rgba(235, 250, 194, 0.1); }

/* ---------- Work index grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}
.work-card {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(235, 250, 194, 0.18);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: rgba(235, 250, 194, 0.04);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.work-card:hover { border-color: rgba(235, 250, 194, 0.4); transform: translateY(-4px); }
.work-media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #d9d4f2 0%, #f0f4e0 100%);
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.work-card:hover .work-media img { transform: scale(1.04); }
.work-body { padding: clamp(20px, 2.5vw, 28px); }
.work-card h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; }
.work-sub { margin-top: 6px; font-size: clamp(1rem, 1.6vw, 1.15rem); opacity: 0.8; }
.work-card .work-body .tags { margin-top: 16px; margin-bottom: 0; }
@media (max-width: 820px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ---------- Store buttons ---------- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 4vw, 40px);
}
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-store img { width: 20px; height: 20px; }
