/* ============================================================
   Matthew Ybarra — Portfolio DRAFT
   Terracotta & Sand palette
   ============================================================ */

:root,
[data-palette="terracotta"] {
  --bg: #F4EADB;
  --surface: #FBF4EA;
  --surface-2: #EBDBC6;
  --ink: #2B1A12;
  --muted: #6F5A4B;
  --line: #DCC8B0;
  --media: #C8552D;
  --media-ink: #A8431F;
  --on-media: #FFF6EC;
  --mkt: #2F5D50;
  --mkt-ink: #2F5D50;
  --on-mkt: #F4EADB;
  --pop: #E9A93A;
  --photo-bg: #EFD9BF;
  --video-frame: #2B1A12;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; }
.mono  { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
section { padding: 96px 0; }
@media (max-width: 700px) { section { padding: 64px 0; } }

.eyebrow { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.section-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
  margin: 14px 0 20px;
  letter-spacing: -.01em;
}
.section-title em { font-style: italic; }
.lede { color: var(--muted); max-width: 620px; font-size: 19px; }

/* ---------- draft banner ---------- */
.draft-bar {
  background: var(--pop);
  color: #2A2230;
  text-align: center;
  padding: 6px 16px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--media) 50%, var(--mkt) 50%);
  color: var(--on-media);
  font-family: "Instrument Serif", serif; font-size: 20px; font-style: italic;
  text-decoration: none;
}
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: background .2s;
}
.nav-links a:hover { background: var(--surface-2); }
.nav-links a.is-media { box-shadow: inset 0 -3px 0 var(--media); }
.nav-links a.is-mkt { box-shadow: inset 0 -3px 0 var(--mkt); }
.nav-links a[aria-current="page"] { background: var(--surface-2); }
@media (max-width: 760px) { .nav-links .hide-sm { display: none; } .nav-links a { padding: 8px 10px; font-size: 14px; } }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); }
.hero-meta .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--media); margin-right: 8px; vertical-align: middle; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.hero h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(64px, 13vw, 188px);
  line-height: .86;
  letter-spacing: -.03em;
  margin: 22px 0 10px;
}
.hero h1 em { font-style: italic; }
.hero-title {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.01em;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px; font-weight: 700;
}
.chip.media { background: var(--media); color: var(--on-media); }
.chip.mkt { background: var(--mkt); color: var(--on-mkt); }
.chip.amp { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; font-size: 1.3em; padding: 0; }

.hero-summary { max-width: 760px; color: var(--muted); font-size: 19px; margin-top: 22px; }

/* reel */
.reel {
  position: relative; margin-top: 40px;
  border-radius: 28px; overflow: hidden;
  background: var(--video-frame);
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--ink) 60%, transparent);
}
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel-ui {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between; padding: 22px;
  color: #fff;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 25%, transparent 70%, rgba(0,0,0,.5));
}
.reel-top, .reel-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rec { display: inline-flex; align-items: center; gap: 8px; }
.rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #FF4D4D; animation: blink 1.2s infinite; }
.reel-btn {
  pointer-events: auto; cursor: pointer;
  border: 0; border-radius: 999px; padding: 10px 18px;
  background: rgba(255,255,255,.9); color: #111;
  font: 700 14px "Manrope", sans-serif;
}
.reel-btn:hover { background: #fff; }
.corner { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.7); }
.corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

/* ---------- stats ---------- */
.stats { padding: 0 0 24px; }
.stat-row {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 26px 18px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(36px, 4.4vw, 56px); line-height: 1; }
.stat span { display: block; color: var(--muted); font-size: 14px; margin-top: 8px; }
.stat .tag { margin-top: 12px; display: inline-block; font-size: 10px; padding: 3px 8px; border-radius: 999px; }
.tag.media { background: var(--media); color: var(--on-media); }
.tag.mkt { background: var(--mkt); color: var(--on-mkt); }
@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
}

/* ---------- two doors ---------- */
.doors { display: flex; gap: 16px; min-height: 520px; }
.door {
  position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-between;
  padding: 36px; border-radius: 32px; text-decoration: none; overflow: hidden;
  transition: flex-grow .5s cubic-bezier(.2,.8,.2,1), transform .3s;
}
.door.media { background: var(--media); color: var(--on-media); }
.door.mkt { background: var(--mkt); color: var(--on-mkt); }
.doors:hover .door { flex-grow: .8; }
.doors .door:hover { flex-grow: 1.4; }
.door h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(56px, 8vw, 112px); line-height: .9; margin: 0; letter-spacing: -.02em; }
.door h3 em { font-style: italic; }
.door p { max-width: 380px; font-size: 18px; margin: 14px 0 0; }
.door ul { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.door li { border: 1.5px solid currentColor; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.door .enter { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 18px; }
.door .arrow {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-size: 26px; transition: transform .3s;
}
.door:hover .arrow { transform: rotate(-45deg); }
.door .motif { position: absolute; right: -10px; top: 20px; opacity: .16; pointer-events: none; }
.door .door-top { position: relative; }
@media (max-width: 800px) {
  .doors { flex-direction: column; min-height: 0; }
  .door { min-height: 380px; }
  .doors:hover .door, .doors .door:hover { flex-grow: 1; }
}

/* ---------- experience ---------- */
.exp-list { margin-top: 40px; border-top: 1px solid var(--line); }
.exp {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px;
  padding: 34px 0; border-bottom: 1px solid var(--line);
}
.exp-date { color: var(--muted); padding-top: 6px; }
.exp-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; align-items: baseline; }
.exp h3 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.01em; }
.exp .org { color: var(--muted); font-weight: 600; }
.split-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; width: 180px; background: var(--line); }
.split-bar i { display: block; height: 100%; }
.split-bar .m { background: var(--media); }
.split-bar .k { background: var(--mkt); }
.split-legend { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.exp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.exp-col {
  border-radius: 20px; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); position: relative;
}
.exp-col h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.exp-col h4::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.exp-col.media h4::before { background: var(--media); }
.exp-col.mkt h4::before { background: var(--mkt); }
.exp-col.media h4 { color: var(--media-ink); }
.exp-col.mkt h4 { color: var(--mkt-ink); }
.exp-col ul { margin: 0; padding-left: 18px; }
.exp-col li { margin: 6px 0; font-size: 15.5px; }
.exp-col .go { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14px; }
.exp-col.empty { background: transparent; border-style: dashed; color: var(--muted); }
@media (max-width: 800px) {
  .exp { grid-template-columns: 1fr; gap: 6px; }
  .exp-cols { grid-template-columns: 1fr; }
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 22px 0; background: var(--surface-2); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: scroll 40s linear infinite; }
.marquee-track span { font-family: "Instrument Serif", serif; font-size: clamp(28px, 3.6vw, 44px); white-space: nowrap; }
.marquee-track span:nth-child(odd) { font-style: italic; }
.marquee-track .sep { color: var(--media-ink); font-style: normal; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.photo-stack { position: relative; aspect-ratio: 4/5; }
.photo-stack .p1 {
  position: absolute; inset: 0 22% 8% 0; border-radius: 200px 200px 28px 28px; overflow: hidden;
  background: var(--photo-bg);
}
.photo-stack .p1 img { width: 100%; height: 100%; object-fit: cover; object-position: top; mix-blend-mode: multiply; }
.photo-stack .p2 {
  position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 3/4; border-radius: 22px; overflow: hidden;
  border: 6px solid var(--bg); transform: rotate(4deg);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.4);
}
.photo-stack .p2 img { width: 100%; height: 100%; object-fit: cover; }
.photo-stack .sticker {
  position: absolute; right: 4%; bottom: 40%; z-index: 2; transform: rotate(6deg);
  background: var(--pop); color: #2A2230; padding: 8px 14px; border-radius: 12px; font-weight: 800; font-size: 14px;
}
.edu { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edu div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.edu b { display: block; font-size: 15px; }
.edu span { color: var(--muted); font-size: 14px; }
.edu div:last-child:nth-child(odd) { grid-column: 1 / -1; }
#about .lede + .lede { margin-top: 16px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .photo-stack { max-width: 440px; } }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--bg); border-radius: 40px 40px 0 0; padding: 96px 0 40px; }
.contact .section-title { font-size: clamp(48px, 9vw, 128px); }
.contact .eyebrow { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-weight: 800; text-decoration: none;
  border: 1.5px solid currentColor; transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.fill-media { background: var(--media); color: var(--on-media); border-color: var(--media); }
.btn.fill-mkt { background: var(--mkt); color: var(--on-mkt); border-color: var(--mkt); }
.placeholder-note { opacity: .6; font-size: 11px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 80px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--bg) 20%, transparent); opacity: .7; }

