/*
Theme Name: Hanse Studio
Theme URI: https://hansestudio.com
Description: Custom child theme for Hanse Studio — premium B2B web studio with Hanseatic heritage. Operated by HANZA Agnieszka Rostocka.
Author: Hanse Studio
Author URI: https://hansestudio.com
Template: astra
Version: 1.1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT,WONK@0,9..144,300..700,0..100,0..1;1,9..144,300..700,0..100,0..1&family=Manrope:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- TOKENS ---------- */
:root {
  --navy: #0F1F3D;
  --navy-90: rgba(15, 31, 61, 0.92);
  --navy-60: rgba(15, 31, 61, 0.62);
  --navy-40: rgba(15, 31, 61, 0.4);
  --navy-12: rgba(15, 31, 61, 0.12);
  --gold: #C8A153;
  --gold-light: #D9B978;
  --gold-dark: #9D7E3F;
  --offwhite: #F8F4EC;
  --paper: #FAF7F0;
  --ink: #1A1A1A;

  /* Semantic tokens — kept dark in both themes (footer, table thead, selection) */
  --footer-bg: var(--navy);
  --footer-text: var(--offwhite);
  --thead-bg: var(--navy);
  --selection-text: var(--navy);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --easing: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ---------- DARK MODE PALETTE ---------- */
[data-theme="dark"] {
  --offwhite: #0E1A2E;
  --paper:    #14253E;
  --navy:     #F8F4EC;
  --navy-90:  rgba(248, 244, 236, 0.92);
  --navy-60:  rgba(248, 244, 236, 0.62);
  --navy-40:  rgba(248, 244, 236, 0.40);
  --navy-12:  rgba(248, 244, 236, 0.14);
  --gold:        #D9B978;
  --gold-light:  #E8CB94;
  --gold-dark:   #C8A153;
  --ink:      #F8F4EC;

  --footer-bg: #08111F;
  --footer-text: #F8F4EC;
  --thead-bg:  #0F1F3D;
  --selection-text: #0F1F3D;
}

/* Smooth color transitions when toggling theme */
html { transition: background-color 280ms var(--easing), color 280ms var(--easing); }
body, .hs-nav, .hs-section, .hs-service, .hs-method, .hs-about__panel,
.hs-stack__item, .hs-toast, .hs-field input, .hs-field textarea,
.hs-legal-page, .hs-legal__cover, .hs-legal__notice, .hs-footer,
.hs-legal__content table, .hs-legal__content table thead {
  transition: background-color 280ms var(--easing), color 280ms var(--easing), border-color 280ms var(--easing);
}

/* Hero compass watermark — slightly more visible on dark bg */
[data-theme="dark"] .hs-hero__compass { opacity: 0.20; }

/* Nav scrolled bg in dark mode (offwhite token now resolves to dark) */
[data-theme="dark"] .hs-nav.is-scrolled {
  background: rgba(14, 26, 46, 0.88);
}

/* Compass divider in legal — switch to gold-light data-URI on dark */
[data-theme="dark"] .hs-legal__content > h2:not(:first-of-type)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none'%3E%3Ccircle cx='16' cy='16' r='14' stroke='%23D9B978' stroke-width='0.6' fill='none'/%3E%3Cpath d='M16 4 L13 16 L16 28 L19 16 Z' fill='%23D9B978' opacity='0.85'/%3E%3Cpath d='M4 16 L16 13 L28 16 L16 19 Z' fill='%23D9B978' opacity='0.5'/%3E%3Ccircle cx='16' cy='16' r='1.5' fill='%23D9B978'/%3E%3C/svg%3E");
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Higher specificity (body.hs-body) defeats Astra parent + Customizer body rules */
body.hs-body {
  margin: 0;
  background: var(--offwhite);
  color: var(--navy);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern', 'liga', 'ss01';
  text-rendering: optimizeLegibility;
}
/* Belt-and-braces: also force html bg in dark mode for any case where body bg leaks */
html[data-theme="dark"] { background: #0E1A2E; }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }

::selection { background: var(--gold); color: var(--selection-text); }

/* Hide Astra wrappers if leaked through */
body.hs-body > #page > .site-header,
body.hs-body > #page > .site-footer { display: none !important; }

.hs-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hs-rule {
  border: 0;
  height: 1px;
  background: var(--navy-12);
  margin: 0;
}

/* ---------- NAV ---------- */
.hs-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--offwhite);
  transition: background-color 300ms, border-color 300ms, box-shadow 300ms;
}
.hs-nav.is-scrolled {
  background: rgba(248, 244, 236, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--navy-12);
}
.hs-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  gap: 2rem;
}
.hs-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  font-variation-settings: 'opsz' 36, 'SOFT' 0, 'WONK' 0;
}
.hs-logo__mark {
  width: 22px; height: 22px;
  color: var(--gold);
  flex-shrink: 0;
}
.hs-logo:hover .hs-logo__mark { transform: rotate(15deg); transition: transform 600ms var(--easing); }

