/* ============================================================
  CUSTODIA - Shared Design System
  Applies to all page templates.
  Replace font imports, colours, and variables to match brand.
  ============================================================ */

/* ----- Design Tokens --------------------------------------- */
:root {
  /*
    Shared Custodia brand colours — hex lives only in custodia-brand.css.
    Use these aliases (or --cu-brand-*) when asked to paint with brand teal/gold/brown/ink.
    Never hardcode #2A4A52, #d4a94a, #3b2213, #5a3420, or #f0ead8.
  */
  --brand-teal: var(--cu-brand-teal);
  --brand-teal-rgb: var(--cu-brand-teal-rgb);
  --brand-gold: var(--cu-brand-gold);
  --brand-brown-dark: var(--cu-brand-dark);
  --brand-brown-mid: var(--cu-brand-mid);
  --brand-wordmark-ink: var(--cu-brand-ink);

  /* Marketing page palette (product-only; not shared brand tokens) */
  --brand-primary:     #2A3B2E;   /* Deep moss green - heritage, solidity */
  --brand-accent:      #7B6B45;   /* Warm archive gold - aged paper, brass */
  --brand-accent-lt: var(--cu-brand-gold);
  --brand-surface:     #F8F6F1;   /* Off-white - aged parchment feel */
  --brand-surface-2:   #EDE9E0;   /* Slightly deeper surface */
  --brand-ink:         #1C1C1A;   /* Near-black body text */
  --brand-muted:       #6B6658;   /* Secondary/muted text */
  --brand-border:      #D5CEC0;   /* Subtle border */
  --brand-cta:         #2A3B2E;   /* CTA button fill */
  --brand-cta-text:    #F8F6F1;   /* CTA button label */
  --brand-link:        #4A6352;   /* Inline links */

  /* App window frame — shared screen chrome for showcase / feature visuals.
     One hairline border + one soft shadow instead of simulated hardware. */
  --app-window-radius: clamp(0.85rem, 1.2vw, 1.15rem);
  --app-window-border: color-mix(in srgb, var(--brand-ink) 14%, transparent);
  --app-window-shadow:
    0 1px 2px color-mix(in srgb, var(--brand-ink) 10%, transparent),
    0 32px 64px -24px color-mix(in srgb, var(--brand-ink) 26%, transparent);
  --app-window-screen-radius: calc(var(--app-window-radius) - 1px);
  /* Django admin dark theme --body-bg (showcase dark-slide bottom fade) */
  --admin-dark-surface: #121212;
  /* Caption/chips breathing room below the stage (single source for all carousels) */
  --showcase-meta-gap: clamp(1.1rem, 2.5vw, 1.9rem);

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing scale */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  1.5rem;
  --sp-lg:  2.5rem;
  --sp-xl:  4rem;
  --sp-2xl: 6rem;

  /* Misc */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  14px;
  --max-width:  1120px;
  --nav-height: 68px;
  --transition: 180ms ease;
  --motion-duration: 620ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --surface-wash: radial-gradient(
    120% 80% at 12% 0%,
    color-mix(in srgb, var(--brand-accent) 10%, transparent) 0%,
    transparent 55%
  ),
  radial-gradient(
    90% 70% at 88% 18%,
    color-mix(in srgb, var(--brand-primary) 8%, transparent) 0%,
    transparent 50%
  );
  --dark-band-bg:
    radial-gradient(80% 120% at 20% 0%, color-mix(in srgb, var(--brand-accent) 28%, transparent) 0%, transparent 55%),
    radial-gradient(70% 100% at 90% 100%, color-mix(in srgb, #1a241c 55%, transparent) 0%, transparent 50%);
}

/* ----- Reset ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--brand-ink);
  background: var(--brand-surface);
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable;
}
img { max-width: 100%; display: block; }
a {color: var(--brand-link);text-decoration: none;font-weight: 600;}
a:hover { text-decoration: underline; }

/* ----- Typography ------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--brand-primary);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 {font-size: clamp(1.3rem, 2.5vw, 1.8rem);}
h4 { font-size: 1.1rem; }
p  { max-width: 65ch; color: var(--brand-muted); }
p.wide { max-width: 80ch; }
small { font-size: 0.8rem; color: var(--brand-muted); }

/* ----- Layout Utilities ------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}
.section { padding: var(--sp-xl) 0; position: relative; }
/* Deep links (#archive, #portal, …) clear the sticky nav so the eyebrow is visible */
.section[id] {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}
.section--lg { padding: var(--sp-2xl) 0; }
.section--tinted {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-surface-2) 92%, var(--brand-accent)) 0%, var(--brand-surface-2) 100%);
}
.section--wash {
  background: var(--surface-wash), var(--brand-surface);
}

.grid-2 {display: grid;grid-template-columns: 1fr 1fr;gap: var(--sp-xl);}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); }
.grid-4--five {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-md);
}
.grid-4--five .card {flex: 0 1 calc((85% - 2 * var(--sp-md)) / 3);}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-4--five .card { flex-basis: calc((100% - var(--sp-md)) / 2); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-4--five .card { flex-basis: 100%; }
}

.stack     {display: flex;flex-direction: column;gap: var(--sp-xs);}
.stack--tight { gap: 4px; }
.stack--form { gap: 1.25rem; }
.stack--legal { gap: 2rem; line-height: 1.7; }
.stack--legal :is(ul, ol) {
  padding-inline-start: 1.4rem;
  color: var(--brand-muted);
}
.cluster   {display: flex;/* flex-wrap: wrap; */align-items: center;gap: var(--sp-sm);}
.cluster--center-actions {
  justify-content: center;
  flex-wrap: wrap;
}
.cluster--center { justify-content: center; gap: 2.5rem; opacity: 0.6; }
.cluster--spread { justify-content: space-between; align-items: flex-start; }
.cluster--radio { gap: 1rem; flex-wrap: wrap; }
.centered  { text-align: center; }
.centered p { margin-inline: auto; }

.container--narrow { max-width: 680px; }
.container--medium {max-width: 760px;}
.container--reading { max-width: 720px; }
.container--reading-lg { max-width: 780px; }
.container--wide { max-width: 820px; }

.grid-2--center { align-items: center; gap: 4rem; }
.grid-2--start { align-items: start; gap: 4rem; }
.grid-2--start-wide { align-items: start; gap: 5rem; }
.grid-2--spaced { margin-bottom: var(--sp-xl); }

.grid-3--pricing {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 800px) {
  .grid-3--pricing {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
  }
}

.lead { font-size: 1.05rem; }
.lead-spaced { font-size: 1.05rem; margin: 1rem auto 2rem; }
.lead-lg { font-size: 1.1rem; }
.text-sm { font-size: 0.9rem; }
.text-xs { font-size: 0.82rem; }
.text-caption { font-size: 0.85rem; }
.text-card { font-size: 0.88rem; }
.text-muted { color: var(--brand-muted); }
.text-inherit { color: inherit; }
.text-inherit:hover { color: inherit; }

.mt-05 { margin-top: 0.6rem; }
.mt-1 { margin-top: 1rem; }
.mt-125 { margin-top: 1.25rem; }
.mb-15 { margin-bottom: 1.5rem; }
.mb-auto { margin-bottom: auto; }
.pt-05 { padding-top: 0.5rem; }
.self-start { align-self: flex-start; }
.gap-top-auto { margin-top: auto; }

.trust-label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-muted);
  margin: 0 auto 1.5rem;
}
.trust-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--brand-primary);
}
.amp {
  font-family: Georgia, "Times New Roman", serif;
}

