/* ============================================================
   A² Studio — AI-first design & development
   Visual language after c2mtl.koki-kiko.com:
   paper gray + black blocks + gradient fields + translucent
   circle clusters + right rail + acid CTA
   ============================================================ */

:root {
  --paper: #f2f2f1;
  --ink: #0b0b0b;
  --white: #ffffff;
  --acid: #46ff00;
  --blue: #1b3df0;
  --violet: #6a14e0;
  --orange: #ff6a00;
  --pink: #ff2e86;
  --red: #e42313;
  --rail-w: 76px;
  --gutter: clamp(16px, 3vw, 48px);
  --font-d: "Inter Tight", system-ui, sans-serif;
  --font-m: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-d);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-right: var(--rail-w);
}

::selection { background: var(--acid); color: var(--ink); }

a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.rail :focus-visible, .footer :focus-visible { outline-color: var(--acid); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.loader-mark {
  color: var(--white);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.04em;
}
.loader-mark sup { color: var(--acid); font-size: 0.5em; }

/* ---------- Right rail ---------- */
.rail {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--rail-w);
  z-index: 900;
  background: var(--ink);
  color: var(--white);
  display: flex; flex-direction: column; align-items: center;
}
.rail-burger {
  width: var(--rail-w); height: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  flex: 0 0 auto;
}
.rail-burger span { display: block; width: 30px; height: 2px; background: var(--white); transition: transform 0.3s, opacity 0.3s; }
.rail-burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.rail-burger.is-open span:nth-child(2) { opacity: 0; }
.rail-burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.rail-nav {
  flex: 1 1 auto;
  display: flex; flex-direction: column; justify-content: space-evenly; align-items: center;
  padding: 24px 0;
}
.rail-link .l2, .rail-cta .l2 { display: block; }
.rail-link {
  writing-mode: vertical-rl;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  line-height: 1.15;
  opacity: 0.92;
  transition: color 0.25s, opacity 0.25s;
}
.rail-link:hover, .rail-link.is-active { color: var(--acid); opacity: 1; }

.rail-lang {
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.08em;
  padding: 14px 0; opacity: 0.7;
}
.rail-cta {
  width: var(--rail-w);
  min-height: 150px;
  background: var(--acid); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl;
  font-weight: 700; font-size: 14px; line-height: 1.15;
  transition: background 0.25s;
  position: relative;
}
.rail-cta .arr { margin-top: 8px; }
.rail-cta:hover { background: var(--white); }