.hs-nav__links {
  display: flex;
  gap: clamp(1.25rem, 2vw, 2.5rem);
}
.hs-nav__links a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-decoration: none;
  transition: color 240ms;
}
.hs-nav__links a::after {
  content: '';
  position: absolute;
  left: 50%; right: 50%; bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: left 320ms var(--easing), right 320ms var(--easing);
}
.hs-nav__links a:hover { color: var(--gold-dark); }
.hs-nav__links a:hover::after { left: 0; right: 0; }

.hs-lang {
  display: flex;
  gap: 0.15rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--navy-40);
}
.hs-lang button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  border-radius: 2px;
  transition: color 200ms, background 200ms;
}
.hs-lang button:hover { color: var(--navy); }
.hs-lang button[aria-current="true"] {
  color: var(--navy);
  background: rgba(15, 31, 61, 0.06);
}

.hs-nav__toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--navy-12);
  padding: 0.5rem 0.85rem;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--navy);
  text-transform: uppercase;
}

.hs-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem var(--gutter) 2.25rem;
  border-top: 1px solid var(--navy-12);
  background: var(--offwhite);
}
.hs-mobile-menu a {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 400;
  color: var(--navy);
  text-decoration: none;
  padding: 0.5rem 0;
  font-variation-settings: 'opsz' 72;
}
.hs-mobile-menu a + a { border-top: 1px solid var(--navy-12); }

.hs-nav.is-open .hs-mobile-menu { display: flex; }

@media (max-width: 880px) {
  .hs-nav__links, .hs-lang { display: none; }
  .hs-nav__toggle { display: inline-flex; }
}

/* ---------- HERO ---------- */
.hs-hero {
  position: relative;
  padding-block: clamp(5rem, 14vh, 10rem) clamp(4rem, 10vh, 7rem);
  overflow: hidden;
}
.hs-hero__compass {
  position: absolute;
  top: 50%;
  right: clamp(-180px, -8vw, -60px);
  transform: translateY(-46%);
  width: clamp(380px, 58vw, 760px);
  height: auto;
  color: var(--gold);
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
}
.hs-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
}
.hs-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--gold-dark);
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.hs-hero__eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: currentColor;
  display: block;
}
.hs-hero__title {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.4vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  color: var(--navy);
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
}
.hs-hero__title em {
  font-style: italic;
  color: var(--gold-dark);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  font-weight: 400;
}
.hs-hero__subline {
  margin: 0 0 2.75rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--navy-90);
  max-width: 56ch;
}
.hs-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* ---------- BUTTONS ---------- */
.hs-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  border-radius: 2px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 250ms var(--easing);
  white-space: nowrap;
}
.hs-btn .arrow {
  display: inline-block;
  transition: transform 280ms var(--easing);
}
.hs-btn:hover .arrow { transform: translateX(4px); }
.hs-btn--primary {
  background: var(--navy);
  color: var(--offwhite);
  border-color: var(--navy);
}
.hs-btn--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.hs-btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy-12);
}
.hs-btn--ghost:hover {
  border-color: var(--navy);
  background: rgba(15, 31, 61, 0.04);
}

