/* =============================================================
   HmmmFactory — Creative Studio
   "Turning ideas into structure."
   ============================================================= */

/* ---- Design tokens ---------------------------------------- */
:root {
  --bg:        #0a0a0c;
  --bg-soft:   #101014;
  --surface:   #15151b;
  --surface-2: #1c1c24;
  --text:      #f4f1ea;
  --muted:     #9a958c;
  --faint:     #6b6760;
  --line:      rgba(244, 241, 234, 0.10);
  --line-soft: rgba(244, 241, 234, 0.05);
  --accent:    #ff5a36;
  --accent-2:  #ff8a3d;
  --accent-dim:#ff5a3622;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Space Grotesk", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1600px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---- Color themes (dark base kept; accent palette swappable) ---- */
[data-theme="ssireum"] { --accent:#e8402e; --accent-2:#3f6ff2; --accent-dim:#e8402e22; } /* satba red + blue */
[data-theme="sprout"]  { --accent:#57b85f; --accent-2:#ff7a45; --accent-dim:#57b85f22; } /* leaf green */
[data-theme="gold"]    { --accent:#d8a441; --accent-2:#b9742f; --accent-dim:#d8a44122; } /* heritage gold */
[data-theme="violet"]  { --accent:#8b6ccf; --accent-2:#e0567f; --accent-dim:#8b6ccf22; } /* studio violet */
[data-theme="mono"]    { --accent:#e9e4da; --accent-2:#8f8a80; --accent-dim:#e9e4da16; } /* minimal */

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  font-feature-settings: "ss01" on;
}

img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: #0a0a0c; }

/* hide native cursor when custom cursor active */
body.cursor-active, body.cursor-active a, body.cursor-active button { cursor: none; }

/* ---- Type scale ------------------------------------------- */
.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
}

/* =============================================================
   Preloader
   ============================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--pad);
  transition: transform 1s var(--ease);
}
.preloader.done { transform: translateY(-101%); }
.preloader__count {
  font-family: var(--serif);
  font-size: clamp(4rem, 18vw, 16rem);
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: -0.04em;
}
.preloader__word {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding-bottom: 0.6rem;
}

/* =============================================================
   Custom cursor
   ============================================================= */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 900;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor {
  width: 38px; height: 38px;
  border: 1px solid #fff;
  margin: -19px 0 0 -19px;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .3s;
}
.cursor-dot {
  width: 5px; height: 5px;
  background: #fff;
  margin: -2.5px 0 0 -2.5px;
}
.cursor.is-hover { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
@media (hover: none) { .cursor, .cursor-dot { display: none; } body.cursor-active { cursor: auto; } }

/* =============================================================
   Navigation
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 2.4vw, 1.8rem) var(--pad);
  mix-blend-mode: difference;
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.25rem; font-weight: 400; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 0.55rem;
}
.nav__brand .mark {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  animation: pulse 3s var(--ease-io) infinite;
}
@keyframes pulse { 0%,100%{ transform: scale(1); opacity:1 } 50%{ transform: scale(.5); opacity:.5 } }
.nav__menu { display: flex; gap: clamp(1rem, 3vw, 2.6rem); align-items: center; }
.nav__link {
  font-size: 0.82rem; letter-spacing: 0.04em; position: relative;
  padding-bottom: 2px;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: currentColor; transition: width .4s var(--ease);
}
.nav__link:hover::after { width: 100%; }
.nav__time { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px){ .nav__menu .nav__link:not(.nav__cta){ display:none } .nav__time{ display:none } }

/* =============================================================
   Layout helpers
   ============================================================= */
.section { position: relative; padding: clamp(6rem, 14vh, 12rem) var(--pad); }
.section--tight { padding-top: clamp(3rem, 6vh, 6rem); }
.container { max-width: var(--maxw); margin: 0 auto; width: 100%; }
.row { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2vw, 2rem); }
.section-index {
  display: flex; align-items: baseline; gap: 1rem;
  font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2.4rem;
}
.section-index .num { color: var(--accent); }
.section-index::before {
  content: ""; flex: 0 0 40px; height: 1px; background: var(--line);
  align-self: center;
}

/* reveal primitives (JS sets initial state; degrade gracefully without JS) */
.reveal-line { overflow: hidden; display: block; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad);
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.6s var(--ease) .3s;
}
.hero.ready #hero-canvas { opacity: 1; }
.hero__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero__eyebrow {
  display: flex; gap: 1.2rem; align-items: center; margin-bottom: clamp(1.4rem, 4vh, 3rem);
  flex-wrap: wrap;
}
.hero__title {
  font-size: clamp(3.2rem, 13vw, 15rem);
  font-weight: 300;
}
.hero__title .word { display: inline-block; overflow: hidden; vertical-align: top; }
.hero__title .word > span { display: inline-block; will-change: transform; }
.hero__title em {
  font-style: italic; color: var(--accent);
  font-variation-settings: "SOFT" 100;
}
.hero__tagline {
  margin-top: clamp(1.6rem, 4vh, 3rem);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap;
}
.hero__tagline p { max-width: 32ch; color: var(--muted); font-size: clamp(0.95rem, 1.4vw, 1.15rem); line-height: 1.6; }
.hero__tagline p strong { color: var(--text); font-weight: 500; }
.hero__scroll {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll .bar { position: relative; width: 60px; height: 1px; background: var(--line); overflow: hidden; }
.hero__scroll .bar::after {
  content:""; position:absolute; inset:0; background: var(--accent);
  transform: translateX(-100%); animation: scrollbar 2.4s var(--ease-io) infinite;
}
@keyframes scrollbar { 0%{ transform: translateX(-100%) } 50%{ transform: translateX(0) } 100%{ transform: translateX(100%) } }
.hero__noise {
  position:absolute; inset:0; z-index:1; pointer-events:none; opacity:.5;
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, var(--bg) 100%);
}

/* =============================================================
   Manifesto
   ============================================================= */
.manifesto { padding-block: clamp(7rem, 18vh, 16rem); }
.manifesto__text {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.8rem, 4.4vw, 4.4rem);
  line-height: 1.18; letter-spacing: -0.02em;
  max-width: 22ch;
}
.manifesto__text .w { display: inline-block; }
.manifesto__text .dim { color: var(--faint); }
.manifesto__text em { font-style: italic; color: var(--accent); }
.manifesto__meta {
  margin-top: clamp(2.5rem, 6vh, 5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem; border-top: 1px solid var(--line); padding-top: 2rem;
}
.manifesto__meta div h4 { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; font-weight: 500; }
.manifesto__meta div p { color: var(--text); font-size: 0.95rem; line-height: 1.5; }

/* =============================================================
   Capabilities
   ============================================================= */
.caps { border-top: 1px solid var(--line); }
.cap {
  position: relative; display: grid;
  grid-template-columns: 5rem minmax(0,1.1fr) minmax(0,1fr) 4rem;
  gap: clamp(1rem,3vw,3rem); align-items: center;
  padding: clamp(1.6rem, 3.2vh, 2.6rem) 0;
  border-bottom: 1px solid var(--line);
  transition: padding .5s var(--ease);
}
.cap__num { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cap__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1;
  letter-spacing: -0.01em; transition: transform .5s var(--ease), color .4s;
}
.cap__desc { color: var(--muted); font-size: 0.92rem; line-height: 1.55; max-width: 40ch; transition: color .4s; }
.cap__arrow { justify-self: end; color: var(--faint); transition: transform .5s var(--ease), color .4s; }
.cap:hover { padding-left: clamp(0.5rem, 2vw, 2rem); }
.cap:hover .cap__title { transform: translateX(0.4rem); color: var(--accent); }
.cap:hover .cap__arrow { transform: translate(0.4rem, -0.4rem); color: var(--accent); }
.cap__bg {
  position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: linear-gradient(90deg, var(--accent-dim), transparent 60%);
  transition: opacity .5s var(--ease);
}
.cap:hover .cap__bg { opacity: 1; }
@media (max-width: 820px){
  .cap { grid-template-columns: 3rem 1fr 2rem; }
  .cap__desc { display: none; }
}

/* =============================================================
   Selected work / showcase
   ============================================================= */
.work { background: var(--bg-soft); }
.work__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.5rem; margin-bottom: clamp(3rem, 8vh, 6rem); }
.work__head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 6vw, 4.5rem); line-height: .95; letter-spacing: -0.02em; }
.work__head p { color: var(--muted); max-width: 30ch; }

