/* ==========================================================
   Thresca — brand identity case study
   Same structural system as sarthi.css (type sizes, spacing, card
   pattern, reveal/split animation) so every case study page reads
   consistently. Only the brand accent values below are Thresca's own.

   Font: Antonia H1, self-hosted below across all 7 weights (Light 300
   through Black 900, each with an italic), used ONLY in the type-weight
   slider demo (.th-sample-text / .th-aa) — same scoping as Aquire on
   AuraWear. Every other headline on the page uses Sora, the site's own
   display font, via --font-display-alt below.
   ========================================================== */

@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-SemiBoldItalic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-Heavy.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-HeavyItalic.woff2") format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Antonia H1"; src: url("AntoniaH1-BlackItalic.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }

:root {
  --sw: 1118px;
  --font-display-alt: var(--font-display); /* Sora, the site's own display font */
  /* Thresca's own palette, sampled directly from the mockup's pixels (no hex codes were
     given in the source file) — confirm against Figma if you have exact values. */
  --th-void: #0F0E1A;
  --th-signal: #7C6FCD;
  --th-haze: #A89FEA;
  --th-mist: #F0EEFF;
  --th-forest: #1A2E1E;
  --th-pulse: #4ADE80;
  --th-chalk: #F5F4F0;
}

.th { background: var(--bg-page); }
.th-wrap { max-width: var(--sw); margin: 0 auto; padding: 0 20px; }

.th-cap { font: 500 16px/1.4 var(--font-body); color: var(--text-secondary); }
.th-back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-secondary); margin-bottom: 28px; transition: color .2s; }
.th-back:hover { color: var(--th-signal); }
.th-back svg { width: 14px; height: 14px; }

/* ---------- Hero ---------- */
.th-hero { padding: 44px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 500px; gap: 40px; align-items: start; }
.th-title { font: 700 clamp(2.4rem, 6.2vw, 60px)/1.08 var(--font-display-alt); letter-spacing: -0.02em; color: var(--bottle-900); margin-top: 6px; }
.th-title .ch { display: inline-block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; vertical-align: bottom; }
.th-title .ch > i { display: block; font-style: normal; transform: translate3d(0, 108%, 0); }
.js.is-loaded .th-title .ch > i { transform: none; transition: transform 1s var(--ease-out) calc(var(--i) * 28ms); }
.th-title .word { display: inline-block; white-space: nowrap; } /* keeps a word on one line across the per-letter split, see sarthi.js fix */
.th-sub { font: 500 16px/1.5 var(--font-body); color: var(--text-secondary); margin-top: 14px; max-width: 60ch; }
.th-divider { width: 100%; max-width: 558px; height: 2px; background: var(--border-subtle); margin: 28px 0; border: 0; }
.th-facts { display: flex; flex-wrap: wrap; gap: 36px; }
.th-fact dt { font: 500 16px/1.3 var(--font-body); color: var(--text-secondary); margin-bottom: 6px; }
.th-fact dd { font: 400 14px/1.5 var(--font-body); margin: 0; max-width: 22ch; }

/* aspect-ratio 1/1 matches the source SVG's real 500x500 canvas exactly, so object-fit:cover
   below fills the box completely with zero cropping and zero stretching — a true 1:1 fit,
   not an approximation. */
.th-logocard { position: relative; width: 100%; max-width: 500px; aspect-ratio: 1 / 1; border-radius: 24px; background: var(--th-void); box-shadow: var(--shadow-sm); overflow: hidden; }
.th-logocard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Context ---------- */
.th-context { padding: 88px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 610px; gap: 40px; align-items: center; }
.th-context h2 { font: 700 32px/1.2 var(--font-display-alt); letter-spacing: -0.01em; color: var(--bottle-900); margin-top: 10px; }
.th-context p { font: 500 16px/1.6 var(--font-body); color: var(--text-secondary); margin-top: 16px; max-width: 56ch; }
/* No context image was supplied in the source — filled with a 4-up feature grid
   (icons: mailbox, list-checks, database, summary) matching the supplied design. */
