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

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

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

body {
  font-family: 'Space Grotesk', 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #000;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

/* ===== ANNOUNCE BAR ===== */
.announce-bar {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.announce-text {
  display: block;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 32px;
  z-index: 900;
  background: #fff;
  border-bottom: 2px solid #000;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-name {
  font-weight: 700;
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, background 0.15s;
  min-height: 44px;
}

.nav-link:hover,
.nav-link:focus-visible {
  border-bottom-color: #000;
  background: #f0f0f0;
  outline: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 2px solid #000;
  cursor: pointer;
  padding: 0.5rem;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #000;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== MAIN WRAP ===== */
main {
  min-height: 60vh;
}

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

/* ===== HERO ===== */
.hero-section {
  min-height: 45vh;
  border-bottom: 2px solid #000;
  position: relative;
  overflow: hidden;
}

.hero-article {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  padding: 5rem 0 4rem;
  position: relative;
}

.hero-bg-text {
  position: absolute;
  right: -0.05em;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(5rem, 20vw, 14rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #000;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
}

.hero-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

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

.hero-eyebrow span {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.375rem 0.75rem;
  border: 2px solid #000;
  background: #000;
  color: #fff;
}

.hero-h1 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.0;
  margin-bottom: 1.5rem;
  max-width: 14ch;
}

.hero-desc {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #333;
  max-width: 44ch;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  background: #000;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 2px solid #000;
  min-height: 52px;
  transition: background 0.15s, color 0.15s;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  background: #fff;
  color: #000;
  outline: none;
}

/* Hero Aside */
.hero-aside {
  width: 220px;
  flex-shrink: 0;
  border-left: 2px solid #000;
  padding-left: 2rem;
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
}

.aside-inner {
  padding: 1rem 0;
  width: 100%;
}

.aside-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.aside-title span {
  display: block;
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.aside-list li a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  font-weight: 500;
  border-bottom: 1px solid #e0e0e0;
  transition: padding-left 0.15s;
  min-height: 40px;
}

.aside-list li:last-child a {
  border-bottom: none;
}

.aside-list li a:hover,
.aside-list li a:focus-visible {
  padding-left: 0.5rem;
  outline: none;
}

/* ===== CONTENT SECTION ===== */
.content-section {
  padding: 5rem 0;
}

.content-article {
  position: relative;
}

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

/* Content styles for injected HTML */
.page-content h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 4rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 4px solid #000;
  scroll-margin-top: 100px;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
  scroll-margin-top: 100px;
}

.page-content h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.page-content p {
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  color: #1a1a1a;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1.25rem;
  padding-left: 0;
}

.page-content ul li,
.page-content ol li {
  font-size: 1.0625rem;
  line-height: 1.7;
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
}

.page-content ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  font-weight: 700;
}

.page-content ol {
  counter-reset: ol-counter;
}

.page-content ol li {
  counter-increment: ol-counter;
}

.page-content ol li::before {
  content: counter(ol-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 0.8em;
}

.page-content a {
  font-weight: 600;
  border-bottom: 2px solid #000;
  transition: background 0.12s;
}

.page-content a:hover,
.page-content a:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
}

.page-content strong {
  font-weight: 700;
}

.page-content em {
  font-style: italic;
}

.page-content blockquote {
  border-left: 4px solid #000;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #f8f8f8;
  font-size: 1.0625rem;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.page-content th {
  background: #000;
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
}

.page-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.page-content tr:hover td {
  background: #f5f5f5;
}

/* Section dividers within content */
.page-content article {
  padding: 3rem 0;
  border-bottom: 1px solid #e0e0e0;
  scroll-margin-top: 100px;
}

.page-content article:last-child {
  border-bottom: none;
}

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

/* footer > article × n */
.footer-brand-section {
  padding: 5rem 2rem 3rem;
  border-bottom: 1px solid #333;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
}

.footer-brand-inner {
  max-width: 1400px;
}

.footer-brand-big {
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: #fff;
  opacity: 0.15;
  margin-bottom: 1.5rem;
  pointer-events: none;
}

.footer-slogan {
  font-size: 1rem;
  color: #aaa;
  max-width: 40ch;
  line-height: 1.6;
}

.footer-nav-section {
  padding: 3rem 2rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* footer nav dl structure */
.footer-nav {
  margin-bottom: 3rem;
}

.footer-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0;
}

.footer-dl dt {
  border-bottom: 1px solid #222;
}

.footer-dl dt a {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ccc;
  transition: color 0.15s, padding-left 0.15s;
  min-height: 44px;
}

.footer-dl dt a:hover,
.footer-dl dt a:focus-visible {
  color: #fff;
  padding-left: 0.5rem;
  outline: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid #222;
}

.footer-copy {
  font-size: 0.8125rem;
  color: #666;
}

.footer-tip {
  font-size: 0.8125rem;
  color: #555;
  text-align: right;
}

/* ===== PARALLAX / SCROLL ANIMATIONS ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg-text {
    transition: transform 0.1s linear;
  }

  .page-content article {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .page-content article.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-content article {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-aside {
    display: none;
  }

  .hero-article {
    flex-direction: column;
    padding: 3rem 0 2.5rem;
  }

  .hero-bg-text {
    font-size: clamp(4rem, 30vw, 8rem);
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 2px solid #000;
    z-index: 800;
    padding: 0.5rem 0;
    gap: 0;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 0.875rem 2rem;
    border-bottom: 1px solid #eee;
    border-left: none;
    font-size: 1rem;
    min-height: 52px;
  }

  .nav-link:hover {
    background: #f5f5f5;
    border-bottom-color: #eee;
  }

  .header-inner {
    position: relative;
    padding: 0 1rem;
  }

  .site-header {
    top: 28px;
  }

  .announce-bar {
    font-size: 0.7rem;
  }

  .wrap {
    padding: 0 1rem;
  }

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

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

  .hero-content {
    padding: 0;
  }

  .content-section {
    padding: 3rem 0;
  }

  .page-content h2 {
    font-size: clamp(1.5rem, 7vw, 2.25rem);
  }

  .footer-brand-section {
    padding: 3rem 1rem 2rem;
  }

  .footer-nav-section {
    padding: 2rem 1rem;
  }

  .footer-dl {
    grid-template-columns: 1fr 1fr;
  }

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

  .footer-tip {
    text-align: left;
  }
}

@media (max-width: 400px) {
  .footer-dl {
    grid-template-columns: 1fr;
  }

  .hero-h1 {
    font-size: 2rem;
  }
}

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