/* site.css — Pri Jain portfolio · shared system */

/* ─── DESIGN TOKENS ──────────────────────────────────────────────── */
:root {
  --cream:      #FAF3E8;
  --peach:      #F6E5DC;
  --orange:     #E63E1E;   /* headline accent */
  --pink:       #E6336B;   /* hot raspberry accent */
  --burgundy:   #6B0A20;   /* dark deep */
  --soft-pink:  #FFCBD5;
  --lavender:   #C4B5E0;
  --ink:        #2E2522;
  --ink-soft:   #5b4f48;
  --ink-muted:  #998b82;
  --border:     #ead9c8;
  --card:       #FFFFFF;

  /* type */
  --font-headline: "Fraunces", "Recoleta", Georgia, serif;
  --font-ui:       "Plus Jakarta Sans", "Klein", system-ui, sans-serif;
  --font-script:   "Caveat", cursive;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 16px;
  min-height: 100%;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  display: flex;
  justify-content: center;
}

#root {
  width: 1280px;
  max-width: 100%;
}

a { color: inherit; }

/* ─── TYPE STYLES ────────────────────────────────────────────────── */

.type-headline {
  font-family: var(--font-headline);
  font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 800;
  font-size: 88px;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--orange);
}

.type-headline-md {
  font-family: var(--font-headline);
  font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 800;
  font-size: 72px;
  line-height: 1.0;
  letter-spacing: -0.015em;
  color: var(--orange);
}

.type-subhead {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--orange);
}

.type-eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink);
}

.type-body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
}

.type-caption {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.type-script {
  font-family: var(--font-script);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
  color: var(--orange);
}

/* ─── BUTTONS ────────────────────────────────────────────────────── */
/* Shared button system used across landing, about, and project cards. */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform .25s cubic-bezier(.5, 1.4, .35, 1),
    box-shadow .25s ease,
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
  position: relative;
  isolation: isolate;
}

.btn:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.btn .btn-arrow {
  display: inline-block;
  transition: transform .25s cubic-bezier(.5, 1.4, .35, 1);
}

.btn:hover .btn-arrow { transform: translateX(4px); }

/* Primary — solid burgundy, cream text. Use for main CTAs. */
.btn-primary {
  background: var(--burgundy);
  color: var(--soft-pink);
  box-shadow: 0 6px 14px rgba(107, 10, 32, 0.18), 0 1px 0 rgba(255,255,255,0.06) inset;
}
.btn-primary:hover {
  background: #520818;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(107, 10, 32, 0.28), 0 1px 0 rgba(255,255,255,0.06) inset;
}

/* Secondary — outlined ink on cream. Use for less-important actions. */
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(46, 37, 34, 0.15);
}

/* Small variant — for in-card or inline use. */
.btn-sm {
  padding: 9px 16px;
  font-size: 12px;
  gap: 8px;
}

/* ─── editable-text placeholders ─────────────────────────────────── */
[contenteditable="true"][data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-muted);
  font-style: italic;
  pointer-events: none;
}
/* On the published (read-only) site, empty editable fields collapse entirely
   so neither placeholder prompts ("Add a title…") nor empty gaps reach visitors. */
