/* review-04 — multi-page architecture, theme contrast and typography safety */

:root {
  --text-safe-x: clamp(1.5rem, 4.5vw, 6rem);
  --text-safe-y: clamp(4rem, 8vw, 8rem);
}

html[data-scene="solstice"] {
  color-scheme: light;
  --ink: #f1eee5;
  --ink-soft: #ffffff;
  --ink-blue: #dce9f6;
  --gold: #f05a3c;
  --gold-pale: #ff9a75;
  --cyan: #1769aa;
  --paper: #172230;
  --scene-grid: rgba(23, 105, 170, 0.09);
  --scene-signal: 23 105 170;
}

body,
button,
input,
textarea {
  text-rendering: geometricPrecision;
}

:where(h1, h2, h3, h4, p, a, span, strong, small) {
  overflow-wrap: break-word;
}

:where(.hero-title, .display-copy, .contact-title, .page-title, .page-section h2, .directory-card h3) {
  padding: 0.12em 0.07em 0.18em;
  margin-inline: -0.07em;
  overflow: visible;
}

.title-line {
  padding: 0.06em 0.08em 0.14em;
  margin: -0.06em -0.08em -0.14em;
  overflow: visible;
}

.section,
.page-section,
.page-hero-inner,
.page-next,
.site-footer {
  padding-inline: var(--text-safe-x);
}

.desktop-nav {
  align-items: center;
  gap: clamp(1rem, 1.6vw, 2rem);
}

.nav-group {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3rem;
}

.nav-group > a::after {
  content: "＋";
  margin-left: 0.42rem;
  color: var(--gold);
  font-size: 0.72em;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% - 0.2rem);
  left: 50%;
  z-index: 10;
  display: grid;
  width: max-content;
  min-width: 12.5rem;
  padding: 0.55rem;
  border: 1px solid rgba(var(--scene-signal), 0.28);
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.75rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(20px);
}

.nav-dropdown a {
  display: flex;
  min-height: 2.8rem;
  align-items: center;
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid rgba(var(--scene-signal), 0.14);
  white-space: nowrap;
}

.nav-dropdown a:last-child {
  border-bottom: 0;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  color: var(--gold-pale);
  background: rgba(var(--scene-signal), 0.1);
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.page-directory {
  position: relative;
  padding-block: var(--text-safe-y);
  background:
    radial-gradient(circle at 84% 18%, rgba(var(--scene-signal), 0.16), transparent 28%),
    var(--ink);
}

.directory-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.62fr);
  gap: clamp(2rem, 8vw, 9rem);
  align-items: end;
  margin: clamp(3rem, 7vw, 7rem) 0 clamp(2.5rem, 5vw, 5rem);
}

.directory-intro .lead {
  max-width: 39rem;
  padding: 0.15rem 0 0.3rem;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(var(--scene-signal), 0.34);
  border-left: 1px solid rgba(var(--scene-signal), 0.34);
}

.directory-card {
  position: relative;
  display: grid;
  min-height: 20rem;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  grid-template-rows: auto 1fr auto;
  gap: 1.4rem;
  color: inherit;
  border-right: 1px solid rgba(var(--scene-signal), 0.34);
  border-bottom: 1px solid rgba(var(--scene-signal), 0.34);
  isolation: isolate;
  overflow: visible;
}

.directory-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(145deg, rgba(var(--scene-signal), 0.16), transparent 56%);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.directory-card:hover::before,
.directory-card:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.directory-card > span {
  color: var(--gold);
  font: 700 0.7rem/1 var(--mono, monospace);
  letter-spacing: 0.12em;
}

