/* =====================================================================
   Thomas Cheung — Personal Brand Site
   Tokens lifted from Brand System v1.0
   ===================================================================== */

:root {
  --bg:        oklch(98.5% 0.002 250);
  --paper:     oklch(100% 0 0);
  --surface:   oklch(100% 0 0);
  --ink:       oklch(30% 0.012 250);
  --ink-soft:  oklch(46% 0.012 250);
  --muted:     oklch(52% 0.010 250);
  --line:      oklch(91% 0.005 250);
  --line-strong: oklch(80% 0.008 250);
  --dot:       oklch(85% 0.008 250);

  --coral:      oklch(58% 0.180 255);
  --coral-deep: oklch(50% 0.200 258);
  --coral-soft: oklch(95% 0.022 255);
  --coral-glow: oklch(58% 0.180 255 / 0.35);

  /* Secondary accent — used at small sizes only (tags, badges, footer rule) */
  --accent2:      oklch(74% 0.150 85);
  --accent2-deep: oklch(60% 0.160 80);
  --accent2-soft: oklch(95% 0.035 85);

  --peach:      oklch(88% 0.055 55);
  --peach-deep: oklch(72% 0.085 50);
  --peach-soft: oklch(95% 0.028 60);

  --font-display: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, Menlo, monospace;
  --font-serif:   'Newsreader', 'Iowan Old Style', Georgia, serif;

  --max:    1560px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss03";
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
  background-position: 0 0;
  background-attachment: fixed;
}

a { color: inherit; }

/* ============ TYPE ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.display-xl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 5.4vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  text-wrap: balance;
  margin: 0;
}
.display-lg {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.032em;
  text-wrap: balance;
  margin: 0;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.026em;
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.012em;
  margin: 0 0 8px;
}
p { margin: 0 0 1em; max-width: 62ch; }
.lede { font-size: 19px; color: var(--ink-soft); line-height: 1.55; max-width: 60ch; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--muted); }
.accent-serif {
  color: var(--coral);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Animated underline accent — serif italic that draws in from left on load */
.title-accent {
  position: relative;
  display: inline-block;
  color: var(--coral);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.title-accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.02em;
  height: 0.07em;
  background: var(--coral);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
  animation: titleUnderline 1.1s 0.45s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes titleUnderline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .title-accent::after {
    animation: none;
    transform: scaleX(1);
  }
}

/* ============ LAYOUT ============ */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
section { padding: 96px 0; }
.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}
.section-head .meta { padding-top: 8px; }
.section-head .meta .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

/* ============ DECORATIONS — scrapbook scatter ============ */
.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  filter: drop-shadow(0 6px 14px oklch(20% 0.02 250 / 0.08));
}
.wrap { position: relative; }
section { position: relative; }

/* —— Each .d-{n} class is a single placement: position + size + rotation —— */

/* HERO (index) */
.hero .d-coins-1   { top: 12%;   left: -10px; width: 70px; transform: rotate(-12deg); }
.hero .d-spark-1   { top: 40%;   left: 40%;  width: 38px;  transform: rotate(15deg); opacity: 0.85; }
.hero .d-spark-2   { bottom: 8%; right: 38%; width: 32px;  transform: rotate(-10deg); opacity: 0.7; }

/* VSL */
#vsl .d-spark-1    { top: 60px;  right: 8%;  width: 44px;  transform: rotate(20deg); opacity: 0.85; }
#vsl .d-bolt-1     { bottom: 6%; left: 4%;   width: 56px;  transform: rotate(-8deg); opacity: 0.55; }

/* Inline title logo (megaphone) */
.section-title .title-logo {
  height: 1.6em;
  width: auto;
  vertical-align: -0.32em;
  margin-right: 0.28em;
  transform: rotate(-12deg);
  display: inline-block;
}

/* Inline title pin (house after "Brokers") */
.display-xl .title-pin {
  height: 0.78em;
  width: auto;
  vertical-align: -0.04em;
  margin-left: 0.08em;
  transform: rotate(-10deg);
  display: inline-block;
}

/* PRINCIPLES */
#principles .d-trex-1   { bottom: calc(100% + 40px); right: 0; width: 150px; transform: rotate(-8deg) scaleX(-1); }
#principles .d-coins-1  { bottom: 8%; left: 3%; width: 80px; transform: rotate(-10deg); }
#principles .d-spark-1  { top: 38%; right: 38%; width: 36px; transform: rotate(-15deg); opacity: 0.7; }

/* SERVICES preview (index) */
#services .d-coins-1   { top: 80px; right: 6%; left: auto; width: 90px; transform: rotate(-8deg); }
footer .d-house-1      { bottom: 96px; left: 14%; width: 78px; transform: rotate(-8deg); opacity: 0.95; }
#services .d-spark-1   { top: 50%; left: 49%; width: 32px; transform: rotate(20deg); opacity: 0.7; }

/* CTA strip — quiet sparkle in the corner space outside the dark card */
#cta .d-spark-1 { top: 8%; right: 4%; width: 40px; transform: rotate(-15deg); opacity: 0.8; }

/* ABOUT — hero */
.hero .d-robot-1   { top: -10px; right: 4%;  width: 105px; transform: rotate(8deg); }
.hero .d-spark-3   { top: 14%;   left: 38%;  width: 40px;  transform: rotate(-15deg); opacity: 0.8; }
.hero .d-coins-2   { bottom: 14%; right: 36%; width: 70px; transform: rotate(-10deg); opacity: 0.85; }