.cs-editable:not(.is-editing):empty { display: none; }
[contenteditable]:focus {
  outline: 2px dashed var(--orange);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ─── animations ─────────────────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeSlideUp {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes letterPop {
  0%   { opacity: 0; transform: translateY(40px) scale(0.5) rotate(-15deg); }
  60%  { opacity: 1; transform: translateY(-8px) scale(1.08) rotate(var(--rest-rotate, 0deg)); }
  100% { opacity: 1; transform: translateY(0)    scale(1)    rotate(var(--rest-rotate, 0deg)); }
}

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.5) rotate(-20deg); }
  60%  { opacity: 1; transform: scale(1.08) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes popInScatter {
  0%   { opacity: 0; transform: scale(0.7) translateY(30px); }
  60%  { opacity: 1; transform: scale(1.04) translateY(-6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

@keyframes outcomePop {
  0%   { opacity: 0; transform: translateY(30px) scale(0.86); }
  62%  { opacity: 1; transform: translateY(-5px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sketchDraw {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

/* ─── scroll-reveal ─────────────────────────────────────────────── */
/* Default: visible. JS adds [data-reveal-pending] only to off-screen
   elements on mount; the attribute is removed when they enter the viewport.
   This guarantees above-the-fold content shows immediately even in
   sandboxes where IntersectionObserver / CSS-transition timelines stall. */
.reveal {
  transition:
    opacity .9s cubic-bezier(.2, .7, .3, 1),
    transform .9s cubic-bezier(.2, .7, .3, 1);
  will-change: opacity, transform;
}
.reveal[data-reveal-pending] {
  opacity: 0;
  transform: translateY(36px);
}
.reveal[data-reveal-pending].from-left  { transform: translateX(-48px); }
.reveal[data-reveal-pending].from-right { transform: translateX(48px); }

/* Script caption that rises up when its section reveals into view */
@keyframes csCaptionRise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal[data-reveal-pending] .cs-caption-rise { opacity: 0; transform: translateY(26px); }
.reveal:not([data-reveal-pending]) .cs-caption-rise {
  animation: csCaptionRise .8s .12s cubic-bezier(.2, .7, .3, 1) backwards;
}
@media (prefers-reduced-motion: reduce) {
  .cs-caption-rise { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ─── case-study page overrides ─────────────────────────────────── */
body.case-study #root {
  width: 100%;
  max-width: 100%;
}
body.case-study {
  display: block;
}

/* shared content max-width for case-study sections */
.cs-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
  position: relative;
}

/* filled image slots: no gray tint behind letterboxed (fit=contain) images */
image-slot[data-filled] {
  --slot-frame-bg: transparent;
}

@media (max-width: 880px) {
  .cs-wrap { padding: 0 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal[data-reveal-pending] { opacity: 1 !important; transform: none !important; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ═══ CASE-STUDY BUILDER ════════════════════════════════════════════════ */

/* — inline editable text — */
.cs-editable { outline: none; }
.cs-editable.is-editing {
  border-radius: 4px;
  transition: box-shadow .15s ease, background .15s ease;
  cursor: text;
}
.cs-editable.is-editing:hover {
  box-shadow: 0 0 0 1.5px rgba(230, 51, 107, 0.35);
}
.cs-editable.is-editing:focus {
  box-shadow: 0 0 0 1.5px var(--pink);
  background: rgba(255, 255, 255, 0.35);
}
.cs-editable.is-editing:empty::before {
  content: attr(data-placeholder);
  opacity: 0.55;
  font-style: italic;
  font-family: inherit;
}

/* — section frame + controls — */
.cs-frame { position: relative; }
.body.cs-editing .cs-frame { outline: 1px dashed transparent; }
.cs-frame:hover { outline: 1px dashed rgba(230, 51, 107, 0.25); outline-offset: -1px; }
.cs-frame-bar {
  position: sticky; top: 10px; right: 18px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: rgba(46,37,34,0.92); backdrop-filter: blur(6px);
  border-radius: 10px; padding: 6px 10px 6px 14px;
  margin: 10px 18px -48px auto; width: fit-content;
  opacity: 1; pointer-events: auto;
}
.cs-frame:hover .cs-frame-bar { opacity: 1; transform: none; pointer-events: auto; }
.cs-frame-tag {
  font-family: var(--font-ui); font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; background: var(--ink);
  padding: 4px 9px; border-radius: 999px; opacity: 0.85;
}
.cs-frame-actions { display: flex; gap: 4px; }
.cs-frame-actions button {
  width: 28px; height: 28px; border: none; cursor: pointer;
  background: var(--ink); color: #fff; border-radius: 7px;
  font-size: 13px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(46,37,34,0.25);
  transition: background .15s ease, transform .12s ease;
}
.cs-frame-actions button:hover:not(:disabled) { transform: translateY(-1px); }
.cs-frame-actions button:disabled { opacity: 0.3; cursor: default; }
.cs-frame-actions .cs-del:hover { background: var(--orange); }

/* — add-section inserter — */
.cs-add {
  position: relative; z-index: 50;
  display: flex; justify-content: center;
  height: 0; margin: 0 auto; max-width: 1280px;
}
.cs-add-btn {
  transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted); background: var(--cream);
  border: 1px dashed var(--border); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; opacity: 0.35;
  transition: opacity .18s ease, color .18s ease, border-color .18s ease;
}
.cs-add:hover .cs-add-btn { opacity: 1; color: var(--pink); border-color: var(--pink); }
.cs-add-plus {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--pink); color: #fff; font-size: 13px; line-height: 1;
}
.cs-add-menu {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, 12px);
  z-index: 80; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 22px 44px rgba(46,37,34,0.18);
  padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  width: 380px;
}
.cs-add-menu button {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--ink);
  background: transparent; border: none; border-radius: 9px;
  padding: 11px 12px; cursor: pointer; text-align: left;
  transition: background .14s ease;
}
.cs-add-menu button:hover { background: var(--peach); }
.cs-add-ic {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  border-radius: 7px; background: var(--peach); color: var(--pink); font-size: 14px;
}

/* — item +/- control (gallery / process / metrics) — */
.cs-itemctl {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted);
}
.cs-itemctl button {
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  font-size: 16px; line-height: 1; display: grid; place-items: center;
}
.cs-itemctl button:hover:not(:disabled) { border-color: var(--pink); color: var(--pink); }
.cs-itemctl button:disabled { opacity: 0.3; cursor: default; }
/* metrics control sits on dark bg */
.cs-metrics-grid ~ * .cs-itemctl,
section[style*="burgundy"] .cs-itemctl { color: rgba(255,203,213,0.8); }

/* — image-side toggle — */
.cs-side-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted);
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
}
.cs-side-toggle:hover { border-color: var(--pink); color: var(--pink); }

/* — url field (video / next link) — */
.cs-video-input {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px;
}
.cs-field-label {
  font-family: var(--font-ui); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--pink);
  white-space: nowrap;
}
.cs-video-input input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--font-ui); font-size: 14px; color: var(--ink);
}

/* — edit toolbar (fixed bottom-centre) — */
.cs-toolbar {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; align-items: center; gap: 6px;
  background: rgba(46,37,34,0.96); backdrop-filter: blur(8px);
  border-radius: 999px; padding: 6px; box-shadow: 0 12px 30px rgba(46,37,34,0.32);
  white-space: nowrap;
}
.cs-toolbar button { white-space: nowrap; }
.cs-tg {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.7); background: transparent; border: none;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.cs-tg.on { background: #fff; color: var(--ink); }
.cs-tb-div { width: 1px; height: 20px; background: rgba(255,255,255,0.2); margin: 0 2px; }
.cs-tb-reset {
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.65); background: transparent; border: none;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.cs-tb-reset:hover { color: var(--soft-pink); }

/* — priorities (MoSCoW) pop-in icon badges — */
@keyframes csPopIcon {
  0%   { opacity: 0; transform: scale(0.2) rotate(-12deg); }
  55%  { opacity: 1; transform: scale(1.16) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.cs-pr-icon {
  transform-origin: center;
  transition: transform .24s cubic-bezier(.34,1.56,.64,1), box-shadow .24s ease, background-color .24s ease;
}
.reveal[data-reveal-pending] .cs-pr-icon { opacity: 0; transform: scale(0.2); }
.reveal:not([data-reveal-pending]) .cs-pr-icon {
  animation: csPopIcon .55s cubic-bezier(.34,1.56,.64,1) backwards;
}
.cs-pr-item:hover .cs-pr-icon {
  transform: scale(1.14) rotate(-4deg);
  box-shadow: 0 8px 18px rgba(46,37,34,0.16);
}

/* — concept card PDF button uses the shared .btn .btn-primary system — */

/* — feature showcase pop-in + hover (transition-driven via reveal system) — */
.cs-feature-pop {
  transition: opacity .6s ease, transform .6s cubic-bezier(.34, 1.56, .64, 1);
}
.reveal[data-reveal-pending].cs-feature-pop {
  opacity: 0; transform: scale(0.7) translateY(16px);
}
.cs-feature-pop:hover { transform: scale(1.05) translateY(-5px); }
.cs-feature-circle { transition: box-shadow .28s ease; }
.cs-feature-pop:hover .cs-feature-circle { box-shadow: 0 16px 32px rgba(107,10,32,0.16); }
@media (prefers-reduced-motion: reduce) {
  .reveal[data-reveal-pending].cs-feature-pop { transform: none; }
}
.cs-tb-hist {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.78); background: transparent; border: none;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.cs-tb-hist:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cs-tb-save {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.78); background: transparent; border: none;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease; white-space: nowrap;
}
.cs-tb-save:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* — version history panel — */
.cs-hist {
  position: fixed; bottom: 78px; left: 50%; transform: translateX(-50%);
  z-index: 320; width: min(420px, calc(100vw - 32px));
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(46,37,34,0.30), 0 2px 0 rgba(46,37,34,0.04);
  border: 1px solid var(--border); overflow: hidden;
  font-family: var(--font-ui);
  animation: csHistIn .18s cubic-bezier(.2,.7,.3,1);
}
@keyframes csHistIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cs-hist-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px;
}
.cs-hist-title { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.cs-hist-x {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--ink-muted); padding: 2px 6px; border-radius: 8px;
}
.cs-hist-x:hover { background: var(--cream); color: var(--ink); }
.cs-hist-note { margin: 0 18px 12px; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }
.cs-hist-save {
  display: block; width: calc(100% - 36px); margin: 0 18px 12px;
  appearance: none; border: 1px dashed var(--border); background: var(--cream);
  color: var(--ink-soft); font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  padding: 9px; border-radius: 10px; cursor: pointer; transition: border-color .15s, color .15s;
}
.cs-hist-save:hover { border-color: var(--orange); color: var(--orange); }
.cs-hist-list { max-height: 46vh; overflow-y: auto; padding: 0 10px 12px; }
.cs-hist-empty { margin: 8px 8px 12px; font-size: 13px; color: var(--ink-muted); }
.cs-hist-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 8px; border-radius: 10px; transition: background .12s;
}
.cs-hist-row:hover { background: var(--cream); }
.cs-hist-info { min-width: 0; }
.cs-hist-when { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.cs-hist-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--pink); background: rgba(230,51,107,0.10); padding: 2px 6px; border-radius: 5px;
}
.cs-hist-sub { font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; }
.cs-hist-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.cs-hist-restore, .cs-hist-go, .cs-hist-cancel {
  appearance: none; border: none; cursor: pointer; font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px;
}
.cs-hist-restore { background: var(--ink); color: #fff; }
.cs-hist-restore:hover { background: var(--burgundy); }
.cs-hist-go { background: var(--orange); color: #fff; }
.cs-hist-cancel { background: var(--cream); color: var(--ink-soft); }
.cs-hist-del {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font-size: 16px; line-height: 1; color: var(--ink-muted); padding: 4px 6px; border-radius: 6px;
}
.cs-hist-del:hover { color: var(--orange); background: rgba(230,62,30,0.08); }

/* hide builder chrome entirely in preview */
body:not(.cs-editing) .cs-add,
body:not(.cs-editing) .cs-frame-bar { display: none; }
.cs-next { transition: opacity .2s ease; }
body.cs-editing .cs-next { cursor: default; }

/* — per-field delete (✕) + restore chip — */
.cs-remove-x {
  position: absolute; top: -9px; right: -9px; z-index: 45;
  width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 15px; line-height: 1;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.6); transform-origin: center;
  transition: opacity .14s ease, transform .14s ease, background .14s ease;
  box-shadow: 0 3px 8px rgba(46,37,34,0.3);
}
.cs-removable:hover > .cs-remove-x { opacity: 1; transform: scale(1); }
.cs-remove-x:hover { background: var(--orange); }
.cs-restore {
  display: inline-flex; align-items: center; gap: 6px; margin: 6px 0;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-muted); background: transparent;
  border: 1px dashed var(--border); border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
}
.cs-restore:hover { color: var(--pink); border-color: var(--pink); }
/* delete control on dark (burgundy) sections */
section[style*="burgundy"] .cs-remove-x { background: var(--soft-pink); color: var(--burgundy); }
section[style*="burgundy"] .cs-restore { color: rgba(255,203,213,0.85); border-color: rgba(255,203,213,0.4); }

