/* ==========================================================
   layout.css — header / footer / containers / sections
   ========================================================== */

/* ----- Containers ----- */
.container {
  width: min(100% - 40px, var(--container-max));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 40px, var(--container-narrow));
  margin-inline: auto;
}

/* ----- Page structure over WebGL canvas ----- */
.webgl-canvas {
  position: fixed;
  inset: 0;
  z-index: var(--z-canvas);
  pointer-events: none;
}

main {
  position: relative;
  z-index: var(--z-content);
}

/* ----- Section rhythm ----- */
.section {
  padding-block: var(--section-space);
}

/* Backgrounds stay translucent so the fixed WebGL letters remain
   visible through the whole page. Readability comes from the pale
   letter material + solid cards, not from opaque section fills. */
.section--subtle {
  background-color: rgba(247, 247, 248, 0.55);
}

.section--white {
  background-color: rgba(255, 255, 255, 0.42);
}

.section--transparent {
  background-color: transparent;
}

.section__header {
  margin-bottom: var(--section-space-sm);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-en);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-sakura-deep);
  margin-bottom: 1.25rem;
}

.section__label::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gradient-sakura);
  border-radius: 1px;
}

.section__label-num {
  font-weight: 700;
  color: var(--color-text);
  opacity: 0.35;
  margin-right: 0.9em;
}

.section__label-num::after {
  content: " /";
}

.section__label--light {
  color: var(--color-sakura-light);
  justify-content: center;
}

.section__title {
  font-size: var(--fs-section-title);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0.015em;
}

.section__lead {
  margin-top: 1.75rem;
  color: var(--color-text-sub);
  max-width: 46em;
}

.section__header--center {
  text-align: center;
}

.section__header--center .section__label {
  justify-content: center;
}

.section__header--center .section__lead {
  margin-inline: auto;
}

.section__footer {
  margin-top: var(--section-space-sm);
  text-align: center;
}

/* ----- Header ----- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
}

.site-header__inner {
  width: min(100% - 40px, 1320px);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo img {
  width: auto;
  height: 34px;
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Standalone header CTA is mobile-only (nav CTA covers desktop) */
.site-header a.site-header__cta {
  display: none;
}

.global-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
}

.global-nav__link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 8px 2px;
  transition: color var(--transition-base);
}

.global-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--gradient-sakura);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.global-nav__link:hover::after,
.global-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Hamburger */
.nav-toggle {
  display: none;
  position: relative;
  z-index: calc(var(--z-nav-overlay) + 1);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
}

.nav-toggle__bar {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle__bar:nth-child(1) { top: 16px; }
.nav-toggle__bar:nth-child(2) { top: 22px; }
.nav-toggle__bar:nth-child(3) { top: 28px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ----- Footer ----- */
.site-footer {
  position: relative;
  z-index: var(--z-content);
  background-color: var(--color-black);
  color: rgba(255, 255, 255, 0.82);
  padding-block: clamp(3.5rem, 8vw, 6rem) 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer__brand img {
  width: auto;
  height: 32px;
  background: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.site-footer__tagline {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.66);
}

.site-footer__heading {
  font-family: var(--font-en);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-sakura);
  margin-bottom: 1.25rem;
}

.site-footer__list li + li {
  margin-top: 0.7rem;
}

.site-footer__list a {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.82);
  transition: color var(--transition-base);
}

.site-footer__list a:hover {
  color: var(--color-sakura-light);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.site-footer__bottom a {
  color: rgba(255, 255, 255, 0.66);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__bottom a:hover {
  color: var(--color-sakura-light);
}

/* ----- Breadcrumb (sub pages) ----- */
.breadcrumb {
  padding-top: calc(var(--header-height) + 1.5rem);
  font-size: 0.8125rem;
  color: var(--color-text-sub);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5em;
  color: var(--color-border);
}

.breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb a:hover {
  color: var(--color-sakura-deep);
}

/* ----- Page hero (sub pages, hosts the SALAB 3D scene) ----- */
.page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(360px, 52vh, 620px);
  padding-block: var(--section-space-sm);
}

/* Full-bleed canvas escaping the centered container */
.hero-canvas {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  width: 100vw;
  max-width: none; /* escape the reset's `canvas { max-width: 100% }` clamp */
  height: 100%;
  pointer-events: none;
}

.page-hero__content {
  position: relative;
}

.page-hero__title {
  font-size: clamp(2.25rem, 5.6vw, 4.25rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0.01em;
}

.page-hero__lead {
  margin-top: 1.75rem;
  color: var(--color-text-sub);
  max-width: 34em;
}
