/* ============================================================
   Cooper Lampe — Creative Developer
   Black / white / iridescent. Lusion-leaning. WebGL-forward.
   ============================================================ */

:root {
  --bg:        #060608;
  --bg-2:      #0b0c11;
  --bg-3:      #12131a;
  --fg:        #f2f3f7;
  --fg-dim:    #9a9ba8;
  --fg-faint:  #565765;
  --accent:    #6e7bff;   /* electric indigo */
  --accent-2:  #57e6ff;   /* cyan */
  --accent-3:  #ff5cc8;   /* magenta */
  --accent-4:  #ffae57;   /* amber */
  --holo:      linear-gradient(110deg, #57e6ff, #6e7bff 45%, #ff5cc8 80%);
  --line:      rgba(242,243,247,0.09);
  --line-2:    rgba(242,243,247,0.18);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1240px;

  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } }
body.is-loading { overflow: hidden; height: 100vh; }

::selection { background: var(--accent-3); color: #fff; }
a { color: var(--fg); text-decoration: none; }
img, svg, canvas { display: block; }
.mono { font-family: var(--f-mono); }
.dim  { color: var(--fg-faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
em { font-style: normal; color: var(--accent-2); }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
#loader.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-label { font-size: 11px; letter-spacing: .5em; color: var(--fg-faint); margin-bottom: 18px; }
.loader-num { font-family: var(--f-display); font-weight: 700; font-size: clamp(70px, 18vw, 200px); line-height: 1; letter-spacing: -0.04em; }
.loader-num .pct { font-size: 0.3em; vertical-align: super; color: var(--accent); margin-left: .1em; }
.loader-sub { font-size: 11px; letter-spacing: .3em; color: var(--fg-faint); margin-top: 14px; }
.loader-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: rgba(255,255,255,0.06); }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--holo); }

/* ---------- Living ambient background (scroll-reactive, GPU-composited) ---------- */
#ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.amb-blob { position: absolute; width: 80vmax; height: 80vmax; border-radius: 50%; filter: blur(50px); will-change: transform; }
.amb-blob.b1 { top: -26vmax; left: -12vmax;
  background: radial-gradient(circle, rgba(110,123,255,0.13), transparent 60%);
  transform: translate3d(0, calc(var(--sp,0) * 46vh), 0); }
.amb-blob.b2 { bottom: -26vmax; right: -12vmax;
  background: radial-gradient(circle, rgba(255,92,200,0.10), transparent 60%);
  transform: translate3d(0, calc(var(--sp,0) * -34vh), 0); }
.amb-orb { position: absolute; left: 50%; top: 50%; width: min(86vw,86vh); aspect-ratio: 1; opacity: .8; will-change: transform;
  transform: translate(-50%,-50%) scale(calc(.72 + var(--sp,0) * 0.5)) rotate(calc(var(--sp,0) * 60deg)); }
.amb-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(143,160,255,0.16); }
.amb-ring.r1 { inset: 0; }
.amb-ring.r2 { inset: 16%; border-color: rgba(143,224,255,0.14); }
.amb-ring.r3 { inset: 33%; border-color: rgba(255,92,200,0.12); }
.amb-ring.r4 { inset: 50%; border-color: rgba(244,243,247,0.10); }
.amb-sat { position: absolute; will-change: transform; }
.amb-sat::before { content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 18px 2px var(--accent-2); }
.amb-sat.s1 { inset: 16%; animation: amborbit 30s linear infinite; }
.amb-sat.s2 { inset: 33%; animation: amborbit 21s linear infinite reverse; }
.amb-sat.s2::before { width: 8px; height: 8px; background: var(--accent-3); box-shadow: 0 0 18px 2px var(--accent-3); }
.amb-sat.s3 { inset: 50%; animation: amborbit 40s linear infinite; }
.amb-sat.s3::before { background: var(--accent); box-shadow: 0 0 18px 2px var(--accent); }
@keyframes amborbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .amb-sat { animation: none !important; } }

/* ---------- Overlays ---------- */
.grain { position: fixed; inset: 0; z-index: 800; pointer-events: none; opacity: .045; mix-blend-mode: screen;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .5s steps(2) infinite; }
@keyframes grain { to { transform: translate(-5px, 3px); } }

