/* casper.codes — full-screen slides.
   One typeface (Inter Tight, variable 100–900): contrast comes from weight, not from mixing faces.
   Texture after thehausofsir.com: static grain fixed over everything (tone multiplied, specks screened),
   and a 1px soft edge on display type like an optical print. Scenes after reelationship.xyz. */
:root {
  --ink: #1E1B16;          /* warm espresso, not cold black */
  --paper: #EFE6D6;        /* beige */
  --cream: #FFF6E4;
  --mute: #8C8273;
  --accent: #E8452C;
  --gizbar: #1F3DFF;
  --median: #F26B1D;
  --font: "Barlow", "PingFang HK", "Noto Sans TC", system-ui, sans-serif;
  --display: "Barlow Condensed", "PingFang HK", sans-serif;
  --hand: "Reenie Beanie", "Bradley Hand", cursive;
  --pad: clamp(24px, 7vw, 120px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-snap-type: y mandatory; height: 100%; overflow-y: scroll; }
body { background: var(--ink); color: var(--ink); font: 400 18px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* grain, twice, static, over everything */
html::before, html::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; background-size: 256px 256px; }
html::before { background-image: url("img/tex/grain-tone.png"); mix-blend-mode: multiply; opacity: .3; }
html::after { background-image: url("img/tex/grain-white.png"); mix-blend-mode: screen; opacity: .8; }

/* chrome */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 40; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.nav { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--pad); mix-blend-mode: difference; color: #fff; font-size: 13px; }
.brand { font-weight: 600; font-size: 16px; text-decoration: none; letter-spacing: -.01em; }
.brand .dot { color: var(--accent); }
.counter { font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.counter b { font-weight: 700; }

/* slides: one screen each, mandatory snap */
.slide { position: relative; height: 100vh; height: 100svh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden;
  padding: 96px var(--pad); display: flex; flex-direction: column; justify-content: center; background: var(--paper); }
.center { align-items: center; text-align: center; }
.dark { background: var(--ink); color: #ECE9E2; }
.paper { background: linear-gradient(#efe6d6b0, #efe6d6b0), url("img/tex/paper.jpg") center / 1024px; }
.ink { background: var(--ink) url("img/tex/ink.jpg") center / 512px; }
.dark { color: var(--cream); }

/* type: one family, weights do the work */
.label { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--mute); margin-bottom: 32px; }
/* headlines: condensed caps like a Reel cover; soft optical edge */
h1, h2, h3, .mega { font-family: var(--display); text-transform: uppercase; text-shadow: 0 0 1px currentColor; }
h1 { font-size: clamp(64px, 11vw, 200px); font-weight: 800; line-height: .86; letter-spacing: -.01em; }
h2 { font-size: clamp(54px, 8.5vw, 150px); font-weight: 800; line-height: .88; letter-spacing: -.01em; }
h1 b, h2 b { font-weight: 900; }
h1 b { color: var(--accent); }
h3 { font-size: clamp(32px, 3.6vw, 56px); font-weight: 700; letter-spacing: 0; margin-top: 24px; }
.bleed h2, .reel h2 { color: var(--cream); text-shadow: 0 2px 18px #0006, 0 0 1px currentColor; }

/* handwritten notes */
.h-wrap { position: relative; display: inline-block; }
.hero .h-wrap { align-self: flex-start; }
.center .h-wrap { display: block; }
.note { position: absolute; font: 400 clamp(26px, 2.6vw, 40px)/1 var(--hand); color: inherit; white-space: nowrap; transform: rotate(var(--rot, -4deg));
  opacity: 0; transition: opacity .6s ease .9s; pointer-events: none; z-index: 3; }
.in .note { opacity: .92; }
.note .arrow { position: absolute; width: 90px; height: 45px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset 1.1s ease 1.3s; }
.in .note .arrow { stroke-dashoffset: 0; }
.n-pre { position: static; display: block; margin-bottom: 6px; --rot: -3deg; text-align: left; }
.center .n-pre { text-align: center; }
.n-hero1 { left: 100%; top: 4%; margin-left: 8px; --rot: 6deg; color: var(--accent); }
.n-hero1 .arrow { left: 0; top: 110%; transform: scaleX(-1) rotate(-50deg); width: 70px; }
.n-me { position: static; display: inline-block; margin: -40px 0 0 230px; --rot: -4deg; color: var(--mute); align-self: flex-start; }
.n-cap { position: static; margin-top: 30px; --rot: -2deg; color: #FFD9A8; }
.n-cap .arrow.flip { left: 102%; top: 40%; transform: scaleX(-1) rotate(-60deg); width: 70px; }
.n-reel { left: 102%; bottom: 18%; --rot: -8deg; color: #FFD9A8; }
.n-gs { position: static; margin-top: 8px; --rot: -5deg; }
.n-md { position: static; margin-top: 8px; --rot: 4deg; color: var(--median); }
.n-com { right: 0; bottom: -40%; --rot: -6deg; color: #FFD9A8; }
.n-work { position: static; margin: -20px 0 10px; --rot: -3deg; color: var(--accent); }
.n-press { right: -2%; top: -30%; --rot: 6deg; color: #F7B35A; }
.n-press .arrow { left: 10%; top: 80%; transform: rotate(80deg); width: 70px; }
.n-hi { right: 6%; top: -26%; --rot: 8deg; color: #FFD9A8; }
.sub { font-size: clamp(17px, 1.4vw, 21px); font-weight: 400; margin-top: 26px; opacity: .78; }
.sub a { color: inherit; text-underline-offset: 4px; }

.btn { display: inline-block; margin-top: 44px; padding: 14px 26px 12px; border: 1.5px solid currentColor; border-radius: 999px; text-decoration: none;
  font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: background .3s, color .3s, border-color .3s; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn.on-dark:hover { background: #fff; color: var(--ink); }

/* 01 hero */
.hero h1 { max-width: none; font-size: clamp(56px, 9vw, 168px); }
.lede { font-size: clamp(18px, 1.6vw, 23px); font-weight: 300; margin-top: 36px; color: #4a4843; }
.me { display: inline-flex; align-items: center; gap: 14px; margin-top: 56px; text-decoration: none; align-self: flex-start; }
.me img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; filter: saturate(.8); box-shadow: 0 0 0 1px #0002; }
.me span { display: flex; flex-direction: column; line-height: 1.25; }
.me b { font-size: 14px; font-weight: 600; }
.me i { font-family: var(--display); font-size: 12px; font-style: normal; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.scroll-hint { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--mute); text-decoration: none; }
.in .scroll-hint.fx { transform: translateX(-50%); }

/* 02 capital: texture-filled numerals */
.mega { font-size: clamp(140px, 28vw, 460px); font-weight: 900; line-height: .9; letter-spacing: -.02em; }
.tex-text { color: transparent; background:
    url("img/tex/grain-white.png") 0 0 / 180px,
    linear-gradient(100deg, var(--cream) 0%, #FFD9A8 30%, var(--accent) 50%, #FFD9A8 70%, var(--cream) 100%) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; text-shadow: none; animation: sheen 9s linear infinite; }
@keyframes sheen { to { background-position: 180px 0, -300% 0; } }
.marquee { position: absolute; left: 0; right: 0; bottom: 0; display: flex; overflow: hidden; white-space: nowrap; background: var(--accent);
  color: var(--cream); font-family: var(--display); font-size: 16px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; padding: 14px 0; }
.marquee div { flex: none; animation: marquee 30s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* 03 reelationship: the reelationship.xyz conveyor as a live background */
.reel { background: radial-gradient(ellipse 75% 65% at 50% 38%, #24533f 0%, #163528 70%, #0f271d 100%); color: #FBF5E9; justify-content: flex-end; }
.reel .label { color: #fbf5e999; }
.conveyor { position: absolute; inset: 0; pointer-events: none; }
.rcard { position: absolute; left: 50%; top: 40%; width: min(62vw, 300px, 30svh); aspect-ratio: 9 / 16; border-radius: 34% / 20%;
  background: #0b1f16; color: #fff8e9; opacity: var(--pose-o, 1);
  filter: blur(var(--pose-b, 0px)) brightness(var(--pose-br, 1));
  transform: translate(-50%, -50%) translate(var(--pose-x, 0px), var(--pose-y, 0px)) rotate(var(--pose-r, 0deg)) scale(var(--pose-s, 1));
  will-change: transform, opacity, filter;
  box-shadow: 10px 26px 56px -10px #ed715429, -12px 30px 72px -12px #9ec7a424, 0 26px 50px -20px #06150e99; }
.rcard video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.rtop { position: absolute; inset: 16px 22% auto; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; text-shadow: 0 1px 6px #0007; }
.rbubble { position: absolute; left: -6%; top: 5%; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 16px;
  background: #102b20e6; font-size: 13px; font-weight: 700; white-space: nowrap; opacity: 0; transform: translateY(6px) rotate(-6deg);
  transition: opacity .5s var(--ease), transform .5s var(--ease); }
.rbubble svg { width: 14px; height: 14px; color: #ed7154; }
.rcard[data-front] .rbubble { opacity: 1; transform: rotate(-6deg); transition-delay: .25s; }
.reel::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(#0f271d00, #0f271dee 70%); z-index: 1; pointer-events: none; }
.reel-copy { position: relative; z-index: 2; padding-bottom: 2vh; }
.reel-copy .btn { margin-top: 32px; }

/* 04 channels */
.duo { flex-direction: row; padding: 0; }
.panel { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 120px 40px;
  text-decoration: none; position: relative; transition: flex .8s var(--ease); }
.panel:hover { flex: 1.25; }
.gongsou { background: #E94560; color: #fff; }
.gongsou .label { color: #ffffffb0; }
.median { background-color: #F6EEDD; }
.pixel { width: clamp(110px, 12vw, 170px); image-rendering: pixelated; }
.median-mark { font-size: clamp(64px, 7vw, 104px); font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.median h3 { color: var(--median); font-weight: 700; }
.go { position: absolute; bottom: 40px; font-size: 12px; font-weight: 600; letter-spacing: .12em; opacity: 0; transform: translateY(8px); transition: .4s var(--ease); }
.panel:hover .go { opacity: 1; transform: none; }
.float { animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-1.5deg); } }

/* 05 community */
.bleed { color: #fff; justify-content: flex-end; }
.bleed-img { position: absolute; inset: -12% 0; }
.bleed-img img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.bleed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0000 35%, #000b); }
.bleed-text { position: relative; z-index: 2; }
.bleed .label { color: #ffffffb0; }

/* 06 more work */
.list { width: min(100%, 760px); text-align: left; }
.item { border-bottom: 1px solid #0b0c0f1f; }
.item summary { list-style: none; display: flex; align-items: baseline; gap: 32px; padding: 24px 0; cursor: pointer; transition: padding-left .4s var(--ease), color .3s; }
.item summary::-webkit-details-marker { display: none; }
.item summary:hover, .item[open] summary { padding-left: 14px; color: var(--accent); }
.item .yr { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); width: 48px; flex: none; }
.item .t { font-family: var(--display); text-transform: uppercase; font-size: clamp(34px, 4vw, 58px); font-weight: 500; letter-spacing: 0; line-height: 1.1; flex: 1; transition: font-weight .4s var(--ease); }
.item summary:hover .t, .item[open] .t { font-weight: 800; }
.plus { width: 18px; height: 18px; position: relative; flex: none; align-self: center; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
.plus::after { transform: rotate(90deg); }
.item[open] .plus::after { transform: rotate(0); }
.more { padding: 0 0 28px 80px; color: #4a4843; animation: open .6s var(--ease); }
.more p { max-width: 32em; }
.more a { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.more a i { color: var(--mute); font-style: normal; margin-left: 4px; }
.more video { margin-top: 16px; width: 100%; max-width: 460px; max-height: 32vh; object-fit: contain; border: 1px solid #0b0c0f1f; background: #fff; }
@keyframes open { from { opacity: 0; transform: translateY(-8px); filter: blur(6px); } }
.old { margin-top: 44px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); text-decoration: none; }
.old:hover { color: var(--accent); }

/* 07 press */
.press { padding-left: 0; padding-right: 0; }
.press-head { padding: 0 var(--pad); margin-bottom: 56px; }
.press h2 b { color: #F7931A; }
.film { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #0000, #000 8%, #000 92%, #0000); mask-image: linear-gradient(90deg, #0000, #000 8%, #000 92%, #0000); }
.film-track { display: flex; gap: 22px; width: max-content; padding: 20px 0; animation: film 70s linear infinite; }
.film:hover .film-track { animation-play-state: paused; }
@keyframes film { to { transform: translateX(-50%); } }
.clip { border: 0; padding: 0; background: none; cursor: zoom-in; flex: none; transform: rotate(var(--r, -1deg)); transition: transform .4s var(--ease); }
.clip:nth-child(2n) { --r: 1.2deg; } .clip:nth-child(3n) { --r: -.4deg; }
.clip:hover { transform: rotate(0) scale(1.05); }
.clip img { height: clamp(180px, 28vh, 290px); width: auto; box-shadow: 0 18px 40px #0008; filter: sepia(.15); }
.lightbox { position: fixed; inset: 0; z-index: 45; background: #0b0c0ff0; display: grid; place-items: center; padding: 5vh 5vw; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; max-width: 90vw; width: auto; animation: open .5s var(--ease); }
.lb-x { position: absolute; top: 24px; right: 28px; background: none; border: 0; color: #fff; font: 600 11px var(--font); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }

/* 08 contact */
.contact h2 b { color: var(--accent); }
.email { display: inline-block; margin-top: 48px; font-family: var(--hand); font-size: clamp(40px, 5vw, 76px); font-weight: 400; color: var(--cream); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease), font-weight .4s; }
.email:hover { background-size: 100% 2px; }
.socials { list-style: none; display: flex; gap: 36px; margin-top: 56px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.socials a { text-decoration: none; color: #9a978f; }
.socials a:hover { color: #fff; }
.foot { position: absolute; bottom: 28px; font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #55534e; }


/* handwriting written out: each letter's outline is traced like a pen, then the ink fills in */
.note .hw { display: block; height: 1.4em; width: calc(var(--w) * 1.4em * 1000 / 1080); overflow: visible; }
.hw path { fill: currentColor; fill-opacity: 0; stroke: currentColor; stroke-width: 18; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .hw path { animation: write .55s cubic-bezier(.45, 0, .2, 1) forwards; animation-delay: calc(var(--k) * 85ms + .9s); }
@keyframes write { 70% { stroke-dashoffset: 0; fill-opacity: 0; } 100% { stroke-dashoffset: 0; fill-opacity: 1; stroke-width: 6; } }
.note { opacity: .95 !important; transition: none; }

/* ---------- text effects ---------- */
/* blur-in, word by word */
.blur-words .w { display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(.18em);
  transition: opacity 1.1s var(--ease), filter 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i) * 110ms + .15s); }
.in .blur-words .w { opacity: 1; filter: blur(0); transform: none; }
/* fade + slight blur for supporting text */
.fx { opacity: 0; filter: blur(6px); transform: translateY(16px);
  transition: opacity 1s var(--ease) var(--d, 0s), filter 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }
.in .fx { opacity: 1; filter: none; transform: none; }

/* responsive */
@media (max-width: 860px) {
  .n-reel, .n-hero1 .arrow { display: none; }
  .n-hero1 { position: static; display: block; margin: 14px 0 0; }
  .n-me { margin: 10px 0 0 4px; }
  .duo { flex-direction: column; }
  .panel { padding: 64px 24px; }
  .panel:hover { flex: 1; }
  .go { opacity: 1; transform: none; bottom: 20px; }
  .pixel { width: 92px; }
  .median-mark { font-size: 56px; }
  h3 { margin-top: 16px; }
  .item summary { gap: 16px; }
  .more { padding-left: 0; }
  .rcard { top: 36%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx, .blur-words .w { opacity: 1; filter: none; transform: none; }
  .hw path { stroke-dashoffset: 0; fill-opacity: 1; }
}

/* hero headline: same type as gizbarcap.com — Fraunces 400, tight tracking, italic accent */
.hero h1 { font-family: "Fraunces", "Times New Roman", serif; text-transform: none; font-weight: 400; font-size: clamp(58px, 9.5vw, 176px); line-height: 1; letter-spacing: -.045em; text-shadow: none; }
.hero h1 b { font-weight: 400; font-style: italic; letter-spacing: -.03em; }
button.email { background-color: transparent; border: 0; padding: 0; cursor: pointer; }
