/* ==========================================================================
   VanaCat — homepage styles
   1. Tokens   2. Base   3. Buttons & links   4. Header & nav   5. Hero
   6. Trust    7. Why    8. Tours   9. Difference   10. Stories
   11. Footer  12. Motion  13. Motion preferences
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --snow: #FAFAFA;
  --white: #FFFFFF;
  --obsidian: #2C2C2C;
  --stone: #5A5550;
  --apricot: #E67E22;
  --apricot-deep: #D35400;
  --sevan: #2980B9;
  --sevan-deep: #1B4F72;
  --sevan-night: #123A56;
  --tuff: #E5D3B3;
  --tuff-deep: #D7B99C;
  --tuff-wash: #F5EDE0;

  --font-display: "Marcellus", "Noto Serif Armenian", Georgia, serif;
  --font-body: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-armenian: "Noto Serif Armenian", Georgia, serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.5rem + 4.6vw, 4.75rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 9vw, 8rem);
  --wrap: 76rem;
  --arch: 999px 999px 0 0;
  --header-h: 4.75rem;
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--snow);
  color: var(--obsidian);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
svg { display: block; }
.sprite { position: absolute; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.3; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--sevan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--obsidian);
  border-radius: 0.5rem;
}
.skip-link:focus { top: 1rem; }

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head p { margin-top: 1rem; color: var(--stone); }

/* 3. Buttons & links ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 var(--step-0)/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}
.btn-primary { background: var(--apricot); color: var(--obsidian); }
.btn-primary:hover { background: #F29544; }
.btn-ghost { border-color: var(--white); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--sevan-deep); }
.btn-small { min-height: 2.75rem; padding: 0.5rem 1.25rem; font-size: 1rem; }

.text-link {
  font-weight: 600;
  color: var(--sevan-deep);
  text-decoration-color: var(--apricot);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.text-link:hover { color: var(--apricot-deep); }

/* 4. Header & nav ---------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--white);
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.site-header.is-solid,
.site-header.is-open {
  background: var(--snow);
  color: var(--obsidian);
  box-shadow: 0 1px 0 var(--tuff);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-eyes { width: 2.6rem; height: 1.15rem; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.nav-list { display: flex; align-items: center; gap: 0.25rem; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: inherit;
  font: 500 1rem/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.nav-link:hover,
.nav-link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--apricot);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}
.chevron { width: 0.7rem; height: 0.5rem; transition: transform 0.2s; }
.nav-menu-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.nav-cta { margin-left: 0.75rem; }
.nav-item-menu { position: relative; }

.submenu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  width: 20rem;
  padding: 0.5rem;
  background: var(--white);
  color: var(--obsidian);
  border: 1px solid var(--tuff);
  border-radius: 1rem;
  box-shadow: 0 18px 40px -18px rgba(27, 79, 114, 0.45);
  display: none;
}
.nav-item-menu.is-open .submenu { display: block; }
.submenu a {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  text-decoration: none;
}
.submenu a:hover { background: var(--tuff-wash); }
.submenu strong { display: block; font-weight: 600; }
.submenu span { display: block; font-size: var(--step--1); color: var(--stone); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem;
  border: 0;
  background: none;
  color: inherit;
  font: 600 1rem/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s;
}
.nav-toggle-bars { position: relative; transform: translateY(-3px); }
.nav-toggle-bars::before { content: ""; position: absolute; top: 7px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(-7px) rotate(-90deg); }

@media (max-width: 68rem) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 0.5rem var(--gutter) 2rem;
    background: var(--snow);
    color: var(--obsidian);
    border-bottom: 1px solid var(--tuff);
  }
  .site-header.is-open .site-nav { display: block; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--tuff); }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: var(--step-1);
    border-radius: 0;
  }
  .submenu {
    position: static;
    width: auto;
    padding: 0 0 0.75rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
  }
  .submenu a { padding: 0.6rem 0.75rem; }
  .nav-list > .nav-cta { margin: 1.5rem 0 0; border-bottom: 0; }
  .nav-cta .btn { width: 100%; min-height: 3.25rem; }
}

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100vh, 58rem);
  min-height: min(100svh, 58rem);
  padding: calc(var(--header-h) + 2rem) var(--gutter) clamp(9rem, 20vh, 14rem);
  background: var(--sevan-night);
  color: var(--white);
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(18, 58, 86, 0.82) 0%, rgba(18, 58, 86, 0.55) 38%, rgba(18, 58, 86, 0) 68%);
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
}
.hero-content > * { max-width: 40rem; }

.hero-greeting {
  margin-bottom: 1.25rem;
  font-size: var(--step-0);
  color: var(--tuff);
}
.hero-greeting [lang="hy"] {
  font-family: var(--font-armenian);
  font-size: 1.3em;
  color: var(--white);
  margin-right: 0.35em;
}

.hero h1 { font-size: var(--step-4); line-height: 1.02; }

.hero-sub {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.hero-sun {
  animation: sunrise 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes sunrise {
  from { transform: translateY(120px); opacity: 0.4; }
  to   { transform: translateY(0); opacity: 1; }
}

@media (max-width: 48rem) {
  .hero {
    align-items: flex-start;
    min-height: 46rem;
    padding-bottom: 22rem;
  }
  /* Show the right half of the scene: Masis and the cat */
  .hero-art {
    inset: auto auto 0 -100%;
    width: 200%;
    height: 30rem;
  }
  .hero-scrim {
    background: linear-gradient(180deg, rgba(18, 58, 86, 0.9) 0%, rgba(18, 58, 86, 0.75) 48%, rgba(18, 58, 86, 0) 72%);
  }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* 6. Trust bar ------------------------------------------------------------- */
