/* =========================================================================
   GIDEON PARTNERS — Blueprint Brutalism
   ========================================================================= */

:root {
  /* Palette */
  --ink:      #0A0A0B;
  --ink-2:    #0E0E10;
  --panel:    #131316;
  --bone:     #F2EEE4;
  --bone-dim: #8E897D;
  --bone-faint: #565249;
  --accent:   #FF4D1C;   /* molten orange — signature */
  --accent-2: #C9FF3D;   /* acid lime — rare spark */
  --line:     rgba(242, 238, 228, 0.12);
  --line-2:   rgba(242, 238, 228, 0.06);

  /* Type */
  --display: "Syne", sans-serif;
  --body:    "Space Grotesk", sans-serif;
  --mono:    "Space Mono", monospace;

  /* Rhythm */
  --gutter: clamp(20px, 4.5vw, 72px);
  --col: 1fr;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-2: cubic-bezier(0.65, 0.05, 0, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } }

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

/* ---------- layers ---------- */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  z-index: 60; pointer-events: none;
  opacity: 0.05; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(6) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)}
  40%{transform:translate(3%,-2%)} 60%{transform:translate(-2%,4%)}
  80%{transform:translate(4%,-3%)}
}

/* faint blueprint column grid + page frame */
.blueprint {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  padding: 0 var(--gutter);
}
.blueprint .cols {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.blueprint .cols span {
  border-left: 1px solid var(--line-2);
}
.blueprint .cols span:last-child { border-right: 1px solid var(--line-2); }
@media (max-width: 720px){ .blueprint .cols { grid-template-columns: repeat(2, 1fr); } }

/* corner registration marks */
.reg { position: fixed; z-index: 40; width: 22px; height: 22px; pointer-events: none; color: var(--bone-faint); }
.reg::before, .reg::after { content:""; position:absolute; background: currentColor; }
.reg::before { width: 1px; height: 100%; left: 50%; }
.reg::after  { height: 1px; width: 100%; top: 50%; }
.reg.tl { top: 14px; left: 14px; } .reg.tr { top: 14px; right: 14px; }
.reg.bl { bottom: 14px; left: 14px; } .reg.br { bottom: 14px; right: 14px; }
@media (max-width: 720px){ .reg { display:none; } }

/* ---------- custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 100;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid var(--bone);
  transition: width .3s var(--ease), height .3s var(--ease),
              background .3s var(--ease), border-color .3s var(--ease), opacity .3s;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--ink);
}
.cursor-ring .label { opacity: 0; transition: opacity .2s; }
body.hov-link .cursor-ring { width: 58px; height: 58px; border-color: var(--accent); }
body.hov-view .cursor-ring { width: 84px; height: 84px; background: var(--accent); border-color: var(--accent); }
body.hov-view .cursor-ring .label { opacity: 1; }
body.hov-view .cursor-dot { opacity: 0; }
body.dragging .cursor-ring { width: 84px; height: 84px; background: var(--accent-2); border-color: var(--accent-2); }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- shared ---------- */
.wrap { padding: 0 var(--gutter); position: relative; z-index: 2; }
.kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--bone-dim);
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker .idx { color: var(--accent); }
.kicker .bar { width: 28px; height: 1px; background: var(--bone-dim); }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; padding: clamp(80px,12vh,160px) 0 clamp(28px,4vh,52px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 6rem); line-height: 0.92;
  letter-spacing: -0.02em; text-transform: uppercase;
}
.section-head .meta { font-family: var(--mono); font-size: 12px; color: var(--bone-dim); text-align: right; }

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .bigtype .ch { opacity: 1 !important; transform: none !important; }
  .grain { animation: none; }
}

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  mix-blend-mode: difference; color: #fff;
}
.nav .brand { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; display:flex; align-items:center; gap:8px;}
.nav .brand .reg-dot { color: var(--accent); }
.nav .links { display: flex; gap: clamp(14px,2vw,34px); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav .links a { position: relative; padding: 4px 0; }
.nav .links a span.n { color: var(--accent); margin-right: 5px; }
.nav .links a::after { content:""; position:absolute; left:0; bottom:0; width:0; height:1px; background: currentColor; transition: width .4s var(--ease); }
.nav .links a:hover::after { width: 100%; }
.nav .clock { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; }
@media (max-width: 860px){ .nav .links { display:none; } }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--gutter) 64px;
}
.hero .top-line {
  display:flex; justify-content: space-between; align-items:center;
  font-family: var(--mono); font-size: 12px; color: var(--bone-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: clamp(20px,5vh,60px);
}
.hero .top-line .star { color: var(--accent); }

.bigtype { position: relative; }
.bigtype .line { display: block; line-height: 0.82; }
.bigtype .word {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 13vw, 13rem); /* JS fits to width; this is the pre-fit fallback */
  letter-spacing: -0.03em; text-transform: uppercase;
  display: inline-block; white-space: nowrap;
}
.bigtype .ch { display: inline-block; will-change: transform; transform-origin: 50% 100%; }
.bigtype .outline {
  color: transparent;
  -webkit-text-stroke: clamp(1px, 0.18vw, 3px) var(--accent);
}
.bigtype .outline .ch { color: transparent; }