/* ABOUT — story */
#story .d-house-1  { top: 20px; right: 4%; width: 90px; transform: rotate(-6deg); }
#story .d-spark-1  { bottom: 12%; left: 5%; width: 36px; transform: rotate(15deg); opacity: 0.75; }

/* ABOUT — beliefs */
#stand .d-house-2  { top: 24px; left: 4%;  width: 88px; transform: rotate(-5deg); }
#stand .d-coins-1  { bottom: 10%; right: 4%; width: 70px; transform: rotate(8deg); }
#stand .d-spark-1  { top: 50%; left: 48%; width: 32px; transform: rotate(20deg); opacity: 0.7; }

/* SERVICES hero */
.hero .d-coins-3   { top: -10px; right: 4%; width: 110px; transform: rotate(10deg); }
.hero .d-mega-2    { top: 16%; left: -10px; width: 75px; transform: rotate(-15deg); opacity: 0.9; }
.hero .d-spark-4   { bottom: 18%; right: 40%; width: 36px; transform: rotate(15deg); opacity: 0.8; }

/* SERVICES programs */
#programs .d-mega-1   { top: 28px; right: 4%; width: 92px; transform: rotate(8deg); }
#programs .d-house-1  { bottom: 12%; left: 4%; width: 80px; transform: rotate(-8deg); }
#programs .d-spark-1  { top: 46%; left: 50%; width: 32px; transform: rotate(-15deg); opacity: 0.7; }

/* SERVICES process */
#process .d-robot-1   { top: 28px; left: 4%; width: 90px; transform: rotate(-8deg); }
#process .d-spark-1   { top: 38%; right: 8%; width: 36px; transform: rotate(20deg); opacity: 0.75; }

/* CONTENT — YouTube */
#youtube .d-mega-1    { top: 14px; left: 4%; width: 92px; transform: rotate(-12deg); }
#youtube .d-spark-1   { top: 48px; right: 6%; width: 40px; transform: rotate(20deg); opacity: 0.8; }

/* CONTENT — Blog */
#blog .d-coins-1      { top: 24px; right: 4%; width: 90px; transform: rotate(8deg); }
#blog .d-house-1      { bottom: 8%; left: 4%; width: 80px; transform: rotate(-8deg); }
#blog .d-spark-1      { top: 46%; left: 50%; width: 32px; transform: rotate(-15deg); opacity: 0.7; }

/* CONTENT — LinkedIn */
#linkedin .d-robot-1  { top: 24px; left: 4%; width: 95px; transform: rotate(-6deg); }
#linkedin .d-spark-1  { top: 50%; right: 4%; width: 36px; transform: rotate(15deg); opacity: 0.75; }

/* CONTENT — Twitter */
#twitter .d-spark-1   { top: 30px; right: 4%; width: 56px; transform: rotate(20deg); opacity: 0.85; }
#twitter .d-mega-1    { bottom: 10%; left: 4%; width: 84px; transform: rotate(-10deg); }

/* Tablet — slightly smaller and fewer */
@media (max-width: 1000px) {
  .deco { transform-origin: center; }
  /* Keep most placements but scale modestly */
  .hero .d-spark-1, .hero .d-spark-2, .hero .d-spark-3, .hero .d-spark-4,
  #vsl .d-spark-1, #vsl .d-bolt-1,
  #principles .d-spark-1, #principles .d-coins-1,
  #services .d-spark-1, #services .d-house-1,
  #story .d-spark-1,
  #stand .d-spark-1, #stand .d-coins-1,
  .hero .d-mega-2, .hero .d-coins-2,
  #programs .d-spark-1, #programs .d-house-1,
  #process .d-spark-1,
  #blog .d-spark-1, #blog .d-house-1,
  #linkedin .d-spark-1,
  #twitter .d-mega-1,
  #cta .d-spark-1 { display: none; }
}

@media (max-width: 640px) {
  /* Mobile — keep one quirky illustration per section, smaller */
  .deco {
    width: auto;
    max-width: 64px;
  }
  .hero .d-coins-1, .hero .d-robot-1, .hero .d-coins-3 { width: 56px; }
  #principles .d-trex-1 { width: 64px; top: 4px; left: auto; right: 4%; }
  #services .d-coins-1 { width: 54px; top: 12px; left: 4%; }
  #story .d-house-1 { width: 54px; top: 12px; right: 4%; }
  #stand .d-house-2 { width: 54px; top: 12px; left: 4%; }
  #programs .d-mega-1 { width: 54px; top: 12px; right: 4%; }
  #process .d-robot-1 { width: 54px; top: 12px; left: 4%; }
  #youtube .d-mega-1 { width: 54px; top: 4px; left: 4%; }
  #blog .d-coins-1 { width: 54px; top: 12px; right: 4%; }
  #linkedin .d-robot-1 { width: 54px; top: 12px; left: 4%; }
  #twitter .d-spark-1 { width: 36px; top: 12px; right: 4%; }
}

