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

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

html {
  font-size: 17px;
  line-height: 1.7;
  scroll-behavior: smooth;
  background: #ffffff;
  color: #000000;
}

body {
  font-family: 'Nunito Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Varela Round', 'Nunito Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: #000;
  color: #fff;
  padding: 2px 8px;
  margin-bottom: 0.5rem;
}

small.eyebrow + h2,
small.eyebrow + h3 {
  margin-top: 0;
}

/* Drop cap for article body first paragraph */
.article-body > p:first-of-type::first-letter,
.article-body div:first-child p:first-of-type::first-letter {
  font-family: 'Varela Round', serif;
  font-size: 3.5rem;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  margin: 0.05em 0.1em 0 0;
  color: #000;
}

/* ============================================================
   SCROLL BEHAVIOR & OFFSETS
   ============================================================ */
div[id] {
  scroll-margin-top: 80px;
}

/* ============================================================
   OVERLAY MENU
   ============================================================ */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

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

.overlay-inner {
  text-align: center;
  width: 90%;
  max-width: 600px;
}

.overlay-brand {
  font-family: 'Varela Round', sans-serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.6rem;
  color: #fff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
}

.overlay-close:hover { background: #fff; color: #000; }

.overlay-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 2rem;
}

.overlay-nav a {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  padding: 0.6rem 1rem;
  color: #fff;
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-nav a:hover {
  background: #fff;
  color: #000;
  text-decoration: none;
}

.overlay-search {
  display: flex;
  gap: 0;
  max-width: 360px;
  margin: 0 auto;
}

.overlay-search input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 0.95rem;
  min-height: 44px;
}

.overlay-search input::placeholder { color: rgba(255,255,255,0.5); }

.overlay-search button {
  padding: 0 1.2rem;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  min-height: 44px;
  min-width: 70px;
  letter-spacing: 0.05em;
}

.overlay-search button:hover { background: rgba(255,255,255,0.85); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 1.5rem;
  background: #fff;
  border-bottom: 2px solid #000;
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* nav-details: hide default marker, use as wrapper only */
.nav-details {
  display: contents;
}

.nav-details > summary {
  display: none;
}

.nav-details[open] > summary { display: none; }

/* Desktop nav sits left */
.desktop-nav {
  display: flex;
  align-items: center;
}

.desktop-nav ul,
.desktop-nav.desktop-nav--left {
  display: flex;
  gap: 0;
  list-style: none;
}

.desktop-nav li > a {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  height: 64px;
  min-width: 44px;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.15s;
}

.desktop-nav li > a:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
}

.site-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: 4px 8px;
}

.brand-text {
  font-family: 'Varela Round', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
  max-width: 160px;
  display: block;
}

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

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.header-search {
  display: flex;
  align-items: center;
  border: 1.5px solid #000;
  height: 40px;
}

.header-search input {
  width: 120px;
  padding: 0 0.6rem;
  font-size: 0.82rem;
  height: 100%;
  border: none;
  background: transparent;
}

.header-search button {
  padding: 0 0.5rem;
  height: 100%;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  min-width: 40px;
  min-height: 40px;
  justify-content: center;
}

.header-search button:hover { background: #000; color: #fff; }

.hamburger-trigger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #000;
  cursor: pointer;
  background: none;
}

.hamburger-trigger .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #000;
  transition: transform 0.2s;
}

