@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #000;
  color: #fff;
  -webkit-text-size-adjust: 100%;
}

body.body-root {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
}

article {
  scroll-margin-top: 72px;
}

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

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

ol, ul {
  list-style: none;
}

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

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
  position: relative;
  min-height: 100vh;
}

/* ===== MENU OVERLAY ===== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 900;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 2rem 4rem 3rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2%);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.menu-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 0.5rem;
}

.menu-close span {
  display: block;
  width: 28px;
  height: 2px;
  background: #fff;
  transition: transform 0.2s;
}

.menu-close span:first-child {
  transform: rotate(45deg) translate(1px, 1px);
}

.menu-close span:last-child {
  transform: rotate(-45deg) translate(1px, -1px);
}

.overlay-nav ol {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.overlay-nav li a.nav-link {
  display: block;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  padding: 0.4rem 0;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.15s, padding-left 0.15s;
  min-height: 48px;
}

.overlay-nav li a.nav-link:hover,
.overlay-nav li a.nav-link:focus-visible {
  color: #fff;
  padding-left: 1rem;
  outline: none;
}

.overlay-brand {
  position: absolute;
  bottom: 2.5rem;
  left: 3rem;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  align-items: end;
  overflow: hidden;
  padding-bottom: 3rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  z-index: 0;
}

.hero-figure {
  overflow: hidden;
  height: 100%;
}

.hero-figure-1 {
  transform: translateY(0);
}

.hero-figure-2 {
  transform: translateY(14%);
}

.hero-img,
.hero-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-img-placeholder {
  background: #111;
}

.hero-img-1 {
  filter: brightness(0.55);
}

.hero-img-2 {
  filter: brightness(0.45);
}

.hero-text {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  text-align: right;
  padding: 5rem 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hero-h1 {
  font-size: clamp(2.4rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: #fff;
  max-width: 18ch;
  text-align: right;
  mix-blend-mode: normal;
}

.hero-desc {
  margin-top: 1.25rem;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  max-width: 40ch;
  text-align: right;
  line-height: 1.6;
}

/* ===== MAIN CONTENT ===== */
.site-main {
  background: #000;
  padding: 0 0 8rem;
}

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto 1fr;
  gap: 0 3rem;
  align-items: start;
}

/* aside on left */
.content-aside {
  grid-column: 1;
  grid-row: 1 / 3;
  position: sticky;
  top: 80px;
}

.aside-inner {
  border-left: 2px solid #fff;
  padding-left: 1.25rem;
}

.aside-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.aside-link {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 0.35rem 0;
  color: rgba(255,255,255,0.55);
  transition: color 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-link:hover,
.aside-link:focus-visible {
  color: #fff;
  outline: none;
}

/* figure decoration */
.content-figure {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 2rem;
}

.deco-line {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.15);
}

/* prose body */
.content-body {
  grid-column: 2;
  grid-row: 2;
}

/* ===== PROSE STYLES ===== */
.prose {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 5rem 0 1.5rem;
  color: #fff;
}

.prose h2 span {
  display: inline;
}

.prose h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 3rem 0 1rem;
  color: #fff;
}

.prose h3 span {
  display: inline;
}

.prose p {
  margin: 0 0 1.25rem;
  color: rgba(255,255,255,0.85);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem 1.5rem;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
}

.prose a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}

.prose a:hover {
  opacity: 0.7;
}

.prose blockquote {
  border-left: 3px solid #fff;
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: rgba(255,255,255,0.65);
  font-style: italic;
}

.prose strong {
  color: #fff;
  font-weight: 700;
}

.prose em {
  color: rgba(255,255,255,0.75);
}

.prose code {
  font-family: 'Courier New', monospace;
  background: rgba(255,255,255,0.1);
  padding: 0.1em 0.4em;
  border-radius: 2px;
  font-size: 0.9em;
}

.prose article {
  scroll-margin-top: 80px;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 1rem;
}

.prose article:first-child {
  border-top: none;
  margin-top: 0;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: calc(1.5rem + 72px);
}

.footer-logo a {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.site-logo,
.site-logomark {
  height: 32px;
  width: auto;
}

.site-logo-text {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff;
}

.footer-nav {
  flex: 1;
}

.footer-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.footer-nav ol li a {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.03em;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.footer-nav ol li a:hover {
  color: #fff;
}

.footer-copy small {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ===== BOTTOM BAR ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 800;
}

.bottom-bar-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: #fff;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.2s, opacity 0.2s;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ===== HOVER MICRO-INTERACTIONS ===== */
.overlay-nav li a.nav-link::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.2s ease;
  margin-top: 2px;
}

.overlay-nav li a.nav-link:hover::after {
  width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-section {
    min-height: 45vh;
    grid-template-columns: 1fr;
    padding-bottom: 2rem;
  }

  .hero-media {
    grid-template-columns: 1fr 1fr;
  }

  .hero-figure-2 {
    transform: translateY(20%);
  }

  .hero-text {
    padding: 3rem 1.5rem 0;
  }

  .hero-h1 {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .content-section {
    grid-template-columns: 1fr;
    padding: 3rem 1.25rem 2rem;
    gap: 0;
  }

  .content-aside {
    grid-column: 1;
    grid-row: auto;
    position: static;
    margin-bottom: 2.5rem;
  }

  .content-figure {
    grid-column: 1;
    grid-row: auto;
  }

  .content-body {
    grid-column: 1;
    grid-row: auto;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: calc(1rem + 72px);
  }

  .footer-nav ol {
    gap: 0.25rem 0.75rem;
  }

  .menu-overlay {
    padding: 4rem 1.5rem 4rem 1.5rem;
  }

  .overlay-brand {
    left: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-h1 {
    font-size: clamp(1.8rem, 11vw, 3rem);
  }

  .hero-text {
    padding: 2.5rem 1.25rem 0;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .menu-overlay {
    transition: none;
  }

  .overlay-nav li a.nav-link,
  .overlay-nav li a.nav-link::after,
  .aside-link,
  .footer-nav ol li a,
  .prose a,
  .hamburger span,
  .menu-close span {
    transition: none;
  }
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