/* ---------- Section chrome ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 28px var(--gutter) 0;
}
.label-tag {
  font-family: var(--font-m);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh; min-height: 620px;
  overflow: hidden;
  background: var(--ink);
}
.hero-field {
  position: absolute; top: 0; bottom: 0; width: 50%;
}
.hero-field--left {
  left: 0;
  background: linear-gradient(135deg, var(--orange) 0%, var(--pink) 78%);
}
.hero-field--right {
  right: 0;
  background: linear-gradient(160deg, #2a63ff 0%, var(--blue) 55%, var(--violet) 120%);
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 2;
}

.hero-band {
  position: absolute; left: 0; bottom: 0; z-index: 3;
  background: var(--ink); color: var(--white);
  padding: clamp(20px, 3.2vw, 44px) clamp(24px, 4vw, 60px) clamp(24px, 3.4vw, 48px) var(--gutter);
  display: flex; flex-direction: column;
  max-width: min(62vw, 900px);
}
.band-line {
  display: block;
  font-size: clamp(3.2rem, 8.6vw, 8.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.92;
  white-space: nowrap;
}
.band-line--sub { color: var(--white); }
.band-line--sub sup { color: var(--acid); font-size: 0.42em; font-weight: 600; }

.hero-edition {
  position: absolute; right: calc(var(--gutter)); bottom: clamp(24px, 4vh, 56px); z-index: 3;
  text-align: right;
  color: var(--white);
}
.he-line {
  display: block;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.0;
}

.hero-meta {
  position: absolute; top: clamp(20px, 4vh, 44px); left: var(--gutter); z-index: 3;
  color: var(--white);
  display: flex; flex-direction: column; gap: 14px;
}
.hero-meta-txt { font-size: 13px; line-height: 1.45; opacity: 0.95; max-width: 340px; }
.hero-meta-cta {
  font-family: var(--font-m); font-size: 12px; letter-spacing: 0.12em;
  border-bottom: 1px solid rgba(255,255,255,0.6);
  align-self: flex-start; padding-bottom: 3px;
  transition: color 0.25s, border-color 0.25s;
}
.hero-meta-cta:hover { color: var(--acid); border-color: var(--acid); }

.hero-scroll {
  position: absolute; left: var(--gutter); bottom: 12px; z-index: 4;
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--white); mix-blend-mode: difference;
}

/* ---------- Manifesto ---------- */
.manifesto { padding-bottom: clamp(60px, 9vw, 130px); }
.manifesto-lede {
  max-width: 720px;
  margin: clamp(48px, 8vw, 110px) auto clamp(48px, 7vw, 100px);
  padding: 0 var(--gutter);
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.knockout {
  text-align: center;
  font-weight: 800;
  font-size: clamp(2.6rem, 8.4vw, 8.8rem);
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-transform: uppercase;
  padding: 0 var(--gutter);
}
.k-line {
  display: block;
  background-image:
    radial-gradient(circle at 12% 40%, var(--red) 0 14%, transparent 15%),
    radial-gradient(circle at 30% 70%, var(--orange) 0 16%, transparent 17%),
    radial-gradient(circle at 48% 30%, var(--pink) 0 15%, transparent 16%),
    radial-gradient(circle at 66% 65%, var(--violet) 0 16%, transparent 17%),
    radial-gradient(circle at 84% 40%, var(--red) 0 14%, transparent 15%),
    linear-gradient(100deg, var(--blue) 0%, var(--violet) 30%, var(--red) 55%, var(--orange) 80%, var(--pink) 100%);
  background-size: 220% 220%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  background: var(--ink);
  padding: clamp(16px, 2.4vw, 30px) 0;
}
.marquee-track {
  display: flex; white-space: nowrap; will-change: transform;
  color: var(--paper);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 6rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.marquee-track span { flex: 0 0 auto; }

/* ---------- Services ---------- */
.services { padding-bottom: clamp(70px, 9vw, 140px); }
.tabs {
  display: flex; justify-content: space-between; gap: 12px;
  padding: clamp(36px, 5vw, 70px) var(--gutter) 0;
  border-bottom: 1px solid rgba(11,11,11,0.18);
}
.tab {
  font-size: clamp(1.2rem, 2.4vw, 2.1rem);
  font-weight: 600; letter-spacing: -0.02em;
  padding: 0 0 14px;
  position: relative;
  opacity: 0.45;
  transition: opacity 0.25s;
}
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 3px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.tab:hover { opacity: 0.8; }
.tab.is-active { opacity: 1; }
.tab.is-active::after { transform: scaleX(1); }

.panes { position: relative; margin-top: clamp(32px, 5vw, 64px); }
.pane {
  display: none;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  padding: 0 var(--gutter);
}
.pane.is-active { display: grid; }
.pane-art {
  aspect-ratio: 4 / 3;
  min-height: 280px;
}
.art-design {
  background:
    radial-gradient(circle at 28% 38%, rgba(228,35,19,0.85) 0 22%, transparent 23%),
    radial-gradient(circle at 52% 62%, rgba(255,106,0,0.85) 0 24%, transparent 25%),
    radial-gradient(circle at 72% 34%, rgba(255,46,134,0.8) 0 20%, transparent 21%),
    radial-gradient(circle at 44% 24%, rgba(228,35,19,0.7) 0 16%, transparent 17%),
    linear-gradient(135deg, var(--orange), var(--pink));
}
.art-dev {
  background:
    radial-gradient(circle at 30% 60%, rgba(228,35,19,0.85) 0 22%, transparent 23%),
    radial-gradient(circle at 58% 34%, rgba(255,46,134,0.8) 0 22%, transparent 23%),
    radial-gradient(circle at 76% 66%, rgba(255,106,0,0.8) 0 18%, transparent 19%),
    linear-gradient(150deg, #2a63ff, var(--blue) 55%, var(--violet));
}
.art-consult {
  background:
    radial-gradient(circle at 34% 36%, rgba(27,61,240,0.85) 0 22%, transparent 23%),
    radial-gradient(circle at 62% 62%, rgba(106,20,224,0.85) 0 24%, transparent 25%),
    radial-gradient(circle at 78% 30%, rgba(255,46,134,0.75) 0 16%, transparent 17%),
    linear-gradient(135deg, var(--pink), var(--red));
}
.art-rnd {
  background:
    radial-gradient(circle at 30% 40%, rgba(70,255,0,0.75) 0 18%, transparent 19%),
    radial-gradient(circle at 56% 66%, rgba(255,106,0,0.85) 0 22%, transparent 23%),
    radial-gradient(circle at 74% 32%, rgba(228,35,19,0.85) 0 20%, transparent 21%),
    #0b0b0b;
}
.pane-copy { display: flex; flex-direction: column; }
.pane-title {
  font-size: clamp(1.8rem, 3.4vw, 3.2rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.0;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.pane-body { max-width: 420px; font-size: 1.05rem; line-height: 1.55; }
.pane-idx {
  margin-top: auto; padding-top: 28px;
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.6;
}

/* ---------- Numbers ---------- */
.numbers {
  position: relative;
  background: linear-gradient(150deg, #2a63ff 0%, var(--blue) 45%, var(--violet) 110%);
  color: var(--white);
  overflow: hidden;
}
.numbers-bg { position: absolute; inset: 0; pointer-events: none; }
.nc {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(228,35,19,0.92) 0%, rgba(228,35,19,0.75) 55%, rgba(150,10,40,0.55) 100%);
  mix-blend-mode: hard-light;
}
.nc1 { width: 46vw; height: 46vw; top: -12vw; right: -10vw; }
.nc2 { width: 30vw; height: 30vw; top: 24%; right: 14vw; background: radial-gradient(circle, rgba(255,46,134,0.9), rgba(160,20,90,0.5)); }
.nc3 { width: 38vw; height: 38vw; bottom: -8vw; right: -6vw; }
.nc4 { width: 22vw; height: 22vw; bottom: 18%; right: 26vw; background: radial-gradient(circle, rgba(255,106,0,0.9), rgba(180,50,10,0.5)); }
.nc5 { width: 16vw; height: 16vw; top: 46%; right: 4vw; background: radial-gradient(circle, rgba(255,46,134,0.85), rgba(120,10,70,0.5)); }

.stat {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 16px clamp(24px, 4vw, 64px);
  align-items: end;
  padding: clamp(36px, 5vw, 70px) var(--gutter);
  border-top: 1px solid rgba(255,255,255,0.35);
}
.stat:first-of-type { border-top: 0; }
.stat-num {
  grid-row: span 2;
  font-size: clamp(4.4rem, 13vw, 13rem);
  font-weight: 700; letter-spacing: -0.05em; line-height: 0.85;
}
.stat-cap { font-size: clamp(1.3rem, 2.4vw, 2.2rem); font-weight: 600; letter-spacing: -0.02em; }
.stat-txt { font-size: 0.98rem; line-height: 1.5; max-width: 380px; opacity: 0.95; }

/* ---------- Process ---------- */
.process { padding-bottom: clamp(80px, 10vw, 150px); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
  padding: clamp(40px, 6vw, 80px) var(--gutter) 0;
}
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step-no { font-family: var(--font-m); font-size: 12px; letter-spacing: 0.14em; }
.step-title {
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  font-weight: 700; letter-spacing: -0.03em;
  margin: 12px 0 12px;
}
.step-txt { font-size: 0.95rem; line-height: 1.55; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink); color: var(--white);
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
}
.footer-main {
  padding: clamp(48px, 7vw, 100px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-content: start;
}
.footer-title {
  grid-column: 1 / -1;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  font-weight: 700; letter-spacing: -0.04em; line-height: 0.98;
}
.footer-mail {
  grid-column: 1 / -1;
  align-self: start; justify-self: start;
  font-family: var(--font-m);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  color: var(--acid);
  border-bottom: 1px solid rgba(70,255,0,0.5);
  padding-bottom: 4px;
  transition: color 0.25s, border-color 0.25s;
}
.footer-mail:hover { color: var(--white); border-color: var(--white); }
.footer-links { display: flex; gap: clamp(32px, 5vw, 80px); }
.fl-col { display: flex; flex-direction: column; gap: 10px; }
.fl-col a { font-size: 15px; opacity: 0.85; transition: color 0.25s, opacity 0.25s; }
.fl-col a:hover { color: var(--acid); opacity: 1; }
.footer-mark { display: flex; align-items: flex-end; justify-content: flex-start; }
.footer-mark canvas { width: min(220px, 40vw); height: auto; }
.footer-copy {
  grid-column: 1 / -1;
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.06em;
  opacity: 0.6;
  margin-top: clamp(24px, 4vw, 48px);
}
.footer-panel {
  background: linear-gradient(150deg, var(--pink) 0%, var(--orange) 90%);
  color: var(--white);
  padding: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 44px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  transition: filter 0.3s;
}
.footer-panel:hover { filter: saturate(1.25); }
.fp-title { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.fp-cta {
  font-family: var(--font-m); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--ink); color: var(--white);
  align-self: flex-start;
  padding: 12px 18px;
}

/* ---------- Reveal helpers ---------- */
.reveal { opacity: 0; transform: translateY(36px); }
.no-js .reveal, .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  body { padding-right: 0; padding-top: 56px; }

  .rail {
    top: 0; right: 0; left: 0; bottom: auto;
    width: auto; height: 56px;
    flex-direction: row;
  }
  .rail-burger { width: 56px; height: 56px; }
  .rail-burger span { width: 24px; }
  .rail-nav {
    flex-direction: row; gap: 18px; padding: 0 8px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .rail-nav::-webkit-scrollbar { display: none; }
  .rail-link { writing-mode: horizontal-tb; font-size: 11px; white-space: nowrap; }
  .rail-link .l2, .rail-cta .l2 { display: inline; margin-left: 0.32em; }
  .rail-lang { display: none; }
  .rail-cta {
    writing-mode: horizontal-tb;
    width: auto; min-height: 0; height: 56px;
    padding: 0 16px; font-size: 12px; white-space: nowrap;
  }

  .hero { min-height: 560px; height: calc(100svh - 56px); }
  .hero-field { width: 100%; }
  .hero-field--right { clip-path: polygon(0 44%, 100% 28%, 100% 100%, 0 100%); }
  .hero-band { max-width: 92vw; padding: 18px 22px 20px var(--gutter); }
  .band-line { font-size: clamp(2.6rem, 13vw, 4.6rem); }
  .hero-edition { display: none; }
  .hero-meta-txt { max-width: 260px; font-size: 12px; }
  .hero-scroll { display: none; }

  .tabs { flex-wrap: wrap; gap: 4px 20px; }
  .pane { grid-template-columns: 1fr; }
  .pane-art { min-height: 220px; }

  .stat { grid-template-columns: 1fr; align-items: start; }
  .stat-num { grid-row: auto; }

  .process-grid { grid-template-columns: 1fr 1fr; }

  .footer { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-panel { min-height: 220px; }
}

@media (max-width: 480px) {
  .process-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .marquee-track { transform: none !important; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