.audience-strip {
  padding-block: var(--sp-lg);
  border-block: 1px solid color-mix(in srgb, var(--brand-border) 70%, transparent);
  background: color-mix(in srgb, var(--brand-surface) 70%, var(--brand-surface-2));
}
.audience-strip .trust-label {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.1rem;
}
.audience-list {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: start;
  min-height: 2.4em;
  margin-inline: auto;
  max-width: 28rem;
}
.audience-list .trust-logo {
  grid-area: 1 / 1;
  font-size: clamp(1.7rem, 3.1vw, 1.95rem);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translateY(0.4rem);
  pointer-events: none;
  transition:
    opacity 400ms var(--motion-ease),
    transform 400ms var(--motion-ease);
}
.audience-list .trust-logo.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .audience-strip .trust-label {
    margin-bottom: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .audience-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 0;
    max-width: none;
    min-height: 0;
  }
  .audience-list .trust-logo {
    position: static;
    grid-area: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding-inline: 1.1rem;
    transition: none;
  }
  .audience-list .trust-logo:not(:last-child) {
    border-right: 1px solid var(--brand-border);
  }
  @media (max-width: 768px) {
    .audience-list .trust-logo {
      padding-inline: 0.85rem;
    }
    .audience-list .trust-logo:not(:last-child) {
      border-right: 0;
    }
  }
}

.section--cta {
  background-color: var(--brand-primary);
  background-image: var(--dark-band-bg);
  background-attachment: fixed;
  text-align: center;
}
.section--cta h2 { color: var(--brand-surface); }
.section--cta p {
  color: rgba(248, 246, 241, 0.65);
  margin: 1rem auto 2rem;
  max-width: 70ch;
  text-wrap: balance;
}
.section--cta .cluster {
  justify-content: center;
  flex-wrap: wrap;
}

.checklist {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist li {
  font-size: 0.9rem;
  color: var(--brand-muted);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.checklist li::before {
  content: '\2713';
  color: var(--brand-accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* ----- Divider --------------------------------------------- */
.divider {
  border: none;
  border-top: 1px solid var(--brand-border);
  margin: 0;
}

/* ----- Navigation ------------------------------------------ */
.site-nav {
  --cu-brand-wordmark-size: 2.95rem;
  --cu-brand-logo-size: 66px;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height);
  background: linear-gradient(90deg, #5c392e 0%, #795939 100%);
  /* No backdrop-filter: it creates a containing block that breaks position:fixed drawers. */
  border-bottom: 1px solid rgba(248, 246, 241, 0.1);
  display: flex;
  align-items: center;
  padding: 0.55rem 0;
  transition: box-shadow var(--transition);
}
.site-nav > .container {
  max-width: 1320px;
}
.site-nav.is-scrolled {
  box-shadow: 0 8px 24px rgba(28, 28, 26, 0.18);
}
.site-nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  width: 100%;
  position: relative;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--cu-brand-logo-gap) * 0.75);
  font-family: var(--cu-brand-wordmark-font);
  font-size: var(--cu-brand-wordmark-size);
  font-weight: var(--cu-brand-wordmark-weight);
  color: var(--cu-brand-ink);
  z-index: 2;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo__wordmark {
  color: var(--cu-brand-ink);
}
.nav-logo .org-logo {
  --cu-brand-logo-box: var(--cu-brand-logo-size);
}

.nav-toggle {
  display: none;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(248, 246, 241, 0.28);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--cu-brand-ink);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
  position: relative;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.site-nav.is-nav-open .nav-toggle__bars {
  background: transparent;
}
.site-nav.is-nav-open .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}
.site-nav.is-nav-open .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-panel {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  min-width: 0;
}

.nav-primary {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  list-style: none;
  flex-wrap: nowrap;
  justify-content: center;
}
.nav-links a {
  font-size: 0.9rem;
  color: rgba(248, 246, 241, 0.6);
  font-weight: 400;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--brand-surface); text-decoration: none; }
.nav-links a.active { color: var(--brand-surface); font-weight: 500; }

.nav-utility {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.1rem;
  flex: 0 0 auto;
}

.nav-admin-link {
  font-size: 0.9rem;
  color: rgba(248, 246, 241, 0.6);
  font-weight: 400;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-admin-link:hover {
  color: var(--brand-surface);
  text-decoration: none;
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .site-nav {
    --cu-brand-wordmark-size: 2.35rem;
    --cu-brand-logo-size: 52px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-panel {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    width: 100%;
    max-width: none;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--sp-lg);
    padding: var(--sp-lg) var(--sp-md) var(--sp-xl);
    /* Match footer moss green */
    background-color: var(--brand-primary);
    background-image: var(--dark-band-bg);
    /* Fade only — no sideways slide (avoids blank strip / layout jump). */
    transform: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav.is-nav-open .nav-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 200ms ease, visibility 0s;
  }

  .nav-primary {
    justify-content: flex-start;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav-links a {
    font-size: 1.15rem;
    color: rgba(248, 246, 241, 0.78);
    padding: 0.7rem 0.15rem;
  }

  .nav-utility {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(248, 246, 241, 0.14);
  }

  .nav-utility .nav-admin-link {
    text-align: center;
  }
  /* Parchment fill on moss — same contrast pattern as footer/CTA band */
  .nav-utility .btn {
    width: 100%;
    justify-content: center;
    background: var(--brand-surface);
    color: var(--brand-primary);
    border-color: var(--brand-surface);
  }
  .nav-utility .btn:hover {
    opacity: 0.92;
    background: var(--brand-surface);
    color: var(--brand-primary);
  }
}

@media (max-width: 700px) {
  .site-nav {
    --cu-brand-wordmark-size: 1.95rem;
    --cu-brand-logo-size: 46.5px;
  }
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--cu-brand-logo-gap) * var(--cu-brand-scale-compact));
  font-family: var(--cu-brand-wordmark-font);
  font-size: calc(var(--cu-brand-wordmark-size) * var(--cu-brand-scale-compact));
  font-weight: var(--cu-brand-wordmark-weight);
  line-height: 1;
}

.footer-brand__wordmark {
  color: var(--cu-brand-ink);
}

/* ----- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-cta);
  color: var(--brand-cta-text);
  border-color: var(--brand-cta);
}
.btn-primary:hover { opacity: 0.88; }
.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-border);
}
.btn-outline:hover { border-color: var(--brand-primary); }
.btn-ghost {
  background: transparent;
  color: var(--brand-muted);
  border-color: transparent;
  padding-left: 0;
}
.btn-ghost:hover { color: var(--brand-primary); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn--inverse {
  background: var(--brand-surface);
  color: var(--brand-primary);
  border: none;
}
.btn--inverse-outline {
  background: transparent;
  color: var(--brand-surface);
  border: 1px solid rgba(248, 246, 241, 0.45);
}
.btn--inverse-outline:hover {
  border-color: var(--brand-surface);
  background: rgba(248, 246, 241, 0.08);
}
.btn--block {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}
.btn--align-start { align-self: flex-start; }

/* ----- Cards ----------------------------------------------- */
.card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-md);
  box-shadow: 0 3px 10px rgba(42, 59, 46, 0.07);
  transform: translateY(-2px);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: 0 10px 24px rgba(42, 59, 46, 0.13);
  transform: translateY(-6px);
}

.card--ribbon {
  position: relative;
}
.card-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.2rem 0.55rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #F5EDDB;
  color: var(--brand-accent);
  border-left: 1px solid var(--brand-accent-lt);
  border-bottom: 1px solid var(--brand-accent-lt);
  border-radius: 0 var(--radius-lg) 0 var(--radius-sm);
}