/* arched hero photo: transparent frame so the pink arch shows through the cutout's
   removed background, and the slot's hover controls aren't clipped */
image-slot#hero-photo-1::part(frame) { background: transparent; }

/* image+text second image: no slot tint so transparent PNGs read clean */
image-slot[id$="__img2"]::part(frame) { background: transparent; }
image-slot[id$="__img2"][data-over]::part(frame) { background: transparent; }

/* "+ Add" affordance for editable collections */
.add-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--pink); background: transparent;
  border: 1.5px dashed var(--pink); border-radius: 999px;
  padding: 9px 16px; cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.add-chip:hover { background: var(--pink); color: #fff; transform: translateY(-1px); }

/* ── password gate ─────────────────────────────────────────────────────── */
.cs-gate-form {
  display: flex; gap: 12px; justify-content: center; align-items: stretch;
  max-width: 460px; margin: 0 auto;
}
.cs-gate-field {
  flex: 1; display: flex; align-items: center;
  background: var(--cream); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 0 16px; transition: border-color .18s ease, box-shadow .18s ease;
}
.cs-gate-field:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(230,51,107,0.14); }
.cs-gate-field.err { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(230,62,30,0.14); }
.cs-gate-field input {
  flex: 1; width: 100%; border: none; outline: none; background: transparent;
  font-family: var(--font-ui); font-size: 16px; color: var(--ink);
  padding: 15px 0; letter-spacing: 0.06em;
}
.cs-gate-field input::placeholder { color: var(--ink-muted); letter-spacing: 0.02em; }
.cs-gate-btn { white-space: nowrap; align-self: stretch; }
.cs-gate-msg {
  margin-top: 18px; min-height: 24px; font-family: var(--font-ui);
  font-size: 14px; text-align: center;
}
.cs-gate-setrow {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: var(--cream); border: 1px dashed var(--pink);
  border-radius: 999px; padding: 10px 18px;
}
@keyframes cs-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.cs-gate.shake { animation: cs-shake .6s cubic-bezier(.36,.07,.19,.97); }