/* ============ TOP NAV ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(1.1);
  background: oklch(98.5% 0.002 250 / 0.82);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.tc-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.tc-mark .name { display: inline-flex; align-items: baseline; }
.tc-mark .name .first { color: var(--ink); }
.tc-mark .name .last { color: var(--coral); margin-left: 0.28em; }
.tc-mark .name .stop { color: var(--coral); margin-left: 0.04em; }
.topbar nav { display: flex; gap: 32px; }
.topbar nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}
.topbar nav a:hover { color: var(--coral); }
.topbar nav a.active { color: var(--ink); }

/* ============ HERO ============ */
.hero {
  min-height: 58vh;
  padding: 40px 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero > .wrap {
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero .kicker-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}
.hero .kicker-row .rule {
  width: 56px;
  height: 1px;
  background: var(--ink-soft);
}
.hero .sub { margin-top: 32px; }
.hero .actions {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============ HERO PORTRAIT CARD ============ */
.hero-side {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(155deg, var(--peach) 0%, var(--peach-soft) 45%, var(--paper) 100%);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 1px 2px oklch(20% 0.02 250 / 0.04),
    0 12px 28px -10px oklch(20% 0.02 250 / 0.18),
    0 30px 60px -30px oklch(20% 0.02 250 / 0.25);
  transition: box-shadow .35s ease, transform .35s ease, border-color .35s ease;
  animation: heroFloat 5.5s ease-in-out infinite;
}
.hero-side:hover { animation-play-state: paused; }
@keyframes heroFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-side { animation: none; }
}
.hero-side:hover {
  transform: translateY(-3px);
  border-color: var(--coral-glow);
  box-shadow:
    0 1px 2px oklch(20% 0.02 250 / 0.06),
    0 16px 36px -10px oklch(20% 0.02 250 / 0.22),
    0 30px 70px -20px oklch(20% 0.02 250 / 0.28),
    0 0 0 1px var(--coral-glow),
    0 0 80px -10px var(--coral-glow);
}
.hero-side .photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transform: scaleX(-1);
  z-index: 0;
}
.hero-side .photo-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, oklch(15% 0.012 250 / 0.85) 0%, oklch(15% 0.012 250 / 0.25) 35%, transparent 60%);
  pointer-events: none;
}
.hero-side .corner-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: oklch(15% 0.012 250 / 0.55);
  backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid oklch(100% 0 0 / 0.18);
}
.hero-side .coral-dot {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px oklch(100% 0 0 / 0.25);
}
.hero-side .signature {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.1;
  color: var(--paper);
  letter-spacing: -0.02em;
}
.hero-side .signature .small {
  display: block;
  font-weight: 500;
  font-size: 12px;
  color: oklch(100% 0 0 / 0.78);
  margin-top: 8px;
  letter-spacing: 0;
}