/* ---------- SECTION SCAFFOLDING ---------- */
.hs-section {
  padding-block: clamp(4.5rem, 9vh, 7.5rem);
  position: relative;
}
.hs-section--alt {
  background: var(--paper);
}
.hs-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vh, 4.5rem);
  border-top: 1px solid var(--navy-12);
  padding-top: 1.25rem;
  position: relative;
}
.hs-section__head::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 80px;
  height: 1px;
  background: var(--gold);
}
.hs-section__num {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--gold-dark);
  text-transform: uppercase;
}
.hs-section__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
  color: var(--navy);
  font-variation-settings: 'opsz' 144;
}
.hs-section__title em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  color: var(--gold-dark);
}
.hs-section__hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--navy-60);
  max-width: 30ch;
  text-align: right;
  align-self: end;
}

@media (max-width: 720px) {
  .hs-section__head { grid-template-columns: 1fr; }
  .hs-section__hint { text-align: left; max-width: none; }
}

/* ---------- PORTFOLIO ---------- */
.hs-portfolio__list {
  display: flex;
  flex-direction: column;
}
.hs-work {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 240px;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  padding-block: clamp(1.75rem, 4vh, 2.5rem);
  border-top: 1px solid var(--navy-12);
  text-decoration: none;
  color: inherit;
  align-items: start;
  transition: background-color 280ms;
}
.hs-work:last-child { border-bottom: 1px solid var(--navy-12); }
.hs-work:hover { background-color: rgba(200, 161, 83, 0.05); }
.hs-work__num {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-dark);
  letter-spacing: 0.04em;
  font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 0;
  padding-top: 0.15rem;
  line-height: 1;
}
.hs-work__body {
  display: grid;
  gap: 0.85rem;
  max-width: 60ch;
}
.hs-work__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--navy);
  font-variation-settings: 'opsz' 72;
}
.hs-work__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--navy-90);
}
.hs-work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.hs-work__tags li {
  padding: 0.3rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-60);
  background: transparent;
  border: 1px solid var(--navy-12);
  border-radius: 2px;
}
.hs-work__meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
  align-self: stretch;
  justify-content: space-between;
  padding-top: 0.4rem;
}
.hs-work__sector {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.hs-work__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  align-self: flex-end;
  white-space: nowrap;
}
.hs-work__link .arrow {
  display: inline-block;
  transition: transform 280ms var(--easing);
}
.hs-work:hover .hs-work__link .arrow { transform: translate(3px, -3px); }
.hs-work--private {
  cursor: default;
}
.hs-work--private:hover { background-color: transparent; }
.hs-work--private .hs-work__link {
  color: var(--navy-40);
}
.hs-work--private .hs-work__link::before {
  content: '◆';
  color: var(--gold);
  margin-right: 0.4rem;
  font-size: 0.7rem;
}

@media (max-width: 760px) {
  .hs-work {
    grid-template-columns: 36px 1fr;
    gap: 1rem;
  }
  .hs-work__num { font-size: 1.125rem; }
  .hs-work__meta {
    grid-column: 2;
    text-align: left;
    margin-top: 0.5rem;
    padding-top: 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
  .hs-work__link { align-self: auto; }
}

/* ---------- SERVICES ---------- */
.hs-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}
@media (max-width: 760px) {
  .hs-services { grid-template-columns: 1fr; }
}
.hs-service {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.25rem;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--offwhite);
  border: 1px solid var(--navy-12);
  border-radius: 2px;
  transition: border-color 280ms var(--easing), transform 280ms var(--easing), box-shadow 320ms var(--easing);
  overflow: hidden;
}
.hs-service::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 60px;
  height: 1px;
  background: var(--gold);
  transition: width 420ms var(--easing);
}
.hs-service:hover {
  border-color: var(--navy-40);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -28px rgba(15, 31, 61, 0.28);
}
.hs-service:hover::before { width: 100%; }
.hs-service__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.hs-service__num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.hs-service__price {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  font-weight: 400;
  color: var(--gold-dark);
  font-variation-settings: 'opsz' 36, 'SOFT' 100;
  white-space: nowrap;
}
.hs-service__price strong {
  font-style: normal;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  font-variation-settings: 'opsz' 72, 'SOFT' 0, 'WONK' 0;
}
.hs-service__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--navy);
  font-variation-settings: 'opsz' 72;
}
.hs-service__hook {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--navy-90);
  max-width: 42ch;
}
.hs-service__list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.hs-service__list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--navy-90);
}
.hs-service__list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--gold);
  font-size: 0.55rem;
  line-height: 1.6;
}
.hs-service__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-decoration: none;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--navy-12);
}
.hs-service__cta .arrow { transition: transform 240ms var(--easing); }
.hs-service:hover .hs-service__cta .arrow { transform: translateX(4px); }

