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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
ol, ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   OVERLAY MENU
   ============================================================ */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.overlay-nav .nav-link {
  color: #fff;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.overlay-nav .nav-link:hover,
.overlay-nav .nav-link.nav-link--active {
  border-bottom-color: #fff;
  text-decoration: none;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
  border-bottom: 3px solid #000;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  gap: 1rem;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-right { justify-content: flex-end; }

.site-nav .nav-link {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 0.6rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.nav-link--active {
  border-bottom-color: #fff;
  text-decoration: none;
}

.nav-brand {
  flex-shrink: 0;
}

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

.brand-text {
  color: #fff;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

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

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

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

/* ============================================================
   STICKY ANCHOR BAR
   ============================================================ */
.sticky-anchor {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: #fff;
  border-bottom: 2px solid #000;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-anchor::-webkit-scrollbar { display: none; }

.anchor-link {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000;
  padding: 0.6rem 1rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-right: 1px solid #000;
  transition: background 0.15s, color 0.15s;
}

.anchor-link:hover,
.anchor-link--active {
  background: #000;
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero--home {
  position: relative;
  background: #000;
  color: #fff;
  min-height: 45vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  text-align: center;
  width: 100%;
}

.hero-eyebrow {
  margin-bottom: 1rem;
}

.hero-eyebrow small {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #aaa;
  border: 1px solid #444;
  padding: 0.25rem 0.75rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: #ccc;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #000;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.75rem 2rem;
  min-height: 48px;
  border: 2px solid #fff;
  transition: background 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
}

.hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: #fff;
  clip-path: polygon(0 60px, 100% 0, 100% 60px);
  z-index: 3;
}

/* ============================================================
   SECTION RULE (replaces slash-divider with code symbols)
   ============================================================ */
.section-rule {
  height: 3px;
  background: #000;
  margin: 3rem 0;
  position: relative;
}

.section-rule::before {
  content: '';
  position: absolute;
  left: 0;
  top: -5px;
  width: 40px;
  height: 13px;
  background: #000;
}

/* ============================================================
   MAIN / ARTICLE
   ============================================================ */
.site-main {
  flex: 1;
}

.main-article {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-wrap {
  padding: 3rem 0;
}

.article-content {
  max-width: 860px;
  margin: 0 auto;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: #000; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-hidden] { color: #999; }

/* ============================================================
   PROSE
   ============================================================ */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: #111;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }

.prose p { margin-bottom: 1.25rem; }

.prose a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover { opacity: 0.7; }

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

.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.5rem; }

.prose blockquote {
  border-left: 4px solid #000;
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: #f5f5f5;
  font-size: 1.1rem;
  font-weight: 700;
}

.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

.prose--story::first-letter {
  font-size: 4rem;
  font-weight: 700;
  float: left;
  line-height: 0.8;
  margin: 0.1em 0.1em 0 0;
  color: #000;
  letter-spacing: -0.02em;
}

/* ============================================================
   EYEBROW / SMALL LABELS
   ============================================================ */
.eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.4rem;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header,
.story-header,
.about-header,
.privacy-header {
  margin-bottom: 2.5rem;
}

.section-header-eyebrow small,
.about-eyebrow small,
.privacy-eyebrow small {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.75rem;
  border: 1px solid #ccc;
  padding: 0.2rem 0.6rem;
}

.section-title,
.story-title,
.about-title,
.privacy-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.section-date,
.story-date,
.about-date,
.privacy-date,
.privacy-modified {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #666;
  letter-spacing: 0.03em;
}

.story-modified { margin-left: 1rem; }

/* ============================================================
   STORY META
   ============================================================ */
.story-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.story-byline {
  font-size: 0.8rem;
  font-weight: 700;
  color: #666;
  letter-spacing: 0.03em;
}

.story-category-badge {
  display: inline-block;
  background: #000;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 4px;
}

/* ============================================================
   HERO FIGURE (story)
   ============================================================ */
.story-hero-figure {
  margin: 2rem 0;
  border: 2px solid #000;
  overflow: hidden;
}

.story-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   CARDS (home)
   ============================================================ */
.section-cards { margin-bottom: 3rem; }

.section-cards h2,
.section-index h2,
.children-section h2,
.related-section h2,
.about-links-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card-item { display: flex; }

.card-link {
  display: flex;
  flex-direction: column;
  border: 2px solid #000;
  border-radius: 18px;
  overflow: hidden;
  width: 100%;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-link:hover {
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
}

.card-figure {
  overflow: hidden;
  max-height: 200px;
}

.card-img { width: 100%; height: 200px; object-fit: cover; }

.card-body {
  padding: 1.25rem;
  flex: 1;
  border-top: 2px solid #000;
  border-bottom: 3px solid #000;
}

.card-badge {
  display: inline-block;
  background: #000;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.card-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.card-date {
  font-size: 0.75rem;
  color: #888;
  font-weight: 700;
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 700;
}

/* ============================================================
   SECTION INDEX LIST
   ============================================================ */
.section-index { margin-bottom: 2rem; }

.section-index-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-index-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #000;
  transition: background 0.15s;
}

.section-index-list li:hover { background: #f5f5f5; }

.section-index-list a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.section-index-list a:hover { text-decoration: underline; }

.section-index-list small {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
}

/* ============================================================
   ENTRY LIST (section children)
   ============================================================ */
.children-section { margin-top: 1rem; }

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  counter-reset: entry-counter;
}

.entry-item {
  border: 2px solid #000;
  border-radius: 18px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.entry-item:hover {
  box-shadow: 3px 3px 0 #000;
}

.entry-link {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 80px;
  color: #000;
}

.entry-link:hover { text-decoration: none; }

.entry-figure {
  flex-shrink: 0;
  width: 120px;
  overflow: hidden;
}

.entry-img {
  width: 120px;
  height: 100%;
  object-fit: cover;
}

.entry-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  flex: 1;
  border-bottom: 3px solid #000;
}

.entry-num {
  font-size: 2rem;
  font-weight: 700;
  color: #e0e0e0;
  letter-spacing: -0.05em;
  flex-shrink: 0;
  line-height: 1;
}

.entry-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  flex: 1;
}

.entry-desc {
  font-size: 0.8rem;
  color: #666;
  display: block;
  margin-top: 0.25rem;
}

/* ============================================================
   RELATED LIST (story)
   ============================================================ */
.related-section { margin-top: 1rem; }

.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-item {
  border: 1px solid #000;
  border-left: 4px solid #000;
  border-radius: 0 4px 4px 0;
}

.related-link {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.1rem;
  gap: 0.25rem;
  transition: background 0.15s;
}

.related-link:hover {
  background: #f5f5f5;
  text-decoration: none;
}

.related-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #000;
  line-height: 1.3;
}

.related-desc {
  font-size: 0.8rem;
  color: #666;
}

/* ============================================================
   STORY BACK LINKS
   ============================================================ */
.story-back {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.back-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.5rem 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.back-link:hover { opacity: 0.7; }

.privacy-footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-brand-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #000;
  color: #fff;
  margin-bottom: 2rem;
  border-radius: 4px;
}

.about-brand-mark {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.about-brand-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #ccc;
}

.about-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-nav-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #000;
}

.about-nav-list a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.about-nav-list a:hover { text-decoration: underline; }

.about-nav-list small {
  font-size: 0.8rem;
  color: #666;
}

/* ============================================================
   PRIVACY META
   ============================================================ */
.privacy-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #000;
  color: #fff;
  margin-top: auto;
  border-top: 3px solid #000;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-col dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #333;
}

.footer-col dd {
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-col dd a {
  color: #ccc;
  transition: color 0.15s;
}

.footer-col dd a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-brand-name {
  font-size: 1.3rem !important;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
  text-transform: none !important;
}

.footer-brand-desc {
  color: #aaa !important;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-about-link {
  color: #fff !important;
  font-weight: 700;
  font-size: 0.85rem;
}

.footer-notice {
  color: #666 !important;
  font-size: 0.75rem;
  margin-top: 1rem;
  line-height: 1.5;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border-top: 1px solid #222;
  font-size: 0.75rem;
  color: #555;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-col--brand {
    grid-column: 1 / -1;
  }

  .cards-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .site-nav .nav-link {
    font-size: 0.72rem;
    padding: 0.5rem 0.4rem;
  }
}

@media (max-width: 640px) {
  .site-nav {
    padding: 0 1rem;
  }

  .nav-left .nav-link:not(:first-child),
  .nav-right .nav-link:not(:last-child) {
    display: none;
  }

  .hero-inner {
    padding: 3rem 1rem 4rem;
  }

  .main-article {
    padding: 0 1rem;
  }

  .article-wrap {
    padding: 2rem 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1rem 1.5rem;
  }

  .footer-col--brand { grid-column: auto; }

  .cards-list {
    grid-template-columns: 1fr;
  }

  .entry-figure { display: none; }

  .about-brand-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .story-back {
    flex-direction: column;
    gap: 0.75rem;
  }

  .privacy-footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .section-index-list li {
    flex-direction: column;
    gap: 0.25rem;
  }

  .about-nav-list li {
    flex-direction: column;
    gap: 0.25rem;
  }
}