.card-icon {
  width: 2.35rem;
  height: 2.35rem;
  background: color-mix(in srgb, var(--brand-surface-2) 70%, var(--brand-accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-sm);
  color: var(--brand-primary);
}
.card-icon__glyph {
  font-size: 1.45rem;
  color: var(--brand-primary);
}
.card__heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.card__heading .card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}
.card__heading h3 {
  margin-bottom: 0;
}

/* ----- Badges ---------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-muted { background: var(--brand-surface-2); color: var(--brand-muted); border: 1px solid var(--brand-border); }
.badge-accent { background: #F5EDDB; color: var(--brand-accent); border: 1px solid var(--brand-accent-lt); }
.badge--spaced { margin-bottom: 0.5rem; }

/* ----- Section Headings ------------------------------------ */
.section-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: var(--sp-xs);
  max-width: none;
}
.section-label .badge {
  margin-left: 0.55rem;
  vertical-align: middle;
  letter-spacing: 0.04em;
}

/* Inside .stack, flex gap would otherwise inflate label→title spacing */
.stack > .section-label {
  margin-bottom: 0;
}
.stack > .section-label + :is(h1, h2, h3) {
  margin-top: calc(var(--sp-xs) - var(--sp-sm));
}

.section-intro { margin-top: var(--sp-sm); margin-bottom: var(--sp-lg); }
.section-intro p { font-size: 1.05rem; }
.section-intro h2 + p { margin-top: var(--sp-sm); }
.section-intro--founder .section-label { font-size: 0.78rem; }

/* ----- Testimonial / positioning --------------------------- */
.testimonial {
  border-left: 3px solid var(--brand-accent-lt);
  padding-left: var(--sp-md);
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--brand-primary);
  line-height: 1.4;
  margin-bottom: var(--sp-sm);
}
.testimonial cite { font-size: 0.85rem; color: var(--brand-muted); font-style: normal; }
.positioning {
  max-width: 42rem;
  margin-inline: auto;
}
.positioning blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: var(--brand-primary);
  margin: 0;
}

/* ----- Form Elements --------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.88rem; font-weight: 500; color: var(--brand-primary); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--brand-ink);
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  transition: border-color var(--transition);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
}
textarea { resize: vertical; min-height: 120px; }
textarea.textarea--compact { min-height: 90px; }

.honeypot { display: none; }

.contact-anchor {
  max-width: 760px;
  margin: 0 auto;
  scroll-margin-top: 10rem;
}

.form-messages { margin-bottom: 1.5rem; }
.message-success {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: var(--brand-primary);
  color: #f0ead8;
}

.form-heading {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}
.form-intro {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.form-guidance {
  font-size: 0.9rem;
  color: var(--brand-muted);
  margin-top: -0.5rem;
}

.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}
.label-optional {
  font-weight: 400;
  color: var(--brand-muted);
}
.field-error {
  margin-top: 0.35rem;
  color: #b71c1c;
  font-size: 0.9rem;
}

.demo-fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.demo-fields[hidden] { display: none !important; }

#message-label .label-optional,
#message-label .label-text--demo { display: none; }
form.is-demo-mode #message-label .label-optional,
form.is-demo-mode #message-label .label-text--demo { display: inline; }
form.is-demo-mode #message-label .label-text:not(.label-text--demo) { display: none; }

/* ----- Placeholder Blocks ---------------------------------- */
/* Visual placeholder for screenshots, images, and video embeds.
   Replace .placeholder with real <img> or embed in production. */
.placeholder {
  background: var(--brand-surface-2);
  border: 1px dashed var(--brand-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brand-muted);
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 280px;
  text-align: center;
}
.placeholder .ph-icon { font-size: 1.8rem; opacity: 0.4; }
.placeholder--hero { min-height: 380px; }
.showcase-carousel {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}
.showcase-carousel--hero {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}
.showcase-carousel--hero .showcase-frame {
  /* Modern app-window chrome: hairline border, soft single shadow.
     Shares --app-window-* tokens with the feature-visual frames.
     overflow: clip keeps the scaled iframe wrap from painting over the
     rounded border corners. */
  border: 1px solid var(--app-window-border);
  border-radius: var(--app-window-radius);
  background: var(--brand-surface);
  box-shadow: var(--app-window-shadow);
  overflow: hidden;
  overflow: clip;
  /* Keyboard focus target for arrow-key browsing (tabindex in template) */
  touch-action: pan-y;
  outline: none;
}
.showcase-carousel--hero .showcase-frame:focus-visible {
  box-shadow:
    var(--app-window-shadow),
    0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}
.showcase-carousel--hero .showcase-slides {
  /* Screen corners nest inside the window border */
  border-radius: var(--app-window-screen-radius);
  overflow: hidden;
}
.showcase-meta {
  display: flex;
  justify-content: center;
  margin: 0 0 var(--showcase-meta-gap);
  padding-inline: var(--sp-md);
}
/* Top-gap variant: strip sits in the canvas gap above the window. */
.showcase-meta--top {
  position: relative;
  z-index: 1;
}
.showcase-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1280 / 875;
  container-type: inline-size;
}
.showcase-slides {
  position: absolute;
  inset: 0;
}
.showcase-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.65s var(--motion-ease);
  pointer-events: none;
  /* Soften the hard clip at the bottom of the iframe preview. */
  --showcase-fade: var(--brand-surface);
}
.showcase-slide[data-showcase-theme="dark"] {
  /* Match Django admin dark --body-bg so dark slides fade cleanly. */
  --showcase-fade: var(--admin-dark-surface);
}
.showcase-slide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: clamp(3.5rem, 12%, 5.5rem);
  pointer-events: none;
  background: linear-gradient(
    to top,
    var(--showcase-fade) 0%,
    color-mix(in srgb, var(--showcase-fade) 70%, transparent) 42%,
    transparent 100%
  );
}
.showcase-slide.is-active {
  opacity: 1;
  z-index: 1;
}
/* Directional entrance — JS tags the track with data-direction="next|prev";
   autoplay always enters from the right, user back-navigation from the left. */
.showcase-slides[data-direction="next"] .showcase-slide.is-active {
  animation: showcase-slide-next 650ms var(--motion-ease);
}
.showcase-slides[data-direction="prev"] .showcase-slide.is-active {
  animation: showcase-slide-prev 650ms var(--motion-ease);
}
@keyframes showcase-slide-next {
  from {
    opacity: 0;
    transform: translateX(2.5%) scale(0.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes showcase-slide-prev {
  from {
    opacity: 0;
    transform: translateX(-2.5%) scale(0.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.showcase-iframe-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 875px;
  transform-origin: top left;
  /* Screen corners nest inside the window border */
  border-radius: var(--app-window-screen-radius);
  overflow: hidden;
  /* Unitless ratio: length / length. Bare /1280 is invalid for scale(). */
  /* --showcase-zoom crops into the canvas (mobile legibility); 1 = full fit. */
  transform: scale(calc(var(--showcase-scale, calc(100cqi / 1280px)) * var(--showcase-zoom, 1)));
}
.showcase-iframe {
  display: block;
  width: 1280px;
  height: 875px;
  border: 0;
  overflow: hidden;
  pointer-events: none;
}
.showcase-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brand-ink) 10%, transparent);
  border-radius: 999px;
  /* Frosted glass — stays legible over light and dark slides */
  background: color-mix(in srgb, var(--brand-surface) 78%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  color: var(--brand-ink);
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-ink) 14%, transparent);
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.showcase-nav .material-symbols-outlined {
  font-size: 1.35rem;
}
.showcase-nav:hover,
.showcase-nav:focus-visible {
  background: color-mix(in srgb, var(--brand-surface) 96%, transparent);
  transform: translateY(-50%) scale(1.07);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-ink) 18%, transparent);
  outline: none;
}
.showcase-nav:focus-visible {
  box-shadow:
    0 6px 18px color-mix(in srgb, var(--brand-ink) 18%, transparent),
    0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}
