/* ============================================================
   TMA TRIBE — Technology Showcase
   Toyota-inspired theme: white paper, Toyota red accent,
   cinematic dark hero.
   ============================================================ */

:root{
  /* Toyota brand */
  --red:        #EB0A1E;
  --red-dark:   #C10817;
  --red-deep:   #8E0511;

  /* Neutrals */
  --ink:        #0F0F14;
  --ink-2:      #2C2C34;
  --ink-soft:   #5C5C66;
  --ink-faint:  #8B8B95;
  --paper:      #FFFFFF;
  --paper-2:    #F6F6F8;
  --paper-3:    #EDEDF1;
  --line:       #E2E2E8;

  /* Dark surfaces */
  --night:      #0A0A0F;
  --night-2:    #12121A;

  /* AWS accent */
  --aws-orange: #FF9900;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Layout */
  --wrap: 1240px;
  --gutter: 32px;
  --radius: 18px;
  --radius-lg: 24px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  /* Elevation */
  --sh-1: 0 1px 2px rgba(16,16,20,.05), 0 2px 8px rgba(16,16,20,.04);
  --sh-2: 0 4px 12px rgba(16,16,20,.07), 0 16px 40px rgba(16,16,20,.07);
  --sh-3: 0 12px 28px rgba(16,16,20,.12), 0 32px 72px rgba(16,16,20,.12);

  --header-h: 76px;
}

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

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body{
  margin:0;
  font-family:var(--font);
  font-size:17px;
  line-height:1.65;
  color:var(--ink);
  background:var(--paper);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

img,svg,video{ display:block; max-width:100%; }
h1,h2,h3{ margin:0; line-height:1.1; letter-spacing:-.025em; font-weight:800; }
p{ margin:0; }
ul{ margin:0; padding:0; list-style:none; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; }

.wrap{
  width:100%;
  max-width:var(--wrap);
  margin-inline:auto;
  padding-inline:var(--gutter);
}

.skip-link{
  position:absolute; left:-9999px; top:0; z-index:200;
  background:var(--red); color:#fff;
  padding:14px 22px; border-radius:0 0 12px 0; font-weight:700;
}
.skip-link:focus{ left:0; }

:focus-visible{
  outline:3px solid var(--red);
  outline-offset:3px;
  border-radius:6px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:100;
  height:var(--header-h);
  display:flex; flex-direction:column; justify-content:center;
  background:rgba(255,255,255,0);
  transition:background .4s var(--ease), box-shadow .4s var(--ease), backdrop-filter .4s var(--ease);
}

/* Middle state: still over the dark hero, but scrolled. Dark glass keeps
   hero content from colliding with the logo and nav as it passes under. */
.site-header.is-scrolled{
  background:rgba(10,10,15,.72);
  backdrop-filter:saturate(150%) blur(20px);
  -webkit-backdrop-filter:saturate(150%) blur(20px);
  box-shadow:0 1px 0 rgba(255,255,255,.09);
}

/* Past the hero: light glass on light content. */
.site-header.is-past-hero{
  background:rgba(255,255,255,.88);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  box-shadow:0 1px 0 var(--line), 0 6px 24px rgba(16,16,20,.06);
}

.header-inner{
  display:flex; align-items:center; gap:24px;
  height:100%;
}

.brand{ display:flex; align-items:center; gap:16px; flex:0 0 auto; }
.brand-logo{
  width:auto; height:26px;
  /* Hero is dark: start white, flip to red once stuck */
  filter:brightness(0) invert(1);
  transition:filter .4s var(--ease);
}
.site-header.is-past-hero .brand-logo{ filter:none; }

.brand-divider{
  width:1px; height:30px;
  background:rgba(255,255,255,.28);
  transition:background .4s var(--ease);
}
.site-header.is-past-hero .brand-divider{ background:var(--line); }

.brand-text{ display:flex; flex-direction:column; line-height:1.1; }
.brand-name{
  font-weight:900; font-size:19px; letter-spacing:.14em;
  color:#fff; transition:color .4s var(--ease);
}
.brand-sub{
  font-size:10.5px; font-weight:600; letter-spacing:.13em;
  text-transform:uppercase; color:rgba(255,255,255,.6);
  transition:color .4s var(--ease);
}
.site-header.is-past-hero .brand-name{ color:var(--ink); }
.site-header.is-past-hero .brand-sub{ color:var(--ink-faint); }

.site-nav{
  display:flex; align-items:center; gap:4px;
  margin-left:auto;
}
.site-nav a{
  position:relative;
  padding:9px 14px; border-radius:10px;
  font-size:14px; font-weight:600;
  color:rgba(255,255,255,.75);
  transition:color .25s var(--ease), background .25s var(--ease);
  white-space:nowrap;
}
.site-nav a::after{
  content:''; position:absolute; left:14px; right:14px; bottom:4px;
  height:2px; background:var(--red);
  transform:scaleX(0); transform-origin:left;
  transition:transform .3s var(--ease);
}
.site-nav a:hover{ color:#fff; }
.site-nav a:hover::after{ transform:scaleX(1); }
.site-header.is-past-hero .site-nav a{ color:var(--ink-soft); }
.site-header.is-past-hero .site-nav a:hover{ color:var(--ink); background:var(--paper-2); }

.header-cta{ flex:0 0 auto; display:flex; align-items:center; }
.aws-badge{ display:flex; align-items:center; }
.aws-mark{
  width:54px; height:auto;
  color:#fff; transition:color .4s var(--ease);
}
.site-header.is-past-hero .aws-mark{ color:var(--ink); }

.header-progress{
  position:absolute; left:0; bottom:0; height:2px; width:0;
  background:linear-gradient(90deg, var(--red), #FF5A45);
  transition:width .1s linear;
}

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position:relative;
  min-height:min(100svh, 940px);
  display:flex; align-items:center;
  padding:calc(var(--header-h) + 72px) 0 96px;
  background:var(--night);
  color:#fff;
  overflow:hidden;
  isolation:isolate;
}

.hero-bg{ position:absolute; inset:0; z-index:-1; overflow:hidden; }

.orb{
  position:absolute; border-radius:50%;
  filter:blur(90px);
  will-change:transform;
}
.orb-1{
  width:620px; height:620px;
  background:radial-gradient(circle at 30% 30%, rgba(235,10,30,.85), rgba(235,10,30,0) 70%);
  top:-140px; left:-80px;
  animation:drift1 22s var(--ease) infinite alternate;
}
.orb-2{
  width:520px; height:520px;
  background:radial-gradient(circle at 50% 50%, rgba(255,153,0,.42), rgba(255,153,0,0) 70%);
  bottom:-160px; right:-60px;
  animation:drift2 26s var(--ease) infinite alternate;
}
.orb-3{
  width:460px; height:460px;
  background:radial-gradient(circle at 50% 50%, rgba(142,5,17,.7), rgba(142,5,17,0) 70%);
  top:44%; left:52%;
  animation:drift3 30s var(--ease) infinite alternate;
}
@keyframes drift1{ to{ transform:translate3d(90px,70px,0) scale(1.16); } }
@keyframes drift2{ to{ transform:translate3d(-110px,-60px,0) scale(1.1); } }
@keyframes drift3{ to{ transform:translate3d(-70px,60px,0) scale(.88); } }

.grid-overlay{
  position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size:64px 64px;
  mask-image:radial-gradient(ellipse 100% 75% at 50% 40%, #000 35%, transparent 78%);
  -webkit-mask-image:radial-gradient(ellipse 100% 75% at 50% 40%, #000 35%, transparent 78%);
}

.hero-inner{ position:relative; }

.hero-kicker{
  display:inline-flex; align-items:center; gap:11px;
  padding:8px 18px 8px 14px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  backdrop-filter:blur(10px);
  font-size:12.5px; font-weight:700;
  letter-spacing:.15em; text-transform:uppercase;
  color:rgba(255,255,255,.9);
  margin-bottom:34px;
}
.pulse-dot{
  width:8px; height:8px; border-radius:50%;
  background:var(--red);
  box-shadow:0 0 0 0 rgba(235,10,30,.75);
  animation:pulse 2.2s infinite;
}
@keyframes pulse{
  70%{ box-shadow:0 0 0 11px rgba(235,10,30,0); }
  100%{ box-shadow:0 0 0 0 rgba(235,10,30,0); }
}

.hero-title{
  font-size:clamp(66px, 15vw, 190px);
  font-weight:900;
  letter-spacing:-.05em;
  line-height:.86;
  margin-bottom:26px;
  display:flex; flex-wrap:wrap; align-items:baseline; gap:0 .22em;
}
.hero-line-1{
  color:transparent;
  -webkit-text-stroke:2px rgba(255,255,255,.42);
}
.hero-line-2{
  background:linear-gradient(105deg, #fff 8%, #FFD9DD 34%, var(--red) 82%);
  -webkit-background-clip:text; background-clip:text;
  color:transparent;
}

.hero-tagline{
  font-size:clamp(21px, 3vw, 30px);
  font-weight:700; letter-spacing:-.02em;
  color:#fff;
  margin-bottom:20px;
}

.hero-lede{
  max-width:62ch;
  font-size:clamp(16px, 1.6vw, 18.5px);
  color:rgba(255,255,255,.68);
  margin-bottom:40px;
}

.hero-actions{ display:flex; flex-wrap:wrap; gap:14px; margin-bottom:76px; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:16px 30px; border-radius:999px; border:1.5px solid transparent;
  font-size:15.5px; font-weight:700; letter-spacing:-.01em;
  cursor:pointer;
  transition:transform .3s var(--ease-out), box-shadow .3s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-icon{ width:18px; height:18px; flex:0 0 auto; }

.btn-primary{
  background:var(--red); color:#fff;
  box-shadow:0 8px 22px rgba(235,10,30,.36);
}
.btn-primary:hover{
  background:var(--red-dark);
  transform:translateY(-3px);
  box-shadow:0 14px 34px rgba(235,10,30,.46);
}
.btn-ghost{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.26);
  color:#fff;
  backdrop-filter:blur(10px);
}
.btn-ghost:hover{
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.5);
  transform:translateY(-3px);
}

.hero-stats{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:2px;
  margin:0;
  border-top:1px solid rgba(255,255,255,.14);
  padding-top:30px;
  max-width:800px;
}
.stat{ display:flex; flex-direction:column-reverse; gap:5px; }
.stat dt{
  font-size:11.5px; font-weight:600; letter-spacing:.1em;
  text-transform:uppercase; color:rgba(255,255,255,.5);
}
.stat dd{
  margin:0;
  font-size:clamp(34px, 4.4vw, 50px);
  font-weight:900; letter-spacing:-.045em;
  line-height:1;
  color:#fff;
}
.stat:first-child dd{ color:var(--red); }

.scroll-cue{
  position:absolute; left:50%; bottom:28px;
  transform:translateX(-50%);
  width:26px; height:44px;
  display:grid; place-items:center;
}
.scroll-cue-line{
  width:1.5px; height:100%;
  background:linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.6));
  position:relative; overflow:hidden;
}
.scroll-cue-line::after{
  content:''; position:absolute; inset:0;
  background:var(--red);
  animation:cue 2s var(--ease) infinite;
}
@keyframes cue{
  0%{ transform:translateY(-100%); }
  60%,100%{ transform:translateY(100%); }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee{
  background:var(--ink);
  color:rgba(255,255,255,.55);
  padding:16px 0;
  overflow:hidden;
  border-block:1px solid rgba(255,255,255,.08);
}
.marquee-track{
  display:flex; align-items:center; gap:32px;
  width:max-content;
  animation:scrollx 44s linear infinite;
  font-size:13px; font-weight:600;
  letter-spacing:.16em; text-transform:uppercase;
  white-space:nowrap;
}
.marquee .sep{ color:var(--red); font-size:9px; }
@keyframes scrollx{ to{ transform:translateX(-50%); } }

/* ============================================================
   SECTION SHELL
   ============================================================ */
.demos{ padding:110px 0 120px; background:var(--paper); }

.section-head{ max-width:760px; margin-bottom:64px; }

.eyebrow{
  display:flex; align-items:center; gap:12px;
  font-size:12.5px; font-weight:700;
  letter-spacing:.17em; text-transform:uppercase;
  color:var(--red);
  margin-bottom:20px;
}
.eyebrow-bar{ width:36px; height:3px; background:var(--red); border-radius:2px; }

.section-title{
  font-size:clamp(36px, 5.4vw, 62px);
  letter-spacing:-.04em;
  margin-bottom:20px;
}
.section-lede{
  font-size:clamp(16.5px, 1.7vw, 19px);
  color:var(--ink-soft);
  max-width:64ch;
}

/* ============================================================
   GRID + CARDS
   ============================================================ */
.grid{ display:grid; gap:28px; }
.grid-2{ grid-template-columns:repeat(2, minmax(0,1fr)); }
.grid-3{ grid-template-columns:repeat(3, minmax(0,1fr)); }
/* Rows of cards sit apart by the same amount as the cards within a row. */
.grid + .grid{ margin-top:28px; }

.card{
  position:relative;
  display:flex; flex-direction:column;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  overflow:hidden;
  transition:transform .45s var(--ease-out), box-shadow .45s var(--ease), border-color .35s var(--ease);
}
.card::before{
  content:''; position:absolute; inset:0 0 auto 0; height:3px;
  background:linear-gradient(90deg, var(--red), #FF6A52);
  transform:scaleX(0); transform-origin:left;
  transition:transform .5s var(--ease-out);
  z-index:3;
}
.card:hover{
  transform:translateY(-6px);
  box-shadow:var(--sh-3);
  border-color:transparent;
}
.card:hover::before{ transform:scaleX(1); }
.card:focus-within{ box-shadow:var(--sh-2); }

/* --- media --- */
.card-media{
  position:relative;
  aspect-ratio:16/9;
  background:var(--ink);
  overflow:hidden;
}
.card-media img{
  width:100%; height:100%; object-fit:cover; object-position:top center;
  transition:transform .8s var(--ease-out), filter .5s var(--ease);
}
.card:hover .card-media img{ transform:scale(1.045); filter:brightness(.72); }
/* Link cards have no play button to reveal, so keep the screenshot readable. */
.card-link-demo:hover .card-media img{ filter:brightness(.92); }
.card-media::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(10,10,15,.05) 0%, rgba(10,10,15,.42) 100%);
  transition:opacity .5s var(--ease);
}

.play-btn{
  position:absolute; inset:0; margin:auto;
  width:78px; height:78px;
  display:grid; place-items:center;
  border:none; border-radius:50%;
  background:var(--red); color:#fff;
  cursor:pointer; z-index:2;
  box-shadow:0 10px 30px rgba(235,10,30,.5);
  transition:transform .4s var(--ease-out), background .3s var(--ease);
}
.play-btn svg{ width:30px; height:30px; margin-left:4px; }
.play-btn:hover{ transform:scale(1.1); background:var(--red-dark); }
.play-ring{
  position:absolute; inset:-1px; border-radius:50%;
  border:2px solid rgba(255,255,255,.7);
  animation:ring 2.6s var(--ease) infinite;
}
@keyframes ring{
  0%{ transform:scale(1); opacity:.7; }
  100%{ transform:scale(1.55); opacity:0; }
}

.media-badge{
  position:absolute; right:14px; bottom:14px; z-index:2;
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 12px; border-radius:999px;
  background:rgba(10,10,15,.72);
  backdrop-filter:blur(8px);
  color:#fff; font-size:12.5px; font-weight:700;
  font-variant-numeric:tabular-nums;
}
.media-badge svg{ width:11px; height:11px; }

/* --- body --- */
.card-body{
  display:flex; flex-direction:column;
  flex:1;
  padding:30px 30px 32px;
}

.card-top{ display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.card-num{
  font-size:13px; font-weight:900;
  letter-spacing:.06em;
  color:var(--red);
  font-variant-numeric:tabular-nums;
}

.chip{
  display:inline-flex; align-items:center;
  padding:5px 12px; border-radius:999px;
  border:1px solid var(--line);
  background:var(--paper-2);
  font-size:12px; font-weight:600;
  letter-spacing:.01em;
  color:var(--ink-soft);
  white-space:nowrap;
}
.chip-solid{
  background:rgba(235,10,30,.07);
  border-color:rgba(235,10,30,.2);
  color:var(--red-dark);
  font-weight:700;
  letter-spacing:.05em; text-transform:uppercase; font-size:11px;
}

.card-title{
  font-size:clamp(21px, 2.1vw, 26px);
  letter-spacing:-.03em;
  margin-bottom:14px;
}
.card-desc{
  font-size:15.5px;
  color:var(--ink-soft);
  margin-bottom:22px;
}

.chips{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-bottom:26px;
}

.card-link{
  display:inline-flex; align-items:center; gap:9px;
  margin-top:auto;
  font-size:15px; font-weight:700;
  color:var(--red);
  background:none; border:none; padding:0;
  cursor:pointer;
  align-self:flex-start;
}
.link-arrow{
  width:17px; height:17px;
  transition:transform .35s var(--ease-out);
}
.card:hover .link-arrow{ transform:translate(4px,-4px); }
.card-video:hover .link-arrow{ transform:translateX(5px); }
.card-link.as-button:hover{ color:var(--red-dark); }

/* link-demo cards: the whole card is one anchor, stacking media over body */
.card-hit{ display:flex; flex-direction:column; flex:1; }
.card-hit .card-media{ flex:0 0 auto; }
.card-hit .card-body{ width:100%; flex:1; }

/* ============================================================
   CLOSING
   ============================================================ */
.closing{
  background:var(--night);
  color:#fff;
  padding:96px 0 100px;
  position:relative; overflow:hidden;
}
.closing::before{
  content:''; position:absolute;
  width:760px; height:760px; border-radius:50%;
  background:radial-gradient(circle, rgba(235,10,30,.28), transparent 68%);
  top:-45%; left:50%; transform:translateX(-50%);
  filter:blur(70px);
}
.closing-inner{ position:relative; text-align:center; }
.closing-title{
  font-size:clamp(32px, 4.6vw, 54px);
  letter-spacing:-.04em;
  margin-bottom:20px;
}
.closing-lede{
  font-size:clamp(16px,1.7vw,18.5px);
  color:rgba(255,255,255,.66);
  max-width:60ch; margin:0 auto 36px;
}
.closing-actions{ display:flex; justify-content:center; gap:14px; flex-wrap:wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer{
  background:#06060A;
  color:rgba(255,255,255,.55);
  padding:56px 0 60px;
  border-top:1px solid rgba(255,255,255,.08);
}
.footer-inner{ display:grid; gap:28px; }
.footer-brand{ display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.footer-logo{ height:24px; width:auto; opacity:.9; }
.footer-event{
  font-size:13px; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase;
  color:rgba(255,255,255,.6);
}
.footer-links{ display:flex; flex-wrap:wrap; gap:8px 26px; }
.footer-links a{
  font-size:14.5px; font-weight:600; color:rgba(255,255,255,.72);
  transition:color .25s var(--ease);
}
.footer-links a:hover{ color:var(--red); }
.footer-note{
  font-size:12.5px; line-height:1.7;
  color:rgba(255,255,255,.38);
  max-width:96ch;
  padding-top:22px;
  border-top:1px solid rgba(255,255,255,.08);
}

/* ============================================================
   VIDEO MODAL
   ============================================================ */
.modal{
  position:fixed; inset:0; z-index:200;
  display:grid; place-items:center;
  padding:24px;
}
.modal[hidden]{ display:none; }
.modal-backdrop{
  position:absolute; inset:0;
  background:rgba(6,6,10,.86);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  animation:fade .3s var(--ease);
}
@keyframes fade{ from{ opacity:0; } }

.modal-panel{
  position:relative;
  width:min(1180px, 100%);
  max-height:calc(100vh - 48px);
  display:flex; flex-direction:column;
  background:var(--night-2);
  border:1px solid rgba(255,255,255,.12);
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 40px 100px rgba(0,0,0,.6);
  animation:pop .4s var(--ease-out);
}
@keyframes pop{ from{ opacity:0; transform:translateY(18px) scale(.97); } }

.modal-head{
  display:flex; align-items:center; gap:16px;
  padding:18px 22px;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.modal-title{
  font-size:17px; font-weight:700; color:#fff;
  letter-spacing:-.01em;
}
.modal-close{
  margin-left:auto; flex:0 0 auto;
  width:40px; height:40px;
  display:grid; place-items:center;
  border:1px solid rgba(255,255,255,.18);
  border-radius:50%;
  background:rgba(255,255,255,.06);
  color:#fff; cursor:pointer;
  transition:background .25s var(--ease), transform .25s var(--ease-out);
}
.modal-close svg{ width:18px; height:18px; }
.modal-close:hover{ background:var(--red); border-color:var(--red); transform:rotate(90deg); }

.modal-video{ background:#000; min-height:0; }
.modal-video video{
  width:100%;
  max-height:calc(100vh - 190px);
  display:block;
}

.modal-hint{
  padding:12px 22px 16px;
  font-size:13px;
  color:rgba(255,255,255,.5);
}
.modal-hint:empty{ display:none; }

/* ============================================================
   REVEAL
   ============================================================ */
/* Only hide content when JavaScript is available to reveal it again.
   Without the .has-js flag everything stays visible, so a failed or
   blocked script can never leave the page blank. */
.has-js .reveal{
  opacity:0; transform:translateY(26px);
  transition:opacity .75s var(--ease-out), transform .75s var(--ease-out);
}
.has-js .reveal.is-in{ opacity:1; transform:none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Six demo links no longer clear the brand and the AWS mark below about
   1125px, so the nav goes before the cards do. */
@media (max-width:1140px){
  .site-nav{ display:none; }
}
@media (max-width:1080px){
  .grid-3{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .grid-3 > .card:last-child{ grid-column:1 / -1; }
}

@media (max-width:820px){
  :root{ --gutter:22px; --header-h:66px; }
  body{ font-size:16px; }
  .hero{ padding:calc(var(--header-h) + 52px) 0 84px; min-height:auto; }
  .hero-title{ line-height:.9; }
  .hero-stats{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:26px 18px; }
  .grid-2, .grid-3{ grid-template-columns:minmax(0,1fr); }
  .grid-3 > .card:last-child{ grid-column:auto; }
  .demos{ padding:80px 0 88px; }
  .section-head{ margin-bottom:44px; }
  .card-body{ padding:26px 24px 28px; }
  .brand-sub{ display:none; }
  /* Centred sheet rather than a full-height panel, which otherwise leaves
     large dead areas above and below a 16:9 video on a phone. */
  .modal{ padding:16px; }
  .modal-panel{
    width:100%; max-width:none;
    max-height:calc(100svh - 32px);
    border-radius:16px;
  }
  .modal-head{ padding:14px 16px; }
  .modal-title{ font-size:15px; }
  .modal-video video{ max-height:64svh; }
  .modal-hint{ padding:10px 16px 14px; font-size:12.5px; }
}

@media (max-width:520px){
  .hero-actions{ flex-direction:column; align-items:stretch; }
  .btn{ width:100%; }
  .play-btn{ width:62px; height:62px; }
  .play-btn svg{ width:24px; height:24px; }
  .footer-links{ flex-direction:column; gap:12px; }
}

/* ============================================================
   PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
  /* Must match .has-js .reveal specificity to win. */
  .has-js .reveal,
  .has-js .reveal.is-in{ opacity:1; transform:none; }
}

@media print{
  .site-header,.scroll-cue,.marquee,.modal,.play-btn{ display:none !important; }
  .hero,.closing,.site-footer{ background:#fff !important; color:#000 !important; }
  .card{ break-inside:avoid; border:1px solid #ccc; }
}