.hamburger-trigger:hover { background: #000; }
.hamburger-trigger:hover .bar { background: #fff; }

.hamburger-btn {
  display: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  margin-top: 64px;
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111 0%, #333 50%, #111 100%);
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 3rem 5% 4rem;
  text-align: right;
  color: #fff;
  max-width: 900px;
  margin-left: auto;
}

.hero-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: #fff;
  color: #000;
  text-transform: uppercase;
}

.badge--outline {
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 500px;
  margin-left: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2.5rem;
  background: #fff;
  color: #000;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  min-height: 48px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.hero-cta:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
main {
  background: #fff;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main > .wrap > div {
  padding: 4rem 0;
}

main > .wrap > div + div {
  border-top: 2px solid #000;
}

article.content-article {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.article-body {
  min-width: 0;
}

/* ============================================================
   ARTICLE BODY CONTENT STYLES
   ============================================================ */
.article-body h2 {
  font-size: clamp(1.3rem, 3vw, 2rem);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #000;
}

.article-body h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin: 2rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.8;
}

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

.article-body ol { list-style: decimal; }

.article-body li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.article-body blockquote {
  border-left: 4px solid #000;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #f5f5f5;
  font-size: 1.1rem;
  font-style: italic;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.article-body th {
  background: #000;
  color: #fff;
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 700;
}

.article-body td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid #e0e0e0;
}

.article-body tr:nth-child(even) td { background: #f9f9f9; }

.article-body a {
  text-decoration: underline;
  font-weight: 600;
}

.article-body a:hover { background: #000; color: #fff; }

/* div dividers inside content */
.article-body div {
  padding: 2.5rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.article-body div:last-child { border-bottom: none; }

.article-body div h2:first-child,
.article-body div h3:first-child {
  margin-top: 0;
}

/* ============================================================
   ASIDE
   ============================================================ */
.content-aside {
  position: sticky;
  top: 84px;
}

.aside-inner {
  border: 2px solid #000;
  padding: 1.5rem;
}

.aside-inner h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  margin-top: 0.3rem;
}

.aside-nav {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.aside-nav li > a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: border-color 0.15s, background 0.15s;
  min-height: 44px;
}

.aside-nav li > a:hover {
  border-left-color: #000;
  background: #f5f5f5;
  text-decoration: none;
}

.aside-tip {
  background: #000;
  color: #fff;
  padding: 1rem;
  margin-top: 1rem;
}

.aside-tip .eyebrow {
  background: #fff;
  color: #000;
  margin-bottom: 0.4rem;
}

.aside-tip p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #000;
  color: #fff;
  margin-top: 0;
}

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

.footer-brand {
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-brand-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.footer-cta-block .eyebrow {
  background: #fff;
  color: #000;
  margin-bottom: 0.75rem;
}

.footer-cta-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  min-height: 48px;
  transition: background 0.2s, color 0.2s;
}

.footer-cta-btn:hover {
  background: rgba(255,255,255,0.85);
  text-decoration: none;
}

.footer-logo-text {
  font-family: 'Varela Round', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.75;
}

.footer-links-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 2rem;
  list-style: none;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.footer-nav li > a {
  display: flex;
  align-items: center;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  min-height: 44px;
  transition: color 0.15s, background 0.15s;
}

.footer-nav li > a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
  opacity: 0.6;
}

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

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

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

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 900px) {
  article.content-article {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    order: -1;
  }

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

  .desktop-nav.desktop-nav--left,
  .desktop-nav.desktop-nav--right {
    display: none;
  }

  .header-search {
    display: none;
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .brand-text {
    font-size: 0.9rem;
    max-width: 140px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 600px) {
  .site-header {
    padding: 0 1rem;
    height: 56px;
    grid-template-columns: 44px 1fr 44px;
    gap: 0.5rem;
  }

  .site-brand {
    padding: 4px 4px;
    min-height: 44px;
  }

  .brand-text {
    font-size: 0.78rem;
    max-width: 110px;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
  }

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

  .hero-section {
    margin-top: 56px;
  }

  .hero-content {
    padding: 2rem 1.2rem 3rem;
  }

  .hero-title {
    font-size: clamp(1.6rem, 8vw, 2.5rem);
  }

  .hero-sub {
    font-size: 0.92rem;
  }

  .hero-cta {
    padding: 0.7rem 1.8rem;
    font-size: 0.88rem;
  }

  .wrap {
    padding: 0 1rem;
  }

  main > .wrap > div {
    padding: 2.5rem 0;
  }

  .aside-inner {
    padding: 1rem;
  }

  .article-body h2 {
    font-size: 1.2rem;
  }

  .footer-brand-inner {
    padding: 2.5rem 1rem;
  }

  .footer-cta-title {
    font-size: 1.4rem;
  }

  .footer-links-inner {
    padding: 1.5rem 1rem;
  }

  .footer-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .footer-nav li > a {
    padding: 0.7rem 0.5rem;
  }

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

  .hamburger-trigger {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }

  .overlay-brand {
    font-size: 1.2rem;
  }

  .overlay-nav a {
    font-size: 1.05rem;
    min-height: 44px;
  }

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