.showcase-nav:active {
  transform: translateY(-50%) scale(0.96);
}
.showcase-nav--prev {
  left: 0.85rem;
}
.showcase-nav--next {
  right: 0.85rem;
}
.showcase-playback {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brand-ink) 10%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-surface) 78%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  color: var(--brand-ink);
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-ink) 14%, transparent);
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.showcase-playback:hover,
.showcase-playback:focus-visible {
  background: color-mix(in srgb, var(--brand-surface) 96%, transparent);
  transform: scale(1.07);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-ink) 18%, transparent);
  outline: none;
}
.showcase-playback:focus-visible {
  box-shadow:
    0 6px 18px color-mix(in srgb, var(--brand-ink) 18%, transparent),
    0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}
.showcase-playback:active {
  transform: scale(0.96);
}
.showcase-playback__icon {
  font-size: 1.35rem;
  line-height: 1;
}
/* Slide picker — labeled chips in two centred rows (collapse to plain dots
   on small screens). Wraps instead of scrolling, so no strip nav is needed. */
.showcase-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  justify-content: safe center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0;
  margin-inline: auto;
  min-width: 0;
  max-width: 54rem;
  padding: 0.2rem 0.75rem 0.4rem;
  overflow: visible;
  position: relative;
}
/* Sliding thumb — one shared background that glides chip to chip.
   Geometry (transform/width/height) is written inline by showcase-carousel.js;
   the transition tweens between measured positions. Inactive chips are ghosts;
   the active chip goes transparent so the thumb paint shows through. */
.showcase-strip__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 999px;
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  transform: translate(0, 0);
  transition:
    transform 260ms ease-out,
    width 260ms ease-out,
    height 260ms ease-out;
  will-change: transform, width, height;
  z-index: 0;
  pointer-events: none;
}
/* Centred two-row chip strip — pills wrap, no scrolling. */
.showcase-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.showcase-chip {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 0.32rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--brand-ink) 12%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-surface) 38%, transparent);
  color: var(--brand-muted);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  z-index: 1;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    width var(--transition);
}
.showcase-chip:hover {
  color: var(--brand-ink);
  border-color: color-mix(in srgb, var(--brand-ink) 28%, transparent);
  background: color-mix(in srgb, var(--brand-surface) 95%, transparent);
}
.showcase-chip:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand-primary) 40%, transparent);
  outline-offset: 2px;
}
.showcase-chip.is-active {
  background: transparent;
  border-color: transparent;
  color: var(--brand-surface);
}
.showcase-chip.is-active:hover {
  color: var(--brand-surface);
  border-color: transparent;
  background: transparent;
}
/* Autoplay progress — fills the active chip while the carousel runs */
.showcase-chip__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: color-mix(in srgb, var(--brand-accent-lt) 85%, transparent);
  pointer-events: none;
}
.showcase-chip.is-active .showcase-chip__progress {
  animation: showcase-chip-progress var(--showcase-interval, 5500ms) linear both;
}
.showcase-carousel:not(.is-running) .showcase-chip.is-active .showcase-chip__progress {
  animation-play-state: paused;
}
@keyframes showcase-chip-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@media (max-width: 640px) {
  .showcase-carousel--hero .showcase-frame {
    /* Crop into the admin canvas instead of shrinking all 1280px of UI into
       ~350px (~27% scale, unreadable). A 4/3 window + 1.85× zoom keeps the
       top-left working area (sidebar, header, first rows) legible. */
    aspect-ratio: 4 / 3;
  }
  .showcase-iframe-wrap {
    --showcase-zoom: 1.85;
  }
  .feature-visual__frame {
    --app-window-radius: 0.85rem;
  }
  .showcase-nav {
    width: 2.15rem;
    height: 2.15rem;
  }
  .showcase-nav .material-symbols-outlined {
    font-size: 1.2rem;
  }
  .showcase-nav--prev {
    left: 0.55rem;
  }
  .showcase-nav--next {
    right: 0.55rem;
  }
  .showcase-playback {
    width: 2.15rem;
    height: 2.15rem;
    right: 0.55rem;
    bottom: 0.55rem;
  }
  .showcase-playback__icon {
    font-size: 1.2rem;
  }
  /* Chips collapse to plain dots; the active one elongates */
  .showcase-dots {
    gap: 0.45rem;
    padding-inline: 0.25rem;
  }
  .showcase-chip {
    padding: 0;
    width: 0.5rem;
    height: 0.5rem;
    justify-content: center;
  }
  .showcase-chip__label {
    display: none;
  }
  .showcase-chip.is-active {
    width: 1.35rem;
  }
  .showcase-carousel.is-running .showcase-chip.is-active .showcase-chip__progress {
    animation: none;
  }
}
.placeholder--medium { min-height: 360px; }
.placeholder--split { min-height: 320px; }
.placeholder--tall { min-height: 400px; }
.placeholder--tall-lg { min-height: 420px; }
.placeholder--card-media {
  min-height: 180px;
  margin: -1rem -1rem 1rem -1rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: none;
  border-bottom: 1px solid var(--brand-border);
}
.placeholder--card-media .placeholder-caption { font-size: 0.75rem; }
.placeholder--avatar {
  min-width: 120px;
  min-height: 120px;
  max-width: 120px;
  border-radius: 50%;
  flex-shrink: 0;
}
.placeholder--avatar .placeholder-caption { font-size: 0.75rem; }

/* ----- Pricing Table --------------------------------------- */
.pricing-card {
  position: relative;
  min-width: 0;
  max-width: 100%;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-md) var(--sp-md) var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  box-shadow: 0 4px 14px rgba(40, 32, 22, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.pricing-card:hover {
  box-shadow: 0 8px 24px rgba(40, 32, 22, 0.1);
  transform: translateY(-2px);
}
.pricing-card--selectable {
  cursor: pointer;
  border: 2px solid transparent;
}
.pricing-card__radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.pricing-card--selectable:has(.pricing-card__radio:checked) {
  border-color: var(--brand-accent);
  box-shadow:
    0 0 0 1px var(--brand-accent),
    0 0 24px rgba(123, 107, 69, 0.25);
  transform: translateY(-2px);
}
.pricing-card--selectable.pricing-card--curator:has(.pricing-card__radio:checked) {
  border-color: var(--brand-primary);
  box-shadow:
    0 0 0 1px var(--brand-primary),
    0 0 24px color-mix(in srgb, var(--brand-primary) 35%, transparent);
}
.pricing-card--selectable.featured {
  border-color: transparent;
  background: #F0F4F1;
  box-shadow: 0 4px 14px rgba(40, 32, 22, 0.05);
}
.pricing-card--selectable.featured:hover {
  box-shadow: 0 8px 24px rgba(40, 32, 22, 0.1);
}
.pricing-card--selectable.featured:has(.pricing-card__radio:checked) {
  border-color: var(--brand-accent);
  box-shadow:
    0 0 0 1px var(--brand-accent),
    0 0 24px rgba(123, 107, 69, 0.25);
}
html:not(.material-symbols-ready) .material-symbols-outlined {
  visibility: hidden;
  opacity: 0;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.pricing-card__title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 2.3rem;
  font-family: var(--font-display);
  min-width: 0;
}
.pricing-card .cluster--spread {
  flex-wrap: wrap;
  row-gap: 0.4rem;
}
.pricing-card .cluster--spread .badge {
  flex-shrink: 0;
}
.pricing-card__corner-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  padding: 0.35rem 0.7rem;
  border-radius: 0 calc(var(--radius-lg) - 2px) 0 var(--radius-sm);
  background: color-mix(in srgb, var(--brand-primary) 14%, var(--brand-surface));
  color: var(--brand-primary);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}