.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 4vw, 4rem); }
@media (max-width: 820px){ .work__grid { grid-template-columns: 1fr; } }

.project { position: relative; display: block; }
.project:nth-child(even) { margin-top: clamp(0rem, 8vw, 7rem); }
.project__media {
  position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 4px;
  background: var(--surface);
  transform-style: preserve-3d; will-change: transform;
}
.project__visual {
  position: absolute; inset: 0;
  transition: transform .9s var(--ease), filter .9s var(--ease);
  transform: scale(1.04);
}
.project:hover .project__visual { transform: scale(1.10); }
.project__inner3d { position:absolute; inset:0; transform: translateZ(40px); display:flex; align-items:flex-end; padding: 1.6rem; }
.project__tag {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  background: rgba(10,10,12,.55); backdrop-filter: blur(8px);
  border: 1px solid var(--line); padding: .45rem .8rem; border-radius: 100px;
  color: var(--text);
}
.project__meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.2rem; gap: 1rem; }
.project__name { font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.05; letter-spacing: -0.01em; }
.project__year { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.project__cat { color: var(--muted); font-size: 0.85rem; margin-top: .3rem; }
.project__view {
  position: absolute; top: 1.4rem; right: 1.4rem; z-index: 3;
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  background: rgba(10,10,12,.4); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.7); transition: all .5s var(--ease);
}
.project:hover .project__view { opacity: 1; transform: scale(1); }

