@layer base, layout, components, utilities, pages;

/* Shared layout for Hayakawa generic pages */

@layer pages {

.page-shell {
  --page-hero-bg-dark: #1a1006;
  --page-hero-bg-light: #2e2010;
  --page-hero-accent: #d8b768;
  --page-hero-text: #f8f1e6;
}

.page-hero {
  position: relative;
  padding: clamp(48px, 10vw, 96px) 0;
  background: linear-gradient(140deg, #f8f1e6 0%, #f1e7c6 100%);
  overflow: hidden;
}

.page-hero__inner {
  position: relative;
  min-height: clamp(420px, 56vw, 680px);
  display: flex;
  align-items: center;
  gap: clamp(32px, 6vw, 120px);
}

.page-hero__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
  width: clamp(520px, 62vw, 860px);
  padding: clamp(28px, 3.4vw, 38px) clamp(48px, 7vw, 96px);
  background: rgba(43, 32, 16, 0.86);
  color: var(--page-hero-text);
  border: 1px solid rgba(150, 130, 110, 0.18);
  box-shadow: 0 24px 48px rgba(43, 32, 16, 0.18);
  backdrop-filter: blur(6px);
}

.page-hero__body::after {
  content: "";
  position: absolute;
  top: clamp(16px, 2.4vw, 26px);
  left: clamp(42px, 5.2vw, 72px);
  width: clamp(94px, 12vw, 160px);
  height: 2px;
  background: linear-gradient(90deg, rgba(216, 183, 104, 0.92), rgba(216, 183, 104, 0));
}

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.64);
}

.page-hero__eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: rgba(248, 250, 252, 0.4);
}

.page-hero__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(150, 130, 110, 0.78);
}

.page-hero__meta dt,
.page-hero__meta dd {
  margin: 0;
}

.page-hero__title {
  margin: 0;
  font-size: clamp(2.2rem, 4.8vw, 3.2rem);
  line-height: 1.12;
  font-weight: 700;
}

.page-hero__lead {
  margin: 0;
  font-size: clamp(1.02rem, 1.8vw, 1.22rem);
  line-height: 1.8;
  color: rgba(248, 250, 252, 0.78);
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.page-hero__cta {
  min-width: 180px;
  padding: 12px 26px;
}

.page-hero__secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(150, 130, 110, 0.45);
  color: rgba(248, 250, 252, 0.82);
  text-decoration: none;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.page-hero__secondary::after {
  content: "→";
  font-size: 0.9rem;
}

.page-hero__secondary:hover,
.page-hero__secondary:focus-visible {
  border-color: rgba(248, 250, 252, 0.9);
  color: #f8f1e6;
  background: rgba(150, 130, 110, 0.16);
}

.page-hero__visual {
  position: absolute;
  top: calc(-1 * clamp(48px, 8vw, 140px));
  right: calc(-1 * clamp(48px, 8vw, 140px));
  bottom: calc(-1 * clamp(48px, 8vw, 140px));
  left: calc(-1 * clamp(48px, 8vw, 140px));
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.page-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 40% at 15% 60%, rgba(43, 32, 16, 0.52) 0%, rgba(43, 32, 16, 0.1) 38%, rgba(43, 32, 16, 0) 68%);
}

.page-hero__visual img {
  position: absolute;
  inset: 0;
  width: 120%;
  height: 120%;
  object-fit: cover;
  transform: translate(-8%, -4%) scale(1.15);
}

.page-hero__visual--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 32, 16, 0.92);
}

.page-hero__visual--logo::after {
  content: none;
}

.page-hero__visual--logo img {
  position: static;
  width: auto;
  height: auto;
  max-width: min(320px, 60%);
  max-height: clamp(140px, 22vw, 220px);
  object-fit: contain;
  transform: none;
}

.page-content {
  padding: clamp(48px, 8vw, 96px) 0;
  background: #ffffff;
}

.page-content__inner {
  display: grid;
  gap: clamp(32px, 8vw, 56px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
}

.page-content__toc {
  position: sticky;
  top: clamp(88px, 12vw, 132px);
  align-self: start;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(150, 130, 110, 0.2);
  border-radius: 4px;
  background: #f8f1e6;
}

.page-content__toc-title {
  display: block;
  margin: 0 0 12px;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(43, 32, 16, 0.68);
}

.page-content__body {
  min-width: 0;
}

.page-content__body > *:first-child {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .page-hero__inner {
    flex-direction: column;
    min-height: auto;
    gap: clamp(32px, 10vw, 64px);
  }

  .page-hero__body {
    width: 100%;
    margin: 0;
  }

  .page-hero__visual {
    position: relative;
    width: 100%;
    height: clamp(240px, 48vw, 360px);
    inset: auto;
  }

  .page-hero__visual img {
    transform: translate(0, 0) scale(1.1);
  }

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

  .page-content__toc {
    position: static;
    order: -1;
  }
}

.page-shell--sitemap .page-hero {
  padding: clamp(36px, 8vw, 64px) 0;
  background: #f8f1e6;
}

.page-shell--sitemap .page-hero__inner {
  min-height: auto;
}

.page-shell--sitemap .page-hero__body {
  width: min(720px, 100%);
  padding: 0;
  background: none;
  color: #2b2010;
  border: none;
  box-shadow: none;
}

.page-shell--sitemap .page-hero__body::after {
  display: none;
}

.page-shell--sitemap .page-hero__meta,
.page-shell--sitemap .page-hero__lead {
  color: rgba(43, 32, 16, 0.68);
}

.page-shell--sitemap .page-hero__visual {
  display: none;
}

}