.pricing-card:has(.pricing-card__corner-badge) .pricing-card__title {
  padding-right: 5.5rem;
}
.pricing-card__icon {
  font-size: 2rem;
  color: var(--brand-accent);
  flex-shrink: 0;
}
.pricing-card.featured {
  background: #F0F4F1;
}
.pricing-card.featured:not(.pricing-card--selectable) {
  border: 2px solid var(--brand-primary);
}
.pricing-card .price {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--brand-primary);
  line-height: 1;
  font-family: 'EB Garamond', Georgia, serif;
  margin: 0;
}
.pricing-card__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-bottom: 0.5rem;
}
.pricing-card__trial-pill {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.pricing-card .price sup { font-size: 1.2rem; vertical-align: super; }
.pricing-card .price span { font-size: 1rem; color: var(--brand-muted); font-family: var(--font-body); }
.pricing-billing-note {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--brand-primary);
  line-height: 1;
}
.pricing-billing-note:not(:empty) {
  margin: 3px 0px 5.7px;
}
.pricing-features {list-style: none;display: flex;flex-direction: column;gap: 8px;flex: 1;margin-bottom: var(--sp-sm);}
.pricing-features li { font-size: 0.9rem; color: var(--brand-muted); display: flex; gap: 8px; align-items: flex-start; }
.pricing-features li::before { content: '\2713'; color: var(--brand-accent); font-weight: 600; flex-shrink: 0; }
.pricing-features li.unavail { opacity: 0.45; }
.pricing-features li.unavail::before {
  content: '\2717';
  color: var(--brand-muted);
  display: inline-block;
  font-weight: 500;
}

.pricing-card__subtitle {
  font-size: 1.05rem;
  color: var(--brand-muted);
  line-height: 1.6rem;
  overflow-wrap: anywhere;
  margin-top: calc(0.25rem - var(--sp-sm));
  margin-bottom: 0.5rem;
}
.pricing-card__trial-note {
  /* margin: 0.55rem 0 0; */
  font-size: 0.82rem;
  color: var(--brand-muted);
  text-align: center;
}
.pricing-card__price-row--trial {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
}
.pricing-card__trial-price {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--brand-primary);
  line-height: 1.2;
}
.pricing-card__then-from {
  margin: 0;
  font-size: 0.88rem;
  color: var(--brand-muted);
}
.pricing-full-link {
  margin: var(--sp-lg) auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--brand-muted);
}
.pricing-full-link a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.pricing-full-link a:hover {
  color: var(--brand-primary);
}
.pricing-card__title-text {
  font-family: var(--font-display);
}
.pricing-intro { margin-top: var(--sp-md); }
.pricing-faq-intro { margin-bottom: var(--sp-md); }
.pricing-plans--entrance {
  animation: showcase-entrance 800ms var(--motion-ease) 400ms both;
}
#plans {
  overflow: clip;
}

.billing-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  margin: 0 auto var(--sp-lg);
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: rgba(248, 246, 241, 0.92);
}

.billing-toggle__button {
  border: none;
  background: transparent;
  color: var(--brand-muted);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.billing-toggle__button:hover {
  color: var(--brand-primary);
}

.billing-toggle__button.is-active,
.billing-toggle__button[aria-pressed='true'] {
  background: var(--brand-primary);
  color: var(--brand-surface);
  box-shadow: 0 8px 18px rgba(42, 59, 46, 0.18);
}

.billing-toggle__button:focus-visible {
  outline: 2px solid var(--brand-accent-lt);
  outline-offset: 2px;
}

.billing-toggle__label--compact {
  display: none;
}

@media (max-width: 600px) {
  .billing-toggle {
    display: flex;
    width: 100%;
  }

  .billing-toggle__button {
    flex: 1 1 50%;
    min-width: 0;
    text-align: center;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 451px) {
  .pricing-plans--entrance {
    padding-inline: clamp(1rem, 5vw, var(--sp-md));
  }

  .billing-toggle {
    width: fit-content;
    flex-wrap: nowrap;
  }

  .billing-toggle__button {
    flex: 0 0 auto;
    padding: 0.55rem 0.6rem;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .billing-toggle__label--full {
    display: none;
  }

  .billing-toggle__label--compact {
    display: inline;
  }

  .pricing-card {
    padding-inline: clamp(1rem, 5vw, var(--sp-md));
  }

  .pricing-card__title {
    gap: 0.45rem;
    font-size: clamp(1.9rem, 7vw, 2rem);
  }

  .pricing-card__icon {
    font-size: clamp(1.75rem, 6vw, 1.75rem);
  }

  .pricing-card:has(.pricing-card__corner-badge) .pricing-card__title {
    padding: 0.75rem 0 0;
  }
}

@media (max-width: 320px) {
  .site-nav {
    --cu-brand-wordmark-size: 1.4rem;
    --cu-brand-logo-size: 34px;
  }

  .site-nav > .container {
    padding-inline: 1rem;
  }

  .site-nav__bar {
    gap: 0.75rem;
  }

  .nav-toggle {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
  }
}

/* ----- Steps ----------------------------------------------- */
.step-list { counter-reset: steps; display: flex; flex-direction: column; gap: var(--sp-md); }
.step-item { display: flex; gap: var(--sp-md); align-items: flex-start; }
.step-num {
  counter-increment: steps;
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--brand-primary);
  color: var(--brand-surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ----- FAQ ------------------------------------------------- */
details.faq {
  border-bottom: 1px solid var(--brand-border);
  padding: var(--sp-sm) 0;
}
details.faq summary {
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--brand-primary);
}
details.faq summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--brand-muted);
  transition: transform var(--transition);
}
details.faq[open] summary::after { content: '-'; }
details.faq p { margin-top: var(--sp-sm); font-size: 0.95rem; }

/* ----- Footer ---------------------------------------------- */
.site-footer {
  background-color: var(--brand-primary);
  background-image: var(--dark-band-bg);
  background-attachment: fixed;
  color: rgba(248,246,241,0.7);
  padding: var(--sp-xl) 0 var(--sp-lg);
}
.site-footer h4 { color: var(--brand-surface); }
.footer-tagline {
  color: rgba(248, 246, 241, 0.55);
  font-size: 0.9rem;
  max-width: 28ch;
}
.footer-col-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 246, 241, 0.4);
  margin-bottom: 1rem;
}
.site-footer a { color: rgba(248,246,241,0.6); font-size: 0.88rem; }
.site-footer a:hover { color: var(--brand-surface); text-decoration: none; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(248,246,241,0.12);
  padding-top: var(--sp-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(248,246,241,0.4);
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 550px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
  }
}

@media (max-width: 400px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    font-size: 1.8rem;
  }

  .footer-brand .org-logo--compact {
    --cu-brand-logo-box: 46px;
  }
}