/* =============================================================
   Archive
   ============================================================= */
.archive { border-top: 1px solid var(--line); }
.archive__list { border-top: 1px solid var(--line); }
.arc-row {
  display: grid; grid-template-columns: 4rem 1fr 1fr 6rem;
  gap: 1.5rem; align-items: center;
  padding: clamp(1rem,2.4vh,1.6rem) 0; border-bottom: 1px solid var(--line);
  position: relative; transition: color .4s;
}
.arc-row__idx { color: var(--faint); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.arc-row__title { font-family: var(--serif); font-weight: 300; font-size: clamp(1.1rem, 2.4vw, 1.7rem); transition: transform .45s var(--ease); }
.arc-row__cat { color: var(--muted); font-size: 0.85rem; }
.arc-row__year { text-align: right; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.arc-row:hover .arc-row__title { transform: translateX(0.5rem); }
.arc-row:hover { color: var(--accent); }
.arc-row:hover .arc-row__cat, .arc-row:hover .arc-row__year { color: var(--accent); }
.arc-row__preview {
  position: fixed; z-index: 50; width: 280px; height: 200px; border-radius: 6px;
  pointer-events: none; opacity: 0; overflow: hidden; transform: translate(-50%,-50%) scale(.9);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.arc-row__preview.show { opacity: 1; }
@media (max-width: 720px){
  .arc-row { grid-template-columns: 2.5rem 1fr 3.5rem; }
  .arc-row__cat { display: none; }
}

/* =============================================================
   Approach / process
   ============================================================= */
.approach { background: var(--bg-soft); }
.approach__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem,3vw,3rem); margin-top: clamp(3rem,8vh,5rem); }
@media (max-width: 820px){ .approach__grid { grid-template-columns: 1fr; } }
.step { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.step__num { font-family: var(--serif); font-size: clamp(2.5rem,6vw,4rem); font-weight: 300; color: var(--accent); line-height: 1; margin-bottom: 1.4rem; }
.step h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: .8rem; letter-spacing: -0.01em; }
.step p { color: var(--muted); font-size: 0.94rem; line-height: 1.6; }

/* =============================================================
   CTA / contact
   ============================================================= */
.cta { text-align: center; padding-block: clamp(8rem, 22vh, 18rem); position: relative; }
.cta__big {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 9vw, 9rem); line-height: .98; letter-spacing: -0.03em;
}
.cta__big em { font-style: italic; color: var(--accent); }
.cta__link {
  display: inline-flex; align-items: center; gap: .8rem; margin-top: clamp(2rem,5vh,3.5rem);
  font-size: clamp(1rem, 2vw, 1.4rem); border-bottom: 1px solid var(--line); padding-bottom: .4rem;
  transition: gap .4s var(--ease), border-color .4s;
}
.cta__link:hover { gap: 1.4rem; border-color: var(--accent); }
.cta__link .arr { color: var(--accent); }