/* ---------- ABOUT ---------- */
.hs-about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) {
  .hs-about { grid-template-columns: 1fr; }
}
.hs-about__lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.9vw, 1.625rem);
  line-height: 1.45;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
  font-variation-settings: 'opsz' 72;
}
.hs-about__lead::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: clamp(4rem, 7vw, 6rem);
  line-height: 0.82;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-dark);
  margin: 0.06em 0.4rem 0 -0.04em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.hs-about__body p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--navy-90);
  margin: 0 0 1.1rem;
}
.hs-about__body p:last-child { margin-bottom: 0; }
.hs-about__body em {
  color: var(--gold-dark);
  font-style: italic;
}

.hs-about__panel {
  position: relative;
  padding: clamp(1.75rem, 2.5vw, 2.25rem);
  background: var(--offwhite);
  border: 1px solid var(--navy-12);
  border-radius: 2px;
}
.hs-about__panel::before {
  content: '';
  position: absolute;
  top: -1px; left: 1.75rem;
  width: 40px;
  height: 3px;
  background: var(--gold);
}
.hs-panel__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}
.hs-panel__label + .hs-panel__label { margin-top: 2rem; }

.hs-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.hs-stack__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--navy-12);
  border-radius: 2px;
  background: var(--paper);
}
.hs-stack__name {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--navy);
}
.hs-stack__role {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-60);
}

.hs-locale {
  display: grid;
  gap: 0.35rem;
}
.hs-locale__city {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.005em;
  font-variation-settings: 'opsz' 72;
}
.hs-locale__city em {
  font-style: italic;
  color: var(--gold-dark);
  font-variation-settings: 'opsz' 72, 'SOFT' 100, 'WONK' 1;
  font-weight: 400;
}
.hs-locale__coords {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--navy-60);
}
.hs-locale__note {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--navy-60);
  margin-top: 0.4rem;
}

.hs-legal {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--navy-12);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--navy-60);
  line-height: 1.6;
  text-transform: uppercase;
}
.hs-legal strong {
  color: var(--navy);
  font-weight: 500;
}

