/* =========================================================
   BOTCLOT — shared design tokens & chrome
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600&family=Geist+Mono:wght@400;500&display=swap");

:root {
  /* Color */
  --ink:        oklch(0.96 0.005 80);
  --ink-dim:    oklch(0.78 0.005 80 / 0.78);
  --ink-faint:  oklch(0.62 0.005 80 / 0.55);
  --ink-line:   oklch(0.96 0.005 80 / 0.16);
  --ink-line-2: oklch(0.96 0.005 80 / 0.08);
  --bg:         oklch(0.145 0.006 250);
  --bg-2:       oklch(0.115 0.006 250);
  --bg-rise:    oklch(0.18 0.006 250);
  --accent:     oklch(0.78 0.13 55);
  --accent-deep:oklch(0.62 0.14 55);

  /* Type */
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans:  "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "Geist Mono", ui-monospace, "SF Mono", monospace;

  /* Spacing */
  --gutter: clamp(20px, 4vw, 56px);
  --max:   1440px;

  /* Easings */
  --ease-out: cubic-bezier(.16,.84,.32,1);
  --ease-io:  cubic-bezier(.65,0,.35,1);
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto;
}

html { overscroll-behavior: none; }
body { min-height: 100vh; overflow-x: hidden; }

/* Subtle fixed dot-grid texture so the page reads as a *space* */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, oklch(0.96 0.005 80 / 0.045) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
/* A soft vignette ground */
body::after {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(80% 60% at 50% 0%, oklch(0.22 0.01 250 / 0.6), transparent 60%),
    radial-gradient(60% 40% at 50% 100%, oklch(0.08 0.005 250 / 0.7), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main, header, footer, .door, .cursor { position: relative; z-index: 1; }

/* =========================================================
   Type system
   ========================================================= */

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono  { font-family: var(--mono);  font-weight: 400; letter-spacing: 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.018em; line-height: 0.96; }

.display {
  font-family: var(--serif);
  font-size: clamp(64px, 11.5vw, 190px);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.display .ital { font-style: italic; color: var(--ink); }
.display .accent { color: var(--accent); font-style: italic; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 10px; vertical-align: middle;
  transform: translateY(-1px);
  box-shadow: 0 0 12px oklch(0.78 0.13 55 / 0.6);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 22ch;
}

.body {
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 56ch;
}

.caption {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

/* =========================================================
   Page chrome — nav, footer
   ========================================================= */

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--gutter);
  z-index: 50;
  pointer-events: none;
  mix-blend-mode: difference; /* makes nav readable over light scenes too */
}
.nav > * { pointer-events: auto; }
.nav .brand {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #fff;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.nav .brand .mark {
  width: 14px; height: 14px;
  border: 1px solid #fff;
  border-radius: 50%;
  position: relative;
}
.nav .brand .mark::after {
  content: ""; position: absolute; inset: 3px;
  border-radius: 50%; background: #fff;
}
.nav-links {
  justify-self: center;
  display: flex; gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav-links a {
  color: #fff; text-decoration: none; opacity: 0.7;
  transition: opacity .25s var(--ease-out);
  position: relative;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.is-current { opacity: 1; }
.nav-links a.is-current::before {
  content: ""; position: absolute; left: -10px; top: 50%; width: 4px; height: 4px;
  border-radius: 50%; background: #fff; transform: translateY(-50%);
}
.nav-cta {
  justify-self: end;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border: 1px solid #fff;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background .25s var(--ease-out), color .25s var(--ease-out);
}
.nav-cta:hover { background: #fff; color: #000; }

.nav .ticker {
  display: none;
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav { grid-template-columns: 1fr auto; }
}

/* Footer */
.site-footer {
  position: relative;
  padding: 120px var(--gutter) 40px;
  border-top: 1px solid var(--ink-line);
  margin-top: 120px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.site-footer h4 {
  font-family: var(--mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.18em; color: var(--ink); margin-bottom: 18px;
}
.site-footer .colophon .word {
  font-family: var(--serif);
  font-size: clamp(56px, 8vw, 110px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 24px;
}
.site-footer .colophon .word .ital { font-style: italic; color: var(--accent); }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: var(--ink-dim); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .bottom {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--ink-line);
  padding-top: 24px; margin-top: 56px;
}
@media (max-width: 900px) {
  .site-footer { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Custom cursor
   ========================================================= */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  transform: translate3d(-50%, -50%, 0);
  mix-blend-mode: difference;
  transition: width .25s var(--ease-out), height .25s var(--ease-out), border-radius .25s var(--ease-out), background .25s var(--ease-out);
}
.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 4px; height: 4px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 201;
  transform: translate3d(-50%, -50%, 0);
  mix-blend-mode: difference;
}
.cursor.is-link {
  width: 64px; height: 64px;
  background: var(--ink);
  mix-blend-mode: difference;
}
.cursor.is-text { width: 2px; height: 22px; border-radius: 2px; background: var(--ink); }
@media (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* =========================================================
   Door / Portal page transition
   ========================================================= */
.portal {
  position: fixed; inset: 0;
  z-index: 100;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.portal .leaf {
  background: var(--bg-2);
  border-left: 1px solid var(--ink-line);
  border-right: 1px solid var(--ink-line);
  transform: translateY(-101%);
  transition: transform 900ms var(--ease-io);
  position: relative;
  overflow: hidden;
}
.portal .leaf.right { transform: translateY(101%); }
.portal .leaf .seam {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--ink-line) 20%, var(--ink-line) 80%, transparent);
}
.portal .leaf.left .seam  { right: 0; }
.portal .leaf.right .seam { left: 0;  }
.portal .label {
  position: absolute; left: 50%; bottom: 8vh; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-faint);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 400ms var(--ease-out) 200ms;
}
.portal.is-closing .leaf.left  { transform: translateY(0); }
.portal.is-closing .leaf.right { transform: translateY(0); }
.portal.is-closing .label { opacity: 1; }
.portal.is-opening .leaf.left  { transform: translateY(-101%); }
.portal.is-opening .leaf.right { transform: translateY(101%); }

/* Initial page-in: doors start closed, open after load */
.portal.is-initial .leaf.left  { transform: translateY(0); transition-duration: 1100ms; }
.portal.is-initial .leaf.right { transform: translateY(0); transition-duration: 1100ms; }
.portal.is-initial .label { opacity: 1; }

/* =========================================================
   Layout primitives
   ========================================================= */

section { position: relative; }
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}
.divider { height: 1px; background: var(--ink-line); width: 100%; }
.divider-faint { height: 1px; background: var(--ink-line-2); width: 100%; }

/* Page index marker shown at top-right of pages */
.page-meta {
  position: fixed;
  right: var(--gutter);
  bottom: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  z-index: 30;
  pointer-events: none;
  display: flex; gap: 12px; align-items: center;
}
.page-meta .progress {
  width: 80px; height: 1px; background: var(--ink-line); position: relative;
}
.page-meta .progress span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ink); width: 0;
  transition: width 60ms linear;
}

/* Section header pattern used across pages */
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  padding: 120px 0 60px;
  border-top: 1px solid var(--ink-line);
}
.section-head .num {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint);
}
.section-head h2 {
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.95;
}
.section-head h2 .ital { font-style: italic; }
.section-head h2 .accent { color: var(--accent); font-style: italic; }
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 18px; padding: 80px 0 40px; }
}

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 14px 22px 14px 24px;
  transition: background .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
  position: relative;
  overflow: hidden;
  background: transparent;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .45s var(--ease-io);
  z-index: -1;
}
.btn:hover { color: var(--bg); border-color: var(--ink); }
.btn:hover::after { transform: translateY(0); }
.btn .arrow {
  display: inline-block; width: 18px; height: 1px; background: currentColor; position: relative;
}
.btn .arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  width: 8px; height: 8px;
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: rotate(45deg);
}

/* Big "ghost" type used as section dividers */
.ghost-type {
  font-family: var(--serif);
  font-size: clamp(120px, 22vw, 360px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  opacity: 0.05;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* Word-reveal mask */
.reveal-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.reveal-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform .9s var(--ease-out);
}
.is-revealed .reveal-word > span,
.reveal-word.is-revealed > span { transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .portal { display: none; }
}