.directory-card h3 {
  max-width: 12ch;
  align-self: end;
  font-size: clamp(1.65rem, 2.6vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.directory-card p {
  max-width: 31rem;
  padding-right: 2rem;
  color: color-mix(in srgb, currentColor 70%, transparent);
  font-size: clamp(0.91rem, 1vw, 1.03rem);
  line-height: 1.65;
}

.directory-card b {
  position: absolute;
  right: clamp(1.4rem, 2.5vw, 2.6rem);
  bottom: clamp(1.4rem, 2.5vw, 2.6rem);
  color: var(--gold);
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

.directory-card:hover b {
  transform: translate(0.25rem, -0.25rem);
}

/* Internal page shell */

.subpage-main {
  position: relative;
  z-index: 1;
}

.page-hero {
  position: relative;
  display: grid;
  min-height: min(82rem, 86svh);
  align-items: end;
  isolation: isolate;
}

.page-hero-media,
.page-hero-media::after {
  position: absolute;
  z-index: -2;
  inset: 0;
}

.page-hero-media {
  background-position: center;
  background-size: cover;
  transform: translate3d(var(--hero-x, 0), var(--hero-y, 0), 0) scale(1.035);
  transition: transform 0.25s ease-out;
}

.page-hero-media::after {
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(3, 9, 20, 0.2), rgba(3, 9, 20, 0.92)),
    linear-gradient(90deg, rgba(3, 9, 20, 0.94), rgba(3, 9, 20, 0.18) 72%);
}

.page-hero-inner {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.34fr);
  gap: clamp(2rem, 8vw, 9rem);
  align-items: end;
  padding-block: clamp(10rem, 20vh, 15rem) clamp(4.5rem, 9vh, 8rem);
}

.page-kicker,
.page-index,
.page-meta,
.page-card > span,
.business-identity dt {
  font: 700 0.7rem/1.35 var(--mono, monospace);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.page-kicker {
  margin-bottom: 1.7rem;
  color: var(--gold-pale);
}

.page-title {
  max-width: 12ch;
  color: #f8f4eb;
  font-size: clamp(3.5rem, 9.2vw, 10.5rem);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.072em;
  text-transform: uppercase;
}

html[data-lang="zh"] .page-title {
  max-width: 9ch;
  font-size: clamp(3.3rem, 8vw, 9rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.page-hero-copy {
  max-width: 30rem;
  padding-bottom: 0.4rem;
  color: rgba(248, 244, 235, 0.8);
  font-size: clamp(1rem, 1.3vw, 1.22rem);
  line-height: 1.75;
}

.page-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.4rem;
  color: var(--gold-pale);
}

.page-section {
  position: relative;
  padding-block: var(--text-safe-y);
  background: var(--ink);
}

.page-section.is-light {
  color: #151a20;
  background: #e9e5dc;
}

.page-section.is-accent {
  background:
    radial-gradient(circle at 18% 22%, rgba(var(--scene-signal), 0.22), transparent 30%),
    var(--ink-soft);
}

.page-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr);
  gap: clamp(2rem, 7vw, 8rem);
  margin-bottom: clamp(3rem, 7vw, 7rem);
}

.page-index {
  padding-top: 0.75rem;
  color: var(--gold);
}

.page-section h2 {
  max-width: 17ch;
  font-size: clamp(2.5rem, 6.2vw, 7rem);
  line-height: 0.91;
  letter-spacing: -0.06em;
}

html[data-lang="zh"] .page-section h2 {
  max-width: 14ch;
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.page-section-heading p {
  max-width: 43rem;
  margin-top: 2rem;
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.75;
  opacity: 0.72;
}

.page-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(var(--scene-signal), 0.26);
  border: 1px solid rgba(var(--scene-signal), 0.26);
}

.page-card {
  position: relative;
  min-height: 22rem;
  padding: clamp(1.7rem, 3.2vw, 3.4rem);
  background: var(--ink);
  overflow: visible;
}

.is-light .page-card {
  background: #f4f0e8;
}

.page-card > span {
  color: var(--gold);
}

.page-card h3 {
  max-width: 16ch;
  margin: clamp(4rem, 8vw, 8rem) 0 1.4rem;
  padding: 0.08em 0 0.14em;
  font-size: clamp(1.55rem, 2.6vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.page-card p,
.page-card li {
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 0.98rem;
  line-height: 1.7;
}

.page-card ul {
  display: grid;
  gap: 0.8rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.page-card li::before {
  content: "↗";
  margin-right: 0.65rem;
  color: var(--gold);
}

.page-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.7fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: center;
}

.page-feature-media {
  position: relative;
  min-height: clamp(25rem, 52vw, 51rem);
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.page-feature-media::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 1px solid rgba(var(--scene-signal), 0.36);
  box-shadow: inset 0 0 0 0.65rem rgba(3, 9, 20, 0.08);
}

.page-feature-copy h2 {
  margin-bottom: 2rem;
}

.page-feature-copy p {
  max-width: 36rem;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.8;
  opacity: 0.74;
}

.page-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  min-height: 40rem;
  padding-block: var(--text-safe-y);
  color: #f8f4eb;
  background:
    linear-gradient(100deg, rgba(3, 9, 20, 0.96), rgba(3, 9, 20, 0.34)),
    url("/assets/img/world.webp") center / cover;
}

.page-next span {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--gold-pale);
  font: 700 0.7rem/1 var(--mono, monospace);
  letter-spacing: 0.13em;
}

.page-next h2 {
  max-width: 15ch;
  padding: 0.08em 0.06em 0.16em;
  margin-left: -0.06em;
  font-size: clamp(2.7rem, 7vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.page-next a {
  display: grid;
  width: clamp(8rem, 13vw, 12rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--gold-pale);
  border-radius: 50%;
  color: var(--gold-pale);
  text-align: center;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.page-next a:hover {
  color: #07101b;
  background: var(--gold-pale);
  transform: rotate(-7deg);
}

/* Sales and contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(19rem, 0.7fr);
  gap: 1px;
  background: rgba(var(--scene-signal), 0.28);
  border: 1px solid rgba(var(--scene-signal), 0.28);
}

.contact-primary,
.business-identity {
  padding: clamp(2rem, 5vw, 5.5rem);
  background: var(--ink);
}

.contact-primary h2 {
  max-width: 13ch;
}

.sales-email {
  display: flex;
  max-width: 46rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(3rem, 8vw, 8rem);
  padding: 1.5rem 0;
  border-top: 1px solid rgba(var(--scene-signal), 0.35);
  border-bottom: 1px solid rgba(var(--scene-signal), 0.35);
  font-size: clamp(1rem, 2vw, 1.65rem);
}

.sales-email span {
  overflow-wrap: anywhere;
}

.business-identity dl {
  display: grid;
  gap: 2rem;
  margin: 0;
}

.business-identity dt {
  margin-bottom: 0.55rem;
  color: var(--gold);
}

.business-identity dd {
  margin: 0;
  line-height: 1.65;
  opacity: 0.74;
}

.business-note {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--scene-signal), 0.25);
  font-size: 0.85rem;
  line-height: 1.65;
  opacity: 0.58;
}

/* Theme expressions. Geometric cuts live on backgrounds, never text boxes. */

html[data-scene="gallery"] .directory-card::before,
html[data-scene="gallery"] .page-card::before {
  position: absolute;
  z-index: 0;
  inset: 0.6rem;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 182, 46, 0.12);
}

html[data-scene="gallery"] :where(.directory-card, .page-card) > * {
  position: relative;
  z-index: 1;
}

html[data-scene="gallery"] .page-title,
html[data-scene="gallery"] .page-section h2 {
  font-style: italic;
  text-transform: uppercase;
}

html[data-scene="gallery"] .page-hero-media::after {
  background:
    repeating-linear-gradient(90deg, transparent 0 12vw, rgba(255, 182, 46, 0.05) 12vw calc(12vw + 1px)),
    linear-gradient(90deg, rgba(8, 7, 5, 0.96), rgba(8, 7, 5, 0.2) 72%),
    linear-gradient(180deg, transparent 45%, rgba(8, 7, 5, 0.95));
}

html[data-scene="aurora"] .page-card::after,
html[data-scene="aurora"] .directory-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  content: "";
  pointer-events: none;
  background: linear-gradient(135deg, transparent 48%, var(--cyan) 49% 52%, var(--ink) 53%);
}

html[data-scene="aurora"] .page-hero-media::after {
  background:
    linear-gradient(90deg, rgba(2, 10, 18, 0.96), rgba(2, 10, 18, 0.22) 72%),
    linear-gradient(180deg, rgba(0, 223, 242, 0.08), rgba(2, 10, 18, 0.94));
}

html[data-scene="aurora"] .page-card,
html[data-scene="aurora"] .directory-card {
  box-shadow: inset 0 0 2.8rem rgba(0, 223, 242, 0.035);
}

html[data-scene="solstice"] body {
  color: #172230;
  background: #f1eee5;
}

html[data-scene="solstice"] body::before {
  opacity: 0.58;
}

html[data-scene="solstice"] #starfield,
html[data-scene="solstice"] .noise {
  opacity: 0.14;
}

html[data-scene="solstice"] .site-header {
  color: #172230;
  border-color: rgba(23, 34, 48, 0.14);
  background: rgba(241, 238, 229, 0.82);
}

html[data-scene="solstice"] .site-header:not(.is-scrolled) {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(9, 31, 53, 0.74), transparent);
}

html[data-scene="solstice"] .nav-dropdown,
html[data-scene="solstice"] .scene-panel,
html[data-scene="solstice"] .language-panel {
  color: #172230;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1.5rem 4rem rgba(20, 42, 67, 0.16);
}

html[data-scene="solstice"] .page-directory,
html[data-scene="solstice"] .page-section,
html[data-scene="solstice"] .page-card,
html[data-scene="solstice"] .contact-primary,
html[data-scene="solstice"] .business-identity {
  color: #172230;
  background-color: #f1eee5;
}

html[data-scene="solstice"] .directory-card::before {
  background: linear-gradient(145deg, rgba(23, 105, 170, 0.14), rgba(240, 90, 60, 0.08));
}

html[data-scene="solstice"] .page-section.is-light,
html[data-scene="solstice"] .is-light .page-card {
  background: #ffffff;
}

html[data-scene="solstice"] .page-section.is-accent {
  background:
    radial-gradient(circle at 18% 22%, rgba(23, 105, 170, 0.18), transparent 30%),
    #dce9f6;
}

html[data-scene="solstice"] .page-hero-media {
  filter: saturate(0.86) brightness(1.08);
}

html[data-scene="solstice"] .page-hero-media::after {
  background:
    linear-gradient(180deg, rgba(12, 37, 62, 0.08), rgba(12, 37, 62, 0.66)),
    linear-gradient(90deg, rgba(12, 37, 62, 0.78), transparent 78%);
}

html[data-scene="solstice"] .manifesto,
html[data-scene="solstice"] .collections,
html[data-scene="solstice"] .contact {
  color: #172230;
  background-color: #f1eee5;
}

html[data-scene="solstice"] .section-dark,
html[data-scene="solstice"] .universe {
  color: #172230;
  background: #dce9f6;
}

html[data-scene="solstice"] .contact-link {
  color: #172230;
  border-color: rgba(23, 105, 170, 0.42);
}

html[data-scene="solstice"] .site-footer {
  color: #172230;
  background: #ffffff;
  border-color: rgba(23, 34, 48, 0.16);
}

@media (max-width: 1180px) {
  .desktop-nav {
    display: none;
  }

  .directory-grid,
  .page-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --text-safe-x: clamp(1.25rem, 5.6vw, 2rem);
    --text-safe-y: clamp(4.5rem, 16vw, 7rem);
  }

  .directory-intro,
  .page-hero-inner,
  .page-section-heading,
  .page-feature,
  .contact-grid,
  .page-next {
    grid-template-columns: minmax(0, 1fr);
  }

  .directory-grid,
  .page-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .directory-card {
    min-height: 17rem;
  }

  .page-hero {
    min-height: 80svh;
  }

  .page-hero-inner {
    gap: 2.5rem;
    padding-top: 9rem;
  }

  .page-title {
    font-size: clamp(3.1rem, 17vw, 6.2rem);
    line-height: 0.9;
  }

  html[data-lang="zh"] .page-title {
    font-size: clamp(3rem, 15vw, 5.5rem);
    line-height: 1.02;
  }

  .page-section-heading p {
    margin-top: 1rem;
  }

  .page-card {
    min-height: 19rem;
  }

  .page-feature-media {
    min-height: 70vw;
  }

  .page-next {
    align-items: start;
  }

  .page-next a {
    width: 8.5rem;
  }

  .sales-email {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .scene-panel {
    right: -6.4rem;
    width: min(22rem, calc(100vw - 2rem));
  }

  .page-title,
  html[data-lang="zh"] .page-title {
    max-width: 100%;
  }

  .directory-card,
  .page-card,
  .contact-primary,
  .business-identity {
    padding-inline: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-hero-media,
  .directory-card::before,
  .directory-card b,
  .page-next a {
    transition: none;
  }
}