/* ---------- CONTACT ---------- */
.hs-contact {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
@media (max-width: 880px) {
  .hs-contact { grid-template-columns: 1fr; }
}

.hs-toast {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
  background: var(--offwhite);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--navy);
  border-radius: 0 2px 2px 0;
}
.hs-toast--err { border-left-color: #b8403c; }
.hs-toast strong { font-weight: 600; }

.hs-form {
  display: grid;
  gap: 1.25rem;
}
.hs-form__row {
  display: grid;
  gap: 1.25rem;
}
.hs-form__row--two {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 560px) {
  .hs-form__row--two { grid-template-columns: 1fr; }
}
.hs-field {
  display: grid;
  gap: 0.4rem;
}
.hs-field label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-60);
}
.hs-field label .req {
  color: var(--gold-dark);
  margin-left: 0.2rem;
}
.hs-field input,
.hs-field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--navy);
  background: var(--offwhite);
  border: 1px solid var(--navy-12);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  transition: border-color 240ms, background 240ms;
  width: 100%;
  box-sizing: border-box;
  font-feature-settings: 'kern', 'liga';
}
.hs-field textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--sans);
  line-height: 1.5;
}
.hs-field input:focus,
.hs-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--paper);
}
.hs-field input:focus-visible,
.hs-field textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(200, 161, 83, 0.2);
}
/* Honeypot — hidden but accessible */
.hs-honey {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.hs-form__submit {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.hs-form__note {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-40);
  line-height: 1.5;
}

/* Contact methods */
.hs-methods {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.hs-method {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.5rem;
  background: var(--offwhite);
  border: 1px solid var(--navy-12);
  border-radius: 2px;
  transition: border-color 240ms, transform 240ms var(--easing);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.hs-method:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.hs-method__label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.hs-method__value {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.005em;
  font-variation-settings: 'opsz' 36;
}
.hs-method__value em {
  font-style: italic;
  color: var(--gold-dark);
  font-variation-settings: 'opsz' 36, 'SOFT' 100;
  font-weight: 400;
}
.hs-method__hint {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--navy-60);
  margin-top: 0.2rem;
}

/* ---------- FOOTER ---------- */
.hs-footer {
  background: var(--footer-bg);
  color: rgba(248, 244, 236, 0.78);
  padding: clamp(3rem, 6vh, 5rem) 0 1.5rem;
  margin-top: 0;
}
.hs-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 3rem;
}
@media (max-width: 880px) {
  .hs-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hs-footer__grid { grid-template-columns: 1fr; }
}
.hs-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.hs-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--offwhite);
  text-decoration: none;
  font-variation-settings: 'opsz' 36;
}
.hs-footer__logo svg { width: 22px; height: 22px; color: var(--gold); }
.hs-footer__tagline {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.4;
  font-style: italic;
  color: rgba(248, 244, 236, 0.82);
  font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 1;
  margin: 0;
  max-width: 28ch;
}
.hs-footer__col h4 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 1rem;
  font-weight: 500;
}
.hs-footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.hs-footer__list a {
  color: rgba(248, 244, 236, 0.78);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 200ms;
}
.hs-footer__list a:hover { color: var(--gold-light); }

.hs-footer__lang {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.hs-footer__lang span {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(248, 244, 236, 0.16);
  border-radius: 2px;
  color: rgba(248, 244, 236, 0.7);
}
.hs-footer__lang span.is-active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.hs-footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(248, 244, 236, 0.16);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 244, 236, 0.55);
}
.hs-footer__bottom strong {
  color: var(--gold-light);
  font-weight: 500;
}
.hs-footer__bottom a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms;
}
.hs-footer__bottom a:hover { border-color: var(--gold); }

/* ---------- PHASE C placeholder fallback (kept just in case) ---------- */
.hs-placeholder {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-40);
  padding-block: 2rem;
  text-align: center;
}

/* ============================================================
   LEGAL PAGE TEMPLATE — editorial premium
   Inspired by: Aman, Soho House, Stripe Legal, The Dial magazine
   ============================================================ */

/* Reading progress bar */
.hs-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--gold);
  z-index: 110;
  transition: width 150ms linear;
  box-shadow: 0 0 8px rgba(200, 161, 83, 0.5);
}