.trust {
  background: var(--tuff);
  padding: 1.5rem var(--gutter);
}
.trust-list {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: var(--wrap);
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: var(--step-1);
}
.trust-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.trust-list li::before {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--apricot-deep);
}
.trust-list li:nth-child(2)::before { background: var(--sevan-deep); }

@media (max-width: 60rem) {
  .trust-list { grid-template-columns: 1fr; }
}

/* 7. Why VanaCat ----------------------------------------------------------- */
.why { padding: var(--section) var(--gutter); }

.why-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  max-width: var(--wrap);
  margin-inline: auto;
}

.why-portrait {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 5;
  max-width: 26rem;
  background: var(--tuff);
  border-radius: var(--arch);
  overflow: hidden;
}
.why-portrait svg { width: 100%; height: auto; padding-inline: 8%; }

.why-copy .lede {
  margin-top: 1.5rem;
  font-size: var(--step-2);
  line-height: 1.4;
  max-width: 34rem;
}
.why-copy > p:not(.lede) {
  margin-top: 1.25rem;
  max-width: 34rem;
  color: var(--stone);
}

.perks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 2.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--tuff-deep);
}
.perks p { margin-top: 0.4rem; color: var(--stone); }

@media (max-width: 56rem) {
  .why-inner { grid-template-columns: 1fr; }
  .why-portrait {
    position: static;
    aspect-ratio: 5 / 4;
    max-width: 22rem;
  }
  .why-portrait svg { padding-inline: 16%; }
}
@media (max-width: 36rem) {
  .perks { grid-template-columns: 1fr; }
}

/* 8. Tours ----------------------------------------------------------------- */
.tours {
  padding: var(--section) var(--gutter);
  background: var(--tuff-wash);
}
.tours > * { max-width: var(--wrap); margin-inline: auto; }
.tours > .section-head { margin-inline: auto; max-width: var(--wrap); }
.tours .section-head p { max-width: 36rem; }

.tour-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 1.5rem;
}

