/* Shared layout/component primitives for both contours-please brands.
   Brand-specific colors/fonts/radii come from each site's own css/theme.css,
   which must be linked BEFORE this file (this file only ever references the
   custom properties, never sets brand values itself). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Visually hidden but still reachable by screen readers — for real <label>
   elements on inputs whose visible cue is a placeholder, not label text. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 72rem; /* 6xl */
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

.font-display {
  font-family: var(--font-display);
}
.font-mono {
  font-family: var(--font-data);
}

@keyframes contour-field-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.site-nav__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav__desktop {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
@media (min-width: 768px) {
  .site-nav__desktop {
    display: flex;
  }
  .site-nav__mobile {
    display: none;
  }
}

.site-nav__link {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s var(--ease, ease);
}
.site-nav__link:hover {
  color: var(--ink);
}

.site-nav__mobile {
  position: relative;
}
.site-nav__mobile summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
}
.site-nav__mobile summary::-webkit-details-marker {
  display: none;
}
.site-nav__mobile[open] summary {
  background: var(--bg-elevated);
}
.site-nav__mobile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 12rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.site-nav__mobile-menu a {
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius-card) - 1px);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.site-nav__mobile-menu a:hover {
  background: var(--bg);
}

/* ---------------------------------------------------------------- buttons */
.btn[hidden] {
  /* inline-flex below would otherwise beat the hidden attribute's UA
     display:none — account.html relies on hidden for plan-conditional
     buttons. */
  display: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* justify-content centers the label box, but once a label wraps (the
     pricing cards' "Join the waitlist" at narrow card widths) the lines
     inside that box are text-aligned, not flex-aligned. */
  text-align: center;
  gap: 0.5rem;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.65rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease, ease), box-shadow 0.15s var(--ease, ease), background 0.15s var(--ease, ease);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 6rem;
}
.hero__eyebrow {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero__headline {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  margin-top: 0.75rem;
  max-width: 38rem;
}
.hero__subhead {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-muted);
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.hero__field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 1;
}
.hero__field svg path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- disclaimer */
.disclaimer-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.disclaimer-banner strong {
  color: var(--ink);
}

/* ---------------------------------------------------------------- section divider */
.section-divider {
  padding: 2.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink-muted);
}
.section-divider__line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-divider__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------- pitch grid */
.pitch-grid {
  padding: 3rem 0;
}
.section-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 2rem;
}
.pitch-grid__list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .pitch-grid__list {
    grid-template-columns: repeat(3, 1fr);
  }
}
.pitch-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: background 0.15s var(--ease, ease);
}
@media (hover: hover) {
  .pitch-card:hover {
    background: var(--bg-elevated);
  }
}
.pitch-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.pitch-card__body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------- coverage strip */
.coverage-strip {
  padding: 3rem 0;
}
.coverage-strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.coverage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-elevated);
}
.coverage-badge svg {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--accent);
}

/* ---------------------------------------------------------------- pricing */
.pricing-table {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .pricing-table {
    grid-template-columns: repeat(3, 1fr);
  }
}
.pricing-card {
  position: relative;
  overflow: hidden;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-elevated);
}
.pricing-card--highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.pricing-card__ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 2.5rem 2.5rem 0;
  border-color: transparent var(--accent) transparent transparent;
}
.pricing-card__ribbon svg {
  position: absolute;
  top: 0.35rem;
  right: -2.15rem;
  width: 0.75rem;
  height: 0.75rem;
  color: var(--accent-ink);
}
.pricing-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.pricing-card__price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.25rem;
}
.pricing-card__cadence {
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.pricing-card__description {
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.pricing-card__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
}
.pricing-card__features svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  color: var(--accent);
}

/* ---------------------------------------------------------------- closing cta */
.closing-cta {
  padding: 4rem 0;
  text-align: center;
}
.closing-cta__inner {
  background: var(--bg-inverse);
  color: var(--on-inverse);
  border-radius: var(--radius-card);
  padding: 3.5rem 2rem;
}
.closing-cta__heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}
.closing-cta__body {
  margin-top: 0.75rem;
  color: var(--on-inverse-muted);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}
.closing-cta__actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-footer__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
}
.site-footer__tagline {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.site-footer__nav a {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.site-footer__nav a:hover {
  color: var(--ink);
}
.site-footer__legal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* ---------------------------------------------------------------- title block (contours.cc only) */
.title-block {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-data);
  font-size: 0.65rem;
  color: var(--ink-muted);
  display: none;
}
@media (min-width: 900px) {
  .title-block {
    display: block;
  }
}
.title-block__sheet {
  font-weight: 700;
  color: var(--ink);
}
.title-block__section {
  opacity: 0.5;
}
.title-block__section--active {
  opacity: 1;
  color: var(--accent);
}

/* ---------------------------------------------------------------- pricing hero-lite (pricing.html) */
.pricing-hero {
  padding: 4rem 0 2rem;
}
.pricing-hero__eyebrow {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.pricing-hero__headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 0.75rem;
}

/* ---------------------------------------------------------------- form fields (login/signup/account) */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}
.form-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.form-field input {
  padding: 0.65rem 0.85rem;
  border-radius: calc(var(--radius-card) - 1px);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.92rem;
  font-family: var(--font-body);
}
.form-field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-error {
  font-size: 0.85rem;
  color: var(--error);
  min-height: 1.2em;
}
.form-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
}
.form-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.45;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---------------------------------------------------------------- auth (login/signup) */
.auth-shell {
  max-width: 26rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
}
.auth-card {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
}
.auth-card h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.auth-card__subhead {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1.75rem;
}
.auth-card .btn {
  width: 100%;
  margin-top: 0.25rem;
}
.auth-card__footer {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
}
.auth-card__footer a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

/* ---------------------------------------------------------------- account dashboard */
.account-shell {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.account-card {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
}
.account-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.account-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.account-stat-row:last-child {
  border-bottom: none;
}
.account-stat-row dt {
  color: var(--ink-muted);
  margin: 0;
}
.account-stat-row dd {
  margin: 0;
  font-weight: 700;
  font-family: var(--font-data);
}
.account-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* ---------------------------------------------------------------- sample grid (samples.html, both brands) */
.sample-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .sample-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .sample-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.sample-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.5rem;
}
.sample-card__format {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.sample-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.35rem;
}
.sample-card__actions .btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
}

/* Nav auth state — logged-out (Log in/Sign up) vs logged-in (account link +
   pulls-remaining chip) elements are both always in the markup, on both the
   full .site-nav header and tool.html's minimal .tool-header; auth.js's
   mountNavAuthState() toggles which set is visible after checking
   /api/auth/me, always setting a real display value both ways (never
   clearing to "" and relying on cascade fallback). The doubled attribute
   selector is a specificity bump (0-2-0), not a typo — some of these
   elements also carry .btn (0-1-0), which sets its own display; without
   this, source order alone would decide which rule won, and this one needs
   to reliably win by default (before JS has run) regardless of ancestor. */
[data-nav-auth][data-nav-auth] {
  display: none;
}
.nav-pulls-chip {
  font-family: var(--font-data);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  white-space: nowrap;
}