/* Page container */
.hs-legal-page {
  padding-block: 0 clamp(4rem, 9vh, 7rem);
  background: var(--offwhite);
  position: relative;
  /* overflow-x: clip cuts horizontal compass watermark overflow
	 without breaking position: sticky on child .hs-toc.
	 (overflow: hidden would create a containing block and kill sticky.) */
  overflow-x: clip;
}
.hs-legal-page::before {
  /* subtle paper-texture watermark */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(15, 31, 61, 0.018) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(200, 161, 83, 0.025) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- HERO COVER ---------- */
.hs-legal__cover {
  position: relative;
  padding: clamp(4rem, 12vh, 9rem) var(--gutter) clamp(3rem, 8vh, 6rem);
  border-bottom: 1px solid var(--navy-12);
  background: var(--paper);
  overflow: hidden;
}
.hs-legal__cover-compass {
  position: absolute;
  top: 50%;
  right: -120px;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  color: var(--gold);
  opacity: 0.07;
  pointer-events: none;
}
@media (max-width: 880px) {
  .hs-legal__cover-compass { width: 320px; height: 320px; right: -80px; opacity: 0.05; }
}
.hs-legal__cover-inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin-inline: auto;
}
.hs-legal__back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-60);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 200ms, gap 240ms var(--easing);
}
.hs-legal__back:hover { color: var(--gold-dark); gap: 0.85rem; }
.hs-legal__num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 1.25rem;
  position: relative;
  padding-left: 50px;
}
.hs-legal__num::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 36px;
  height: 1px;
  background: var(--gold);
}
.hs-legal__title {
  margin: 0 0 1.75rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--navy);
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  max-width: 14ch;
}
.hs-legal__title em {
  font-style: italic;
  color: var(--gold-dark);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.hs-legal__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--navy-12);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-60);
}
.hs-legal__meta-row dt {
  display: block;
  color: var(--gold-dark);
  margin-bottom: 0.35rem;
}
.hs-legal__meta-row dd {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  font-style: italic;
  font-variation-settings: 'opsz' 36, 'SOFT' 100;
}

/* ---------- TWO-COLUMN LAYOUT ---------- */
.hs-legal__layout {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) var(--gutter) 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 960px) {
  .hs-legal__layout { grid-template-columns: 1fr; }
}

/* TOC sidebar (sticky on desktop) */
.hs-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  font-family: var(--sans);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-width: thin;
}
@media (max-width: 960px) {
  .hs-toc {
    position: static;
    max-height: none;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0 1.75rem;
    border-block: 1px solid var(--navy-12);
  }
}
.hs-toc__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 32px;
}
.hs-toc__label::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 22px;
  height: 1px;
  background: var(--gold);
}
.hs-toc__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
}
.hs-toc__list li {
  position: relative;
}
.hs-toc__list a {
  display: block;
  padding: 0.55rem 0 0.55rem 1.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--navy-60);
  text-decoration: none;
  border-left: 1px solid var(--navy-12);
  transition: color 220ms, border-color 220ms, padding-left 240ms var(--easing);
  position: relative;
}
.hs-toc__list a::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 3px;
  height: 60%;
  background: var(--gold);
  transition: transform 240ms var(--easing);
  transform-origin: center;
}
.hs-toc__list a:hover {
  color: var(--navy);
  padding-left: 1.75rem;
}
.hs-toc__list a.is-active {
  color: var(--navy);
  border-left-color: var(--gold);
}
.hs-toc__list a.is-active::before {
  transform: translateY(-50%) scale(1);
}
.hs-toc__num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  margin-right: 0.55rem;
  width: 1.5rem;
}

/* ---------- MAIN CONTENT ---------- */
.hs-legal__main {
  max-width: 720px;
  font-family: var(--sans);
}

.hs-legal__lead {
  margin: 0 0 clamp(2.5rem, 5vh, 3.5rem);
  padding-bottom: clamp(2rem, 4vh, 2.75rem);
  border-bottom: 1px solid var(--navy-12);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--navy);
  font-variation-settings: 'opsz' 72, 'SOFT' 0, 'WONK' 0;
  position: relative;
}
.hs-legal__lead::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 8vw, 6.5rem);
  line-height: 0.82;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-dark);
  margin: 0.05em 0.45rem 0 -0.05em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.hs-legal__lead em {
  font-style: italic;
  color: var(--gold-dark);
  font-variation-settings: 'opsz' 72, 'SOFT' 100, 'WONK' 1;
}

/* Notice — disclaimer */
.hs-legal__notice {
  display: flex;
  gap: 1.25rem;
  margin: 0 0 clamp(2.5rem, 5vh, 3.5rem);
  padding: 1.4rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--navy-12);
  border-radius: 2px;
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--navy-90);
}
.hs-legal__notice::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
}
.hs-legal__notice-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--gold-dark);
  margin-top: 0.1rem;
}
.hs-legal__notice strong {
  color: var(--gold-dark);
  font-weight: 600;
  letter-spacing: 0.005em;
}