/* per-char load reveal */
.bigtype .ch { opacity: 0; transform: translateY(110%) rotate(6deg); }
.loaded .bigtype .ch { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .9s var(--ease); }
/* once the entrance reveal has played, drop the long transform easing so the
   mouse magnetism tracks the cursor near-instantly (added by JS: body.hero-interactive) */
.hero-interactive .bigtype .ch { transition: opacity .7s var(--ease), transform .1s var(--ease); }

.hero .undertext {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px;
  margin-top: clamp(26px, 5vh, 56px); flex-wrap: wrap;
}
.hero .statement {
  font-family: var(--body); font-weight: 500;
  font-size: clamp(1.05rem, 1.7vw, 1.6rem); line-height: 1.25; max-width: 30ch;
}
.hero .statement b { color: var(--accent); font-weight: 700; }
.hero .scrollcue { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-dim); display:flex; flex-direction:column; align-items:center; gap:8px; }
.hero .scrollcue .arrow { width:1px; height:46px; background: linear-gradient(var(--accent), transparent); animation: drop 1.8s var(--ease) infinite; }
@keyframes drop { 0%{transform: scaleY(0); transform-origin: top;} 40%{transform: scaleY(1); transform-origin: top;} 60%{transform: scaleY(1); transform-origin: bottom;} 100%{transform: scaleY(0); transform-origin: bottom;} }