/* ----- Utility --------------------------------------------- */
.mt-sm  { margin-top: var(--sp-sm); }
.mt-md  { margin-top: var(--sp-md); }
.mt-lg  { margin-top: var(--sp-lg); }
.mb-sm  { margin-bottom: var(--sp-sm); }
.mb-md  { margin-bottom: var(--sp-md); }
.mb-lg  { margin-bottom: var(--sp-lg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ----- Profile card ---------------------------------------- */
.profile-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.profile-card__portrait {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  object-position: center 32%;
}
.profile-card__name { font-size: 1.2rem; }
.profile-card__role {
  font-size: 0.85rem;
  color: var(--brand-accent);
  font-weight: 500;
  margin: 0;
}
.profile-card__links {
  gap: 12px;
  margin-top: 4px;
}
.profile-card__links a {
  font-size: 0.85rem;
  color: var(--brand-muted);
}

/* ----- Legal page ------------------------------------------ */
.legal-page {
  max-width: 780px;
  margin-inline: auto;
}
.legal-updated {
  font-size: 0.9rem;
  color: var(--brand-muted);
}
.legal-divider { margin: 2rem 0; }
.legal-page address {
  color: var(--brand-muted);
  font-style: normal;
  font-weight: 500;
}

/* ----- Step headings --------------------------------------- */
.step-title { font-size: 1.1rem; }
.step-desc { font-size: 0.92rem; }

/* ----- Card compact text ----------------------------------- */
.card p.text-card { max-width: none; }
.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}


.grid-3 h3 {margin-bottom: 15px;}

/* ----- Hero (showcase-led) --------------------------------- */
.hero--showcase {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  overflow: clip;
  background: var(--surface-wash), var(--brand-surface);
}
.hero__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, color-mix(in srgb, var(--brand-accent) 12%, transparent), transparent 70%);
  opacity: 0.9;
}
.hero__atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Copy sits above the stage, left edge aligned with the window below it */
.hero__lede {
  position: relative;
  max-width: 81.25rem;
  margin-inline: auto;
  padding-inline: var(--sp-md);
  text-align: left;
}
.hero--showcase h1 {
  max-width: 20ch;
  margin-inline: 0;
}
.hero__lead {
  margin-inline: 0;
  margin-top: 0.85rem;
  max-width: 48ch;
}
.hero__actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.hero__trial {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-top: 1rem;
}
.hero__trial-note { font-size: 0.82rem; }
.trial-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--brand-link);
  text-decoration: none !important;
  transition: color var(--transition);
}
.trial-link__label {
  position: relative;
  padding-bottom: 2px;
}
.trial-link__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--motion-ease);
}
.trial-link:hover,
.trial-link:focus-visible {
  color: var(--brand-primary);
}
.trial-link:hover .trial-link__label::after,
.trial-link:focus-visible .trial-link__label::after {
  transform: scaleX(1);
}
.trial-link__arrow {
  transition: transform 280ms var(--motion-ease);
}
.trial-link:hover .trial-link__arrow,
.trial-link:focus-visible .trial-link__arrow {
  transform: translateX(3px);
}
@media (prefers-reduced-motion: reduce) {
  .trial-link__label::after,
  .trial-link__arrow { transition: none; }
}

/* Showcase stage — full-width row under the hero copy (cursor.com pattern).
   The wider stage renders the 1280px demo canvas at ~0.94x instead of ~0.75x. */
.container--stage {
  max-width: 1440px;
}
.hero__stage {
  position: relative;
  width: 100%;
  max-width: 1300px;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  /* Canvas band: square landscape backdrop the window sits inset on.
     The padding is the inset — the strip pills sit in the top gap, the
     window fills the content box. */
  border-radius: 0;
  padding: clamp(0.75rem, 3vw, 2rem) clamp(1rem, 5.9vw, 6.7rem) clamp(1.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(
      120% 70% at 50% 0%,
      color-mix(in srgb, var(--brand-accent-lt) 38%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(
      130% 80% at 8% 100%,
      color-mix(in srgb, var(--brand-primary) 38%, transparent) 0%,
      transparent 55%
    ),
    radial-gradient(
      130% 80% at 92% 100%,
      color-mix(in srgb, var(--brand-accent) 30%, transparent) 0%,
      transparent 55%
    ),
    linear-gradient(
      180deg,
      var(--brand-surface) 0%,
      color-mix(in srgb, var(--brand-accent-lt) 14%, var(--brand-surface)) 55%,
      color-mix(in srgb, var(--brand-primary) 18%, var(--brand-surface)) 100%
    );
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--brand-ink) 8%, transparent),
    0 40px 80px -32px color-mix(in srgb, var(--brand-ink) 28%, transparent);
}
.hero__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__stage--entrance {
  animation: showcase-entrance 800ms var(--motion-ease) 500ms both;
}
@keyframes showcase-entrance {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Ambient pool behind the whole canvas band so it reads as lifted off the page */
.hero__stage::before {
  content: "";
  position: absolute;
  inset: 18% -5% -6%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 55%,
    color-mix(in srgb, var(--brand-primary) 20%, transparent),
    transparent 70%
  );
  filter: blur(50px);
  opacity: 0.42;
  pointer-events: none;
}
.showcase-carousel--hero {
  position: relative;
  z-index: 1; /* lift the window above the canvas grain overlay */
}
.showcase-carousel--hero .showcase-meta {
  padding-inline: 0;
}

/* ----- Feature list (non-card) ----------------------------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem) clamp(1.75rem, 4vw, 3rem);
}
.feature-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.15rem;
  align-items: start;
  padding-bottom: 0.25rem;
}
.feature-item__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-surface-2) 70%, var(--brand-accent));
  color: var(--brand-primary);
}
.feature-item__icon .material-symbols-outlined {
  font-size: 1.45rem;
}
.feature-item__body h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin-bottom: 0.35rem;
}
.feature-item__body p {
  margin-bottom: 0.55rem;
}
.feature-item__more {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-link);
  text-decoration: none !important;
  transition: color var(--transition);
}
.feature-item__more::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--motion-ease);
}
.feature-item__more:hover,
.feature-item__more:focus-visible {
  color: var(--brand-primary);
}
.feature-item__more:hover::after,
.feature-item__more:focus-visible::after {
  transform: scaleX(1);
}
.feature-item__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.35rem;
}
.feature-item__title-row h3 {
  margin-bottom: 0;
}
.feature-badge {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-accent);
}
@media (max-width: 700px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

/* ----- Roadmap layout ------------------------------------- */
.feature-list.roadmap-principles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roadmap-feedback-actions {
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .feature-list.roadmap-principles {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .roadmap-feedback-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .roadmap-feedback-actions .btn {
    width: 100%;
    white-space: normal;
  }
}

/* ----- Product feature visuals ---------------------------- */
.feature-visual-grid {
  container-type: inline-size;
  container-name: feature-visual-grid;
}
.feature-visual {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 2.5vw, 1.6rem) 0.65rem clamp(1.8rem, 3.5vw, 2.4rem);
}
/* Use the showcase's fade-and-rise entrance once this section reaches view. */
[data-reveal].reveal-pending .feature-visual--entrance {
  opacity: 0;
  transform: translateY(40px);
}
[data-reveal].is-revealed .feature-visual--entrance {
  animation: showcase-entrance 800ms var(--motion-ease) 500ms both;
}
/* ----- Photo hub: media and callouts animate in turn --------
   The figure itself stays static; its children carry the motion,
   so the section reads: photo lands first, chips pop one by one.
   Children have no separate hidden state: while reveal-pending the
   whole section is hidden, and on reveal the animations' backwards
   fill (fill-mode: both) holds each child at its from-state until
   its delay elapses. */
[data-reveal] .feature-visual--photo.feature-visual--entrance {
  opacity: 1;
  transform: none;
  animation: none;
}
/* Timing tokens — tune the whole sequence from one place. */
.feature-visual--photo {
  --photo-media-delay: 280ms;
  --photo-callout-delay: 780ms;
  --photo-callout-step: 200ms;
}
/* Sequence follows DOM order among callouts only (nth-child "of"
   syntax), so non-callout siblings — media, figcaption — can't
   shift the stagger if the markup changes. Browsers without "of"
   support fall back to --callout-order: 1 (chips pop together).
   To run chips in non-DOM order, set --callout-order inline on
   the callout (e.g. style="--callout-order: 2"). */
.feature-visual--photo .feature-callout:nth-child(1 of .feature-callout) { --callout-order: 1; }
.feature-visual--photo .feature-callout:nth-child(2 of .feature-callout) { --callout-order: 2; }
.feature-visual--photo .feature-callout:nth-child(3 of .feature-callout) { --callout-order: 3; }
/* Extra callouts keep the rhythm instead of snapping in at 0ms. */
.feature-visual--photo .feature-callout:nth-child(n+4 of .feature-callout) { --callout-order: 4; }
[data-reveal].is-revealed .feature-visual--photo .feature-visual__media {
  animation: feature-media-in 700ms var(--motion-ease) var(--photo-media-delay) both;
}
[data-reveal].is-revealed .feature-visual--photo .feature-callout {
  animation: feature-callout-in 480ms var(--motion-ease) both;
  animation-delay: calc(
    var(--photo-callout-delay)
    + (var(--callout-order, 1) - 1) * var(--photo-callout-step)
  );
}
/* Gentler rise than showcase-entrance (40px) — the parent section
   already rises 18px on reveal, so the combined motion stays calm. */
@keyframes feature-media-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes feature-callout-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.feature-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 4%;
  bottom: 4%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-accent) 18%, transparent);
  filter: blur(34px);
}
.feature-visual__frame {
  /* Modern app-window chrome — same --app-window-* tokens as the hero stage.
     overflow: clip keeps the inner screen/toolbar from painting over the
     rounded border corners. */
  position: relative;
  z-index: 1;
  border: 1px solid var(--app-window-border);
  border-radius: var(--app-window-radius);
  background: var(--brand-surface);
  box-shadow: var(--app-window-shadow);
  overflow: hidden;
  overflow: clip;
}
.feature-visual__inner {
  border-radius: var(--app-window-screen-radius);
  overflow: hidden;
  background: var(--brand-surface);
}
.feature-visual__toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-primary) 88%, black);
  background: var(--brand-primary);
  color: color-mix(in srgb, var(--brand-surface) 82%, transparent);
}
.feature-visual__traffic-lights {
  display: inline-flex;
  gap: 0.3rem;
  justify-self: start;
}
.feature-visual__traffic-lights span {
  width: 0.47rem;
  height: 0.47rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-surface) 28%, transparent);
}
.feature-visual__traffic-lights span:first-child {
  background: color-mix(in srgb, #a85a47 70%, var(--brand-surface));
}
.feature-visual__traffic-lights span:nth-child(2) {
  background: color-mix(in srgb, var(--brand-accent) 72%, var(--brand-surface));
}
.feature-visual__traffic-lights span:last-child {
  background: color-mix(in srgb, var(--brand-surface) 55%, transparent);
}
.feature-visual__toolbar-title {
  justify-self: center;
  color: var(--brand-surface);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.feature-visual__screen {
  overflow: hidden;
  aspect-ratio: 1600 / 1076;
  background: #f7f2e9;
}
.feature-visual__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Portal mocks have their own image sizing — do not force screen-fill. */
.feature-visual__screen--portal img {
  width: auto;
  height: auto;
  object-fit: unset;
  max-width: none;
}
/* Photo hub (Archive): object image without device chrome */
.feature-visual--photo {
  padding: clamp(0.75rem, 2vw, 1.25rem) 0.65rem clamp(1.6rem, 3vw, 2.1rem);
}
.feature-visual__media {
  position: relative;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 1600 / 1076;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--brand-border) 70%, transparent);
  background: var(--brand-surface-2);
  box-shadow:
    0 18px 36px rgba(28, 28, 26, 0.18),
    0 44px 90px rgba(28, 28, 26, 0.14);
}
.feature-visual--photo .feature-visual__media {
  width: min(100%, 29rem);
  margin-inline: auto;
}
/* Keep the handshake in frame when the landscape photo is cropped to the hub ratio */
.feature-visual--people .feature-visual__media img {
  object-position: center 58%;
}
.feature-visual__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Fluid variant: fill the column (no 29rem cap). Fixed height so
   narrowing the column cover-crops left/right instead of shrinking
   the whole photo; reset to the photo’s ratio when the grid stacks. */