/* ============ TWEAKS PANEL ============ */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  font-family: var(--font-body);
}
.tweaks-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: -0.005em;
  box-shadow: 0 8px 24px -8px oklch(20% 0.02 250 / 0.4);
  transition: background .2s ease, transform .15s ease;
}
.tweaks-toggle:hover { background: oklch(30% 0.02 250); }
.tweaks-toggle:active { transform: translateY(1px); }
.tweaks-toggle-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  transition: background .2s ease;
}
.tweaks-body {
  width: 320px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow:
    0 24px 48px -16px oklch(20% 0.02 250 / 0.18),
    0 4px 12px -4px oklch(20% 0.02 250 / 0.06);
  backdrop-filter: blur(8px);
  max-height: min(560px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
}
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.tweaks-head-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tweaks-close {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tweaks-close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tweaks-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.tweaks-current {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tweaks-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: oklch(0% 0 0 / 0.04);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.tweaks-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 7px 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  text-align: center;
  white-space: nowrap;
}
.tweaks-tab.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 2px oklch(20% 0.02 250 / 0.06), 0 0 0 1px var(--line);
}
.tweaks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.tweaks-serif-grid {
  grid-template-columns: repeat(2, 1fr);
}
.tweaks-grid.is-hidden { display: none; }
.tweaks-grid::-webkit-scrollbar { width: 6px; }
.tweaks-grid::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.tweaks-grid::-webkit-scrollbar-track { background: transparent; }
.tweaks-swatch {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  font-family: var(--font-display);
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.tweaks-swatch:hover { background: oklch(0% 0 0 / 0.03); }
.tweaks-swatch.is-active {
  border-color: var(--ink);
  background: oklch(0% 0 0 / 0.04);
}
.tweaks-swatch .chip {
  width: 100%;
  aspect-ratio: 1.4 / 1;
  border-radius: 7px;
}
.tweaks-swatch .name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.1;
}
.tweaks-serif-swatch .preview {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 7px;
  background: oklch(0% 0 0 / 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.tweaks-serif-swatch .preview em {
  font-style: italic;
  color: var(--coral);
  margin-left: 0.04em;
}
.tweaks-serif-swatch.is-active .preview {
  background: oklch(0% 0 0 / 0.06);
}
.tweaks-foot {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
  flex-shrink: 0;
}
.tweaks.is-collapsed .tweaks-body { display: none; }
.tweaks.is-collapsed .tweaks-toggle { display: inline-flex; }

/* Display tab — Web/Mobile picker */
.tweaks-display-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tweaks-display-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 8px;
  cursor: pointer;
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
  color: var(--ink-soft);
}
.tweaks-display-btn:hover { background: oklch(0% 0 0 / 0.03); }
.tweaks-display-btn.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.tweaks-display-btn .glyph {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tweaks-display-btn .label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Mobile preview overlay */
.mobile-preview {
  position: fixed;
  inset: 0;
  background: oklch(15% 0.012 250 / 0.92);
  backdrop-filter: blur(12px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}
.phone-frame {
  /* content-box so the 14px bezel padding sits OUTSIDE the 390x844 screen.
     Default border-box was eating into the iframe and rendering it at 362x816 —
     not a real iPhone viewport, which made the website look squished. */
  box-sizing: content-box;
  width: 390px;            /* real iPhone 14/15 CSS pixel viewport width */
  height: 844px;           /* real iPhone 14/15 CSS pixel viewport height */
  max-height: calc(100vh - 100px);
  border-radius: 52px;
  background: #0a0a0a;
  padding: 14px;           /* bezel — outer dims become 418 x 872 */
  box-shadow:
    0 0 0 2px #2a2a2a,
    0 30px 80px rgba(0, 0, 0, 0.5);
  position: relative;
  flex-shrink: 0;
}
.phone-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 40px;
  background: var(--bg);
  display: block;
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: #0a0a0a;
  border-radius: 0 0 18px 18px;
  z-index: 2;
  pointer-events: none;
}
.mobile-preview-close {
  position: fixed;
  top: 24px;
  right: 24px;
  appearance: none;
  background: var(--paper);
  color: var(--ink);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 160;
  transition: background .15s ease;
}
.mobile-preview-close:hover { background: var(--coral); color: var(--paper); }
.mobile-preview-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: oklch(100% 0 0 / 0.7);
  margin: 0;
}
html.is-mobile-preview { overflow: hidden; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--coral); color: var(--paper); }
.btn-primary:hover { background: var(--coral-deep); }
/* Quiet outline-style button with red YouTube logo retained for brand ID */
.btn-youtube {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  gap: 9px;
}
.btn-youtube:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-youtube svg { display: block; }
.btn-youtube .yt-bg   { fill: #E03131; }
.btn-youtube .yt-play { fill: #fff; }
.btn-secondary { background: var(--ink); color: var(--paper); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn .arrow { font-size: 14px; }

/* ============ VSL / VIDEO ============ */
#vsl { padding: 32px 0 80px; }
.vsl-head {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.vsl-head .section-title { margin: 0; }
.vsl-frame {
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--line);
  box-shadow:
    0 1px 2px oklch(20% 0.02 250 / 0.04),
    0 16px 40px -10px oklch(20% 0.02 250 / 0.18),
    0 40px 80px -30px oklch(20% 0.02 250 / 0.3);
  transition: box-shadow .35s ease, transform .35s ease, border-color .35s ease;
  cursor: pointer;
  position: relative;
}
.vsl-frame.has-played { cursor: default; }
.vsl-frame .vsl-hint {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: oklch(15% 0.012 250 / 0.55);
  backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid oklch(100% 0 0 / 0.18);
  pointer-events: none;
  transition: opacity .25s ease;
}
.vsl-frame.has-played .vsl-hint { opacity: 0; }
.vsl-frame:hover {
  transform: translateY(-2px);
  border-color: var(--coral-glow);
  box-shadow:
    0 1px 2px oklch(20% 0.02 250 / 0.06),
    0 20px 50px -10px oklch(20% 0.02 250 / 0.22),
    0 40px 90px -25px oklch(20% 0.02 250 / 0.32),
    0 0 0 1px var(--coral-glow),
    0 0 80px -10px var(--coral-glow);
}
.vsl-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--ink);
}

/* ============ PRINCIPLES / 3-COL ============ */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.principle { padding: 40px 36px; border-right: 1px solid var(--line); }
.principle:first-child { padding-left: 0; }
.principle:last-child { border-right: none; padding-right: 0; }
.principle .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--coral);
  letter-spacing: 0.1em;
}
.principle h3 { margin: 14px 0 10px; font-size: 22px; }
.principle p { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* ============ SERVICE CARDS ============ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: border-color .15s ease, transform .15s ease;
}
/* Soft hand-painted color stroke on the left edge — one accent per card */
.service-card::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 22px;
  bottom: 22px;
  width: 6px;
  border-radius: 999px;
  opacity: 0.45;
  pointer-events: none;
  transition: opacity .2s ease;
}
.service-card:nth-child(1)::before { background: oklch(78% 0.180 130); } /* lime  */
.service-card:nth-child(2)::before { background: oklch(58% 0.200 260); } /* cobalt */
.service-card:nth-child(3)::before { background: oklch(82% 0.155 90); }  /* mustard */
.service-card:hover::before { opacity: 0.7; }
.service-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.service-card .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.service-card h3 {
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0;
}
.service-card p {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
}
.service-card .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}
.service-card .arrow-cta {
  color: var(--coral);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.service-card .tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.service-card .tag::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--ink-soft);
  flex-shrink: 0;
}