.tour {
  position: relative;
  display: grid;
  grid-template-columns: 42% 1fr;
  background: var(--white);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.tour:hover,
.tour:focus-within { box-shadow: 0 0 0 2px var(--apricot); }

.tour-feature {
  grid-row: span 2;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
}

.tour-art { min-height: 13rem; }
.tour-art svg { width: 100%; height: 100%; }
.tour-feature .tour-art { min-height: 20rem; }

.tour-body { padding: 1.5rem 1.6rem 1.6rem; }
.tour-feature .tour-body { padding: 2rem 2.25rem 2.25rem; }

.tour-meta {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--sevan-deep);
}
.tour h3 {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.15;
}
.tour-feature h3 { font-size: var(--step-3); }
.tour h3 a { text-decoration: none; }
.tour h3 a::after { content: ""; position: absolute; inset: 0; }
.tour h3 a:focus-visible { outline: none; }
.tour:has(h3 a:focus-visible) { outline: 3px solid var(--sevan); outline-offset: 3px; }
.tour-body > p:not(.tour-meta):not(.tour-price) {
  margin-top: 0.75rem;
  color: var(--stone);
  max-width: 34rem;
}
.tour-price { margin-top: 1.1rem; font-size: var(--step--1); }
.tour-price strong { font-size: var(--step-1); font-weight: 700; color: var(--apricot-deep); }

.tours-more { margin-top: 2.5rem; }

@media (max-width: 64rem) {
  .tour-grid { grid-template-columns: 1fr; }
  .tour-feature .tour-art { min-height: 16rem; }
}
@media (max-width: 36rem) {
  .tour { grid-template-columns: 1fr; }
  .tour-art { min-height: 11rem; }
  .tour-feature .tour-art { min-height: 13rem; }
  .tour-feature .tour-body { padding: 1.5rem 1.6rem 1.6rem; }
}

/* 9. The VanaCat difference ------------------------------------------------ */
.difference {
  padding: var(--section) var(--gutter);
  background: var(--sevan-deep);
  color: var(--white);
}
.difference-inner { max-width: var(--wrap); margin-inline: auto; }

.tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.tab-list { display: grid; align-content: start; }

.tab {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.35rem 0 1.35rem 1.25rem;
  border: 0;
  border-left: 4px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: none;
  color: rgba(255, 255, 255, 0.72);
  font: 400 var(--step-2)/1.2 var(--font-display);
  text-align: left;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.tab svg { flex: none; width: 2rem; height: 2rem; }
.tab:hover { color: var(--white); }
.tab[aria-selected="true"] {
  color: var(--white);
  border-left-color: var(--apricot);
}
.tab[aria-selected="true"] svg { color: var(--apricot); }

.tab-panel { padding-top: 1.1rem; }
.tab-panel[hidden] { display: none; }
.tab-lede { font-size: var(--step-2); line-height: 1.4; max-width: 32rem; }
.tab-panel ul { margin-top: 2rem; display: grid; gap: 0.9rem; max-width: 32rem; }
.tab-panel li {
  position: relative;
  padding-left: 1.75rem;
  color: rgba(255, 255, 255, 0.88);
}
.tab-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--apricot);
}
.difference :focus-visible { outline-color: var(--tuff); }

@media (max-width: 56rem) {
  .tabs { grid-template-columns: 1fr; gap: 1.5rem; }
  .tab { padding-block: 1.1rem; }
}

/* 10. Stories -------------------------------------------------------------- */
.stories { padding: var(--section) var(--gutter); }
.stories > * { max-width: var(--wrap); margin-inline: auto; }

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
}

.story {
  padding-top: 1.5rem;
  border-top: 3px solid var(--sevan);
}
.story-lead { grid-row: span 2; border-top-color: var(--apricot); }

.story blockquote p { font-size: var(--step-1); line-height: 1.5; }
.story-lead blockquote p {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.2;
  text-wrap: balance;
}
.story figcaption {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--stone);
}

@media (max-width: 52rem) {
  .story-grid { grid-template-columns: 1fr; }
}

/* 11. Footer --------------------------------------------------------------- */
.site-footer { background: var(--obsidian); color: var(--snow); }

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.newsletter-copy p { margin-top: 1rem; max-width: 30rem; color: var(--tuff); }