/* full-image: bare plate — no frame tint, white image bg drops into the page */
.cs-fi-bare image-slot::part(frame) { background: transparent; }
.cs-fi-bare image-slot::part(image) { mix-blend-mode: multiply; }
.cs-fi-bare image-slot { --drop-ring: transparent; }

/* — refresh nav — */
.cs-refresh-nav {
  text-align: center;
  padding: 0 0 80px;
}
.cs-refresh-top {
  font-family: var(--font-script);
  font-size: 24px;
  font-weight: 700;
  color: var(--pink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: opacity .2s;
  display: inline-block;
  margin-bottom: 28px;
}
.cs-refresh-top:hover { opacity: 0.6; }
.cs-refresh-head {
  font-family: var(--font-script);
  font-size: 32px;
  font-weight: 700;
  color: var(--orange);
  margin: 0 0 4px;
  line-height: 1.1;
}
.cs-refresh-sub {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #F4A6B8;
  margin: 0 0 24px;
  letter-spacing: 0.04em;
}
.cs-refresh-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.cs-refresh-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: none;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: color .18s;
}
.cs-refresh-btn:hover { color: var(--orange); }

/* — intro body: keep the UI font even if pasted/edited text (which often
   lands in nested <div>s) carries its own font. Weight & colour pass through. */