#wipe { position: fixed; inset: 0; z-index: 900; background: var(--bg); transform: scaleY(0); transform-origin: bottom; pointer-events: none; }
#wipe.in  { transform: scaleY(1); transform-origin: bottom; transition: transform .5s var(--ease); }
#wipe.out { transform: scaleY(0); transform-origin: top;    transition: transform .5s var(--ease); }

/* ---------- Cursor ---------- */
#cursor { position: fixed; top: 0; left: 0; z-index: 950; pointer-events: none; }
#cursor .dot, #cursor .ring { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
#cursor .dot { width: 5px; height: 5px; background: var(--fg); mix-blend-mode: difference; }
#cursor .ring { width: 34px; height: 34px; border: 1px solid rgba(242,243,247,0.5);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s, border-color .25s; }
#cursor.hot .ring { width: 56px; height: 56px; border-color: var(--accent-2); }
#cursor.view .ring { width: 78px; height: 78px; background: var(--accent); border-color: transparent; mix-blend-mode: normal; }
#cursor.view .dot { opacity: 0; }
#cursor .label { position: absolute; transform: translate(-50%, -50%); font-size: 10px; letter-spacing: .12em; color: #fff; opacity: 0; }
#cursor.view .label { opacity: 1; }
@media (pointer: coarse) { #cursor { display: none; } }

/* ---------- Topbar ---------- */
.topbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 700;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 48px); mix-blend-mode: difference; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .14em; color: #fff; }
.brand svg { color: #fff; }
.topnav { display: flex; align-items: center; gap: 26px; font-size: 12px; letter-spacing: .1em; }
.topnav a { color: #fff; opacity: .8; transition: opacity .25s; }
.topnav a:hover { opacity: 1; }
.topnav-cta { border: 1px solid rgba(255,255,255,0.4); padding: 8px 14px; opacity: 1 !important; }
@media (max-width: 720px) { .topnav a:not(.topnav-cta) { display: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; padding: 15px 28px;
  border: 1px solid var(--line-2); cursor: none; position: relative; overflow: hidden;
  transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  clip-path: polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px); }
.btn.full { width: 100%; }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 700; }
.btn-primary:hover { box-shadow: 0 0 40px rgba(110,123,255,0.5); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); box-shadow: 0 0 30px rgba(87,230,255,0.15); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; width: 100%; overflow: hidden; }
#particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-foot { position: absolute; left: 0; bottom: clamp(40px, 8vh, 90px); width: 100%; z-index: 2;
  padding: 0 clamp(20px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; pointer-events: none; }
.hero-foot > * { pointer-events: auto; }
.hero-tag { font-size: 11px; letter-spacing: .22em; color: var(--fg-dim); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); animation: blink 1.5s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.hero-lede { max-width: 540px; font-size: clamp(15px, 2vw, 19px); color: var(--fg-dim); margin-bottom: 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 10px; letter-spacing: .3em; color: var(--fg-faint); animation: floaty 2.2s var(--ease) infinite; }
@keyframes floaty { 0%,100%{transform:translate(-50%,0);opacity:.5} 50%{transform:translate(-50%,6px);opacity:1} }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 16px 0; }
.marquee-track { display: flex; white-space: nowrap; width: max-content; animation: scrollx 30s linear infinite; }
.marquee-track span { font-family: var(--f-display); font-weight: 600; font-size: clamp(16px, 2.4vw, 26px); color: var(--fg-dim); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---------- Manifesto ---------- */
.manifesto { max-width: var(--maxw); margin: 0 auto; padding: clamp(90px,16vw,200px) clamp(20px,4vw,48px); }
.big-line { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 4.6vw, 60px);
  line-height: 1.16; letter-spacing: -0.02em; max-width: 18ch; }
.big-line em { color: var(--accent-2); }
.reveal-words .w { display: inline-block; opacity: 0; transform: translateY(0.5em); }

/* ---------- Section base ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px,11vw,140px) clamp(20px,4vw,48px); }
.section-head { margin-bottom: 56px; max-width: 820px; }
.section-head.center { margin-inline: auto; text-align: center; }
.sec-no { display: inline-block; font-size: 11px; letter-spacing: .2em; color: var(--accent); margin-bottom: 20px; }
.section h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 5.2vw, 62px); line-height: 1.02; letter-spacing: -0.025em; }
.section h2.big { font-size: clamp(36px, 7vw, 92px); }
.section-sub { color: var(--fg-dim); margin-top: 18px; font-size: 17px; }

/* ---------- Work list — minimal rows, monoline icons, accent-flood hover ---------- */
.work-list { border-top: 1px solid var(--line); }
.work-row { position: relative; display: grid; grid-template-columns: 30px 46px 1fr auto auto; gap: 26px; align-items: center;
  padding: 30px 8px; border-bottom: 1px solid var(--line); cursor: none; overflow: hidden; isolation: isolate;
  transition: padding .5s var(--ease); }