.feature-visual--fluid .feature-visual__media {
  width: 100%;
  aspect-ratio: auto;
  height: 23rem;
}
@media (max-width: 600px) {
  .feature-visual--fluid .feature-visual__media {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}
/* Fluid-photo callouts: scale with the figure (cqi) so they track
   column width the same way the photo does. Stay inset so absolute
   chips cannot widen the page past the sticky header. */
.feature-visual--fluid .feature-callout {
  min-width: 0;
  width: max-content;
  max-width: calc(100% - 2 * clamp(0.4rem, 3.5cqi, 0.75rem));
  padding: clamp(0.45rem, 2.8cqi, 0.75rem) clamp(0.55rem, 3.2cqi, 0.85rem);
  border-radius: clamp(0.55rem, 3cqi, 0.85rem);
}
.feature-visual--fluid .feature-callout--bottom-start {
  left: auto;
  right: clamp(0.4rem, 3.5cqi, 0.75rem);
  bottom: clamp(0.45rem, 3cqi, 0.65rem);
}
.feature-visual--fluid .feature-callout__copy {
  min-width: 0;
  max-width: 100%;
}
.feature-visual--fluid .feature-callout__copy small,
.feature-visual--fluid .feature-callout__copy strong {
  white-space: normal;
  overflow-wrap: anywhere;
}
.feature-visual--fluid .feature-callout__copy small {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: clamp(0.5rem, 2.35cqi, 0.61rem);
}
.feature-visual--fluid .feature-callout__copy strong {
  font-size: clamp(0.78rem, 4.1cqi, 0.9rem);
}
.feature-visual--fluid .feature-callout__copy small .material-symbols-outlined {
  font-size: 0.85rem;
  line-height: 1;
}
.feature-callout {
  position: absolute;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  min-width: 10.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--brand-border) 75%, transparent);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--brand-surface) 91%, transparent);
  box-shadow:
    0 14px 30px rgba(42, 59, 46, 0.16),
    0 2px 6px rgba(42, 59, 46, 0.08);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.feature-visual--photo .feature-callout {
  background: color-mix(in srgb, var(--brand-surface) 74%, transparent);
  border-color: color-mix(in srgb, var(--brand-border) 55%, transparent);
}
.feature-callout--bottom-start {
  left: -0.55rem;
  bottom: -0.5rem;
}
.feature-callout--top-start {
  top: -0.15rem;
  left: -0.1rem;
}
.feature-callout--top-end {
  top: -0.15rem;
  right: -0.1rem;
}
.feature-callout--middle-end {
  top: 63.6%;
  right: -2.05rem;
}
.feature-callout--middle-start {
  top: 48%;
  left: -0.55rem;
}