/* ============ ABOUT — TWO-COL CONTENT ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.two-col p { font-size: 17px; color: var(--ink-soft); }
.bio-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.bio-card .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.bio-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bio-card li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-soft);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.bio-card li:last-child { border-bottom: none; }
.bio-card li b {
  color: var(--ink);
  font-weight: 600;
  min-width: 100px;
}

/* ============ SERVICES — DEEP LIST ============ */
.service-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.service-row:last-child { border-bottom: none; }
.service-row .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--coral);
  letter-spacing: 0.1em;
  padding-top: 6px;
}
.service-row h3 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.service-row p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
}
.service-row ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-row ul li {
  font-size: 14px;
  color: var(--ink-soft);
  padding-left: 16px;
  position: relative;
}
.service-row ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

/* ============ CONTENT PAGE — VIDEO GRID (YouTube-style) ============ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 20px;
}
.video-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video-card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  transition: border-radius .2s ease;
}
.thumb-1 { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); }
.thumb-2 { background: linear-gradient(140deg, var(--ink), oklch(28% 0.02 250)); }
.thumb-3 { background: linear-gradient(160deg, var(--peach), var(--peach-deep)); }
.thumb-4 { background: linear-gradient(135deg, var(--accent2), var(--accent2-deep)); }
.thumb-5 { background: linear-gradient(140deg, oklch(48% 0.10 200), oklch(34% 0.08 220)); }
.thumb-6 { background: linear-gradient(150deg, var(--coral-deep), var(--ink)); }
.video-card .thumb .length {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: oklch(0% 0 0 / 0.78);
  padding: 3px 6px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.video-card .vc-meta {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 0 2px;
}
.vc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-image: url("../images/thomas.png");
  background-size: cover;
  background-position: center 25%;
  background-color: var(--peach);
  border: 1px solid var(--line);
}
.vc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.vc-info h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s ease;
}
.video-card:hover .vc-info h3 { color: var(--coral); }
.vc-channel {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
}
.vc-channel .verified {
  display: inline-flex;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--muted);
  color: var(--paper);
  font-size: 8px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.vc-stats {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 1px;
}

/* ============ BLOG GRID ============ */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px -16px oklch(20% 0.02 250 / 0.16);
}
.blog-card .blog-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2-deep);
  background: var(--accent2-soft);
  padding: 4px 10px;
  border-radius: 999px;
  align-self: flex-start;
}
.blog-card h3 {
  font-size: 26px;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin: 0;
}
.blog-card p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: none;
}
.blog-card .blog-meta {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ SOCIAL CARDS (LinkedIn + Twitter) ============ */
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tweet-grid {
  grid-template-columns: repeat(3, 1fr);
}
.social-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 22px 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.social-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 30px -14px oklch(20% 0.02 250 / 0.14);
}
.social-card .social-head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
}
.social-card .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach), var(--peach-deep));
  border: 1px solid var(--line);
  background-image: url("../images/thomas.png");
  background-size: cover;
  background-position: center 25%;
}
.social-card .handle {
  display: block;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.social-card .role {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.social-card .platform-icon {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.linkedin-card .platform-icon {
  background: oklch(38% 0.13 245);
  color: var(--paper);
  font-style: italic;
}
.tweet-card .platform-icon.x {
  background: var(--ink);
  color: var(--paper);
}
.social-card .social-body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  max-width: none;
}
.social-card .social-body em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--coral);
  letter-spacing: -0.01em;
}
.social-card .social-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

/* ============ CTA STRIP ============ */
.cta-strip {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
.cta-strip h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
.cta-strip h2 em {
  color: var(--coral);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
}
.cta-strip .actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cta-strip .btn-outline {
  color: var(--paper);
  border-color: oklch(100% 0 0 / 0.2);
}

/* ============ FOOTER ============ */
footer { padding: 64px 0 96px; }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.foot-grid .meta-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}
.foot-grid h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.022em;
  line-height: 1.05;
  margin: 0 0 6px;
}
.foot-grid p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}
.foot-grid ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
.foot-grid li {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 4px 0;
}
.foot-grid li a { text-decoration: none; }
.foot-grid li a:hover { color: var(--coral); }