.th-context-empty { width: 100%; max-width: 610px; aspect-ratio: 610 / 350; border-radius: 24px; background: var(--bg-raised); box-shadow: var(--shadow-sm); overflow: hidden; }

/* ---------- Context: 4-up feature grid filling th-context-empty ---------- */
.th-ctx-grid { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.th-ctx-item { padding: clamp(18px, 4vw, 32px) clamp(18px, 4.5vw, 36px); border-right: 1px solid var(--ink-black); border-bottom: 1px solid var(--ink-black); }
.th-ctx-item:nth-child(2n) { border-right: none; }
.th-ctx-item:nth-child(n+3) { border-bottom: none; }
.th-ctx-icon { display: block; width: 32px; height: 32px; color: var(--bottle-900); margin-bottom: clamp(10px, 2vw, 16px); }
.th-ctx-icon svg { width: 100%; height: 100%; display: block; }
.th-ctx-item h3 { font: 700 18px/1.2 var(--font-display-alt); letter-spacing: -0.01em; color: var(--bottle-900); }
.th-ctx-item p { margin-top: 6px; font: 400 14px/1.45 var(--font-body); color: var(--text-secondary); }
@media (max-width: 480px) {
  .th-ctx-icon { width: 24px; height: 24px; }
  .th-ctx-item h3 { font-size: 15px; }
  .th-ctx-item p { font-size: 12.5px; }
}

/* ---------- Process cards (identical color system to sarthi.css) ---------- */
.th-process { padding: 112px 0 0; }
.th-pcard {
  position: sticky; top: calc(84px + var(--n, 0) * 18px); transform-origin: 50% 0; will-change: transform;
  width: 100%; min-height: 266px; border-radius: 24px; padding: clamp(24px, 4vw, 44px); margin-bottom: 20px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 40px); align-items: center;
  box-shadow: 0 -10px 28px rgb(0 50 35 / 0.10);
}
.th-pcard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #000; opacity: calc(var(--dim, 0) * 0.16); pointer-events: none; }
.th-pcard__no { font: 700 60px/1 var(--font-display-alt); letter-spacing: -0.02em; opacity: .9; }
.th-pcard__body h3 { font: 600 32px/1.2 var(--font-display-alt); letter-spacing: -0.01em; }
.th-pcard__body p { font: 400 16px/1.5 var(--font-body); margin-top: 8px; opacity: .88; max-width: 60ch; }
.th-pcard__body ul { margin-top: 12px; display: grid; gap: 6px; }
.th-pcard__body li { font: 400 16px/1.5 var(--font-body); opacity: .88; display: flex; gap: 10px; }
.th-pcard__body li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; margin-top: 9px; opacity: .7; }
.th-pcard__icon { width: 71px; height: 71px; flex: none; display: grid; place-items: center; }
.th-pcard__icon svg, .th-pcard__icon img { width: 71px; height: 71px; object-fit: contain; }
.th-pcard--1 { background: var(--bg-raised); color: var(--bottle-900); }
.th-pcard--2 { background: var(--bg-inverse); color: var(--sand-100); }
.th-pcard--3 { background: var(--salad-400); color: var(--bottle-900); }
.th-pcard--4 { background: var(--red-100); color: var(--bottle-900); }
@media (max-width: 760px) {
  .th-pcard { grid-template-columns: 1fr; text-align: left; }
  .th-pcard__icon { order: -1; }
}

