/* --------------------------------------------------------------
   layout.css — shell, sections, grids, header, footer
   -------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}
.shell--wide {
  max-width: var(--shell-wide);
}
.shell--narrow {
  max-width: 820px;
}
.shell--reading {
  max-width: var(--reading-max);
}

.section {
  padding: clamp(4rem, 7vw, 9rem) 0;
  position: relative;
}
.section--alt {
  background: var(--bg-secondary);
}
.section--accent {
  background: var(--bg-accent);
}
.section--deep {
  background: var(--bg-deep);
}
.section--white {
  background: var(--white-warm);
}

/* soft gradient dividers */
.section-divider {
  position: relative;
  height: 120px;
  margin-top: -60px;
  margin-bottom: -60px;
  background: linear-gradient(180deg, transparent, var(--bg-secondary));
  pointer-events: none;
}

.site-main {
  padding-top: var(--header-h);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(246, 241, 234, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    background 0.45s var(--ease-soft),
    border-color 0.45s var(--ease-soft),
    box-shadow 0.45s var(--ease-soft);
}
.site-header.is-scrolled {
  background: rgba(246, 241, 234, 0.92);
  border-bottom-color: rgba(201, 177, 138, 0.26);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--space-6);
}

.site-logo {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink-primary);
}
.site-logo__mark {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 400;
  color: var(--rose-deep);
  letter-spacing: -0.02em;
  line-height: 1;
}
.site-logo__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}
.nav-list > li > a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s var(--ease-soft);
}
.nav-list > li.nav-cta > a {
  background: var(--ink-primary);
  color: var(--white-warm);
  border: 1px solid var(--ink-primary);
  box-shadow: 0 18px 30px -20px rgba(46, 42, 38, 0.45);
  padding: 15px 10px;
}
.nav-list > li.nav-cta > a:hover {
  background: var(--ink-primary);
  color: var(--white-warm);
  border: 1px solid var(--ink-primary);
  box-shadow: 0 18px 30px -20px rgba(46, 42, 38, 0.45);
  padding: 15px 10px;
  opacity: .8;
}
.nav-list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--rose-deep);
  transition: right 0.4s var(--ease-soft);
}
.nav-list > li > a:hover,
.nav-list > li > a.is-active {
  color: var(--ink-primary);
}
.nav-list > li > a:hover::after,
.nav-list > li > a.is-active::after {
  right: 0;
}
.nav-list .nav-cta {
  margin-left: var(--space-3);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  margin-right: -10px;
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink-primary);
  transition:
    transform 0.4s var(--ease-soft),
    opacity 0.4s var(--ease-soft);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-list {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3rem);
    background: rgba(246, 241, 234, 0.98);
    backdrop-filter: blur(18px);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
    transform: translateY(-110%);
    transition: transform 0.6s var(--ease-soft);
    border-bottom: 1px solid rgba(201, 177, 138, 0.24);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav-list.is-open {
    transform: translateY(0);
  }
  .nav-list > li > a {
    font-size: 1.4rem;
    font-family: var(--font-display);
    color: var(--ink-primary);
  }
  .nav-list .nav-cta {
    margin-left: 0;
    margin-top: var(--space-3);
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-secondary);
  color: var(--ink-primary);
  padding-top: clamp(4rem, 6vw, 7rem);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding-bottom: var(--space-9);
  border-bottom: 1px solid rgba(94, 84, 76, 0.14);
}
.site-footer__inner > * > .eyebrow {
  margin-bottom: var(--space-3);
}
.site-footer__tagline {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.4;
  max-width: 24rem;
  margin-bottom: var(--space-4);
}
.site-footer__contact {
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 2;
}
.site-footer__contact a {
  color: var(--ink-primary);
}
.site-footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.site-footer__nav a:hover {
  color: var(--ink-primary);
}
.site-footer__note p {
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
}
.site-footer__base {
  display: flex;
  justify-content: space-between;
  padding: var(--space-5) 0;
  color: var(--ink-mute);
  font-size: 0.85rem;
}
.site-footer__base a {
  color: var(--ink-mute);
}

@media (max-width: 820px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-7);
    padding-bottom: var(--space-7);
  }
  .site-footer__base {
    flex-direction: column;
    gap: 8px;
    text-align: left;
  }
}

/* ---------- Grids ---------- */

.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.two-col--wide {
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 900px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col,
  .two-col--wide {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
}
@media (max-width: 560px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Rhythm helpers ---------- */
.stack > * + * {
  margin-top: var(--space-4);
}
.stack-lg > * + * {
  margin-top: var(--space-6);
}
.stack-xl > * + * {
  margin-top: var(--space-7);
}

.center-text {
  text-align: center;
}
.max-prose {
  max-width: var(--reading-max);
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* section header */
.section-head {
  max-width: 56rem;
  margin: 0 auto var(--space-8);
  text-align: center;
}
.section-head .eyebrow {
  margin-bottom: var(--space-4);
}
.section-head h2 {
  margin-bottom: var(--space-4);
}
.section-head p {
  color: var(--ink-soft);
}

/* hair line */
.hairline {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--gold-soft);
  margin: 0 auto;
  opacity: 0.7;
}
.hairline--long {
  width: 120px;
}
.hairline--left {
  margin: 0;
}

/* decorative */
.deco-wave {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  user-select: none;
  line-height: 0;
}
.deco-wave--top {
  top: -1px;
}
.deco-wave--bottom {
  bottom: -1px;
}
.deco-wave svg {
  width: 100%;
  height: auto;
  display: block;
}

.deco-blob {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
  filter: blur(2px);
}
.section,
.hero {
  isolation: isolate;
}
.section > .shell,
.hero > .shell {
  position: relative;
  z-index: 1;
}