/* accent floods in from the left on hover */
.work-row::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--row-accent, var(--accent)) 0%, transparent 80%);
  opacity: 0; clip-path: inset(0 100% 0 0); transition: clip-path .6s var(--ease), opacity .4s var(--ease); }
.work-row:hover { padding-left: 24px; }
.work-row:hover::before { opacity: .10; clip-path: inset(0 0 0 0); }

.work-idx { font-size: 12px; color: var(--fg-faint); transition: color .35s var(--ease); }
.work-row:hover .work-idx { color: var(--row-accent, var(--accent)); }

.work-icon { width: 46px; height: 46px; display: grid; place-items: center; }
.work-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--fg-dim);
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .4s var(--ease), transform .5s var(--ease); }
.work-row:hover .work-icon svg { stroke: var(--row-accent, var(--accent)); transform: scale(1.12) rotate(-4deg);
  filter: drop-shadow(0 0 8px var(--row-accent, var(--accent))); }

.work-meta h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 3.6vw, 40px);
  letter-spacing: -0.015em; display: inline-flex; align-items: center; gap: 12px; position: relative; }
.work-meta h3::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 2px; width: 100%;
  background: var(--row-accent, var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.work-row:hover .work-meta h3::after { transform: scaleX(1); }
.work-meta p { color: var(--fg-dim); font-size: 14.5px; margin-top: 8px; max-width: 56ch; transition: color .35s var(--ease); }
.tag-new { font-size: 9px; letter-spacing: .14em; color: var(--bg); background: var(--row-accent, var(--accent-3)); padding: 4px 8px; border-radius: 2px; }

.work-tags { list-style: none; display: flex; flex-direction: column; gap: 5px; text-align: right; font-size: 11px; color: var(--fg-faint); }
.work-go { font-size: 12px; letter-spacing: .08em; color: var(--fg); white-space: nowrap; display: inline-flex; gap: 6px;
  transition: color .35s var(--ease), transform .5s var(--ease); }
.work-row:hover .work-go { color: var(--row-accent, var(--accent-2)); transform: translateX(4px); }
@media (max-width: 820px) {
  .work-row { grid-template-columns: 38px 1fr; gap: 8px 16px; padding: 22px 6px; }
  .work-icon { grid-row: span 1; width: 38px; height: 38px; }
  .work-icon svg { width: 24px; height: 24px; }
  .work-idx { display: none; }
  .work-tags, .work-go { display: none; }
}

/* ---------- Full-bleed stages ---------- */
.stage { position: relative; height: 100svh; min-height: 560px; width: 100%; overflow: hidden;
  display: flex; align-items: center; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.stage-copy { position: relative; z-index: 2; max-width: 540px;
  margin-left: clamp(20px, 6vw, 110px); padding: 0 clamp(20px,4vw,0px); }
.stage-copy.right { margin-left: auto; margin-right: clamp(20px, 6vw, 110px); text-align: right; }
.stage-copy h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px,5.4vw,64px); line-height: 1.02; letter-spacing: -0.025em; margin: 14px 0 18px; }
.stage-copy p { color: var(--fg-dim); font-size: 16px; margin-bottom: 26px; }
.stage-bh::after, .stage-liquid::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.stage-bh::after { background: linear-gradient(90deg, rgba(6,6,8,0.85) 0%, rgba(6,6,8,0.2) 45%, transparent 70%); }
.stage-liquid::after { background: linear-gradient(270deg, rgba(6,6,8,0.85) 0%, rgba(6,6,8,0.2) 45%, transparent 70%); }
@media (max-width: 640px) {
  .stage-copy, .stage-copy.right { text-align: left; margin: 0 22px; }
  .stage-bh::after { background: linear-gradient(180deg, transparent, rgba(6,6,8,0.9)); }
  .stage-liquid::after { background: linear-gradient(180deg, transparent, rgba(6,6,8,0.9)); }
  .stage { align-items: flex-end; padding-bottom: 12vh; }
}

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }
.price { position: relative; border: 1px solid var(--line); background: var(--bg-2); padding: 30px 26px;
  display: flex; flex-direction: column; gap: 15px; transition: transform .4s var(--ease), border-color .4s; }