/* =========================================================================
   MARQUEE
   ========================================================================= */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 18px 0; background: var(--ink-2);
  position: relative; z-index: 2;
}
.marquee .track { display: flex; gap: 0; white-space: nowrap; width: max-content; animation: scroll-x 32s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .item { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem,3vw,2.6rem); text-transform: uppercase; letter-spacing: -0.01em; padding: 0 34px; display:flex; align-items:center; gap:34px; }
.marquee .item .dot { color: var(--accent); font-size: 0.5em; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* =========================================================================
   MANIFESTO
   ========================================================================= */
.manifesto { padding: clamp(90px,14vh,180px) 0; position: relative; z-index: 2; }
.manifesto .big {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 22ch; text-wrap: balance;
}
.manifesto .big .w { color: var(--bone-faint); transition: color .5s var(--ease); }
.manifesto .big .w.lit { color: var(--bone); }
.manifesto .big .w.acc { color: var(--accent); }
.manifesto .foot { display:flex; gap: clamp(30px,6vw,90px); margin-top: clamp(40px,7vh,90px); flex-wrap: wrap; }
.manifesto .foot .col { font-family: var(--mono); font-size: 13px; color: var(--bone-dim); max-width: 32ch; line-height: 1.6; }
.manifesto .foot .col h4 { font-family: var(--mono); color: var(--bone); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }

/* =========================================================================
   WORK
   ========================================================================= */
.work { padding-bottom: clamp(60px,10vh,120px); position: relative; z-index: 2; }
.work .list { border-top: 1px solid var(--line); }
.work .row {
  display: grid; grid-template-columns: 60px 1fr auto auto; align-items: center;
  gap: 24px; padding: clamp(20px,3.4vw,42px) 0;
  border-bottom: 1px solid var(--line); position: relative;
  transition: padding .5s var(--ease);
}
.work .row .num { font-family: var(--mono); font-size: 13px; color: var(--bone-dim); }
.work .row .name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.8rem, 6vw, 5rem); line-height: 0.95; letter-spacing: -0.02em;
  transition: transform .5s var(--ease), color .5s var(--ease);
  color: var(--bone);
}
.work .row .cat { font-family: var(--mono); font-size: 12px; color: var(--bone-dim); text-transform: uppercase; letter-spacing: 0.08em; text-align: right; }
.work .row .yr { font-family: var(--mono); font-size: 13px; color: var(--bone-dim); }
.work .row::before {
  content:""; position:absolute; left:-100%; top:0; bottom:0; width:100%;
  background: var(--accent); z-index:-1; transition: left .55s var(--ease);
}
.work .row:hover { padding-left: 28px; }
.work .row:hover::before { left: 0; }
.work .row:hover .num,
.work .row:hover .name,
.work .row:hover .cat,
.work .row:hover .yr { color: var(--ink); }
.work .row:hover .name { transform: translateX(12px); }
@media (max-width: 720px){
  .work .row { grid-template-columns: 38px 1fr; }
  .work .row .cat, .work .row .yr { display:none; }
}

/* floating preview */
.work-preview {
  position: fixed; top: 0; left: 0; z-index: 45;
  width: 320px; height: 220px; pointer-events: none;
  opacity: 0; transform: translate(-50%,-50%) scale(0.8); transform-origin: center;
  transition: opacity .35s var(--ease), transform .45s var(--ease);
  overflow: hidden; mix-blend-mode: normal;
  border: 1px solid rgba(0,0,0,0.2);
}
.work-preview.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.work-preview .pv { position:absolute; inset:0; display:grid; place-items:center; }
.work-preview .pv .pl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
@media (pointer: coarse){ .work-preview { display:none; } }

/* =========================================================================
   SERVICES
   ========================================================================= */