.cs-intro-body, .cs-intro-body * {
  font-family: var(--font-ui) !important;
}
.cs-intro-body [style*="background"] { background: transparent !important; }
/* — intro body: neutralize any inline text colors left from editing so
   paragraphs stay grey and bold labels stay near-black. — */
.cs-intro-body, .cs-intro-body *:not([style*="color"]) { color: var(--ink-soft) !important; }
.cs-intro-body strong:not([style*="color"]), .cs-intro-body b:not([style*="color"]) { color: var(--ink) !important; }

/* — outcome (animated numbers) — */
.cs-outcome-head {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: clamp(56px, 7vw, 104px);
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--orange);
  text-align: center;
  text-wrap: balance;
  margin: 0 auto 64px;
  max-width: 16ch;
}
.cs-outcome-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 56px 64px;
  align-items: start;
}
.cs-outcome-item { text-align: left; }
.cs-outcome-num {
  font-family: var(--font-headline);
  font-variation-settings: "opsz" 144, "SOFT" 60, "wght" 600;
  font-size: clamp(56px, 6vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--burgundy);
  font-variant-numeric: tabular-nums;
}
.cs-outcome-item.pop .cs-outcome-num {
  animation: outcomePop .85s cubic-bezier(.2,.7,.3,1) both;
}
.cs-outcome-cap {
  margin: 18px 0 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.cs-outcome-lbl { font-weight: 700; color: var(--ink); }

/* — insights (research cards) — */
.cs-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}
.cs-insight-card {
  display: flex;
  flex-direction: column;
  background: #fffdfa;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(46,37,34,0.08), 0 4px 10px rgba(46,37,34,0.05);
  transition: transform .35s cubic-bezier(.4,1.1,.4,1), box-shadow .35s;
}
.cs-insight-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 56px rgba(46,37,34,0.14), 0 8px 16px rgba(46,37,34,0.08);
}
.cs-insight-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--peach);
  border-bottom: 1px solid var(--border);
}
.cs-insight-media image-slot { width: 100%; height: 100%; }
.cs-insight-body { padding: 26px 26px 30px; display: flex; flex-direction: column; }
.cs-insight-num {
  font-family: var(--font-headline);
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 600;
  font-size: 40px; line-height: 1; color: var(--orange);
  letter-spacing: -0.03em; margin-bottom: 14px;
}
.cs-insight-title {
  margin: 0 0 12px; font-family: var(--font-headline);
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 600;
  font-size: 24px; line-height: 1.16; color: var(--ink); text-wrap: balance;
}
.cs-insight-text {
  margin: 0; font-family: var(--font-ui); font-size: 15px; line-height: 1.6;
  color: var(--ink-soft); text-wrap: pretty;
}
.cs-insight-quote {
  margin: 20px 0 0; padding: 2px 0 2px 16px;
  border-left: 3px solid var(--pink);
}
.cs-insight-qtext {
  margin: 0; font-family: var(--font-headline); font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 500;
  font-size: 17px; line-height: 1.4; color: var(--burgundy); text-wrap: pretty;
}
.cs-insight-qby {
  display: block; margin-top: 9px; font-family: var(--font-ui);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-muted);
}
.cs-insight-ext { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.cs-insight-ext-label {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--orange);
  margin-bottom: 8px;
}