/* ---------- Mark ---------- */
.th-mark { padding: 88px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 450px; gap: 48px; align-items: center; }
.th-mark h2 { font: 700 40px/1.15 var(--font-display-alt); letter-spacing: -0.02em; color: var(--bottle-900); margin-top: 10px; }
.th-mark > div > p.th-lede { font: 400 16px/1.6 var(--font-body); color: var(--text-secondary); margin-top: 14px; max-width: 54ch; }
.th-marknotes { margin-top: 26px; display: grid; gap: 0; }
.th-marknotes > div { padding: 16px 0; border-top: 1.5px solid var(--th-signal); }
.th-marknotes > div:first-child { border-top: 1.5px solid var(--th-signal); }
.th-marknotes dt { font: 500 16px/1.4 var(--font-body); }
.th-marknotes dd { font: 500 16px/1.5 var(--font-body); color: var(--text-secondary); margin: 4px 0 0; }
.th-markart { position: relative; width: 100%; max-width: 450px; aspect-ratio: 1; border-radius: 24px; background: var(--bg-raised); box-shadow: var(--shadow-sm); overflow: hidden; display: grid; place-items: center; }
.th-markart img { max-width: 68%; max-height: 68%; object-fit: contain; }

/* ---------- Type & colour ---------- */
/* ---------- Colour palette: click a swatch to expand, click the chip to copy ---------- */
.th-palette { padding: 88px 0 0; }
.th-palette h2 { font: 700 32px/1.2 var(--font-display-alt); letter-spacing: -0.01em; color: var(--bottle-900); margin-top: 10px; }
.th-swatches { display: flex; gap: 10px; margin-top: 28px; height: 260px; }
.th-sw {
  position: relative; flex: 1 1 0; min-width: 0; border: 0; border-radius: 24px; padding: 20px; text-align: left; cursor: pointer; overflow: hidden;
  background: var(--c); color: var(--t, #fff); display: flex; flex-direction: column; justify-content: flex-end; font: inherit;
  transition: flex-grow .7s var(--ease-out);
}
.th-sw[aria-expanded="true"] { flex-grow: 3.6; }
.th-sw b { font: 700 1.1rem/1.1 var(--font-display-alt); white-space: nowrap; }
.th-sw__more { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .7s var(--ease-out), opacity .5s ease; font: 500 .95rem/1.4 var(--font-body); }
.th-sw[aria-expanded="true"] .th-sw__more { max-height: 120px; opacity: 1; transition-delay: 0s, .15s; }
.th-sw__more span { display: block; }
.th-sw__chip { display: inline-block; margin-top: 10px; padding: 3px 10px; border: 1.5px solid currentColor; border-radius: 999px; font: 600 12px/1.4 var(--font-body); cursor: pointer; }
.th-sw__toast { position: absolute; top: 16px; right: 16px; font: 600 12px/1 var(--font-body); padding: 6px 10px; border-radius: 999px; background: rgb(0 0 0 / .25); opacity: 0; transform: translate3d(0, -6px, 0); transition: opacity .3s, transform .3s; }
.th-sw__toast.on { opacity: 1; transform: none; }
@media (max-width: 620px) {
  .th-swatches { flex-direction: column; height: auto; }
  .th-sw { flex: none; min-height: 76px; transition: min-height .7s var(--ease-out); }
  .th-sw[aria-expanded="true"] { min-height: 230px; flex-grow: 0; }
}
/* ---------- Type: a live weight slider across all seven loaded Antonia H1 weights ---------- */
.th-type { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 5vw, 64px); align-items: center; margin-top: 44px; }
.th-slider { display: grid; gap: 8px; }
.th-slider label { font: 500 14px/1 var(--font-body); color: var(--text-secondary); display: flex; justify-content: space-between; }
.th-slider input { width: 100%; accent-color: var(--th-signal); height: 28px; }
.th-sample-text { font: 600 clamp(1.4rem, 3vw, 2.1rem)/1.2 "Antonia H1", var(--font-display); font-weight: var(--w, 700); letter-spacing: -0.02em; margin-top: 22px; padding: 14px 16px; border: 1.5px dashed var(--border-subtle); border-radius: 16px; }
.th-scale { margin-top: 22px; display: grid; gap: 10px; }
.th-scale div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.th-scale span { font: 500 14px/1.4 var(--font-body); }
.th-scale small { font: 500 12px/1 var(--font-body); color: var(--text-secondary); }
.th-aa { font-family: "Antonia H1", var(--font-display); font-size: clamp(6rem, 18vw, 13rem); line-height: .9; letter-spacing: -0.03em; font-weight: var(--w, 700); color: var(--th-signal); text-align: center; transition: font-weight .15s linear; }
@media (max-width: 760px) {
  .th-type { grid-template-columns: 1fr; }
  .th-aa { font-size: clamp(5rem, 24vw, 9rem); margin-top: 20px; }
}