.colophon {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
  .two-col,
  .cta-strip {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 36px;
  }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .social-grid, .tweet-grid { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr; }
  .principle {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 24px 0;
  }
  .principle:last-child { border-bottom: none; }
  .service-row { grid-template-columns: 1fr; gap: 14px; }
  .service-row .idx { padding-top: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .cta-strip .actions { justify-content: flex-start; }
  section { padding: 72px 0; }

  /* Hero stacks on tablet/mobile — text + buttons centered */
  .hero {
    min-height: auto;
    padding: 56px 0;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-side {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
  }
  .hero .kicker-row { justify-content: center; }
  .hero-text { text-align: center; }
  .hero-text p,
  .hero-text .lede {
    margin-left: auto;
    margin-right: auto;
  }
  .hero .actions { justify-content: center; }
}

@media (max-width: 720px) {
  .topbar-inner { height: 56px; }
  .topbar .btn { display: none; }
  /* Hide the wordmark on mobile and let nav links spread evenly across */
  .topbar .tc-mark { display: none; }
  .topbar nav {
    flex: 1;
    justify-content: space-around;
    gap: 8px;
  }
  .topbar nav a { font-size: 13px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  #vsl { padding: 16px 0 56px; }
  .vsl-head { margin-bottom: 28px; }
  .vsl-frame { border-radius: 14px; }
  .service-grid { grid-template-columns: 1fr; }
  .video-grid, .social-grid, .tweet-grid { grid-template-columns: 1fr; }
  .blog-card { padding: 24px; }
  .blog-card h3 { font-size: 22px; }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand   brand"
      "site    connect"
      "contact contact";
    gap: 32px;
  }
  .foot-grid > div:nth-child(1) { grid-area: brand; }
  .foot-grid > div:nth-child(2) { grid-area: site; }
  .foot-grid > div:nth-child(3) { grid-area: connect; }
  .foot-grid > div:nth-child(4) { grid-area: contact; }
  .cta-strip { padding: 32px 28px; }
  .cta-strip h2 { font-size: 26px; }
  section { padding: 56px 0; }
  .hero { padding: 40px 0; }
  .hero-side { max-width: 400px; aspect-ratio: 1 / 1; }
  .hero-side .signature { font-size: 19px; padding: 20px; }
  .display-xl { font-size: clamp(46px, 13vw, 76px); line-height: 1.0; }
  .lede { font-size: 17px; }
  .section-title { font-size: clamp(26px, 6vw, 34px); }
  .service-card { padding: 26px; }
  .service-row { padding: 28px 0; }
  .service-row h3 { font-size: 24px; }
  .principle { padding: 22px 0; }
  .bio-card { padding: 26px; }
  .btn { padding: 11px 18px; font-size: 14px; }
  .hero .actions { gap: 8px; }
  .colophon { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* Tweaks panel on small screens */
  .tweaks { right: 12px; bottom: 12px; }
  .tweaks-body { width: calc(100vw - 24px); max-width: 320px; padding: 14px; }
}

@media (max-width: 420px) {
  .topbar nav { gap: 14px; }
  .topbar nav a { font-size: 12px; }
  .wrap { padding: 0 18px; }
}

/* ============ RESOURCES PAGE ============ */
.resources-head {
  text-align: center;
  margin: 0 auto 56px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.resources-head .section-title { margin: 0; }

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.resource-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.resource-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -16px oklch(20% 0.02 250 / 0.16);
}
.resource-card .resource-icon {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.resource-card .resource-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.resource-card .resource-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2-deep);
  background: var(--accent2-soft);
  padding: 4px 10px;
  border-radius: 999px;
  align-self: flex-start;
}
.resource-card h3 {
  font-size: 22px;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 0;
}
.resource-card p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  flex: 1;
  max-width: none;
}
.resource-card .btn {
  align-self: flex-start;
  margin-top: 8px;
}

@media (max-width: 1000px) {
  .resource-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .resource-grid { grid-template-columns: 1fr; gap: 16px; }
  .resource-card { padding: 24px; }
}

/* ============ RESOURCE MODAL ============ */
body.no-scroll { overflow: hidden; }

.resource-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.resource-modal.is-open { display: flex; }
.resource-modal-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(15% 0.012 250 / 0.55);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.resource-modal-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 30px 80px -20px oklch(20% 0.02 250 / 0.4);
  z-index: 1;
  animation: resModalIn .22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes resModalIn {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.resource-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-family: inherit;
  line-height: 1;
  padding: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.resource-modal-close:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.resource-modal-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.resource-modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.resource-modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin: 8px 0 6px;
}
.resource-modal-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 10px;
}
.resource-modal-card .modal-blurb {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 18px;
  max-width: none;
}
.resource-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.resource-form input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.resource-form input[type="email"]:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-glow);
}
.resource-form button[type="submit"] {
  width: 100%;
  justify-content: center;
}
.resource-modal-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  margin-bottom: 0;
  line-height: 1.5;
}

