@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  font-size: 16px;
  background: #000;
  color: #fff;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

/* ============================================================
   Typography Scale
   ============================================================ */
h1, h2, h3, h4 {
  font-family: 'Calistoga', serif;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  margin-bottom: 0.25em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 0.5em;
}

p {
  font-size: 1rem;
  line-height: 1.7;
}

/* ============================================================
   Site Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  height: 64px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  gap: 1.5rem;
}

.brand a {
  display: flex;
  align-items: center;
}

.brand-text {
  font-family: 'Calistoga', serif;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
}

.brand-logo {
  height: 36px;
  width: auto;
}

/* Nav links — structure: header > nav > p > a */
.site-header nav {
  flex: 1;
  overflow: hidden;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  line-height: 1;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 0.9rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* CTA Button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 1.25rem;
  background: #fff;
  color: #000;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.cta-btn:hover {
  background: rgba(255,255,255,0.85);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   Full-Screen Overlay Menu
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.overlay-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.overlay-close:hover {
  color: #fff;
}

.overlay-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.overlay-link {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  font-family: 'Calistoga', serif;
  font-size: clamp(2rem, 7vw, 5rem);
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.15);
  line-height: 1.1;
  padding: 0.2em 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.25s;
}

.overlay-link:last-child {
  border-bottom: none;
}

.overlay-link::before {
  content: attr(data-num);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
  transform: translateY(-0.15em);
}

.overlay-link:hover {
  color: #fff;
}

/* ============================================================
   Main & Sections
   ============================================================ */
main {
  padding-top: 64px;
}

/* Section scroll offset */
div[id] {
  scroll-margin-top: 72px;
}

/* ============================================================
   Hero Section — structure: div > figure + aside
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto auto;
  grid-template-areas:
    "content aside"
    "figure  aside";
  gap: 0;
  padding: 5rem 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-content {
  grid-area: content;
  align-self: end;
  padding-bottom: 2rem;
  padding-right: 2rem;
  position: relative;
  z-index: 2;
}

.hero-h1 {
  font-family: 'Calistoga', serif;
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: #fff;
  margin-bottom: 1rem;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  line-height: 1.7;
}

.hero-figure {
  grid-area: figure;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  min-height: 200px;
}

.hero-figure .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.hero-bg-text {
  position: absolute;
  bottom: -0.15em;
  right: -0.05em;
  font-family: 'Calistoga', serif;
  font-size: clamp(6rem, 20vw, 18rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* Hero Aside */
.hero-aside {
  grid-area: aside;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-left: 2rem;
  border-left: 1px solid rgba(255,255,255,0.08);
  padding-top: 1rem;
}

.aside-tile {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  transition: background 0.2s, color 0.2s;
}

.aside-tile:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ============================================================
   Content Section — structure: div > figure/aside
   ============================================================ */
.content-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 2rem 8rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "heading  aside"
    "subtitle aside"
    "body     aside";
  column-gap: 4rem;
  row-gap: 0;
}

.section-heading {
  grid-area: heading;
}

.subtitle {
  grid-area: subtitle;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 3rem;
  margin-top: 0.5rem;
}

.content-body {
  grid-area: body;
}

/* Aside in content div */
.content-section > aside {
  grid-area: aside;
  align-self: start;
  position: sticky;
  top: 80px;
  border-left: 1px solid rgba(255,255,255,0.08);
  padding-left: 2rem;
}

/* ============================================================
   Page Content Styles (injected HTML)
   ============================================================ */
.content-body h2,
.content-body h3,
.content-body h4 {
  font-family: 'Calistoga', serif;
  color: #fff;
  margin-top: 2.5em;
  margin-bottom: 0.5em;
}

.content-body h2 {
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0.4em;
}

.content-body h3 {
  font-size: clamp(1.125rem, 2.5vw, 1.625rem);
  letter-spacing: -0.02em;
}

.content-body p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 1.25em;
  font-size: 1rem;
  line-height: 1.75;
}

.content-body a {
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transition: border-color 0.2s;
}

.content-body a:hover {
  border-color: #fff;
}

.content-body ul,
.content-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
  color: rgba(255,255,255,0.75);
}

.content-body li {
  margin-bottom: 0.4em;
  line-height: 1.65;
}

.content-body strong {
  color: #fff;
  font-weight: 600;
}

.content-body em {
  color: rgba(255,255,255,0.6);
}

.content-body blockquote {
  border-left: 3px solid rgba(255,255,255,0.2);
  padding: 0.75em 1.5em;
  margin: 2em 0;
  color: rgba(255,255,255,0.5);
  font-size: 1.0625rem;
  font-style: italic;
}

.content-body pre,
.content-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}

.content-body pre {
  padding: 1.25em 1.5em;
  overflow-x: auto;
  margin-bottom: 1.25em;
}

.content-body code {
  padding: 0.15em 0.4em;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.9375rem;
}

.content-body th,
.content-body td {
  text-align: left;
  padding: 0.65em 1em;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
}

.content-body th {
  color: #fff;
  font-weight: 600;
}

/* Section blocks within injected content */
.content-body div {
  padding: 4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.content-body div:last-child {
  border-bottom: none;
}

/* ============================================================
   Footer — structure: footer > div × n
   ============================================================ */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: #000;
}

.footer-contact {
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-tagline {
  font-family: 'Calistoga', serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.6);
  max-width: 640px;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.65);
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.footer-email:hover {
  border-color: #fff;
  color: #fff;
}

.footer-copy {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.copyright {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.03em;
}

/* ============================================================
   Parallax / Motion
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg-text {
    will-change: transform;
  }

  .overlay-link {
    transition: color 0.25s ease, transform 0.25s ease;
  }

  .overlay-link:hover {
    transform: translateX(0.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================================
   Responsive — Tablet
   ============================================================ */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "figure"
      "aside";
    padding: 4rem 1.5rem 3rem;
  }

  .hero-aside {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-left: 0;
    padding-top: 1.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .aside-tile {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 120px;
  }

  .content-section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "subtitle"
      "aside"
      "body";
    padding: 4rem 1.5rem 5rem;
  }

  .content-section > aside {
    position: static;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-left: 0;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }
}

/* ============================================================
   Responsive — Mobile
   ============================================================ */
@media (max-width: 640px) {
  html {
    scroll-padding-top: 64px;
  }

  .header-inner {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .site-header nav {
    display: none;
  }

  .brand-text {
    font-size: 1.0625rem;
  }

  .hero-section {
    min-height: auto;
    padding: 3rem 1rem 2rem;
  }

  .hero-h1 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .hero-desc {
    font-size: 0.9375rem;
  }

  .hero-aside {
    gap: 0.375rem;
  }

  .aside-tile {
    flex: 1 1 calc(50% - 0.2rem);
  }

  .content-section {
    padding: 3rem 1rem 4rem;
    column-gap: 0;
    row-gap: 0;
  }

  .overlay {
    padding: 5rem 1.5rem 3rem;
  }

  .overlay-link {
    font-size: clamp(1.75rem, 9vw, 3.5rem);
  }

  .footer-contact {
    padding: 3rem 1rem;
  }

  .footer-contact-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-copy {
    padding: 1.25rem 1rem;
  }

  .cta-btn {
    padding: 0 0.875rem;
    font-size: 0.75rem;
  }
}

/* ============================================================
   Utility
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button[aria-expanded]{min-width:44px;min-height:44px}