/* ---------- Complete Visual Identity: autoplaying logo-loop, same pattern as sarthi.css,
   now using all 4 real lockup exports instead of repeating one. Each lockup's own canvas
   already carries its real background (two are plain white, two are --th-void), so the
   frame's background is set to match that exact file per frame rather than a fixed colour —
   that is what keeps the card's edge invisible against the logo instead of showing a seam. */
.th-identity { padding: 88px 0 0; }
.th-identity h2 { font: 600 32px/1.2 var(--font-display-alt); letter-spacing: -0.01em; color: var(--bottle-900); }
.th-switcher { margin-top: 32px; }
.th-stage { position: relative; width: 1110px; height: 470px; max-width: 100%; margin: 0 auto; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-sm); }
@media (max-width: 1078px) { .th-stage { width: 100%; aspect-ratio: 1038 / 470; height: auto; } }
.th-frame {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.97); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); pointer-events: none;
}
.th-frame.is-active { opacity: 1; transform: scale(1); }
.th-frame[data-key="horizontal-light"], .th-frame[data-key="stacked-light"] { background: #FFFFFF; }
.th-frame[data-key="horizontal-dark"], .th-frame[data-key="stacked-dark"] { background: var(--th-void); }
.th-frame img { max-width: 56%; max-height: 56%; object-fit: contain; transform: translateY(-80px); }
@media (max-width: 760px) { .th-frame img { transform: translateY(-50px); } }
.th-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.th-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-subtle); transition: background-color .4s, transform .4s; }
.th-dots i.is-active { background: var(--th-signal); transform: scale(1.3); }
.th-row3 { margin-top: 16px; display: flex; gap: 16px; height: clamp(180px, 22vw, 268px); }
.th-row3 figure { margin: 0; height: 100%; border-radius: 12px; overflow: hidden; background: var(--bg-sunken); flex: 1 1 0; min-width: 0; }
.th-row3 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-laptop { margin-top: 16px; width: 100%; border-radius: 12px; overflow: hidden; background: var(--bg-sunken); }
.th-laptop img { width: 100%; display: block; }
@media (max-width: 760px) {
  .th-row3 { flex-direction: column; height: auto; }
  .th-row3 figure { height: clamp(160px, 45vw, 240px); }
}

/* ---------- Next project ---------- */
.th-next-wrap { padding: 88px 0 64px; }
.th-next {
  width: 100%; min-height: 215px; border-radius: 24px; background: var(--bg-inverse); color: var(--text-inverse);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(24px, 4vw, 48px);
  text-decoration: none;
}
.th-next__top { font: 500 22px/1.2 var(--font-body); opacity: .75; }
.th-next__title { font: 700 clamp(2rem, 7vw, 60px)/1.05 var(--font-display-alt); letter-spacing: -0.02em; margin-top: 8px; }
.th-next svg { width: clamp(48px, 8vw, 80px); height: clamp(48px, 8vw, 80px); flex: none; transition: transform .35s var(--ease-standard); }
.th-next:hover svg { transform: translate(8px, -8px); }

/* ---------- Reveal ---------- */
.js [data-sr] { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.js [data-sr].is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .th-hero, .th-context, .th-mark { grid-template-columns: 1fr; }
  .th-logocard, .th-markart { max-width: 100%; justify-self: center; }
  .th-context-empty { max-width: 100%; justify-self: center; }
}
@media (max-width: 560px) {
  .th-wrap { padding: 0 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-sr] { opacity: 1; transform: none; transition: none; }
  .th-title .ch > i { transform: none !important; transition: none !important; }
  .th-pcard { position: static; transform: none !important; box-shadow: none; }
  .th-pcard::after { display: none; }
  .th-frame { transition: none; }
  .th-frame.is-active { opacity: 1; transform: none; }
}