/* ============ TOAST ============ */
.lead-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
  box-shadow: 0 16px 40px -10px oklch(20% 0.02 250 / 0.35);
  max-width: calc(100vw - 40px);
}
.lead-toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.lead-toast-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--paper);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lead-toast-action {
  background: transparent;
  border: none;
  color: var(--coral);
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.lead-toast-action:hover { color: var(--paper); }

/* ============ DECO EDIT MODE ============ */
/* Edit-positions button inside the tweaks Display tab */
.tweaks-edit-btn {
  grid-column: 1 / -1;
  appearance: none;
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 11px 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.tweaks-edit-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
}
.tweaks-edit-btn.is-active {
  background: var(--coral);
  color: var(--paper);
  border-color: var(--coral);
  border-style: solid;
}
.tweaks-edit-btn svg { display: block; }

/* While editing — make decorations interactive and visibly pickable */
body.is-deco-editing .deco {
  pointer-events: auto !important;
  cursor: grab;
  outline: 2px dashed var(--coral);
  outline-offset: 4px;
  transition: outline-color .12s ease, outline-style .12s ease;
}
body.is-deco-editing .deco:hover {
  outline-style: solid;
  outline-color: var(--ink);
}
body.is-deco-editing .deco.is-dragging {
  cursor: grabbing;
  outline-style: solid;
  outline-color: var(--ink);
  z-index: 9999;
  opacity: 0.85;
}

/* Inline-flow decorations (icons sitting in headlines) — same edit affordance,
   but they keep their natural inline position and get nudged via relative offsets. */
body.is-deco-editing .inline-deco {
  cursor: grab;
  outline: 2px dashed var(--coral);
  outline-offset: 4px;
  transition: outline-color .12s ease, outline-style .12s ease;
}
body.is-deco-editing .inline-deco:hover {
  outline-style: solid;
  outline-color: var(--ink);
}
body.is-deco-editing .inline-deco.is-dragging {
  cursor: grabbing;
  outline-style: solid;
  outline-color: var(--ink);
  z-index: 9999;
  opacity: 0.85;
}

/* Floating bottom toolbar (only visible in edit mode) */
.deco-toolbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  z-index: 260;
  box-shadow: 0 16px 40px -10px oklch(20% 0.02 250 / 0.4);
  max-width: calc(100vw - 32px);
}
body.is-deco-editing .deco-toolbar { display: flex; }
.deco-toolbar-info {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: oklch(100% 0 0 / 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}
.deco-toolbar-btn {
  appearance: none;
  background: transparent;
  border: 1px solid oklch(100% 0 0 / 0.18);
  color: var(--paper);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.deco-toolbar-btn:hover {
  background: oklch(100% 0 0 / 0.1);
  border-color: oklch(100% 0 0 / 0.32);
}
.deco-toolbar-btn.primary {
  background: var(--coral);
  border-color: var(--coral);
}
.deco-toolbar-btn.primary:hover {
  background: var(--coral-deep);
  border-color: var(--coral-deep);
}

/* ============ DECO EDIT MODE — extras (size, delete, library) ============ */

/* Selected deco (clicked, not yet dragging) */
body.is-deco-editing .deco.is-selected {
  outline-style: solid !important;
  outline-color: var(--coral) !important;
  outline-width: 3px !important;
  z-index: 100;
}

/* Toolbar refinements (toolbar already styled — adding new pieces) */
.deco-toolbar {
  flex-wrap: wrap;
  justify-content: center;
}
.deco-toolbar-divider {
  width: 1px;
  height: 22px;
  background: oklch(100% 0 0 / 0.16);
  margin: 0 4px;
}
.deco-selected-controls {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  border-left: 1px solid oklch(100% 0 0 / 0.16);
  border-right: 1px solid oklch(100% 0 0 / 0.16);
  margin: 0 4px;
}
.deco-selected-controls.is-shown { display: inline-flex; }
.deco-size-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: oklch(100% 0 0 / 0.7);
}
.deco-size-label input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: oklch(100% 0 0 / 0.18);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.deco-size-label input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--coral);
  cursor: grab;
  border: 2px solid var(--paper);
}
.deco-size-label input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--coral);
  cursor: grab;
  border: 2px solid var(--paper);
}
.deco-size-value {
  min-width: 28px;
  text-align: right;
  color: var(--paper);
  font-weight: 500;
}
.deco-delete-btn {
  background: oklch(58% 0.180 25 / 0.18) !important;
  border-color: oklch(58% 0.180 25 / 0.4) !important;
  color: oklch(82% 0.12 30) !important;
}
.deco-delete-btn:hover {
  background: oklch(58% 0.180 25) !important;
  border-color: oklch(58% 0.180 25) !important;
  color: var(--paper) !important;
}

/* "+ Add" button — active state when library is open */
#deco-add.is-active {
  background: var(--coral);
  border-color: var(--coral);
}

/* Library popup */
.deco-library {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: 0 18px 50px -16px oklch(20% 0.02 250 / 0.32);
  z-index: 270;
}
.deco-library-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.deco-library-grid button {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  padding: 8px;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.deco-library-grid button:hover {
  border-color: var(--coral);
  transform: translateY(-2px);
  background: var(--paper);
}
.deco-library-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Flip button active state in deco edit toolbar */
#deco-flip.is-active {
  background: var(--coral) !important;
  border-color: var(--coral) !important;
  color: var(--paper) !important;
}

/* ============================================================
   MOBILE — fit each section above the fold
   ============================================================ */
