@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: #f5f5f5;
  color: #1f1f1f;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ===== Sidebar aside (structural contract) ===== */
.site-aside {
  display: none;
}

/* ===== Page Shell ===== */
.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1f1f1f;
  flex-shrink: 0;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.logo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #1f1f1f;
  color: #ffffff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #1f1f1f;
}

.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-nav ul,
.site-aside nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  flex-wrap: wrap;
}

.header-nav ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.header-nav ul li a:hover,
.header-nav ul li a:focus-visible {
  background: #f5f5f5;
  color: #000;
}

/* Nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1f1f1f;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.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); }

/* Ticker */
.header-ticker {
  background: #1f1f1f;
  color: #ffffff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 24px;
  letter-spacing: 0.05em;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  padding: 12px 24px 16px;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu ul li a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #1f1f1f;
  text-decoration: none;
  border-radius: 10px;
  min-height: 44px;
  transition: background 0.15s ease;
}

.mobile-menu ul li a:hover {
  background: #f5f5f5;
}

/* ===== Hero ===== */
.hero-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 45vh;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: right;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
}

.hero-text h1 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: #1f1f1f;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  max-width: 400px;
  margin-left: auto;
}

.hero-badges {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 5px 14px;
  background: #f5f5f5;
  color: #1f1f1f;
  font-size: 12px;
  font-weight: 700;
  border-radius: 100px;
  border: 1px solid #e0e0e0;
  letter-spacing: 0.03em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  padding: 12px 28px;
  background: #1f1f1f;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  min-height: 48px;
  transition: background 0.18s ease, transform 0.18s ease;
  letter-spacing: 0.01em;
}

.hero-cta:hover {
  background: #333;
  transform: translateY(-1px);
}

/* Hero visual / bento preview */
.hero-visual {
  display: flex;
  justify-content: center;
}

.bento-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.bp-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 18px;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1f1f1f;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.bp-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.bp-card--lg { grid-column: 1 / 3; min-height: 120px; }
.bp-card--md { grid-column: 1 / 2; min-height: 90px; }
.bp-card--sm { min-height: 90px; }

.bp-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f1f1f;
  flex-shrink: 0;
}

.bp-dot--accent { background: #555; }
.bp-dot--mid { background: #999; }

/* ===== Bento Main ===== */
.bento-main {
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px 64px;
}

.bento-content {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: start;
}

/* figure */
.bento-figure {
  grid-column: 1 / 3;
  margin-bottom: 4px;
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.fg-tile {
  height: 6px;
  border-radius: 100px;
}

.fg-tile--a { background: #1f1f1f; }
.fg-tile--b { background: #c0c0c0; }
.fg-tile--c { background: #1f1f1f; opacity: 0.4; }
.fg-tile--d { background: #e0e0e0; }

figcaption {
  font-size: 11px;
  color: #aaa;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

/* Content aside */
.content-aside {
  grid-column: 2 / 3;
  grid-row: 2;
  position: sticky;
  top: 80px;
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.aside-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f1f1f;
  margin-bottom: 10px;
}

.content-aside hr,
.footer-links-section hr,
.footer-brand-section hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 10px 0 14px;
}

.aside-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-links li a {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  text-decoration: none;
  border-radius: 8px;
  min-height: 36px;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}

.aside-links li a:hover {
  background: #f5f5f5;
  color: #1f1f1f;
}

/* Page content */
.page-content {
  grid-column: 1 / 2;
  grid-row: 2;
}

/* ===== Prose / Content Styles ===== */
.prose {
  font-size: 16px;
  line-height: 1.75;
  color: #1f1f1f;
}

.prose div {
  background: #ffffff;
  border-radius: 24px;
  padding: 36px 40px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.22s ease;
}

.prose div:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}

.prose h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
  color: #1f1f1f;
}

.prose h2 + hr {
  border: none;
  border-top: 2px solid #1f1f1f;
  margin-bottom: 20px;
  width: 40px;
}

.prose h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: #1f1f1f;
}

.prose h3 + hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin-bottom: 16px;
}

.prose p {
  margin-bottom: 16px;
}

.prose ul, .prose ol {
  margin: 12px 0 16px 20px;
}

.prose li {
  margin-bottom: 8px;
  line-height: 1.7;
}

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

.prose a:hover { opacity: 0.65; }

.prose strong { font-weight: 700; }

.prose blockquote {
  border-left: 3px solid #1f1f1f;
  margin: 20px 0;
  padding: 12px 20px;
  background: #f5f5f5;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #444;
}

/* ===== Footer ===== */
.site-footer {
  background: #1f1f1f;
  color: #ffffff;
  padding: 0;
}

.footer-brand-section,
.footer-links-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.site-footer > div {
  display: grid;
}

.site-footer > .footer-brand-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  border-bottom: 1px solid #333;
}

.footer-brand .brand-link {
  color: #ffffff;
  margin-bottom: 12px;
  display: inline-flex;
}

.footer-brand .brand-name {
  color: #ffffff;
  font-size: 20px;
}

.footer-desc {
  font-size: 14px;
  color: #aaa;
  line-height: 1.7;
  max-width: 340px;
}

.footer-contact {
  padding-top: 8px;
}

.footer-contact h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 10px;
}

.footer-contact hr {
  border: none;
  border-top: 1px solid #333;
  margin-bottom: 14px;
}

.footer-contact a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}

.footer-contact a:hover { color: #fff; }

.footer-links-section {
  border-bottom: 1px solid #333;
  padding-top: 32px;
  padding-bottom: 32px;
}

.footer-links-section h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 10px;
}

.footer-links-section hr {
  border: none;
  border-top: 1px solid #333;
  margin-bottom: 16px;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.footer-nav li a {
  font-size: 14px;
  font-weight: 600;
  color: #ccc;
  text-decoration: none;
  padding: 6px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}

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

.footer-copy-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
}

.copyright {
  font-size: 13px;
  color: #666;
  text-align: center;
}

/* ===== Utilities ===== */
img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid #1f1f1f;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Stagger animation ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.prose div {
  animation: fadeUp 0.4s ease both;
}

.prose div:nth-child(1) { animation-delay: 0.05s; }
.prose div:nth-child(2) { animation-delay: 0.1s; }
.prose div:nth-child(3) { animation-delay: 0.15s; }
.prose div:nth-child(4) { animation-delay: 0.2s; }
.prose div:nth-child(5) { animation-delay: 0.25s; }
.prose div:nth-child(6) { animation-delay: 0.3s; }
.prose div:nth-child(7) { animation-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr 1fr;
    min-height: auto;
    padding: 36px 24px 32px;
  }

  .bento-content {
    grid-template-columns: 1fr;
  }

  .bento-figure {
    grid-column: 1;
  }

  .content-aside {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }

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

  .site-footer > .footer-brand-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 16px 24px;
    min-height: auto;
  }

  .hero-text {
    text-align: left;
  }

  .hero-badges {
    justify-content: flex-start;
  }

  .hero-cta {
    align-self: flex-start;
  }

  .hero-visual {
    display: none;
  }

  .header-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header-inner {
    gap: 16px;
  }

  .bento-main {
    padding: 0 16px 48px;
  }

  .prose div {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .footer-brand-section,
  .footer-links-section,
  .footer-copy-section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand-name {
    font-size: 15px;
  }

  div[id] {
    scroll-margin-top: 100px;
  }
}