/* ---------- Apple-style logo player: matches AuraWear ---------- */
.th-switcher{position:relative}
.th-dots{display:none!important}
.th-player{
  position:absolute!important;
  z-index:20!important;
  left:50%!important;
  bottom:18px!important;
  transform:translateX(-50%)!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  width:auto!important;
  height:63px!important;
  margin:0!important;
  pointer-events:none!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.th-player__reveal{
  width:8px!important;
  height:8px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:#D4D4D4!important;
  box-shadow:0 2px 10px rgb(0 0 0 / .08)!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  transition:width .55s cubic-bezier(.22,1,.36,1),height .55s cubic-bezier(.22,1,.36,1),background-color .25s ease,border-radius .55s cubic-bezier(.22,1,.36,1),opacity .25s ease!important;
}
.th-player__body{
  width:0!important;
  height:63px!important;
  opacity:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#F0F0F0!important;
  border-radius:999px!important;
  pointer-events:none!important;
  transform:scale(.72)!important;
  transform-origin:right center!important;
  transition:width .6s cubic-bezier(.22,1,.36,1),opacity .22s ease,transform .6s cubic-bezier(.22,1,.36,1)!important;
}
.th-player__track{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  width:225px!important;
  height:63px!important;
  flex:none!important;
  padding:0!important;
}
.th-player__track i{
  width:7px!important;
  height:7px!important;
  border-radius:50%!important;
  background:#BDBDBD!important;
  display:block!important;
  transition:width .4s cubic-bezier(.22,1,.36,1),background-color .3s ease!important;
}
.th-player__track i.is-active{
  width:47px!important;
  border-radius:999px!important;
  background:#1A1A1A!important;
}
.th-player__pause{
  width:63px!important;
  height:63px!important;
  flex:none!important;
  border:0!important;
  border-radius:50%!important;
  background:#F0F0F0!important;
  display:grid!important;
  place-items:center!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  color:#171717!important;
  opacity:1!important;
  transform:none!important;
  box-shadow:0 2px 10px rgb(0 0 0 / .04)!important;
  transition:transform .25s ease,background-color .25s ease!important;
}
.th-player__pause:hover{background:#E9E9E9!important;transform:scale(1.04)!important}
.th-player__pause:active{transform:scale(.97)!important}
.th-player__pause svg{width:26px!important;height:26px!important;fill:currentColor!important}
.th-player__pause .play{display:none!important}
.th-player.is-expanded .th-player__body{
  width:225px!important;
  opacity:1!important;
  pointer-events:auto!important;
  transform:scale(1)!important;
}
.th-player.is-expanded .th-player__reveal{
  width:0!important;
  height:0!important;
  opacity:0!important;
  pointer-events:none!important;
}
.th-player.is-paused .th-player__pause .pause{display:none!important}
.th-player.is-paused .th-player__pause .play{display:block!important}
.th-player.is-paused .th-player__track i.is-active{background:#777!important}
.th-player:focus-within .th-player__body,
.th-player:hover .th-player__body{opacity:1!important}
.th-player__reveal:focus-visible,
.th-player__pause:focus-visible{outline:2px solid #1A1A1A!important;outline-offset:4px!important}
@media (max-width:760px){
  .th-player{bottom:14px!important;height:54px!important;gap:7px!important}
  .th-player__body{height:54px!important}
  .th-player__track{width:190px!important;height:54px!important;gap:6px!important}
  .th-player__track i{width:5px!important;height:5px!important}
  .th-player__track i.is-active{width:38px!important}
  .th-player__pause{width:54px!important;height:54px!important}
  .th-player__pause svg{width:24px!important;height:24px!important}
  .th-player.is-expanded .th-player__body{width:190px!important}
}
@media (prefers-reduced-motion:reduce){
  .th-player__body,.th-player__reveal,.th-player__track i{transition:none!important}
}
