@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Sans+3:wght@300;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;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Source Sans 3', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #1f1f1f;
  background-color: #f5f5f5;
  overflow-x: hidden;
}

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

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

ul, menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ===== Scroll margin for fixed header ===== */
article[id] {
  scroll-margin-top: 100px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1f1f1f;
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.brand-name {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  color: #ffffff;
  line-height: 1;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.4rem;
  background: #ffffff;
  color: #1f1f1f;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
  min-height: 40px;
}

.header-cta:hover {
  background: #f5f5f5;
  color: #1f1f1f;
}

/* ===== Nav (details/summary structure) ===== */
.nav-details {
  width: 100%;
}

.nav-details[open] .nav-toggle::after {
  content: '✕';
}

.nav-toggle {
  display: none;
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  user-select: none;
  min-height: 40px;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle::after {
  content: '☰';
  font-size: 1rem;
}

.nav-toggle::-webkit-details-marker { display: none; }

.nav-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 0 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav-menu li a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.03em;
  white-space: nowrap;
  min-height: 44px;
  transition: color 0.15s, background 0.15s;
  border-radius: 0;
}

.nav-menu li a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.08);
}

/* ===== Hero ===== */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  background: #1f1f1f;
  color: #ffffff;
  overflow: hidden;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem 4rem 4rem;
  gap: 1.2rem;
}

.eyebrow {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}

.hero-h1 {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  max-width: 420px;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  background: #ffffff;
  color: #1f1f1f;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  border-radius: 0;
  width: fit-content;
  min-height: 48px;
  transition: background 0.2s, transform 0.15s;
}

.cta-primary:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
}

.hero-figure {
  margin: 0;
  overflow: hidden;
  position: relative;
  background: #2a2a2a;
}

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

.hero-figure--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a2a2a 0%, #383838 100%);
}

.hero-placeholder-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.12);
}

/* ===== Main Content ===== */
.site-main {
  background: #f5f5f5;
}

/* ===== Bento Section ===== */
.bento-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto 1fr;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  align-items: start;
}

.bento-deco {
  grid-column: 1 / -1;
  margin: 0 0 1.5rem 0;
}

.bento-deco-bar {
  display: block;
  height: 3px;
  width: 60px;
  background: #1f1f1f;
}

.bento-aside {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 100px;
  padding-right: 2rem;
  padding-top: 0.5rem;
}

.bento-aside .eyebrow {
  color: rgba(31,31,31,0.45);
  display: block;
  margin-bottom: 0.4rem;
}

.aside-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: #1f1f1f;
  margin-bottom: 1rem;
  line-height: 1.2;
}

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

.aside-nav-list li a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #1f1f1f;
  border-left: 2px solid transparent;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.5;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-nav-list li a:hover {
  border-left-color: #1f1f1f;
  background: rgba(31,31,31,0.05);
}

/* ===== Page Content (bento grid) ===== */
.page-content-wrap {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

/* Bento grid for sections inside page.content */
.page-content-wrap article {
  background: #ffffff;
  border-radius: 0;
  padding: 2rem 2rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.page-content-wrap article:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}

/* Bento grid layout for content sections */
.page-content-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: start;
}

.page-content-wrap article:nth-child(1) {
  grid-column: 1 / -1;
}

.page-content-wrap article:nth-child(2),
.page-content-wrap article:nth-child(3) {
  grid-column: span 1;
}

.page-content-wrap article:nth-child(4) {
  grid-column: 1 / -1;
}

.page-content-wrap article:nth-child(5),
.page-content-wrap article:nth-child(6) {
  grid-column: span 1;
}

.page-content-wrap article:nth-child(7) {
  grid-column: 1 / -1;
}

/* Typography inside content */
.page-content-wrap h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  color: #1f1f1f;
  line-height: 1.15;
  margin-bottom: 0.8rem;
}

.page-content-wrap h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: #1f1f1f;
  margin-bottom: 0.6rem;
}

.page-content-wrap p {
  font-size: 1rem;
  line-height: 1.75;
  color: #3a3a3a;
  margin-bottom: 0.75rem;
}

.page-content-wrap p:last-child {
  margin-bottom: 0;
}

.page-content-wrap ul,
.page-content-wrap ol {
  padding-left: 1.4rem;
  margin-bottom: 0.75rem;
  line-height: 1.75;
  color: #3a3a3a;
  font-size: 1rem;
}

.page-content-wrap li {
  margin-bottom: 0.3rem;
}

.page-content-wrap a {
  color: #1f1f1f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content-wrap a:hover {
  opacity: 0.65;
}

.page-content-wrap strong {
  font-weight: 700;
  color: #1f1f1f;
}

/* small eyebrow inside content */
.page-content-wrap small {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(31,31,31,0.4);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

/* small + h2 adjacency styling */
.page-content-wrap small + h2,
.page-content-wrap small + h3 {
  margin-top: 0.2rem;
}

/* ===== Footer ===== */
.site-footer {
  background: #1f1f1f;
  color: rgba(255,255,255,0.55);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.75);
}

.footer-note {
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 600px;
  color: rgba(255,255,255,0.4);
}

/* ===== Stagger animation ===== */
@media (prefers-reduced-motion: no-preference) {
  .page-content-wrap article {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.45s ease forwards;
  }

  .page-content-wrap article:nth-child(1) { animation-delay: 0.05s; }
  .page-content-wrap article:nth-child(2) { animation-delay: 0.12s; }
  .page-content-wrap article:nth-child(3) { animation-delay: 0.19s; }
  .page-content-wrap article:nth-child(4) { animation-delay: 0.26s; }
  .page-content-wrap article:nth-child(5) { animation-delay: 0.33s; }
  .page-content-wrap article:nth-child(6) { animation-delay: 0.40s; }
  .page-content-wrap article:nth-child(7) { animation-delay: 0.47s; }

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-content-wrap article {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cta-primary,
  .header-cta,
  .nav-menu li a,
  .aside-nav-list li a {
    transition: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .bento-section {
    grid-template-columns: 180px 1fr;
    padding: 2rem 1.5rem;
  }

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

  .page-content-wrap article:nth-child(n) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .header-brand-row {
    padding: 0.6rem 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-details:not([open]) .nav-menu {
    display: none;
  }

  .nav-details[open] .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0;
    background: #1f1f1f;
  }

  .nav-details[open] .nav-menu li a {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: 48px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-aside {
    padding: 3rem 1.5rem 2rem;
    order: 1;
  }

  .hero-figure {
    order: 2;
    min-height: 240px;
  }

  .bento-section {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

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

  .bento-aside {
    grid-column: 1;
    grid-row: auto;
    position: static;
    padding-right: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(31,31,31,0.1);
    margin-bottom: 0.5rem;
  }

  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .aside-nav-list li a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
    min-height: 40px;
  }

  .aside-nav-list li a:hover {
    border-left-color: transparent;
    border-bottom-color: #1f1f1f;
  }

  .page-content-wrap {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: 1fr;
  }

  .page-content-wrap article {
    padding: 1.5rem 1.25rem;
  }

  .page-content-wrap h2 {
    font-size: 1.4rem;
  }

  .site-footer {
    padding: 1.5rem 1rem;
  }

  article[id] {
    scroll-margin-top: 80px;
  }
}

@media (max-width: 375px) {
  .brand-name {
    font-size: 1.35rem;
  }

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

  .header-cta {
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
  }

  .page-content-wrap article {
    padding: 1.25rem 1rem;
  }
}