@media (max-width: 640px) {

  /* --- Section padding tighter so section heads + content fit --- */
  section { padding: 36px 0; }
  .section-head { margin-bottom: 20px; gap: 12px; }
  .resources-head { margin-bottom: 24px; gap: 10px; }

  /* --- Hero: pin to viewport height (minus sticky topbar) --- */
  .hero {
    min-height: calc(100vh - 56px);
    padding: 12px 0 16px;
    display: flex;
    align-items: stretch;
  }
  .hero > .wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .hero .kicker-row { margin-bottom: 10px; }
  .hero-grid { gap: 16px; }
  .hero-text { text-align: center; }
  .hero .sub { margin-top: 12px; }

  /* Smaller hero title to fit 4 lines on small screens */
  .display-xl {
    font-size: clamp(32px, 9vw, 50px);
    line-height: 1.0;
  }
  .hero-text .lede,
  .lede {
    font-size: 15px;
    line-height: 1.4;
    max-width: 100%;
  }

  /* Tighter photo card so it doesn't dominate the viewport */
  .hero-side {
    max-width: 240px !important;
    aspect-ratio: 1 / 1;
    margin: 0 auto !important;
  }
  .hero-side .signature { font-size: 14px; padding: 14px; }
  .hero-side .signature .small { font-size: 11px; margin-top: 4px; }
  .hero-side .corner-tag { font-size: 9px; padding: 4px 8px; top: 12px; left: 12px; }

  /* CTA buttons stay centered, slightly smaller */
  .hero .actions { margin-top: 16px; gap: 10px; }
  .hero .actions .btn { padding: 10px 16px; font-size: 14px; }

  /* --- VSL section: fit eyebrow + title + video --- */
  #vsl { padding: 8px 0 32px; }
  .vsl-head { margin-bottom: 16px; }
  .vsl-head .section-title { font-size: clamp(24px, 6.5vw, 32px); }

  /* --- Multi-card sections become horizontal swipe carousels --- */
  .principles,
  .service-grid,
  .video-grid,
  .resource-grid,
  .social-grid,
  .tweet-grid,
  .blog-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 4px 20px 16px;
    margin: 0 -20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: none !important;
    border-bottom: none !important;
  }
  .principles::-webkit-scrollbar,
  .service-grid::-webkit-scrollbar,
  .video-grid::-webkit-scrollbar,
  .resource-grid::-webkit-scrollbar,
  .social-grid::-webkit-scrollbar,
  .tweet-grid::-webkit-scrollbar,
  .blog-grid::-webkit-scrollbar {
    display: none;
  }

  .principle {
    flex: 0 0 84%;
    min-width: 0;
    scroll-snap-align: center;
    border: 1px solid var(--line);
    border-bottom: 1px solid var(--line) !important;
    border-radius: var(--r-md);
    padding: 22px 20px;
  }

  .service-card,
  .resource-card,
  .blog-card,
  .social-card {
    flex: 0 0 84%;
    min-width: 0;
    scroll-snap-align: center;
  }
  .video-card { flex: 0 0 76%; min-width: 0; scroll-snap-align: center; }

  /* Service-row (services page deep list) — keep stacked, just tighter */
  .service-row { padding: 22px 0; gap: 10px; }
  .service-row h3 { font-size: 22px; }

  /* CTA strip tighter */
  .cta-strip { padding: 28px 24px; }
  .cta-strip h2 { font-size: 24px; }
  #cta { padding: 16px 0 32px; }

  /* Footer keeps stacked layout but tighter */
  footer { padding: 32px 0 48px; }

  /* On mobile, hide CSS-positioned (desktop-placement) decorations.
     User-added decos in the mobile bucket are exempt — they have correct
     mobile positions because the user placed them while in mobile-edit. */
  .deco:not(.user-deco) { display: none; }
}

/* ============ MOBILE HERO CTA + 90vh ============ */
.hero-mobile-cta { display: none; }

@media (max-width: 640px) {
  .hero {
    min-height: 90vh !important;   /* hero takes 90% of viewport, leaves 10% peek */
  }
  .hero-mobile-cta {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }
  .hero-mobile-cta .btn-youtube {
    padding: 11px 18px;
    font-size: 14px;
  }
}

/* ============ MOBILE — bigger hero title to fill viewport ============ */
@media (max-width: 640px) {
  .display-xl {
    font-size: clamp(38px, 12vw, 60px);
    line-height: 1.0;
  }
}

/* (Old rule retired — toolbar + library now stay visible in preview mode and
   drive the iframe via postMessage. See the rules further below.) */

/* ============ Make every deco reliably clickable in edit mode ============
   Without an explicit z-index, body-level user-added decos can fall behind
   section text (which gets rendered later in DOM order). Bumping decos to
   a high z while editing guarantees the click lands on the icon, not the
   text it happens to overlap. */
body.is-deco-editing .deco,
body.is-deco-editing .inline-deco {
  z-index: 500 !important;
  pointer-events: auto !important;
}
body.is-deco-editing .deco.is-dragging,
body.is-deco-editing .deco.is-selected,
body.is-deco-editing .inline-deco.is-selected {
  z-index: 9999 !important;
}

/* ============ Mobile decoration visibility =============================
   The earlier mobile rule hides ALL .deco (since they're positioned for
   desktop and don't translate to mobile cleanly). But user-added decos
   in the mobile bucket DO have correct mobile positions — let them show.
   And during edit mode, show everything so it's all editable. */
/* user-deco visibility — visible on every viewport, every mode */
.deco.user-deco { display: block !important; }
/* Edit mode shows everything so you can grab CSS-defined decos too */
body.is-deco-editing .deco { display: block !important; }

/* ============ Disable parent-page editing while mobile preview is open ============
   Without this, the edit-mode z-index bump (500) puts parent decos above the
   mobile-preview overlay (150), so clicks behind the blur edit them by accident. */
html.is-mobile-preview .deco,
html.is-mobile-preview .inline-deco {
  z-index: 1 !important;
  pointer-events: none !important;
}

/* Parent's toolbar is what we use for mobile editing — un-hide it
   (the earlier rule that hid it has been replaced by the new flow). */
html.is-mobile-preview .deco-toolbar { display: flex !important; }
html.is-mobile-preview .deco-library { /* keep library hidden by default */ }

/* Publish button — distinct color (green) so it stands out from Done/Reset */
.deco-publish-btn {
  background: oklch(58% 0.16 145) !important;
  border-color: oklch(58% 0.16 145) !important;
  color: var(--paper) !important;
}
.deco-publish-btn:hover:not(:disabled) {
  background: oklch(50% 0.17 145) !important;
  border-color: oklch(50% 0.17 145) !important;
}
.deco-publish-btn:disabled {
  opacity: 0.65;
  cursor: progress;
}