/* ═══ RESPONSIVE ════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .cs-hero-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .cs-intro-grid,
  .cs-it-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .cs-intro-grid aside { margin-top: 0 !important; }
  .cs-it-grid > div:first-child { order: -1; }
  .cs-metrics-grid { grid-template-columns: 1fr 1fr !important; gap: 40px !important; }
}
@media (max-width: 720px) {
  .cs-wrap { padding: 0 24px; }
  .cs-hero { min-height: 560px; }
  .cs-nav > div { padding: 14px 24px !important; }
  .cs-nav nav { gap: 0 !important; }
  .cs-nav nav a { padding: 6px 8px !important; font-size: 12px !important; }
  .cs-step { grid-template-columns: 64px 1fr !important; gap: 20px !important; }
  .cs-step > div:first-child { font-size: 48px !important; }
  .cs-metrics-grid { grid-template-columns: 1fr !important; }
  .cs-next { grid-template-columns: 1fr !important; }
  .cs-next > div:last-child { display: none; }
  .cs-add-menu { grid-template-columns: 1fr; width: 260px; }
  .cs-outcome-grid { grid-template-columns: 1fr !important; gap: 44px !important; }
}
@media (max-width: 1024px) {
  .cs-outcome-grid { grid-template-columns: 1fr 1fr !important; }
  .cs-insights-grid { grid-template-columns: 1fr; gap: 24px; }
  .cs-insight-media { aspect-ratio: 16 / 9; }
}

/* ═══ MOBILE RESPONSIVE — comprehensive ══════════════════════════════════════ */