/* ---------- palette switcher ---------- */
.palette-switch {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 8px 6px 14px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.35);
}
.palette-switch .label { color: var(--muted); margin-right: 4px; min-width: 120px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid transparent; outline-offset: 2px;
}
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); }
.swatch[data-p="terracotta"] { background: linear-gradient(135deg, #C8552D 50%, #2F5D50 50%); }
@media (max-width: 520px) { .palette-switch .label { display: none; } }

/* ============================================================
   Door pages (media.html / marketing.html)
   ============================================================ */
.page-hero { padding: 64px 0 48px; position: relative; }
.page-hero .big {
  font-family: "Instrument Serif", serif; font-weight: 400;
  font-size: clamp(80px, 16vw, 220px); line-height: .85; letter-spacing: -.03em; margin: 18px 0 22px;
}
.page-hero .big em { font-style: italic; }
.page-media .page-hero .big em { color: var(--media-ink); }
.page-mkt .page-hero .big em { color: var(--mkt-ink); }
.door-swap {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px;
  font-weight: 700; text-decoration: none; padding: 10px 18px; border-radius: 999px;
}
.page-media .door-swap { background: var(--mkt); color: var(--on-mkt); }
.page-mkt .door-swap { background: var(--media); color: var(--on-media); }

.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.subnav a { text-decoration: none; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); }
.subnav a:hover { border-color: var(--ink); }

.group-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.group-head h2 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(36px, 5vw, 60px); margin: 8px 0 0; line-height: 1; }
.group-head p { color: var(--muted); max-width: 460px; margin: 0; }

/* video cards */
.grid { display: grid; gap: 20px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.vcard { text-decoration: none; display: block; }
.vcard .thumb {
  position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: var(--surface-2);
}
.vcard .thumb img, .vcard .thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.vcard:hover .thumb img, .vcard:hover .thumb video { transform: scale(1.05); }
/* YouTube hover preview: iframe sits over the thumbnail, fades in once loaded */
.vcard .thumb iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  pointer-events: none; opacity: 0; transition: opacity .3s;
  transform: scale(1.35); /* crops YouTube's title bar and logo out of the frame */
}
.vcard .thumb.yt-on iframe { opacity: 1; }
.vcard .thumb .role-tag, .vcard .thumb .viewers { z-index: 2; }
.vcard .thumb::after { z-index: 2; }
.vcard .thumb::after {
  content: "▶"; position: absolute; left: 14px; bottom: 14px;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--media); color: var(--on-media); font-size: 13px;
  transition: transform .3s;
}
.vcard:hover .thumb::after { transform: scale(1.12); }
.vcard .role-tag { position: absolute; right: 12px; top: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 10px; }
.vcard h4 { margin: 12px 0 2px; font-size: 16px; line-height: 1.35; }
.vcard .viewers { position: absolute; right: 12px; bottom: 12px; background: var(--media); color: var(--on-media); padding: 5px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; }
.reel-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 16px; color: var(--muted); }
.reel-caption h3 { margin: 0; color: var(--ink); font-family: "Instrument Serif", serif; font-weight: 400; font-size: 32px; }
.vcard small { color: var(--muted); }

.feature-card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 20px; }
.feature-card .thumb { border-radius: 18px; }
.feature-card .stat-big { font-family: "Instrument Serif", serif; font-size: clamp(56px, 7vw, 96px); line-height: .9; color: var(--media-ink); }
@media (max-width: 800px) { .feature-card { grid-template-columns: 1fr; } }

/* phone reels */
.reels { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.phone {
  flex: 0 0 200px; aspect-ratio: 9/16; border-radius: 28px; padding: 18px; scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: space-between; text-decoration: none;
  border: 6px solid var(--ink); position: relative; overflow: hidden;
  transition: transform .3s;
}
.phone:hover { transform: translateY(-6px) rotate(-1deg); }
.phone:nth-child(4n+1) { background: var(--media); color: var(--on-media); }
.phone:nth-child(4n+2) { background: var(--mkt); color: var(--on-mkt); }
.phone:nth-child(4n+3) { background: var(--pop); color: #2A2230; }
.phone:nth-child(4n+4) { background: var(--surface-2); color: var(--ink); }
.phone h4 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 26px; line-height: 1.05; margin: 0; }
/* phone card with a real thumbnail */
.reel-item { flex: 0 0 200px; text-decoration: none; scroll-snap-align: start; }
.reel-item .phone { width: 100%; }
.reel-item h4 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 22px; line-height: 1.1; margin: 12px 0 4px; }
.reel-item > .mono { color: var(--media-ink); }
.reel-item:hover .phone { transform: translateY(-6px) rotate(-1deg); }
.phone.has-img { background: #000; color: #fff; justify-content: flex-end; gap: 6px; }
.phone.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.phone.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.45), transparent 30%, transparent 50%, rgba(0,0,0,.85)); }
.phone.has-img > *:not(img) { position: relative; z-index: 1; }
.phone.has-img .ig { position: absolute; top: 18px; left: 18px; right: 18px; }
.phone.has-img h4 { text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.phone.has-img .mono { color: var(--media); }
.phone.has-img .ig .mono, .phone.has-img .ig span { color: #fff; }
.phone.has-img:hover img { transform: scale(1.05); }
.mini-tag { display: inline-block; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: var(--media); color: var(--on-media); font-size: 10px; }
/* keep section titles clear of the sticky nav after jumping to them */
section[id], footer[id] { scroll-margin-top: 76px; }
.phone .ig { display: flex; justify-content: space-between; align-items: center; }

/* toolkit */
.toolkit { display: flex; flex-wrap: wrap; gap: 10px; }
.toolkit span { padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.page-media .toolkit span:nth-child(3n+1) { background: var(--media); color: var(--on-media); border-color: transparent; }
.page-mkt .toolkit span:nth-child(3n+1) { background: var(--mkt); color: var(--on-mkt); border-color: transparent; }

/* marketing: positioning + process */
.positioning {
  font-family: "Instrument Serif", serif; font-size: clamp(30px, 3.8vw, 48px); line-height: 1.15; max-width: 1000px; margin: 0;
}
.positioning mark { background: var(--mkt); color: var(--on-mkt); padding: 0 .15em; border-radius: 6px; }
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 48px; counter-reset: step; }
.process div { padding: 22px 18px; border-top: 3px solid var(--mkt); position: relative; }
.process div::before { counter-increment: step; content: "0" counter(step); display: block; color: var(--mkt-ink); font: 600 12px "JetBrains Mono", monospace; letter-spacing: .1em; }
.process b { display: block; font-size: 20px; margin: 6px 0; }
.process span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } }

/* case studies */
.cases { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.case {
  grid-column: span 3; background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  padding: 30px; display: flex; flex-direction: column; gap: 14px; position: relative;
}
.case.wide { grid-column: span 6; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; }
.case.third { grid-column: span 2; }
.case .case-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.case h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.02; margin: 0; }
.case .client { color: var(--muted); }
.case dl { margin: 0; display: grid; gap: 10px; }
.case dt { font: 600 11px "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--mkt-ink); }
.case dd { margin: 0; font-size: 15.5px; }
.case .result {
  margin-top: auto; display: flex; align-items: baseline; gap: 12px; padding-top: 16px; border-top: 1px dashed var(--line);
}
.case .result b { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 48px; line-height: 1; color: var(--mkt-ink); white-space: nowrap; }
.case .result span { color: var(--muted); font-size: 14px; }
.case .status { font-size: 10px; padding: 4px 10px; border-radius: 999px; background: var(--pop); color: #2A2230; }
.case.featured { background: var(--mkt); color: var(--on-mkt); border-color: transparent; }
.case.featured .client, .case.featured .result span { color: inherit; opacity: .75; }
.case.featured dt, .case.featured .result b { color: inherit; }
.case.featured .result { border-color: color-mix(in srgb, var(--on-mkt) 30%, transparent); }
.case.slot {
  background: transparent; border: 2px dashed var(--line); align-items: flex-start; justify-content: center; color: var(--muted);
  min-height: 260px;
}
.case.slot h3 { color: var(--ink); }
.case .site-mock {
  border-radius: 16px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; min-height: 240px;
}
.site-mock .chrome { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.site-mock .chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.site-mock .body { padding: 18px; display: grid; gap: 10px; }
.site-mock .body div { height: 14px; border-radius: 6px; background: var(--surface-2); }
.site-mock .body .hero-blk { height: 90px; background: var(--mkt); opacity: .55; }
.case-link { font-weight: 800; font-size: 15px; }
.site-mock { display: block; position: relative; text-decoration: none; transition: transform .3s; }
.site-mock:hover { transform: translateY(-4px); }
.site-mock .chrome { align-items: center; }
.site-mock .url { margin-left: 10px; color: var(--muted); font-size: 11px; text-transform: none; letter-spacing: 0; }
.site-mock .mock-note { position: absolute; left: 18px; bottom: 14px; color: var(--muted); font-size: 10px; }
.case-fig { margin: 0; align-self: center; border-radius: 16px; overflow: hidden; background: #fff; padding: 10px; }
.case-fig img { width: 100%; height: auto; }

/* mini bar chart (sharing study) */
.minichart { margin: 0; align-self: center; display: grid; gap: 8px; background: color-mix(in srgb, var(--on-mkt) 8%, transparent); border-radius: 18px; padding: 20px; }
.minichart figcaption { margin-bottom: 6px; opacity: .75; }
.minichart .bar { display: grid; grid-template-columns: 96px 1fr 38px; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.minichart .bar i { display: block; height: 14px; border-radius: 0 6px 6px 0; width: calc((var(--v) - 1) / 4 * 100%); }
.minichart .bar.hi i { background: var(--on-mkt); }
.minichart .bar.lo i { background: color-mix(in srgb, var(--on-mkt) 30%, transparent); }
.minichart .bar b { font-family: "JetBrains Mono", monospace; font-size: 12px; text-align: right; }
.minichart .legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; opacity: .8; }
.minichart .legend .k { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.minichart .legend .k.hi { background: var(--on-mkt); }
.minichart .legend .k.lo { background: color-mix(in srgb, var(--on-mkt) 30%, transparent); margin-left: 10px; }

@media (max-width: 900px) {
  .case, .case.third { grid-column: span 6; }
  .case.wide { grid-template-columns: 1fr; }
}

/* reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- marketing: chronological timeline (research → measure) ---------- */
.timeline { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 14px; counter-reset: step; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 2px; background: linear-gradient(90deg, var(--mkt), color-mix(in srgb, var(--mkt) 25%, transparent)); }
.timeline li { position: relative; padding-top: 52px; }
.timeline li::before {
  counter-increment: step; content: "0" counter(step); position: absolute; top: 0; left: 0;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--mkt); color: var(--mkt-ink); font: 600 12px "JetBrains Mono", monospace;
}
.timeline li:not(:last-child)::after { content: "→"; position: absolute; top: 6px; right: 8px; color: var(--mkt-ink); font-weight: 800; background: var(--bg); padding: 0 4px; line-height: 1; font-size: 18px; }
.timeline .when { display: block; color: var(--muted); font-size: 10.5px; margin-bottom: 4px; }
.timeline b { display: block; font-family: "Instrument Serif", serif; font-weight: 400; font-size: 30px; line-height: 1; margin-bottom: 8px; }
.timeline span:not(.when) { color: var(--muted); font-size: 14.5px; display: block; }
.timeline li.lead { background: var(--mkt); color: var(--on-mkt); border-radius: 24px; padding: 22px 22px 24px; }
.timeline li.lead::before { position: static; margin-bottom: 14px; background: var(--on-mkt); color: var(--mkt); border-color: var(--on-mkt); }
.timeline li.lead::after { display: none; }
.timeline li.lead b { font-size: 44px; }
.timeline li.lead .when, .timeline li.lead span { color: inherit; opacity: .85; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 0; padding-left: 0; }
  .timeline::before { left: 17px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--mkt), color-mix(in srgb, var(--mkt) 25%, transparent)); }
  .timeline li { padding: 0 0 28px 56px; }
  .timeline li::after { display: none; }
  .timeline li.lead { margin: 0 0 28px 44px; padding: 20px; }
  .timeline li.lead::before { position: static; }
}

/* ---------- marketing: grouped case studies ---------- */
.case-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; color: var(--muted); margin-top: 28px; font-size: 12px; }
.case-group:first-child { margin-top: 0; }
.case-group span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--mkt); color: var(--on-mkt); }
.case-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Muñoz events: drop-downs with galleries ---------- */
.events { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 26px 30px 12px; }
.events-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 6px; }
.events-head h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 34px; margin: 0; }
.events-head p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 460px; }
.event { border-top: 1px solid var(--line); }
.event summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 20px 0; }
.event summary::-webkit-details-marker { display: none; }
.ev-name { flex: 1; font-family: "Instrument Serif", serif; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.05; }
.ev-name small { display: block; font-family: "Manrope", sans-serif; font-size: 14px; color: var(--muted); margin-top: 4px; }
.ev-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.ev-plus { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink); position: relative; flex: none; transition: transform .3s, background .3s; }
.ev-plus::before, .ev-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.ev-plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity .2s; }
.event[open] .ev-plus { background: var(--mkt); border-color: var(--mkt); color: var(--on-mkt); transform: rotate(180deg); }
.event[open] .ev-plus::after { opacity: 0; }
.event summary:hover .ev-name { color: var(--mkt-ink); }
.ev-body { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 4px 0 28px; }
.ev-info dl { margin: 0; display: grid; gap: 10px; }
.ev-info dt { font: 600 11px "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--mkt-ink); }
.ev-info dd { margin: 0; font-size: 15px; }
.ev-feature { margin-top: 18px; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.ev-feature iframe { width: 100%; height: 100%; border: 0; display: block; }
.gallery { columns: 3 180px; column-gap: 12px; }
.gallery figure { break-inside: avoid; margin: 0 0 12px; }
.gallery img, .gallery video { width: 100%; height: auto; display: block; border-radius: 12px; background: var(--surface-2); }
.gallery a { display: block; }
.gallery figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) { .ev-body { grid-template-columns: 1fr; } .events { padding: 22px 20px 8px; } }

/* ---------- Muñoz events v2: open state, layouts, albums ---------- */
.case.full { grid-column: 1 / -1; }
.event { transition: background .35s ease, padding .35s ease, margin .35s ease, border-radius .35s ease; }
.ev-name { transition: font-size .35s ease, color .2s; }
.event[open] {
  background: var(--media); color: var(--on-media); border-radius: 22px; border-top-color: transparent;
  padding: 0 24px; margin: 10px -16px;
}
.event[open] + .event { border-top-color: transparent; }
.event[open] .ev-name { font-size: clamp(36px, 4.4vw, 58px); color: inherit; }
.event[open] .ev-name small, .event[open] .ev-count, .event[open] .ev-info dt,
.event[open] figcaption, .event[open] .album-label { color: inherit; opacity: .8; }
.event[open] .ev-plus { background: var(--on-media); border-color: var(--on-media); color: var(--media); }
.event[open] .ev-info dd { color: inherit; }

/* Cave: big poster + side column */
.ev-body.ev-cave { grid-template-columns: auto 1fr; align-items: start; }
.ev-poster { margin: 0; }
.ev-poster img { height: min(72vh, 640px); width: auto; max-width: 100%; border-radius: 16px; display: block; box-shadow: 0 24px 50px -24px rgba(0,0,0,.45); }
.ev-poster figcaption { font-size: 12.5px; margin-top: 8px; }
.ev-side { display: flex; flex-direction: column; gap: 32px; min-width: 0; }

/* stacked: full-width video on top, then info + albums */
.ev-body.ev-stacked { display: block; }
.ev-stacked .ev-feature { margin: 0 0 28px; width: 100%; }
.ev-row { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.albums { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

/* albums: overlapping stack, spreads on hover, each card grows on hover */
.album-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.album-label { font-size: 11px; color: var(--muted); }
.album-label::after { content: "  ·  hover to spread"; opacity: .7; }
.album { --h: 180px; display: flex; flex-wrap: wrap; align-items: flex-start; row-gap: 14px; padding: 6px 0 4px 6px; }
.album figure {
  margin: 0; flex: none; position: relative; width: calc(var(--h) * var(--a, .75));
  margin-left: var(--ml, 0px); transform: rotate(var(--r, 0deg)); z-index: var(--z, 1);
  transition: margin-left .5s cubic-bezier(.2,.8,.2,1), transform .35s ease, box-shadow .35s;
}
.album img, .album video { width: 100%; height: var(--h); object-fit: cover; display: block; border-radius: 12px; background: #000; box-shadow: 0 10px 24px -14px rgba(0,0,0,.5); }
.album figcaption { font-size: 12px; margin-top: 6px; line-height: 1.3; opacity: 0; transition: opacity .3s; color: var(--muted); }
.album:hover figure { margin-left: 14px; transform: none; }
.album:hover figure:first-child { margin-left: 0; }
.album:hover figcaption { opacity: 1; }
.event[open] .album figcaption { opacity: 0; }
.event[open] .album:hover figcaption { opacity: .85; }
.album:hover figure:hover { transform: scale(1.14); z-index: 30; }
.album figure.vid { cursor: pointer; }
.album .snd { position: absolute; top: 8px; right: 8px; font: 600 9.5px "JetBrains Mono", monospace; letter-spacing: .06em; text-transform: uppercase; background: rgba(0,0,0,.6); color: #fff; padding: 4px 7px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.album:hover .snd { opacity: 1; }
@media (hover: none) {
  .album figure, .album figure:first-child { margin-left: 0; margin-right: 12px; transform: none; }
  .album figcaption { opacity: 1; }
  .album-label::after { content: ""; }
}
@media (max-width: 860px) {
  .ev-body.ev-cave, .ev-row { grid-template-columns: 1fr; }
  .ev-poster img { height: auto; width: 100%; }
  .event[open] { padding: 0 16px; margin: 10px -8px; }
}

/* ---------- logos in card corners ---------- */
.case-logo {
  position: absolute; left: -16px; bottom: -22px; z-index: 3;
  display: flex; align-items: center; gap: 14px; pointer-events: none;
}
.case-logo img { display: block; width: auto; }
.case-logo .x { font: 400 40px "Instrument Serif", serif; color: var(--muted); line-height: 1; }
.case.has-logo { padding-bottom: 104px; overflow: visible; }
.case.has-logo#nsac .case-top { flex-wrap: wrap; justify-content: flex-start; gap: 8px 12px; }
/* dark backgrounds: sit the logo on a light chip so dark marks stay readable */
.case.featured .case-logo {
  background: #FFFDF8; padding: 12px 18px; border-radius: 18px;
}
.case.featured .case-logo img { filter: none; }
@media (max-width: 560px) {
  .case-logo { left: -10px; bottom: -18px; transform: scale(.72); transform-origin: left bottom; }
  .case.has-logo { padding-bottom: 84px; }
}

/* ---------- logos: homepage experience + media section heads ---------- */
.exp-logo { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.exp-logo img, .sec-logo img { display: block; width: auto; }
.exp-logo .x { font: 400 20px "Instrument Serif", serif; color: var(--muted); line-height: 1; }
.head-with-logo { display: flex; align-items: center; gap: 18px; }
.sec-logo { flex: none; }
@media (max-width: 800px) { .exp-logo { margin-top: 8px; } }
@media (max-width: 520px) { .head-with-logo { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* Muñoz: go-to-market card and its events read as one unit */
#gtm { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
#gtm + .events {
  margin-top: -20px; border-top: 1px dashed var(--line); border-top-left-radius: 0; border-top-right-radius: 0;
  position: relative; background: var(--surface);
}
#gtm + .events .events-head .eyebrow-link { display: block; font: 600 11px "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--mkt-ink); margin-bottom: 6px; }

/* room for logos that bleed past card edges */
.cases { column-gap: 36px; row-gap: 36px; }
.case-group { margin-top: 40px; }
#gtm + .events { margin-top: -36px; }

/* UTSA logo: small, top-right corner (COM 3073 study + R project) */
.case-logo.tr { left: auto; bottom: auto; top: 24px; right: 26px; }
.case.has-logo-tr .case-top { min-height: 40px; padding-right: 200px; }
@media (max-width: 560px) { .case-logo.tr { transform: none; } .case.has-logo-tr .case-top { padding-right: 0; padding-top: 44px; } }

/* ---------- logo style options (draft switcher) ---------- */
.logo-switch button { font: inherit; background: transparent; border: 0; color: inherit; padding: 0 6px; cursor: pointer; opacity: .6; text-decoration: underline; text-underline-offset: 3px; }
.logo-switch button[aria-pressed="true"] { opacity: 1; font-weight: 700; text-decoration: none; background: rgba(0,0,0,.1); border-radius: 6px; }
.lg { display: block; position: relative; isolation: isolate; }
html[data-logo="tint"] .lg { transition: background-color .45s ease; }
.lg img { transition: filter .45s ease, opacity .45s ease; }

/* Tinted: logo recolored in the palette's marketing color; full color on hover */
html[data-logo="tint"] .lg {
  background-color: var(--ink);
  -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat;
}
html[data-logo="tint"] .lg img { mix-blend-mode: luminosity; }
html[data-logo="tint"] .case:hover .lg, html[data-logo="tint"] .exp:hover .lg { background-color: transparent; }

/* Mono: soft grayscale; full color on hover */
html[data-logo="mono"] .lg img { filter: grayscale(1) contrast(1.05); opacity: .7; }
html[data-logo="mono"] .case:hover .lg img, html[data-logo="mono"] .exp:hover .lg img { filter: none; opacity: 1; }

/* Sticker: full-color logo on a tilted cream sticker, like the SXSW sticker in About */
html[data-logo="sticker"] .case-logo:not(.tr), html[data-logo="sticker"] .exp-logo {
  background: #FFFDF8; border: 1.5px solid var(--line); border-radius: 26px; padding: 12px 16px;
  transform: rotate(-5deg); width: max-content;
}
html[data-logo="sticker"] .case-logo:not(.tr) { transform-origin: left bottom; }
html[data-logo="sticker"] .exp-logo { padding: 8px 10px; border-radius: 18px; }
html[data-logo="sticker"] .case:hover .case-logo:not(.tr), html[data-logo="sticker"] .exp:hover .exp-logo { transform: rotate(0deg); }
html[data-logo="sticker"] .case-logo, html[data-logo="sticker"] .exp-logo { transition: transform .45s ease; }

/* the YouTube preview on the 31st Mariachi Extravaganza: clearly marked as not my work */
.ev-credit { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 13.5px; }
.ev-credit .tag { font: 600 10.5px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.ev-stacked .ev-feature + .ev-row { margin-top: 0; }
/* dark palette: logos sit on light chips, so tint them dark */
.ev-impact { margin: 2px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.ev-impact li { font-size: 14.5px; line-height: 1.45; }
.ev-stacked .ev-row { grid-template-columns: minmax(300px, 380px) 1fr; }

/* event captions: only show when that specific image or video is hovered */
@media (hover: hover) {
  .event .album figcaption, .event .album:hover figcaption, .event[open] .album:hover figcaption,
  .event .gallery figcaption, .event .ev-poster figcaption { opacity: 0; transition: opacity .25s ease; }
  .event .album figure:hover figcaption, .event[open] .album figure:hover figcaption,
  .event .gallery figure:hover figcaption, .event .ev-poster:hover figcaption { opacity: .9; }
}

/* case study stat chips */
.case-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.case-chips li { font-size: 10.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid currentColor; opacity: .8; }

/* color-coded toolkit */
.tk-legend { display: flex; flex-wrap: wrap; gap: 18px; margin: -8px 0 18px; color: var(--muted); font-size: 11px; }
.tk-legend .k { display: inline-flex; align-items: center; gap: 8px; }
.tk-legend .k::before { content: ""; width: 12px; height: 12px; border-radius: 4px; }
.tk-legend .k.res::before { background: var(--mkt); }
.tk-legend .k.str::before { background: var(--pop); }
.tk-legend .k.tool::before { background: var(--media); }
.page-mkt .toolkit.coded span:nth-child(n) { border-color: transparent; }
.page-mkt .toolkit.coded span.res { background: var(--mkt); color: var(--on-mkt); }
.page-mkt .toolkit.coded span.str { background: var(--pop); color: #2A2230; }
.page-mkt .toolkit.coded span.tool { background: var(--media); color: var(--on-media); }

/* ---------- Media: articles ---------- */
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .3s ease, border-color .3s; }
.article:hover { transform: translateY(-4px); border-color: var(--media); }
.art-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.art-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.article:hover .art-img img { transform: scale(1.04); }
.art-img .credit { position: absolute; left: 10px; bottom: 10px; font-size: 9.5px; background: rgba(0,0,0,.55); color: #fff; padding: 3px 8px; border-radius: 999px; }
.art-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.art-body .kicker { font-size: 10.5px; color: var(--media-ink); }
.art-body h4 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 28px; line-height: 1.05; margin: 0; }
.art-body p { margin: 0; color: var(--muted); font-size: 14.5px; }
.art-body .read { margin-top: auto; padding-top: 10px; font-size: 10.5px; }
@media (max-width: 900px) { .articles { grid-template-columns: 1fr; } }
.case-group[id] { scroll-margin-top: 90px; }

/* NSAC × Rocket Mortgage stacked in the experience date column */
.exp-logo.stack { flex-direction: column; align-items: flex-start; gap: 4px; }
.exp-logo.stack .x { padding-left: 2px; }

/* hero chips link to their pages */
a.chip { text-decoration: none; transition: transform .2s ease, filter .2s ease; }
a.chip:hover { transform: translateY(-3px) rotate(-1deg); filter: brightness(1.08); }
/* more room between the date and the logo */
.exp-logo { margin-top: 28px; }
@media (max-width: 800px) { .exp-logo { margin-top: 14px; } }
.exp-logo a { display: block; line-height: 0; }

/* ============================================================
   Marketing page: graphic elements
   ============================================================ */
.page-hero, .hero { overflow: hidden; }
.page-hero .wrap, .hero .wrap { position: relative; }
.hero-art { position: absolute; top: 0; right: 0; width: 300px; height: 210px; pointer-events: none; z-index: 0; }
.page-hero .big, .subnav, .page-hero .door-swap, .hero h1, .hero-title, .hero .reel { position: relative; z-index: 1; }
.ha-arc { position: absolute; right: 30px; top: 0; width: 200px; height: 100px; border-radius: 200px 200px 0 0; background: var(--media); }
.ha-block { position: absolute; right: 205px; top: 105px; width: 84px; height: 84px; border-radius: 28px; background: var(--mkt); transform: rotate(-8deg); }
.ha-dots { position: absolute; right: -10px; top: 95px; width: 110px; height: 110px;
  background-image: radial-gradient(var(--ink) 1.6px, transparent 1.8px); background-size: 14px 14px; opacity: .35; }
.ha-badge { position: absolute; right: 45px; top: 20px; width: 180px; height: 180px; animation: ha-spin 40s linear infinite; rotate: calc(var(--sy, 0) * .25deg); }
.ha-badge circle { fill: var(--bg); }
.ha-badge text { font: 700 14.5px "JetBrains Mono", monospace; letter-spacing: .14em; fill: var(--ink); }
.ha-core { position: absolute; right: 104px; top: 79px; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pop); color: #2B1A12; font: 400 34px "Instrument Serif", serif; }
@keyframes ha-spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .hero-art { transform: scale(.72); transform-origin: top right; } }
@media (max-width: 760px) { .hero-art { top: -20px; right: -60px; transform: scale(.5); opacity: .55; } }

/* stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 44px; }
.stat-strip .st { position: relative; overflow: hidden; text-decoration: none; border-radius: 22px; padding: 22px 22px 20px; min-height: 150px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px; transition: transform .3s ease; }
.stat-strip .st:hover { transform: translateY(-4px) rotate(-.6deg); }
.stat-strip .st b { font: 400 clamp(48px, 5.4vw, 72px) "Instrument Serif", serif; line-height: .9; letter-spacing: -.02em; }
.stat-strip .st span { font-size: 14px; line-height: 1.35; max-width: 26ch; }
.stat-strip .st::after { content: ""; position: absolute; right: -26px; top: -26px; width: 90px; height: 90px; border-radius: 50%; border: 14px solid currentColor; opacity: .14; }
.stat-strip .s1 { background: var(--mkt); color: var(--on-mkt); }
.stat-strip .s2 { background: var(--media); color: var(--on-media); }
.stat-strip .s3 { background: var(--pop); color: #2B1A12; }
.stat-strip .s4 { background: var(--ink); color: var(--bg); }
.stat-strip .s2::after { border-radius: 8px; transform: rotate(18deg); }
.stat-strip .s3::after { border-radius: 0; border-width: 0; border-left: 45px solid transparent; border-right: 45px solid transparent; border-bottom: 80px solid currentColor; width: 0; height: 0; }
@media (max-width: 860px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

/* wave dividers between sections */
section:has(> .wave-top) { position: relative; overflow-x: clip; }
.wave-top { position: absolute; left: 0; top: -47px; width: 100%; height: 48px; display: block; }
.wave-top path { fill: var(--surface-2); }
.wave-top.flip { top: 0; transform: scaleY(-1); }
.page-mkt #toolkit { padding-top: 130px; overflow: hidden; }

/* case groups: big outlined number behind the header */
.page-mkt .case-group { position: relative; margin-top: 76px; padding-top: 8px; }
.page-mkt .case-group:first-child { margin-top: 34px; }
.page-mkt .case-group::before { content: attr(data-n); position: absolute; right: -4px; bottom: -10px; z-index: -1;
  font: 400 150px/1 "Instrument Serif", serif; color: transparent; -webkit-text-stroke: 1.5px var(--muted); opacity: .4; letter-spacing: -.04em; pointer-events: none; }
.page-mkt .cases { isolation: isolate; }
.page-mkt .case-group span { width: 36px; height: 36px; font-size: 13px; }

/* dot texture on the case-study section */
.page-mkt #cases { background-image: radial-gradient(color-mix(in srgb, var(--ink) 13%, transparent) 1.2px, transparent 1.4px) !important;
  background-size: 22px 22px !important; background-color: var(--surface-2) !important; }

/* result numbers: hand-drawn underline */
.page-mkt .case .result b { position: relative; padding-bottom: 6px; }
.page-mkt .case .result b::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 10px;
  background: var(--pop);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C 20 2, 35 9, 55 5 S 95 2, 118 6' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C 20 2, 35 9, 55 5 S 95 2, 118 6' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }

/* case cards: pop out as they scroll through the middle of the screen */
.page-mkt .case.reveal { transition: opacity .8s ease, transform .55s cubic-bezier(.2,.8,.2,1.2), box-shadow .55s ease; }
.page-mkt .case.reveal.in.pop:not(.full) { transform: translate(-5px, -5px) rotate(-.4deg); box-shadow: 10px 10px 0 var(--mkt); }
.page-mkt .case.reveal.in.pop.featured { box-shadow: 10px 10px 0 var(--media); }
.page-mkt .case.reveal.in.pop.wide { rotate: .4deg; }
html[data-logo="tint"] .page-mkt .case.pop .lg { background-color: transparent; }
/* NSAC × Rocket Mortgage sits higher so it clears the green block */
.case dd.role { font-weight: 700; }

/* toolkit: floating shapes */
.tk-art span { position: absolute; pointer-events: none; }
.tk-art span:nth-child(1) { right: 6%; top: 90px; width: 120px; height: 120px; border-radius: 50%; border: 18px solid var(--media); opacity: .9; }
.tk-art span:nth-child(2) { right: 14%; bottom: 60px; width: 70px; height: 70px; border-radius: 16px; background: var(--pop); transform: rotate(14deg); }
.tk-art span:nth-child(3) { right: 2%; bottom: 120px; width: 110px; height: 110px;
  background-image: radial-gradient(var(--mkt) 2px, transparent 2.3px); background-size: 14px 14px; }
@media (max-width: 900px) { .tk-art { display: none; } }

@media (prefers-reduced-motion: reduce) { .ha-badge { animation: none; } }

/* ---------- scroll motion (values set by script.js) ---------- */
.ha-arc   { translate: 0 calc(var(--sy, 0) * -.22px); }
.ha-block { translate: calc(var(--sy, 0) * -.12px) calc(var(--sy, 0) * .18px); rotate: calc(var(--sy, 0) * .08deg); }
.ha-dots  { translate: 0 calc(var(--sy, 0) * -.1px); }
.ha-core  { translate: 0 calc(var(--sy, 0) * -.05px); }
.stat-strip .st::after { rotate: calc(var(--p, 0) * 120deg); translate: calc(var(--p, 0) * -24px) calc(var(--p, 0) * 30px); }
.page-mkt .case-group::before { translate: calc(var(--p, 0) * -140px) 0; }
.tk-art span:nth-child(1) { translate: 0 calc(var(--p, 0) * 90px); }
.tk-art span:nth-child(2) { translate: 0 calc(var(--p, 0) * -70px); rotate: calc(var(--p, 0) * -90deg); }
.tk-art span:nth-child(3) { translate: calc(var(--p, 0) * 40px) calc(var(--p, 0) * 50px); }
.wave-top path { transition: none; }
.wave-top { translate: calc(var(--p, 0) * 60px) 0; width: calc(100% + 120px); left: -60px; }
/* reading progress bar */
.scroll-bar { position: fixed; left: 0; top: 0; height: 4px; width: 100%; z-index: 200; transform-origin: left center;
  transform: scaleX(var(--prog, 0)); background: linear-gradient(90deg, var(--mkt), var(--media) 60%, var(--pop)); pointer-events: none; }
.event[id] { scroll-margin-top: 100px; }
@media (prefers-reduced-motion: reduce) {
  .ha-arc, .ha-block, .ha-dots, .ha-core, .ha-badge, .stat-strip .st::after, .page-mkt .case-group::before, .tk-art span, .wave-top, .group-head[data-n]::before, .sb-track, .photo-stack > *, .door .motif { translate: none !important; rotate: none !important; }
}
.page-mkt #cases { overflow-x: clip; }
body { overflow-x: clip; }

/* ---------- lightbox for event media ---------- */
.events figure.zoomable { cursor: zoom-in; }
.events figure.zoomable:focus-visible { outline: 2px solid var(--pop); outline-offset: 3px; }
html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 500; display: grid; grid-template-columns: 70px 1fr 70px; align-items: center;
  background: rgba(20, 12, 8, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease; padding: 24px 12px; }
.lightbox.on { opacity: 1; }
.lightbox[hidden] { display: none; }
.lb-stage { grid-column: 2; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0;
  transform: scale(.96); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.lightbox.on .lb-stage { transform: none; }
.lb-media img, .lb-media video { display: block; max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 12px; background: #000; margin: 0 auto; }
.lb-media { max-width: 100%; }
.lb-cap { color: #F4EADB; font-size: 15px; text-align: center; max-width: 60ch; }
.lb-close { position: absolute; top: 16px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: #F4EADB; color: #2B1A12; font-size: 28px; line-height: 1; }
.lb-nav { width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid rgba(244,234,219,.5); background: transparent; color: #F4EADB;
  font-size: 22px; cursor: pointer; justify-self: center; transition: background .2s, color .2s; }
.lb-nav:hover { background: #F4EADB; color: #2B1A12; }
.lb-prev { grid-column: 1; grid-row: 1; } .lb-next { grid-column: 3; grid-row: 1; } .lb-stage { grid-row: 1; }
.lb-count { position: absolute; top: 28px; left: 24px; color: rgba(244,234,219,.75); font-size: 12px; letter-spacing: .1em; }
.lightbox.single .lb-nav { visibility: hidden; }
@media (max-width: 640px) {
  .lightbox { grid-template-columns: 1fr; padding: 70px 10px 80px; }
  .lb-stage { grid-column: 1; }
  .lb-nav { position: absolute; bottom: 18px; }
  .lb-prev { left: calc(50% - 66px); } .lb-next { right: calc(50% - 66px); }
}

/* Muñoz go-to-market card: text beside a team photo */
#gtm { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
.gtm-text { display: flex; flex-direction: column; gap: 14px; }
.gtm-photo { margin: 0; position: relative; }
.gtm-photo img { display: block; width: 100%; height: auto; border-radius: 16px; }
.gtm-photo figcaption { position: absolute; left: 12px; bottom: 12px; font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); color: var(--ink); }
.gtm-photo.zoomable { cursor: zoom-in; }
@media (max-width: 860px) { #gtm { grid-template-columns: 1fr; } }

/* ============================================================
   Graphic elements shared by Home + Media
   ============================================================ */
/* camera-themed hero art (Media) */
.hero-art.cam .ha-arc { width: 96px; height: 96px; border-radius: 50%; right: 190px; top: -4px; }
.ha-film { position: absolute; right: 190px; top: 110px; width: 120px; height: 66px; border-radius: 8px; background: var(--ink);
  rotate: -12deg; translate: calc(var(--sy, 0) * -.14px) calc(var(--sy, 0) * .16px); }
.ha-film::before, .ha-film::after { content: ""; position: absolute; left: 6px; right: 6px; height: 7px;
  background: repeating-linear-gradient(90deg, var(--bg) 0 7px, transparent 7px 14px); }
.ha-film::before { top: 6px; } .ha-film::after { bottom: 6px; }
.ha-rec { position: absolute; right: 0; top: 6px; font-size: 11px; letter-spacing: .12em; color: var(--media-ink); font-weight: 700;
  animation: blink 1.4s infinite; }
.hero-art.cam .ha-core { font-size: 22px; padding-left: 4px; }

/* scroll band: a strip of words that slides sideways as you scroll */
.scroll-band { position: relative; z-index: 2; overflow: hidden; padding: 34px 0; margin-bottom: -40px; pointer-events: none; }
.sb-track { display: flex; gap: 28px; white-space: nowrap; width: max-content; padding: 14px 0;
  font: 400 clamp(34px, 4.6vw, 60px)/1 "Instrument Serif", serif; }
.sb-track span:nth-child(4n+3) { font-style: italic; }
.sb-track i { font-style: normal; font-size: .55em; align-self: center; opacity: .8; }
.scroll-band .sb-a { background: var(--media); color: var(--on-media); rotate: -2deg; translate: calc(-20% + var(--p, 0) * 30%) 0; }
.scroll-band .sb-b { background: var(--mkt); color: var(--on-mkt); rotate: 1.6deg; translate: calc(-35% - var(--p, 0) * 30%) 0; margin-top: 18px; }

/* big outlined numbers behind Media section headings */
.group-head[data-n] { position: relative; isolation: isolate; }
.group-head[data-n]::before { content: attr(data-n); position: absolute; right: -4px; bottom: -24px; z-index: -1;
  font: 400 170px/1 "Instrument Serif", serif; color: transparent; -webkit-text-stroke: 1.5px var(--muted); opacity: .35;
  letter-spacing: -.04em; pointer-events: none; translate: max(calc(var(--p, 0) * 120px), calc(var(--p, 0) * -120px)) 0; }

/* Media cards pop as they cross the middle of the screen */
.page-media .vcard .thumb, .page-media .reel-item .phone, .page-media .article { transition: transform .55s cubic-bezier(.2,.8,.2,1.2), box-shadow .55s ease, opacity .8s ease; }
.page-media .vcard.pop .thumb { transform: translate(-5px, -5px) rotate(-.5deg); box-shadow: 9px 9px 0 var(--media); }
.page-media .reel-item.pop .phone { transform: translate(-4px, -6px) rotate(-1deg); box-shadow: 8px 8px 0 var(--media); }
.page-media .article.reveal.in.pop { transform: translate(-5px, -5px); box-shadow: 9px 9px 0 var(--mkt); }

/* Home: stats shapes, door motifs, about photos */
.stat-row .stat { position: relative; overflow: hidden; }
.stat-row .stat::after { content: ""; position: absolute; right: -14px; top: -14px; width: 56px; height: 56px; border-radius: 50%;
  border: 9px solid var(--media); opacity: .18; rotate: calc(var(--p, 0) * 140deg); translate: calc(var(--p, 0) * -18px) calc(var(--p, 0) * 22px); }
.stat-row .stat:nth-child(even)::after { border-color: var(--mkt); border-radius: 10px; }
.door .motif { translate: calc(var(--p, 0) * -40px) calc(var(--p, 0) * 60px); rotate: calc(var(--p, 0) * 25deg); }
.photo-stack .p1 { translate: 0 calc(var(--p, 0) * 40px); }
.photo-stack .p2 { translate: 0 calc(var(--p, 0) * -50px); }
.photo-stack .sticker { translate: calc(var(--p, 0) * 20px) calc(var(--p, 0) * -80px); rotate: calc(var(--p, 0) * 18deg); }

/* Home: experience timeline that fills as you scroll */
#experience { background: var(--surface-2); }
.exp-list { position: relative; }
.exp-list::before, .exp-list::after { content: ""; position: absolute; left: 211px; top: 0; width: 3px; border-radius: 3px; }
.exp-list::before { bottom: 0; background: var(--line); }
.exp-list::after { height: calc(var(--fill, 0) * 100%); background: linear-gradient(var(--mkt), var(--media)); }
.exp { position: relative; }
.exp::before { content: ""; position: absolute; left: 205px; top: 40px; width: 15px; height: 15px; border-radius: 50%; z-index: 1;
  background: var(--surface-2); border: 3px solid var(--line); transition: background .4s, border-color .4s, transform .4s; }
.exp.lit::before { background: var(--pop); border-color: var(--media); transform: scale(1.25); }
.exp .exp-date + div { padding-left: 14px; }
@media (max-width: 800px) { .exp-list::before, .exp-list::after, .exp::before { display: none; } .exp .exp-date + div { padding-left: 0; } }



/* Marketing: company logos sit inside their card, at the bottom (UTSA top-right logos unchanged) */
.page-mkt .case.has-logo { padding-bottom: 30px; }
.page-mkt .case-logo:not(.tr) { position: static; order: 99; align-self: flex-start; margin-top: 4px; transform: none; }
.page-mkt .case-logo.collab { gap: 10px; }
.page-mkt .case-logo .x { font-size: 30px; }

/* ---------- scroll-filled highlights (fill left to right as you scroll) ---------- */
.hl {
  /* crayon-textured highlight; the top layer "erases" the part not reached yet, so it fills left to right */
  --hl-bg: var(--surface);
  background-image:
    linear-gradient(to right, transparent calc(var(--h, 0) * 100%), var(--hl-bg) calc(var(--h, 0) * 100%)),
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='40' viewBox='0 0 180 40' preserveAspectRatio='none'><filter id='c' x='-5%' y='-20%' width='110%' height='140%'><feTurbulence type='fractalNoise' baseFrequency='0.05 0.3' numOctaves='2' seed='3' stitchTiles='stitch' result='w'/><feDisplacementMap in='SourceGraphic' in2='w' scale='8' xChannelSelector='R' yChannelSelector='G'/></filter><rect x='-10' y='4' width='200' height='32' fill='%23F8E09E' filter='url(%23c)'/></svg>");
  background-size: 100% 100%, 180px 100%;
  background-repeat: no-repeat, repeat-x;
  -webkit-box-decoration-break: slice; box-decoration-break: slice; padding: 1px 2px;
}
/* on dark backgrounds the text darkens as the light crayon fills in, so it stays legible */
.case.featured .hl { --hl-bg: var(--mkt); color: color-mix(in srgb, #2B1A12 calc(var(--h, 0) * 100%), var(--on-mkt)); }

/* charts zoom in slightly on scroll */
.page-mkt .minichart, .page-mkt .case-fig { scale: calc(.93 + var(--z, 1) * .07); }
@media (prefers-reduced-motion: reduce) { .page-mkt .minichart, .page-mkt .case-fig { scale: 1 !important; } }

.page-mkt #paisano .result b::after { clip-path: inset(0 calc((1 - var(--h, 0)) * 100%) 0 0); }

/* "The Events": a bit larger and heavier */
.events-head h3.ev-title { font-size: 44px; -webkit-text-stroke: .9px currentColor; letter-spacing: .005em; }

/* Media: section text never runs under the big outlined number */
.group-head[data-n] { padding-right: 220px; }
@media (max-width: 700px) {
  .group-head[data-n] { padding-right: 110px; }
  .group-head[data-n]::before { font-size: 110px; bottom: -12px; }
}

/* Media: swipe hint above the social reels row */
.swipe-hint { display: flex; justify-content: flex-end; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: -10px 0 12px; }
.swipe-hint .arr { display: inline-block; font-size: 16px; color: var(--media-ink); animation: swipe-nudge 1.6s ease-in-out infinite; }
@keyframes swipe-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .swipe-hint .arr { animation: none; } }

/* Marketing: highlighted chips + R script links */
.case-chips .hl { padding: 1px 3px; margin: -1px -3px; }
.case-chips .chip-link { color: inherit; text-decoration: none; }
.case-chips .chip-link:hover .hl { text-decoration: underline; text-underline-offset: 3px; }
.case-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* Home experience: logos tinted antique gold / bronze instead of plain ink (full color on hover) */
html[data-logo="tint"] .exp-logo .lg { background-color: #4F4331; }
html[data-logo="tint"] .exp:hover .exp-logo .lg { background-color: transparent; }

/* draft-only toggle between the two type versions */
.version-switch { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 14px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.35); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.version-switch .label { color: var(--muted); margin-right: 6px; }
.version-switch a { text-decoration: none; padding: 6px 12px; border-radius: 999px; color: var(--ink); }
.version-switch a[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* phones: shorten nav labels so the menu stays on one line */
@media (max-width: 600px) { .nav-links .nl-x { display: none; } }