/* ---------- CONTENT TYPOGRAPHY ---------- */
.hs-legal__content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--navy-90);
}

/* H2 = main section heading */
.hs-legal__content > h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--navy);
  font-variation-settings: 'opsz' 144;
  margin: clamp(3.5rem, 7vh, 5rem) 0 1.75rem;
  padding-top: clamp(3rem, 6vh, 4.5rem);
  position: relative;
  scroll-margin-top: 100px;
}
.hs-legal__content > h2:first-of-type {
  padding-top: 0;
  margin-top: 0;
}

/* Decorative compass divider above each h2 (except first) */
.hs-legal__content > h2:not(:first-of-type)::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none'%3E%3Ccircle cx='16' cy='16' r='14' stroke='%23C8A153' stroke-width='0.6' fill='none'/%3E%3Cpath d='M16 4 L13 16 L16 28 L19 16 Z' fill='%23C8A153' opacity='0.85'/%3E%3Cpath d='M4 16 L16 13 L28 16 L16 19 Z' fill='%23C8A153' opacity='0.5'/%3E%3Ccircle cx='16' cy='16' r='1.5' fill='%23C8A153'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.85;
}

/* Section number — large italic Fraunces */
.hs-legal__content > h2 .num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--gold-dark);
  margin-bottom: 0.55rem;
  font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 1;
  text-transform: none;
}

.hs-legal__content > h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy);
  letter-spacing: -0.005em;
  margin: 2rem 0 0.75rem;
  font-variation-settings: 'opsz' 36;
}

.hs-legal__content p {
  margin: 0 0 1.15rem;
  hyphens: auto;
}

.hs-legal__content p + p {
  text-indent: 0;
}

.hs-legal__content strong {
  color: var(--navy);
  font-weight: 600;
}

.hs-legal__content em {
  color: var(--gold-dark);
  font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 1;
}

.hs-legal__content a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 200ms, text-decoration-thickness 200ms;
}
.hs-legal__content a:hover {
  color: var(--gold-dark);
  text-decoration-thickness: 2px;
}

/* Lists */
.hs-legal__content ul,
.hs-legal__content ol {
  margin: 0.5rem 0 1.5rem;
  padding-left: 1.75rem;
  list-style: none;
}
.hs-legal__content ul li,
.hs-legal__content ol li {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 0.7rem;
  line-height: 1.65;
}
.hs-legal__content ul li::before {
  content: '';
  position: absolute;
  left: -1.4rem;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.hs-legal__content ol {
  counter-reset: legal-list;
  padding-left: 2.4rem;
}
.hs-legal__content ol li {
  counter-increment: legal-list;
}
.hs-legal__content ol li::before {
  content: counter(legal-list, decimal-leading-zero);
  position: absolute;
  left: -2rem;
  top: 0.05em;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--gold-dark);
  font-weight: 500;
}

/* Tables — premium editorial styling */
.hs-legal__content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  font-size: 0.9375rem;
  background: var(--paper);
  border: 1px solid var(--navy-12);
  border-radius: 2px;
  overflow: hidden;
}
.hs-legal__content table thead {
  background: var(--thead-bg);
}
.hs-legal__content table thead th {
  text-align: left;
  padding: 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 500;
  border-bottom: 1px solid var(--gold);
}
.hs-legal__content table tbody td {
  padding: 0.95rem 1.1rem;
  vertical-align: top;
  line-height: 1.55;
  border-bottom: 1px solid var(--navy-12);
}
.hs-legal__content table tbody tr:last-child td {
  border-bottom: none;
}
.hs-legal__content table tbody tr:nth-child(even) td {
  background: rgba(15, 31, 61, 0.018);
}
.hs-legal__content table tbody td:first-child {
  font-weight: 500;
  color: var(--navy);
  border-right: 1px solid var(--navy-12);
}