.price:hover { transform: translateY(-6px); border-color: var(--line-2); }
.price.featured { border-color: var(--accent); background: linear-gradient(180deg, rgba(110,123,255,0.08), var(--bg-2)); box-shadow: 0 0 60px rgba(110,123,255,0.12); }
.ribbon { position: absolute; top: 0; right: 0; background: var(--accent); color: #fff; font-size: 9px; letter-spacing: .14em; padding: 6px 12px; }
.price header { display: flex; align-items: center; gap: 12px; }
.price .tier { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--accent-2); font-size: 13px; }
.price h3 { font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.price-tag { font-family: var(--f-display); font-weight: 700; font-size: 42px; }
.price-tag .from { font-family: var(--f-mono); font-size: 12px; color: var(--fg-faint); font-weight: 400; margin-right: 8px; }
.price-desc { color: var(--fg-dim); font-size: 14.5px; }
.price-list { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; color: var(--fg-dim); }
.price-list li { padding-left: 18px; position: relative; }
.price-list li::before { content: "▸"; position: absolute; left: 0; color: var(--accent-2); }
.price .btn { margin-top: auto; }
.fine-print { text-align: center; margin-top: 36px; color: var(--fg-faint); font-size: 13px; }
.fine-print a { color: var(--accent-2); }

/* ---------- About ---------- */
.about-wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .about-wrap { grid-template-columns: 1fr; gap: 36px; } }
.about-text h2 { margin: 14px 0 22px; }
.about-text p { color: var(--fg-dim); margin-bottom: 16px; max-width: 50ch; }
.about-text .btn { margin-top: 12px; }
.term { border: 1px solid var(--line-2); background: #07080d; box-shadow: 0 40px 100px rgba(0,0,0,0.6); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: var(--bg-3); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--fg-faint); }
.term-bar span:nth-child(1){color:#ff5f56} .term-bar span:nth-child(2){color:#ffbd2e} .term-bar span:nth-child(3){color:#27c93f}
.term-title { margin-left: auto; letter-spacing: .08em; }
.term-body { padding: 22px; font-size: 13px; line-height: 1.85; color: var(--accent-2); min-height: 300px; white-space: pre-wrap; }
.term-body .k{color:var(--accent-3)} .term-body .v{color:var(--fg)} .term-body .c{color:var(--fg-faint)}

/* ---------- Contact ---------- */
.contact-form { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 11px; letter-spacing: .16em; color: var(--fg-faint); }
.field input, .field textarea { background: var(--bg-2); border: 1px solid var(--line-2); color: var(--fg);
  font-family: var(--f-body); font-size: 15px; padding: 14px 16px; resize: vertical; cursor: none;
  transition: border-color .25s, box-shadow .25s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110,123,255,0.14); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { font-family: var(--f-mono); font-size: 12px; color: var(--fg-dim); background: var(--bg-2); border: 1px solid var(--line-2); padding: 9px 14px; cursor: none; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--accent-2); color: var(--accent-2); }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.contact-form > .btn { grid-column: 1 / -1; margin-top: 6px; }
.form-status { grid-column: 1 / -1; text-align: center; font-size: 13px; min-height: 18px; margin-top: -4px; }
.form-status[data-kind="ok"] { color: var(--accent-2); }
.form-status[data-kind="err"] { color: var(--accent-3); }
.form-alt { grid-column: 1 / -1; text-align: center; color: var(--fg-faint); font-size: 12px; }
.form-alt a { color: var(--accent-2); }
@media (max-width: 560px) { .contact-form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(50px,8vw,90px) clamp(20px,4vw,48px) 40px; max-width: var(--maxw); margin: 0 auto; }
.footer-big { font-family: var(--f-display); font-weight: 700; font-size: clamp(64px, 16vw, 220px); line-height: .86; letter-spacing: -0.04em;
  background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 30px 0; border-top: 1px solid var(--line); }
.footer-grid > div { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.footer-grid .dim { font-size: 10px; letter-spacing: .2em; }
.footer-grid a:hover { color: var(--accent-2); }
.footer-grid .ok { color: #27c93f; }
.footer-fine { margin-top: 30px; color: var(--fg-faint); font-size: 11px; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Reveals ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal, .reveal-words .w { opacity: 1 !important; transform: none !important; }
}
