/* ============================================
   THREADLINE — layout.css
   Nav, hero, section wrappers, footer
   ============================================ */

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  height: 62px;
  display: flex;
  align-items: center;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav__logo {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--thread);
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 400;
  transition: color var(--duration);
  white-space: nowrap;
}

.nav__links a:hover { color: var(--thread); }

.nav__cta {
  background: var(--ink);
  color: var(--paper);
  padding: 9px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--duration);
  flex-shrink: 0;
}

.nav__cta:hover { background: var(--thread); color: #fff; }

/* Mobile nav toggle */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: all 0.3s;
}

.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 62px;
  left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 20px var(--gutter) 28px;
  flex-direction: column;
  gap: 20px;
  z-index: 199;
}

.nav__mobile-menu.is-open { display: flex; }

.nav__mobile-menu a {
  font-size: 16px;
  color: var(--ink-2);
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.nav__mobile-menu .btn--primary {
  align-self: flex-start;
  margin-top: 8px;
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 62px);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.hero__bg-panel {
  position: absolute;
  top: 0; right: 0;
  width: 50%;
  height: 100%;
  background: var(--paper-2);
  border-left: 1px solid var(--rule);
  z-index: 0;
}

.hero__left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--gutter) 80px 0;
  padding-left: var(--gutter);
  position: relative;
  z-index: 1;
}

.hero__kicker { margin-bottom: 28px; }

.hero__h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 5.5vw, 76px);
  line-height: 1.0;
  color: var(--ink);
  margin-bottom: 28px;
  letter-spacing: -0.03em;
}

.hero__h1 em {
  font-style: italic;
  color: var(--thread);
}

.hero__lead {
  font-size: 19px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 460px;
  margin-bottom: 40px;
  font-weight: 300;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero__stats {
  display: flex;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}

.stat__num {
  font-family: var(--serif);
  font-size: 36px;
  color: var(--ink);
  line-height: 1;
}

.stat__label {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 5px;
  font-family: var(--mono);
}

.hero__right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px var(--gutter) 60px 60px;
  position: relative;
  z-index: 1;
}

/* ---- Section wrappers ---- */
.section {
  padding: var(--space-9) 0;
  border-bottom: 1px solid var(--rule);
}

.section--paper-2 { background: var(--paper-2); }
.section--dark { background: var(--ink); color: var(--paper); }

.section__header { margin-bottom: 56px; }

/* ---- Footer ---- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule-dark);
}

.footer__logo {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer__logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--thread-mid);
}

.footer__tagline {
  font-size: 13px;
  color: rgba(245, 242, 236, 0.45);
  line-height: 1.65;
  max-width: 240px;
}

.footer__col-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(245, 242, 236, 0.4);
  margin-bottom: 18px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer__links a {
  font-size: 14px;
  color: rgba(245, 242, 236, 0.6);
  transition: color var(--duration);
}

.footer__links a:hover { color: var(--thread-mid); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copy {
  font-size: 12px;
  color: rgba(245, 242, 236, 0.3);
}

.footer__legal {
  display: flex;
  gap: 20px;
}

.footer__legal a {
  font-size: 12px;
  color: rgba(245, 242, 236, 0.3);
  transition: color var(--duration);
}

.footer__legal a:hover { color: rgba(245, 242, 236, 0.6); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero__h1 { font-size: clamp(42px, 5vw, 64px); }
  .hero__stats { gap: 28px; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__cta.nav__cta--desktop { display: none; }
  .nav__hamburger { display: flex; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero__bg-panel { display: none; }
  .hero__left {
    padding: 48px var(--gutter);
    justify-content: flex-start;
  }
  .hero__right {
    padding: 0 var(--gutter) 48px;
    justify-content: flex-start;
  }
  .hero__stats { gap: 24px; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
}