.services { padding-bottom: clamp(70px,11vh,140px); position: relative; z-index: 2; }
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.svc {
  padding: clamp(28px,3vw,46px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden; transition: background .5s var(--ease);
}
.svc .n { font-family: var(--mono); font-size: 12px; color: var(--bone-dim); }
.svc h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem,2.6vw,2.4rem); text-transform: uppercase; letter-spacing: -0.01em; margin: 14px 0 14px; line-height: 1; }
.svc p { color: var(--bone-dim); font-size: 14px; line-height: 1.6; max-width: 36ch; }
.svc .tags { margin-top: 18px; display:flex; flex-wrap:wrap; gap:8px; }
.svc .tags span { font-family: var(--mono); font-size: 11px; color: var(--bone-faint); border: 1px solid var(--line); padding: 4px 9px; border-radius: 100px; transition: color .4s, border-color .4s; }
.svc:hover { background: var(--ink-2); }
.svc:hover h3 { color: var(--accent); }
.svc:hover .tags span { color: var(--bone-dim); border-color: var(--bone-faint); }
.svc::after { content: attr(data-big); position:absolute; right:-10px; bottom:-30px; font-family: var(--display); font-weight:800; font-size: 9rem; color: var(--line-2); pointer-events:none; line-height:1; }
@media (max-width: 720px){ .svc-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   PLAYGROUND
   ========================================================================= */
.play { padding-bottom: clamp(60px,10vh,120px); position: relative; z-index: 2; }
.play .stage {
  position: relative; height: clamp(420px, 64vh, 680px);
  border: 1px solid var(--line); background:
    radial-gradient(120% 120% at 50% 0%, rgba(255,77,28,0.06), transparent 60%),
    var(--ink-2);
  overflow: hidden; touch-action: none;
}
.play .stage canvas { display:block; width:100%; height:100%; }
.play .hint { position:absolute; top: 18px; left: 18px; font-family: var(--mono); font-size: 12px; color: var(--bone-dim); letter-spacing:0.08em; text-transform:uppercase; pointer-events:none; }
.play .reset { position:absolute; bottom: 18px; right: 18px; font-family: var(--mono); font-size: 12px; color: var(--bone); letter-spacing:0.08em; text-transform:uppercase; border: 1px solid var(--line); padding: 8px 14px; transition: background .3s, color .3s; }
.play .reset:hover { background: var(--accent-2); color: var(--ink); border-color: var(--accent-2); }

/* =========================================================================
   STUDIO / ABOUT
   ========================================================================= */
.studio { padding-bottom: clamp(70px,11vh,140px); position: relative; z-index: 2; }
.studio .grid { display:grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px,6vw,90px); align-items: start; }
.studio .lead { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem,3vw,2.6rem); line-height: 1.1; letter-spacing: -0.01em; }
.studio .lead b { color: var(--accent); }
.studio .principles { display:flex; flex-direction: column; }
.studio .principles .p { display:grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.studio .principles .p:last-child { border-bottom: 1px solid var(--line); }
.studio .principles .p .pn { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.studio .principles .p h4 { font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.01em; }
.studio .principles .p p { color: var(--bone-dim); font-size: 14px; line-height: 1.6; margin-top: 6px; }
@media (max-width: 820px){ .studio .grid { grid-template-columns: 1fr; } }

/* =========================================================================
   CONTACT / FOOTER
   ========================================================================= */
.contact { padding: clamp(90px,16vh,220px) 0 0; position: relative; z-index: 2; }
.contact .lead-k { text-align:center; margin-bottom: 26px; }
.contact .cta { text-align: center; }
.contact .cta a {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.4rem, 11vw, 11rem); line-height: 0.86; letter-spacing: -0.03em;
  display: inline-block; color: var(--bone);
  -webkit-text-stroke: 0 var(--accent); transition: color .4s var(--ease);
}
.contact .cta a:hover { color: var(--accent); }
.contact .email { display:flex; justify-content:center; margin-top: clamp(28px,5vh,60px); }
.contact .email a { font-family: var(--mono); font-size: clamp(14px, 2vw, 20px); letter-spacing: 0.06em; border: 1px solid var(--bone); padding: 16px 26px; border-radius: 100px; transition: background .35s var(--ease), color .35s var(--ease), border-color .35s; display:flex; align-items:center; gap:12px; }
.contact .email a:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.contact .email a .arr { transition: transform .35s var(--ease); }
.contact .email a:hover .arr { transform: translateX(6px); }

footer {
  margin-top: clamp(90px,15vh,200px);
  border-top: 1px solid var(--line); padding: 40px var(--gutter) 30px;
  position: relative; z-index: 2;
}
footer .top { display:flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
footer .top .brandblock { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem,9vw,7rem); text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.9; }
footer .cols { display:flex; gap: clamp(24px,5vw,70px); flex-wrap: wrap; }
footer .cols .c { font-family: var(--mono); font-size: 13px; color: var(--bone-dim); line-height: 1.9; }
footer .cols .c h5 { color: var(--bone); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
footer .cols .c a:hover { color: var(--accent); }
footer .legal { display:flex; justify-content: space-between; margin-top: 50px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--bone-faint); letter-spacing: 0.06em; text-transform: uppercase; flex-wrap: wrap; gap: 12px; }

.magnetic { display: inline-block; will-change: transform; }