/* ── Personal art cards ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pa-cards-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
}

/* ── About page sections ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-hero-section { padding: 24px 32px 40px !important; }
  .about-facts-section { padding: 40px 32px 20px !important; }
  .about-resume-section { padding: 40px 32px 50px !important; }
  .about-carousel-section { padding: 40px 32px 50px !important; }
}
@media (max-width: 768px) {
  .about-hero-section { padding: 24px 20px 32px !important; }
  .about-portrait-wrap { width: 200px !important; margin: 0 auto; }
  .about-portrait-box { width: 200px !important; height: 256px !important;
    border-radius: 100px 100px 12px 12px !important; }
  .about-facts-section { padding: 32px 20px 16px !important; }
  .about-facts-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px 16px !important;
    justify-content: stretch !important;
  }
  .about-resume-section { padding: 36px 20px 48px !important; }
  .about-exp-row {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    padding: 20px 0 !important;
  }
  .about-carousel-section { padding: 36px 20px 48px !important; }
}

/* ── Case study hero bottom text padding ────────────────────────────────── */
@media (max-width: 768px) {
  .cs-hero-bottom { padding: 0 24px 36px !important; }
  .cs-hero-bottom .cs-hero-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
}

/* ── Case study section wraps on small screens ──────────────────────────── */
@media (max-width: 600px) {
  .cs-wrap { padding: 0 18px !important; }
  .cs-outcome-grid { grid-template-columns: 1fr !important; gap: 36px !important; }
}

/* ── Edit toolbar smaller on mobile ────────────────────────────────────── */
@media (max-width: 768px) {
  .cs-toolbar { bottom: 12px; padding: 4px; gap: 2px; }
  .cs-tg { padding: 7px 10px; font-size: 12px; }
  .cs-tb-save, .cs-tb-hist, .cs-tb-reset { padding: 7px 8px; font-size: 12px; }
  .cs-tb-div { margin: 0; }
}