/* Document Library: desk photo + floating Custodia list window */
.feature-visual--docs {
  --photo-float-delay: 520ms;
}
.feature-visual--docs .feature-visual__float {
  position: absolute;
  z-index: 3;
  right: -0.35rem;
  bottom: 0.05rem;
  width: min(54%, 19.5rem);
  container-type: inline-size;
  pointer-events: none;
  /* Hidden until hub photo is ready — do not use !important opacity
     (it overrides the entrance animation and shows the float early). */
  opacity: 0;
}
.feature-visual--docs .feature-visual__float .feature-visual__frame {
  width: 100%;
}
.feature-visual--docs .feature-visual__toolbar {
  min-height: 1.55rem;
  padding: 0.28rem 0.55rem;
}
.feature-visual--docs .feature-visual__toolbar-title {
  font-size: 0.6rem;
}
.feature-visual--docs .feature-visual__traffic-lights span {
  width: 0.38rem;
  height: 0.38rem;
}
.feature-visual--docs .feature-visual__screen--docs {
  position: relative;
  aspect-ratio: 16 / 11;
  display: block;
  background: #f8f4ee;
  overflow: hidden;
  container-type: inline-size;
}
/* Float only after section reveal AND hub desk image has loaded. */
[data-reveal].is-revealed .feature-visual--docs.is-hub-ready .feature-visual__float {
  animation: feature-docs-float-in 560ms var(--motion-ease) var(--photo-float-delay) both;
}
@keyframes feature-docs-float-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 0.97;
    transform: translateY(0) scale(1);
  }
}

.feature-callout__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.1rem;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--brand-accent) 17%, var(--brand-surface));
  color: var(--brand-accent);
}
.feature-callout__icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.feature-callout__icon .material-symbols-outlined {
  font-size: 1.15rem;
}
.feature-callout__status-dot {
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.32rem;
  border: 2px solid var(--brand-surface);
  border-radius: 50%;
  background: #4f7658;
  box-shadow: 0 0 0 1px color-mix(in srgb, #4f7658 34%, transparent);
}
.feature-callout__status-dot--fair {
  background: #b0893d;
  box-shadow: 0 0 0 1px color-mix(in srgb, #b0893d 34%, transparent);
}
.feature-callout__status-dot--in-progress {
  background: #3d6b8a;
  box-shadow: 0 0 0 1px color-mix(in srgb, #3d6b8a 34%, transparent);
}
.feature-callout__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.feature-callout__copy small {
  margin-bottom: 0.2rem;
  color: var(--brand-muted);
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.feature-callout__copy strong {
  color: var(--brand-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}
.feature-callout__copy > span {
  margin-top: 0.15rem;
  color: var(--brand-muted);
  font-size: 0.7rem;
}

@media (max-width: 860px) {
  .feature-visual-grid {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }
  .feature-visual-grid .stack {
    max-width: 42rem;
  }
  .feature-visual-grid .feature-visual {
    width: min(100%, 42rem);
    margin-inline: auto;
  }
}

@container feature-visual-grid (max-width: 31rem) {
  .feature-visual {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0.75rem 0.2rem 1rem;
  }
  .feature-visual__frame {
    grid-column: 1 / -1;
  }
  .feature-visual__media {
    grid-column: 1 / -1;
  }
  .feature-visual--docs .feature-visual__float {
    position: relative;
    inset: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    grid-column: 1 / -1;
    order: 1;
  }
  .feature-visual--docs .feature-visual__media {
    order: 0;
  }
  .feature-visual__toolbar {
    grid-template-columns: auto 1fr;
  }
  .feature-visual__toolbar-title {
    justify-self: end;
  }
  .feature-callout {
    position: relative;
    inset: auto;
    min-width: 0;
    padding: 0.7rem;
    box-shadow: 0 8px 20px rgba(42, 59, 46, 0.11);
  }
  .feature-visual--photo .feature-callout:last-of-type {
    grid-column: 1 / -1;
  }
}

@container feature-visual-grid (max-width: 22rem) {
  .feature-visual {
    grid-template-columns: 1fr;
  }
  .feature-callout {
    grid-template-columns: auto 1fr;
  }
}

/* ----- Atmosphere panels (inner pages) --------------------- */
.atmosphere-panel {
  min-height: 280px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--brand-border) 80%, transparent);
  background:
    radial-gradient(120% 90% at 10% 0%, color-mix(in srgb, var(--brand-accent) 16%, transparent), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, color-mix(in srgb, var(--brand-primary) 12%, transparent), transparent 50%),
    var(--brand-surface-2);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem 1.4rem;
}
.atmosphere-panel--tall { min-height: 360px; }
.atmosphere-panel--medium { min-height: 320px; }
.atmosphere-panel--hero { min-height: 380px; }
.atmosphere-panel--avatar {
  width: 120px;
  height: 120px;
  min-height: 0;
  border-radius: 50%;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.atmosphere-panel__label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brand-primary);
  margin: 0;
}
.atmosphere-panel--card {
  min-height: 160px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 1px solid var(--brand-border);
}

/* Archive Portal: window chrome fills the atmosphere placeholder column */
.feature-visual--portal {
  width: 100%;
  margin: 0;
  padding: 0;
  min-width: 0;
  align-self: stretch;
  /* Same as docs float — bezel cqi resolves against this chrome width */
  container-type: inline-size;
}
.feature-visual--portal .feature-visual__frame {
  width: 100%;
}
.feature-visual--portal .feature-visual__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--brand-teal);
  border-radius: var(--app-window-screen-radius);
  overflow: hidden;
}
.feature-visual--portal .feature-visual__toolbar {
  flex: 0 0 auto;
  min-height: 1.85rem;
  padding: 0.35rem 0.65rem;
}
.feature-visual--portal .feature-visual__toolbar-title {
  font-size: 0.65rem;
}
.feature-visual--portal .feature-visual__traffic-lights span {
  width: 0.4rem;
  height: 0.4rem;
}
/* Atmosphere-sized screen: full column width; aspect matches mock canvas (720×500)
   so JS scale fills the chrome with no letterboxing. */
.feature-visual--portal .feature-visual__screen--portal {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 500;
  min-height: 0;
  overflow: hidden;
  background: var(--brand-teal); /* match portal header — hides subpixel gaps under toolbar */
  container-type: size;
}
.portal-mock-carousel__slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 420ms var(--motion-ease), visibility 420ms var(--motion-ease);
  pointer-events: none;
  /* Nested size container so each slide is the scale reference. */
  container-type: size;
}
.portal-mock-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.portal-mock-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  pointer-events: auto;
}
.portal-mock-carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-primary) 28%, transparent);
  cursor: pointer;
}
.portal-mock-carousel__dot.is-active {
  background: var(--brand-accent);
}
.portal-mock-carousel__dot:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .portal-mock-carousel__slide {
    transition: none;
  }
}

/* ----- Motion ---------------------------------------------- */
[data-reveal].reveal-pending:not(.is-revealed) {
  opacity: 0;
  transform: translateY(18px);
}
[data-reveal] {
  transition:
    opacity var(--motion-duration) var(--motion-ease),
    transform var(--motion-duration) var(--motion-ease);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal],
  [data-reveal].reveal-pending {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__stage--entrance,
  .pricing-plans--entrance {
    animation: none;
  }
  [data-reveal].reveal-pending .feature-visual--entrance,
  [data-reveal].is-revealed .feature-visual--entrance,
  [data-reveal].is-revealed .feature-visual--photo .feature-visual__media,
  [data-reveal].is-revealed .feature-visual--photo .feature-callout {
    animation: none;
    opacity: 1;
    transform: none;
  }
  [data-reveal].is-revealed .feature-visual--docs.is-hub-ready .feature-visual__float {
    animation: none;
    opacity: 0.97;
    transform: none;
  }
  .showcase-slide {
    transition: none;
    animation: none;
  }
  .showcase-strip__thumb {
    transition: none !important;
  }
  .showcase-chip.is-active .showcase-chip__progress {
    animation: none;
    transform: scaleX(0);
  }
  .nav-panel {
    transition: none;
  }
}


code {
    font-size: 1.2rem;
}
