/* ============================================================
   KYOBIX — Engineering the Digital Bridge
   Base styles
   ============================================================ */

:root {
  --ink: #07090C;
  --graphite: #0E1117;
  --graphite-2: #14181F;
  --graphite-3: #1A1F29;
  --line: rgba(216, 220, 226, 0.08);
  --line-2: rgba(216, 220, 226, 0.14);
  --titanium: #C8CDD4;
  --titanium-hi: #E6E9ED;
  --titanium-2: #8B9099;
  --titanium-3: #5A5F68;
  --cobalt: #2A53FF;
  --cobalt-hi: #4A6DFF;
  --cobalt-glow: rgba(42, 83, 255, 0.28);
  --danger: #FF5A47;
  --ok: #3ED598;

  --f-display: 'Inter Tight', 'Neue Haas Grotesk', -apple-system, sans-serif;
  --f-body: 'Inter Tight', -apple-system, sans-serif;
  --f-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  --max: 1440px;
  --gutter: 32px;
}

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

html, body {
  background: var(--ink);
  color: var(--titanium);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(42,83,255,0.04), transparent 70%),
    var(--ink);
}

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

/* Selection */
::selection { background: var(--cobalt); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--graphite-3); border: 2px solid var(--ink); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--titanium-3); }

/* --- Typography utilities --- */
.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--titanium-2);
  font-weight: 400;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--titanium-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--cobalt);
  transform: rotate(45deg);
}

.display {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--titanium-hi);
}

.h1 { font-size: clamp(56px, 9vw, 140px); }
.h2 { font-size: clamp(42px, 5.5vw, 84px); }
.h3 { font-size: clamp(28px, 2.8vw, 42px); }
.h4 { font-size: clamp(20px, 1.6vw, 26px); }

.caption {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--titanium-3);
  letter-spacing: 0.05em;
}

/* --- Layout --- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

.section {
  padding: 120px 0;
  position: relative;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 72px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border: 1px solid var(--line-2);
  color: var(--titanium-hi);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 180ms ease;
  background: transparent;
  cursor: pointer;
}
.btn:hover { border-color: var(--titanium); background: rgba(216,220,226,0.04); }
.btn-primary {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}
.btn-primary:hover { background: var(--cobalt-hi); border-color: var(--cobalt-hi); }
.btn .arrow {
  display: inline-block;
  transition: transform 180ms ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Hairlines */
.hr-line { height: 1px; background: var(--line); width: 100%; }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms cubic-bezier(.2,.6,.2,1), transform 800ms cubic-bezier(.2,.6,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Blueprint grid background utility */
.grid-bg {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Column guides - visible in hero */
.col-guides {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  pointer-events: none;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.col-guides > div {
  border-right: 1px solid var(--line);
}
.col-guides > div:first-child { border-left: 1px solid var(--line); }

/* Tiny X glyph */
.x-glyph {
  display: inline-block;
  width: 10px; height: 10px;
  position: relative;
}
.x-glyph::before, .x-glyph::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%; height: 1.5px;
  top: 50%;
  background: var(--titanium);
}
.x-glyph::before { transform: translateY(-50%) rotate(45deg); }
.x-glyph::after { transform: translateY(-50%) rotate(-45deg); background: var(--cobalt); }

/* Corner ticks for framed boxes */
.framed {
  position: relative;
}
.framed::before, .framed::after,
.framed > .tick-tl, .framed > .tick-tr {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--titanium-3);
  border-style: solid;
  border-width: 0;
}
.framed::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.framed::after  { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }
.framed > .tick-tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.framed > .tick-bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }

/* Cursor dot */
.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--cobalt);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: width 200ms, height 200ms, background 200ms;
}
.cursor-ring {
  position: fixed;
  width: 28px; height: 28px;
  border: 1px solid var(--titanium-3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 250ms ease, height 250ms ease, border-color 250ms ease, opacity 250ms;
}
.cursor-ring.hover {
  width: 44px; height: 44px;
  border-color: var(--cobalt);
}

@media (max-width: 900px) {
  .cursor-dot, .cursor-ring { display: none; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; }
  .section { padding: 64px 0; }
  .section-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 48px; }
  .h1 { font-size: clamp(40px, 11vw, 72px); }
  .h2 { font-size: clamp(32px, 8vw, 56px); }
  .h3 { font-size: clamp(22px, 5vw, 34px); }
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 32px; }
  .h1 { font-size: clamp(36px, 12vw, 56px); }
  .h2 { font-size: clamp(28px, 9vw, 44px); }
  .btn { font-size: 10px; padding: 12px 14px; }
}