/* ── Photo board polaroids ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .board-pola { width: 160px !important; }
}

/* ═══ BOUNCING TESTIMONIAL QUOTES (metrics section) ══════════════════════ */
.cs-bquotes { position: relative; margin: 78px auto 0; max-width: 980px; }
.cs-bquotes-intro {
  font-family: var(--font-script); font-weight: 700;
  font-size: clamp(28px, 3vw, 40px); line-height: 1.12;
  color: var(--burgundy); text-align: center; text-wrap: balance;
  margin: 0 auto 12px; max-width: 740px;
}
.cs-bquotes-sub {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--pink);
  text-align: center; margin: 0 auto 50px;
}
.cs-bquotes-grid { display: flex; flex-direction: column; gap: 34px; }
.cs-bquote-wrap { max-width: 560px; }
.cs-bquote-wrap:nth-child(odd)  { align-self: flex-start; }
.cs-bquote-wrap:nth-child(even) { align-self: flex-end; }
.cs-bquote {
  position: relative;
  background: var(--cream);
  border: 1.5px solid rgba(107, 10, 32, 0.12);
  border-radius: 22px; padding: 28px 32px 24px;
  box-shadow: 0 16px 34px rgba(107, 10, 32, 0.10);
  transform: rotate(var(--tilt, 0deg));
  opacity: 1;
}
.cs-bquote-wrap:nth-child(odd)  .cs-bquote { --tilt: -1.7deg; }
.cs-bquote-wrap:nth-child(even) .cs-bquote { --tilt: 1.9deg; }
.cs-bquote::before {
  content: "\201C"; position: absolute; top: -18px; left: 22px;
  font-family: var(--font-headline); font-style: italic;
  font-size: 76px; line-height: 1; color: var(--pink); opacity: 0.42;
}
.cs-bquote-text {
  margin: 0; font-family: var(--font-headline); font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 500;
  font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5;
  color: var(--burgundy); text-wrap: pretty;
}
.cs-bquote-pic-wrap {
  position: absolute; top: 92px; right: -10px;
  width: min(320px, 30%); margin: 0; text-align: center; z-index: 2;
}
@media (max-width: 1080px) {
  .cs-bquote-pic-wrap {
    position: static; width: auto; margin: 44px auto 0;
  }
}
.cs-bquote-pic-bob { display: block; }
.cs-bquote-pic-pop { display: block; opacity: 1; }
.cs-bquote-pic-cap {
  margin-top: 16px; font-family: var(--font-script); font-weight: 700;
  font-size: 24px; color: var(--pink);
}

/* one-shot bounce-in when the section scrolls into view */
@keyframes quoteBounceIn {
  0%   { opacity: 0; transform: translateY(48px) scale(0.78) rotate(var(--tilt, 0deg)); }
  55%  { opacity: 1; transform: translateY(-13px) scale(1.05) rotate(var(--tilt, 0deg)); }
  74%  { transform: translateY(6px) scale(0.99) rotate(var(--tilt, 0deg)); }
  88%  { transform: translateY(-3px) scale(1.004) rotate(var(--tilt, 0deg)); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(var(--tilt, 0deg)); }
}
@keyframes quoteBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.cs-bquotes.in .cs-bquote { animation: quoteBounceIn 0.72s cubic-bezier(.2,.8,.3,1.25) both; }
.cs-bquotes.in .cs-bquote-wrap:nth-child(1) .cs-bquote { animation-delay: 0.05s; }
.cs-bquotes.in .cs-bquote-wrap:nth-child(2) .cs-bquote { animation-delay: 0.24s; }
.cs-bquotes.in .cs-bquote-wrap:nth-child(3) .cs-bquote { animation-delay: 0.43s; }
.cs-bquotes.in .cs-bquote-wrap:nth-child(4) .cs-bquote { animation-delay: 0.62s; }
.cs-bquotes.in .cs-bquote-pic-pop { animation: quoteBounceIn 0.7s cubic-bezier(.2,.8,.3,1.25) 0.5s both; }

/* gentle continuous bob once settled — only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .cs-bquotes.in .cs-bquote-wrap { animation: quoteBob var(--bob, 4.4s) ease-in-out infinite; }
  .cs-bquotes.in .cs-bquote-wrap:nth-child(1) { animation-delay: 0.95s; --bob: 4.2s; }
  .cs-bquotes.in .cs-bquote-wrap:nth-child(2) { animation-delay: 1.2s;  --bob: 5.0s; }
  .cs-bquotes.in .cs-bquote-wrap:nth-child(3) { animation-delay: 1.4s;  --bob: 4.7s; }
  .cs-bquotes.in .cs-bquote-wrap:nth-child(4) { animation-delay: 1.6s;  --bob: 5.2s; }
  .cs-bquotes.in .cs-bquote-pic-bob { animation: quoteBob 4.6s ease-in-out 1.45s infinite; }
}

/* reduced motion: show everything, no animation */
@media (prefers-reduced-motion: reduce) {
  .cs-bquote, .cs-bquote-pic-pop { opacity: 1 !important; animation: none !important; }
}

@media (max-width: 720px) {
  .cs-bquote-wrap { align-self: stretch !important; max-width: 100%; }
}
