/* === Fonts (self-hosted) === */
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/CabinetGrotesk-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Pixel Square';
  src: url('fonts/GeistPixel-Square.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

ul { list-style: none; }

:root {
  /* Color (monochrome) */
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-text-soft: rgba(0, 0, 0, 0.78);
  --color-text-muted: rgba(0, 0, 0, 0.55);
  --color-text-faint: rgba(0, 0, 0, 0.38);
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-strong: rgba(0, 0, 0, 0.16);
  --color-surface-hover: #fafafa;
  --color-accent: #c72238;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Spacing (4px scale) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', sans-serif;
  --font-body: 'Geist Mono', ui-monospace, monospace;
  --font-jp: 'IBM Plex Sans JP', 'Noto Sans JP', sans-serif;
  --font-jp-serif: 'Noto Serif JP', serif;
  --font-pixel: 'Geist Pixel Square', monospace;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Topbar === */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.topbar-brand {
  display: flex;
  align-items: center;
  color: var(--color-text);
  text-decoration: none;
}

.topbar-brand-logo {
  display: block;
  width: 88px;
  height: 22px;
  background-color: currentColor;
  mask: url('logo.svg') no-repeat center / contain;
  -webkit-mask: url('logo.svg') no-repeat center / contain;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar-nav a {
  position: relative;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar-nav a:hover { color: var(--color-text); }
.topbar-nav a:hover::after { transform: scaleX(1); }
.topbar-nav a.is-active { color: var(--color-text); }

@media (max-width: 640px) {
  .topbar { padding: 14px 20px; }
  .topbar-nav { gap: 14px; }
  .topbar-nav a { font-size: 12px; }
  .topbar-brand-logo { width: 72px; height: 18px; }
}

/* === Page hero (subpages) === */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 168px 32px 96px;
  border-bottom: 1px solid var(--color-border);
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 72px;
}

@media (max-width: 1024px) {
  .page-hero-inner { padding: 0 48px; }
}

@media (max-width: 720px) {
  .page-hero-inner { padding: 0 16px; }
}

/* === Dot grid backdrop (shared across hero / page-hero) === */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
}

.hero::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: center center;
  mask: linear-gradient(to bottom, black 0%, black 65%, transparent 100%);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 65%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner,
.page-hero-inner {
  position: relative;
  z-index: 1;
}

.page-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-label .num {
  font-family: var(--font-pixel);
  letter-spacing: 0.1em;
}

.page-title {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}

@media (max-width: 720px) {
  .page-hero { padding: 128px 24px 64px; }
}

/* === Content shell (subpage container with vertical guides) === */
.content-shell {
  position: relative;
}

.content-shell::before,
.content-shell::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
  pointer-events: none;
}

.content-shell::before { left: max(32px, calc(50% - 640px)); }
.content-shell::after  { right: max(32px, calc(50% - 640px)); }

/* === Section head (Cal/Dub style — for in-page sections) === */
.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.section-head-title {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 18px;
}

.section-head-desc {
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  max-width: 56ch;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-secondary:hover {
  border-color: var(--color-text);
  background: var(--color-surface-hover);
}

.btn-lg {
  font-size: 14px;
  padding: 14px 26px;
}

.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* === Badge (pill) === */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.badge-live {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}

.badge-soon {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* === Reveal on scroll === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-2 { transition-delay: 0.10s; }
.reveal-3 { transition-delay: 0.20s; }
.reveal-4 { transition-delay: 0.30s; }

/* === Footer (multi-column, shared) === */
footer {
  padding: 96px 32px 32px;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-body);
  color: var(--color-text-muted);
}

.footer-grid {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 72px 64px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  border-bottom: 1px solid var(--color-border);
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand-logo {
  display: block;
  width: 96px;
  height: 24px;
  background-color: var(--color-text);
  mask: url('logo.svg') no-repeat center / contain;
  -webkit-mask: url('logo.svg') no-repeat center / contain;
}

.footer-tagline {
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  max-width: 22em;
}

.footer-col-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 22px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col li {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.footer-col a,
.footer-col li > span {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: var(--color-text); }

.footer-col li > span { color: var(--color-text-faint); }

.footer-bottom {
  width: 100%;
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
}

@media (max-width: 1024px) {
  .footer-grid { padding: 0 48px 64px; }
  .footer-bottom { padding: 0 48px; }
}

@media (max-width: 720px) {
  footer { padding: 64px 24px 24px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
    padding: 0 16px 48px;
  }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; padding: 0 16px; }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