/* =============================================================
   Footer
   ============================================================= */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem,6vh,5rem) var(--pad) 2rem; }
.footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px){ .footer__top { grid-template-columns: 1fr 1fr; } }
.footer__brand { font-family: var(--serif); font-size: clamp(2rem,8vw,5rem); font-weight: 300; letter-spacing: -0.02em; grid-column: 1 / -1; line-height: .9; margin-bottom: 2rem; }
.footer h5 { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; font-weight: 500; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer ul a { color: var(--text); font-size: .92rem; transition: color .3s; }
.footer ul a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; margin-top: clamp(3rem,8vh,5rem); padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; flex-wrap: wrap; gap: 1rem; }

/* =============================================================
   Case study page
   ============================================================= */
.case-hero { min-height: 92svh; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--pad); position: relative; overflow: hidden; }
.case-hero__bg { position: absolute; inset: 0; z-index: 0; }
.case-hero__bg::after { content:""; position:absolute; inset:0; background: linear-gradient(0deg, var(--bg) 5%, transparent 60%); }
.case-hero__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.case-hero__cat { margin-bottom: 1.5rem; }
.case-hero__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 10vw, 9rem); line-height: .92; letter-spacing: -0.03em; }
.case-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1.5rem; margin-top: clamp(2rem,5vh,3.5rem); border-top: 1px solid var(--line); padding-top: 1.8rem; }
.case-meta h4 { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; font-weight: 500; }
.case-meta p { font-size: .95rem; }

.case-body { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem,10vh,8rem) var(--pad); }
.case-intro { font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem,4vw,3rem); line-height: 1.25; letter-spacing: -0.02em; max-width: 24ch; }
.case-live { display: inline-flex; align-items: center; gap: .65rem; margin-top: clamp(1.5rem,4vh,2.4rem); padding: .95rem 1.7rem; background: var(--accent); color: var(--bg); border-radius: 999px; font-family: var(--sans); font-weight: 500; font-size: .98rem; letter-spacing: .01em; box-shadow: 0 12px 34px var(--accent-dim); transition: transform .4s var(--ease), gap .4s var(--ease), box-shadow .4s; }
.case-live:hover { transform: translateY(-2px); gap: 1.05rem; box-shadow: 0 18px 46px var(--accent-dim); }
.case-live__play { font-size: .68rem; transform: translateY(0.5px); }
.case-live__arr { font-weight: 700; }

.case-block { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(2rem,5vw,5rem); padding-block: clamp(3rem,8vh,6rem); border-top: 1px solid var(--line); }
@media (max-width: 820px){ .case-block { grid-template-columns: 1fr; gap: 1rem; } }
.case-block h3 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.case-block p { font-size: clamp(1.05rem,1.6vw,1.3rem); line-height: 1.6; color: var(--text); }
.case-block p + p { margin-top: 1.2rem; }
.case-gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(1rem,2vw,2rem); padding-block: clamp(2rem,6vh,5rem); }
.case-gallery .g { border-radius: 4px; overflow: hidden; aspect-ratio: 4/3; }
.case-gallery .g--wide { grid-column: span 4; }
.case-gallery .g--tall { grid-column: span 2; aspect-ratio: 3/4; }
.case-gallery .g--full { grid-column: 1 / -1; aspect-ratio: 21/9; }
@media (max-width: 820px){ .case-gallery { grid-template-columns: 1fr; } .case-gallery .g { grid-column: 1 / -1 !important; aspect-ratio: 4/3 !important; } }
.case-next { border-top: 1px solid var(--line); padding: clamp(4rem,10vh,8rem) var(--pad); text-align: center; }
.case-next a { display: inline-block; }
.case-next .label { color: var(--muted); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.case-next .t { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem,8vw,6rem); line-height: 1; letter-spacing: -0.02em; margin-top: 1rem; transition: color .4s; }
.case-next a:hover .t { color: var(--accent); }

/* back link */
.back { position: fixed; top: 50%; left: var(--pad); transform: translateY(-50%) rotate(-90deg); transform-origin: left; z-index: 200; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; mix-blend-mode: difference; }
@media (max-width: 820px){ .back { position: static; transform: none; display: inline-block; margin: 1rem 0; } }

/* =============================================================
   Visual placeholders (procedural, no external images)
   ============================================================= */
.viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.viz--a { background:
  radial-gradient(80% 120% at 20% 10%, #ff5a3633, transparent 50%),
  radial-gradient(60% 90% at 90% 90%, #2a2a3a, transparent 60%),
  linear-gradient(135deg, #161620, #0d0d12); }
.viz--b { background:
  radial-gradient(70% 100% at 80% 20%, #ff5a3622, transparent 55%),
  conic-gradient(from 200deg at 30% 70%, #1a1a24, #0c0c10, #1a1a24); }
.viz--c { background:
  linear-gradient(120deg, #0e0e14 0%, #1d1822 100%),
  radial-gradient(50% 80% at 50% 0%, #ff5a3618, transparent); }
.viz--d { background:
  radial-gradient(90% 90% at 10% 90%, #2b2438, transparent 60%),
  linear-gradient(60deg, #0c0c11, #16161e); }
.viz-grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px; }
.viz-num { position: absolute; bottom: 1rem; right: 1.2rem; font-family: var(--serif); font-size: clamp(3rem,8vw,7rem); color: rgba(244,241,234,.06); font-weight: 300; line-height: 1; }

/* =============================================================
   Image-based project (illustration showcase)
   ============================================================= */
.project__art {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: contain;
  padding: clamp(1.4rem, 4vw, 3rem);
  filter: drop-shadow(0 24px 40px rgba(0,0,0,.45));
  transition: transform .9s var(--ease);
  transform: scale(1);
}
.project--art .project__visual { transform: scale(1); }
.project--art:hover .project__art { transform: scale(1.06) translateY(-4px); }
.project__kr { font-size: 0.55em; color: var(--muted); font-family: var(--sans); letter-spacing: 0; vertical-align: middle; margin-left: .4rem; }

/* case hero with artwork */
.case-hero--art .case-hero__inner { max-width: var(--maxw); }
.case-hero__art {
  position: absolute; z-index: 1; right: clamp(-2rem, 2vw, 4rem); bottom: 0;
  height: min(82vh, 760px); width: auto; object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.5));
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 99%);
          mask-image: linear-gradient(to bottom, #000 80%, transparent 99%);
}
.case-hero__kr { display: block; font-family: var(--sans); font-weight: 400; font-size: clamp(1rem, 2.4vw, 1.8rem); color: var(--muted); letter-spacing: -0.01em; margin-top: 1rem; }
@media (max-width: 900px){ .case-hero__art { height: 46vh; right: -1rem; opacity: .35; } }

.case-credits { margin-top: 1.6rem; color: var(--muted); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }

/* technique gallery */
.case-gallery--art {
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 2.4rem);
}
@media (max-width: 900px){ .case-gallery--art { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .case-gallery--art { grid-template-columns: 1fr; } }
.art { margin: 0; }
.art__frame {
  position: relative; aspect-ratio: 1/1; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.art__frame img {
  width: 86%; height: 86%; object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.4));
  transition: transform .7s var(--ease);
}
.art:hover .art__frame img { transform: scale(1.07) rotate(-1deg); }
.art__cap { display: flex; align-items: baseline; gap: .7rem; padding: 1rem .2rem 0; border-top: 1px solid var(--line); margin-top: 1rem; }
.art__idx { color: var(--accent); font-size: .72rem; font-variant-numeric: tabular-nums; }
.art__kr { font-family: var(--serif); font-weight: 300; font-size: 1.15rem; }
.art__en { color: var(--muted); font-size: .8rem; margin-left: auto; }

/* =============================================================
   Theme switcher (site setting)
   ============================================================= */
.theme-switch {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vh, 1.6rem);
  z-index: 300; display: flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.75rem 0.5rem 0.9rem;
  background: rgba(20, 20, 26, 0.6); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 100px;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.theme-switch__label {
  font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-right: 0.25rem; user-select: none;
}
.theme-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--dot, #fff); position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform .3s var(--ease);
}
.theme-dot[data-dot2] { background: linear-gradient(135deg, var(--dot) 0 50%, var(--dot2) 50% 100%); }
.theme-dot:hover { transform: scale(1.25); }
.theme-dot.is-active { box-shadow: 0 0 0 2px var(--bg-soft), 0 0 0 3px var(--dot); }
@media (max-width: 560px){ .theme-switch__label { display: none; } }
@media print { .theme-switch { display: none; } }

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
