/* Shared header + footer — homepage and inner pages */
@view-transition {
  navigation: auto;
}

.topnav {
  view-transition-name: wy-header;
}

.wrap {
  width: min(1160px, calc(100% - var(--gutter, 24px) * 2));
  margin: 0 auto;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #f6f5f3;
  border-bottom: 1px solid rgba(28, 22, 18, 0.08);
}

body.home-page .topnav {
  background: #1c1612;
  border-bottom-color: rgba(246, 245, 243, 0.1);
}

.topnav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-inline-start: auto;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: #1c1612;
  place-items: center;
}
body.home-page .nav-toggle { color: #f6f5f3; }

.nav-burger {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.25s ease, background 0.2s ease;
}
.nav-burger::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}

html.menu-open .nav-burger {
  transform: rotate(45deg);
}
html.menu-open .nav-burger::before {
  top: 0;
  transform: rotate(-90deg);
}

.sheet-nav {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink, #111827);
}
body.home-page .brand { color: #f6f5f3; }

.brand-mark { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-weight: 800; font-size: 1.15rem; }

.wy-merge {
  display: inline-flex;
  margin-inline-start: 8px;
  color: var(--paper-text, #1c1612);
  opacity: 0.9;
}
body.home-page .wy-merge { color: rgba(246, 245, 243, 0.55); }
body.home-page .wy-bead--sms { fill: #E8D9C4; }
.wy-bead--on {
  offset-path: path("M1 3 H28 C36 3, 36 8, 44 8 H71");
  animation: wy-bead 3.4s linear infinite;
}
.wy-bead--sms {
  offset-path: path("M1 13 H28 C36 13, 36 8, 44 8 H71");
  animation: wy-bead 4.2s linear infinite;
  animation-delay: 0.7s;
}
@keyframes wy-bead {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .wy-bead--on,
  .wy-bead--sms { animation: none; offset-distance: 70%; }
  .wy-transit-pkt { animation: none !important; }
}

.wy-transit {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(28, 22, 18, 0.1);
}
body.home-page .wy-transit { background: rgba(246, 245, 243, 0.12); }
.wy-transit-pkt {
  position: absolute;
  top: 0;
  width: 36px;
  height: 2px;
}
.wy-transit-pkt--on {
  background: #7a2e4a;
  animation: wy-pkt 5.5s linear infinite;
}
.wy-transit-pkt--sms {
  background: #E8D9C4;
  animation: wy-pkt 7.2s linear infinite reverse;
  animation-delay: 1.1s;
}
@keyframes wy-pkt {
  from { transform: translateX(-40px); }
  to { transform: translateX(100vw); }
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-inline-start: auto;
}

.topnav-links a {
  position: relative;
  color: var(--muted, var(--ink-mute, #64748b));
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
body.home-page .topnav-links a { color: rgba(246, 245, 243, 0.72); }
body.home-page .topnav-links a:hover { color: #e8c4d0; }

.topnav-links a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

html[dir="rtl"] .topnav-links a::after,
body[dir="rtl"] .topnav-links a::after {
  transform-origin: right;
}

.topnav-links a:hover { color: var(--accent, var(--primary, #7a2e4a)); }
.topnav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  padding: 10px 18px;
  border-radius: 0;
  background: #7a2e4a;
  color: #f6f5f3;
  border: 1px solid #7a2e4a;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
}
.nav-cta:hover {
  background: #5c2238;
  border-color: #5c2238;
  color: #f6f5f3;
  text-decoration: none;
}

@keyframes wy-nav-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.page-breadcrumb {
  font-size: 0.875rem;
  color: var(--muted, var(--ink-mute, #64748b));
  margin: 24px 0 8px;
}

h2[id],
h3[id],
section[id] {
  scroll-margin-top: 88px;
}

.site-footer {
  background: #1c1612;
  color: #f8f4ed;
  padding: 32px 0 28px;
  margin-top: 0;
  border-top: 0;
  text-align: start;
  font-size: 1rem;
}

.site-footer a { color: rgba(248, 244, 237, 0.72); }
.site-footer a:hover { color: #f8f4ed; text-decoration: none; }

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin: 0 0 28px;
}

.footer-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 14px 20px;
  border-radius: 14px;
  background: #7a2e4a;
  color: #fffefb !important;
  font-weight: 700;
  text-decoration: none;
}
.footer-download:hover { color: #fffefb !important; filter: brightness(1.08); }

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
.footer-social a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(248, 244, 237, 0.28);
  border-radius: 50%;
  color: #f8f4ed;
  font-size: 1.15rem;
  text-decoration: none;
}
.footer-social a:hover { color: #fffefb; background: rgba(248, 244, 237, 0.08); }

/* Two columns on every phone — never a single stacked list */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 24px;
  margin: 0;
  align-items: start;
}

.footer-col h4 {
  margin: 0;
  color: #f8f4ed;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-col ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.footer-col li { margin: 0; }
.footer-col a {
  display: block;
  padding: 5px 0;
  color: rgba(248, 244, 237, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.35;
}
.footer-col a:hover { color: #f8f4ed; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(248, 244, 237, 0.12);
  color: rgba(248, 244, 237, 0.5);
  font-size: 0.85rem;
}
.footer-legal p { margin: 0; }
.footer-legal a { color: rgba(248, 244, 237, 0.5); }

.footer-lang {
  margin: 0;
  position: relative;
}
.footer-lang summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(248, 244, 237, 0.28);
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
  color: #f8f4ed;
}
.footer-lang summary::-webkit-details-marker { display: none; }
.footer-lang[open] summary { border-color: rgba(248, 244, 237, 0.5); }
.footer-lang a {
  display: block;
  padding: 8px 12px;
  color: #f8f4ed;
}
.footer-lang a[aria-current="true"] { font-weight: 700; }

.app-dock { display: none; }

@media (min-width: 640px) {
  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .footer-download { width: auto; }
  .footer-lang { margin-inline-start: auto; }
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 32px;
  }
}

@media (max-width: 768px) {
  .topnav-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .topnav-links,
  .nav-cta,
  .wy-merge,
  .wy-transit { display: none; }
  .nav-toggle { display: grid; margin: 0; }
  .brand {
    justify-self: start;
    gap: 8px;
  }
  .brand-name { font-size: 1.35rem; letter-spacing: -0.03em; }
  .brand-mark { width: 36px; height: 36px; }
  .nav-toggle { justify-self: end; }

  .sheet-nav {
    display: block;
    position: fixed;
    inset: 72px 0 0 0;
    z-index: 70;
    background: #f6f5f3;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0 calc(32px + env(safe-area-inset-bottom));
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -28px, 0);
    transition:
      opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.45s;
  }
  html.menu-open .sheet-nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  html.menu-open,
  html.menu-open body { overflow: hidden; }

  .sheet-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid rgba(28, 22, 18, 0.1);
    color: #1c1612;
    font-size: clamp(1.45rem, 5.2vw, 1.85rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-decoration: none;
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition:
      opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      color 0.2s ease;
  }
  .sheet-nav a:hover { color: #7a2e4a; }
  .sheet-nav a i { color: #7a2e4a; font-size: 1.15rem; flex-shrink: 0; }

  html.menu-open .sheet-nav a {
    opacity: 1;
    transform: none;
  }
  html.menu-open .sheet-nav a:nth-child(1) { transition-delay: 0.06s; }
  html.menu-open .sheet-nav a:nth-child(2) { transition-delay: 0.1s; }
  html.menu-open .sheet-nav a:nth-child(3) { transition-delay: 0.14s; }
  html.menu-open .sheet-nav a:nth-child(4) { transition-delay: 0.18s; }
  html.menu-open .sheet-nav a:nth-child(5) { transition-delay: 0.22s; }
  html.menu-open .sheet-nav a:nth-child(6) { transition-delay: 0.26s; }
  html.menu-open .sheet-nav a:nth-child(7) { transition-delay: 0.3s; }
  html.menu-open .sheet-nav a:nth-child(8) { transition-delay: 0.34s; }
  html.menu-open .sheet-nav a:nth-child(9) { transition-delay: 0.38s; }
  html.menu-open .sheet-nav a:nth-child(10) { transition-delay: 0.42s; }
}

.brand-slogan {
  margin: 0.35rem 0 1.25rem;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--accent, #7a2e4a);
}

.sms-core {
  padding: 56px 0 24px;
  background: transparent;
  border: 0;
}

.sms-core-kicker {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #7a2e4a);
}

.sms-core h2 {
  margin: 0 0 1rem;
  max-width: 18em;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.sms-core p,
.sms-core li {
  max-width: 42em;
}

.sms-core ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.sms-core-note {
  margin-top: 1.25rem;
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 3px solid var(--accent, #7a2e4a);
  font-size: 0.95rem;
  color: var(--muted, #6a5e54);
}

.page-card .sms-core {
  padding: 8px 0 24px;
  background: transparent;
  border: 0;
}

.page-card .sms-core .wrap {
  width: auto;
  max-width: none;
  margin: 0;
}

.footer-bottom p { margin: 0; color: rgba(248, 244, 237, 0.55); }

.wy-reveal {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.wy-reveal.is-in {
  opacity: 1;
  transform: none;
}

.wy-stagger > * {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--wy-i, 0) * 70ms);
}

.wy-stagger.is-in > * {
  opacity: 1;
  transform: none;
}

.wy-stagger.is-in > a:hover,
.wy-stagger.is-in > li:hover {
  transform: translateX(6px);
}

html[dir="rtl"] .wy-stagger.is-in > a:hover,
html[dir="rtl"] .wy-stagger.is-in > li:hover,
body[dir="rtl"] .wy-stagger.is-in > a:hover,
body[dir="rtl"] .wy-stagger.is-in > li:hover {
  transform: translateX(-6px);
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
  .wy-stagger > *,
  .wy-reveal,
  html.menu-open .sheet-nav a {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fg-index-row,
    .fg-article,
    .page-card,
    .hero-copy {
      animation: wy-view-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

@keyframes wy-view-in {
  from { opacity: 0.2; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
  .wy-merge { display: none; }
}