.newsletter-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--step--1);
  font-weight: 600;
}
.newsletter-row { display: flex; gap: 0.6rem; }
.newsletter-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--white);
  color: var(--obsidian);
  font: 400 var(--step-0)/1.2 var(--font-body);
}
.newsletter-row input[aria-invalid="true"] { border-color: var(--apricot); }
.newsletter-status { min-height: 1.6em; margin-top: 0.6rem; font-size: var(--step--1); color: var(--tuff); }
.site-footer :focus-visible { outline-color: var(--apricot); }

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem 2rem;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 4.5rem) var(--gutter);
}
.footer-brand p { margin-top: 1rem; max-width: 20rem; color: var(--tuff); }
.footer-col h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-1);
  color: var(--tuff);
}
.footer-col ul { margin-top: 1rem; display: grid; gap: 0.15rem; }
.footer-col a {
  display: inline-block;
  padding-block: 0.4rem;
  text-decoration: none;
}
.footer-col a:hover,
.footer-legal a:hover { color: var(--apricot); text-decoration: underline; text-underline-offset: 0.3em; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--step--1);
  color: var(--tuff);
}
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-legal a { text-decoration: none; }

@media (max-width: 56rem) {
  .newsletter { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 30rem) {
  .newsletter-row { flex-direction: column; }
  .footer-main { grid-template-columns: 1fr; }
}

/* 12. Motion ---------------------------------------------------------------- */
/* Site-specific motion. Scroll reveals, counters and parallax come from
   motion.css + motion.js and are switched on with data- attributes in the HTML. */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* Pages cross-fade into each other; the header holds still */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }

/* Press feedback */
.btn {
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.14s var(--ease-out);
}
.btn:active { transform: scale(0.97); }

/* Cards lift and their art drifts closer */
.tour,
.card { transition: box-shadow 0.2s, transform 0.3s var(--ease-out); }
.tour-art { overflow: hidden; }
.tour-art svg,
.card .ph svg { transition: transform 0.7s var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .tour:hover,
  .card:has(h3 a):hover { transform: translateY(-4px); }
  .tour:hover .tour-art svg,
  .card:has(h3 a):hover .ph svg { transform: scale(1.05); }
}

/* Tours dropdown grows out of its button */
@media (min-width: 68.0625rem) {
  .submenu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: 2rem 0;
    transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out), visibility 0s linear 0.18s;
  }
  .nav-item-menu.is-open .submenu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
}

/* Mobile menu and tab panels ease in when they appear */
@media (max-width: 68rem) {
  .site-header.is-open .site-nav { animation: drop-in 0.22s var(--ease-out); }
}
.tab-panel:not([hidden]) { animation: drop-in 0.3s var(--ease-out); }
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-6px); }
}

/* FAQ answers open smoothly where the browser can do it */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content {
    height: 0;
    overflow: hidden;
    transition: height 0.28s var(--ease-out), content-visibility 0.28s allow-discrete;
  }
  .faq details[open]::details-content { height: auto; }
}

/* Counting numbers keep their width */
[data-count] { font-variant-numeric: tabular-nums; }

/* Reading progress on long guides */
.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 3px;
  background: var(--apricot);
}

/* Hero entrances: copy rises in reading order, the arch comes up like a sunrise */
@media (prefers-reduced-motion: no-preference) {
  .hero-greeting,
  .hero-sub,
  .hero-actions,
  .page-hero-copy > *,
  .soon-brand,
  .soon-greeting,
  .soon-sub,
  .soon-actions { animation: rise 0.9s var(--ease-out) both; }

  .page-hero h1 { animation-delay: 0.07s; }
  .page-hero .lede { animation-delay: 0.15s; }
  .page-hero .hero-actions { animation-delay: 0.23s; }
  .hero-sub,
  .soon-sub { animation-delay: 0.35s; }
  .hero-actions,
  .soon-actions { animation-delay: 0.45s; }

  .page-hero .ph-arch { animation: arch-rise 1.3s var(--ease-out) 0.1s both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}
@keyframes arch-rise {
  from { transform: translateY(45%); }
}

/* 13. Motion preferences --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