@media (max-width: 640px) {
  .hs-legal__content table { font-size: 0.875rem; }
  .hs-legal__content table thead th,
  .hs-legal__content table tbody td { padding: 0.7rem 0.85rem; }
}

/* ---------- ASTRA SCROLL-TO-TOP — brand override ---------- */
#ast-scroll-top {
  /* Reset Astra defaults */
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 48px !important;
  height: 48px !important;
  font-size: 0 !important;
  padding: 0 !important;
  bottom: clamp(1.25rem, 3vw, 2rem) !important;
  right: clamp(1.25rem, 3vw, 2rem) !important;
  z-index: 99 !important;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transition: opacity 320ms var(--easing), transform 320ms var(--easing) !important;
  overflow: hidden;
  position: fixed !important;
}
#ast-scroll-top[style*="display: inline-flex"],
#ast-scroll-top[style*="display:inline-flex"],
#ast-scroll-top[style*="display: block"],
#ast-scroll-top[style*="display:block"] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Custom render: outer ring, inner navy disc, gold arrow */
#ast-scroll-top::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--navy);
  border: 1px solid var(--gold);
  box-shadow:
    0 12px 28px -12px rgba(15, 31, 61, 0.5),
    0 2px 6px -2px rgba(15, 31, 61, 0.3),
    inset 0 0 0 4px rgba(248, 244, 236, 0.04);
  transition: transform 320ms var(--easing), box-shadow 320ms var(--easing);
}
#ast-scroll-top::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -38%) rotate(-45deg);
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-radius: 1px;
  transition: border-color 240ms, transform 320ms var(--easing);
}

/* Hide Astra's own SVG icon completely */
#ast-scroll-top .ast-icon,
#ast-scroll-top svg,
#ast-scroll-top span {
  display: none !important;
  visibility: hidden !important;
}

#ast-scroll-top:hover::before {
  transform: scale(1.04);
  box-shadow:
    0 18px 36px -10px rgba(15, 31, 61, 0.6),
    0 4px 10px -2px rgba(200, 161, 83, 0.3),
    inset 0 0 0 4px rgba(248, 244, 236, 0.08);
}
#ast-scroll-top:hover::after {
  border-color: var(--gold-light);
  transform: translate(-50%, -50%) rotate(-45deg);
}
#ast-scroll-top:focus-visible::before {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* End-of-document signature */
.hs-legal__sig {
  margin-top: clamp(4rem, 8vh, 6rem);
  padding-top: clamp(2.5rem, 5vh, 3.5rem);
  border-top: 1px solid var(--navy-12);
  text-align: center;
  position: relative;
}
.hs-legal__sig::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--gold);
}
.hs-legal__sig svg {
  width: 36px;
  height: 36px;
  color: var(--gold);
  margin-bottom: 1rem;
  opacity: 0.85;
}
.hs-legal__sig-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--navy-60);
  font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 1;
  margin: 0;
}
.hs-legal__sig-text strong {
  display: block;
  font-style: normal;
  color: var(--navy);
  font-size: 0.85rem;
  font-variation-settings: 'opsz' 36, 'SOFT' 0, 'WONK' 0;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 0.3rem;
}

/* ---------- REVEAL ANIMATION ---------- */
.hs-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 800ms var(--easing), transform 800ms var(--easing);
}
.hs-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .hs-reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- THEME TOGGLE BUTTON ---------- */
.hs-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--navy-12);
  border-radius: 50%;
  cursor: pointer;
  color: var(--navy);
  transition: border-color 240ms var(--easing), color 240ms var(--easing), transform 240ms var(--easing), background-color 240ms var(--easing);
  flex-shrink: 0;
  position: relative;
  padding: 0;
  font: inherit;
}
.hs-theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  transform: rotate(-12deg);
}
.hs-theme-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.hs-theme-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}
.hs-theme-toggle__sun  { display: none; }
.hs-theme-toggle__moon { display: block; }
[data-theme="dark"] .hs-theme-toggle__sun  { display: block; }
[data-theme="dark"] .hs-theme-toggle__moon { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hs-theme-toggle:hover { transform: none; }
}
