/* ============================================================
   Tavina Heritage — components (th- prefixed to avoid Astra collisions)
   Spec: docs/DESIGN.md · Mockup source: design/mockups/homepage.html
   ============================================================ */

html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--tav-font-body);
  background: var(--tav-canvas);
  color: var(--tav-ink);
  line-height: 1.55;
}
/* Fine paper grain — kills the flat template look at ~2.5% opacity */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 1000; opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.th-wrap { max-width: var(--tav-wrap); margin: 0 auto; padding: 0 var(--tav-wrap-pad); }

/* ── Header: translucent, blurred, shadow after scroll ── */
.th-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--tav-canvas) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--tav-dur), box-shadow var(--tav-dur);
}
/* Header content rides the same rails as the page body (contained),
   while the bar itself (blur, hairline, background) stays full-bleed. */
.th-header-inner {
  max-width: var(--tav-wrap); margin: 0 auto;
  padding: 14px var(--tav-wrap-pad);
  display: flex; align-items: center; justify-content: space-between;
}
.th-header.is-scrolled { border-bottom-color: var(--tav-line); box-shadow: 0 1px 12px rgba(var(--tav-shadow-tint), .06); }
.th-wordmark { font-family: var(--tav-font-display); font-weight: 700; font-size: 2rem; color: var(--tav-ink); text-decoration: none; }
.th-nav { display: flex; gap: 28px; align-items: center; }
.th-nav a.th-navlink {
  font-size: .95rem; font-weight: 500; color: var(--tav-ink-soft); text-decoration: none;
  transition: color var(--tav-dur) var(--tav-ease-out);
}
.th-nav a.th-navlink:hover { color: var(--tav-primary); }
.th-nav-list { display: flex; gap: 28px; align-items: center; list-style: none; margin: 0; padding: 0; }
.th-nav-list a { font-size: .95rem; font-weight: 500; color: var(--tav-ink-soft); text-decoration: none; transition: color var(--tav-dur) var(--tav-ease-out); }
.th-nav-list a:hover { color: var(--tav-primary); }
@media (max-width: 960px) { .th-nav-list { display: none; } }

/* ── Standard pages (Features / Use Cases / Reviews / Pricing / Contact) ── */
.th-page-hero { padding: 72px 0 8px; max-width: 44rem; }
.th-page-hero h1 { font-family: var(--tav-font-display); font-weight: 700; font-size: clamp(2.8rem, 5vw, 3.8rem); line-height: 1.05; margin-bottom: 16px; }
.th-page-hero p { font-size: 1.12rem; color: var(--tav-ink-soft); }
.th-cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 960px) { .th-cards-2 { grid-template-columns: 1fr; } }
.th-steps-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 960px) { .th-steps-2 { grid-template-columns: 1fr; } }
.th-quote-card blockquote { font-family: var(--tav-font-display); font-weight: 600; font-size: 1.7rem; line-height: 1.25; color: var(--tav-ink); margin: 0 0 12px; }
.th-quote-card .th-quote-by { font-size: .88rem; color: var(--tav-muted); font-weight: 600; }
.th-contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: start; }
@media (max-width: 960px) { .th-contact-grid { grid-template-columns: 1fr; } }
.th-contact-form { background: var(--tav-surface); border-radius: var(--tav-radius-card); padding: 32px 30px; box-shadow: var(--tav-shadow-1); }
.th-field { margin-bottom: 18px; }
.th-field label { display: block; font-size: .82rem; font-weight: 600; color: var(--tav-ink-soft); margin: 0 0 6px 4px; }
.th-field input, .th-field textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--tav-line); border-radius: 13px;
  font-family: var(--tav-font-body); font-size: .95rem; background: var(--tav-surface); color: var(--tav-ink);
  transition: border-color var(--tav-dur), box-shadow var(--tav-dur); outline: none;
}
.th-field input:focus, .th-field textarea:focus { border-color: var(--tav-primary); box-shadow: 0 0 0 3.5px rgba(47, 93, 70, .13); }
.th-field textarea { min-height: 140px; resize: vertical; }
.th-contact-side .th-card { margin-bottom: 16px; }

/* ── Buttons ── */
.th-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--tav-font-body); font-weight: 600; font-size: .95rem;
  padding: 12px 24px; border-radius: var(--tav-radius-btn); border: none; cursor: pointer;
  text-decoration: none;
  transition: transform var(--tav-dur) var(--tav-ease-out), box-shadow var(--tav-dur) var(--tav-ease-out), background var(--tav-dur);
}
.th-btn-primary { background: var(--tav-primary); color: var(--tav-primary-ink); box-shadow: 0 2px 8px rgba(var(--tav-shadow-tint), .15); }
.th-btn-primary:hover { background: var(--tav-primary-hover); color: var(--tav-primary-ink); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(var(--tav-shadow-tint), .22); }
.th-btn-ghost { background: transparent; color: var(--tav-ink); border: 1.5px solid var(--tav-line); }
.th-btn-ghost:hover { border-color: var(--tav-muted); color: var(--tav-ink); transform: translateY(-2px); }
.th-btn-light { background: var(--tav-surface); color: var(--tav-primary); }
.th-btn-light:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); color: var(--tav-primary); }

/* ── Hero ── */
.th-hero {
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: center;
  padding: 88px 0 56px;
}
.th-eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tav-muted); margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.th-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--tav-accent); }
.th-hero h1, .th-h1 {
  font-family: var(--tav-font-display); font-weight: 700;
  font-size: clamp(3.2rem, 6vw, 4.6rem); line-height: 1.02; margin-bottom: 22px;
}
.th-swash { color: var(--tav-primary); position: relative; white-space: nowrap; }
.th-swash::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: .06em; height: .14em;
  background: var(--tav-accent); opacity: .5; border-radius: 99px; z-index: -1;
}
.th-lede { font-size: 1.16rem; color: var(--tav-ink-soft); max-width: 34rem; margin-bottom: 34px; }
.th-lede strong { color: var(--tav-ink); font-weight: 600; }
.th-cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.th-hero-note { font-size: .85rem; color: var(--tav-muted); display: flex; align-items: center; gap: 7px; }

/* Spokesmodel — the only pink pixel in the composition */
.th-muse {
  position: relative; aspect-ratio: 4 / 4.5; border-radius: 24px;
  background:
    radial-gradient(120% 100% at 80% 0%, var(--tav-accent-soft) 0%, transparent 55%),
    linear-gradient(160deg, var(--tav-surface) 0%, var(--tav-canvas) 100%);
  box-shadow: var(--tav-shadow-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; overflow: hidden;
}
.th-muse img { width: 100%; height: 100%; object-fit: cover; }
.th-muse .th-muse-ring {
  width: 58%; aspect-ratio: 1; border-radius: 50%; border: 5px solid #E8A2B8; /* her pink — exception by rule */
  background: linear-gradient(150deg, #F6D7E0, #EFB9C9);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tav-font-display); font-weight: 600; font-size: 1.5rem; color: #8C4A5E; text-align: center;
  box-shadow: 0 10px 30px rgba(232, 162, 184, .35);
}
.th-muse .th-muse-caption { font-size: .85rem; color: var(--tav-muted); font-weight: 500; }

/* ── Sections ── */
.th-section { padding: 72px 0; }
.th-sec-head { max-width: 44rem; margin-bottom: 44px; }
.th-sec-head h2 {
  font-family: var(--tav-font-display); font-weight: 700;
  font-size: clamp(2.4rem, 4.2vw, 3.2rem); line-height: 1.05; margin-bottom: 14px;
}
.th-sec-head h2 em { font-style: normal; color: var(--tav-primary); }
.th-sec-head p { font-size: 1.08rem; color: var(--tav-ink-soft); }

/* ── Cards (elevation + hover-lift) ── */
.th-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.th-card {
  background: var(--tav-surface); border-radius: var(--tav-radius-card);
  padding: 30px 28px; box-shadow: var(--tav-shadow-1);
  transition: transform var(--tav-dur) var(--tav-ease-out), box-shadow var(--tav-dur) var(--tav-ease-out);
}
.th-card:hover { transform: translateY(-4px); box-shadow: var(--tav-shadow-2); }
.th-card i[class^="ph"], .th-card i[class*=" ph"] { font-size: 2rem; color: var(--tav-primary); display: block; margin-bottom: 16px; }
.th-card h3 { font-family: var(--tav-font-display); font-weight: 600; font-size: 1.75rem; margin-bottom: 8px; }
.th-card p { font-size: .95rem; color: var(--tav-ink-soft); }

/* ── Demo band (chat) ── */
.th-demo {
  background: linear-gradient(160deg, var(--tav-accent-soft) 0%, var(--tav-canvas) 70%);
  border-radius: 28px; padding: 56px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.th-demo h2 { font-family: var(--tav-font-display); font-weight: 700; font-size: clamp(2.2rem, 3.6vw, 3rem); line-height: 1.05; margin-bottom: 16px; }
.th-demo p { color: var(--tav-ink-soft); font-size: 1.05rem; margin-bottom: 22px; }
.th-chat {
  background: var(--tav-surface); border-radius: 20px; box-shadow: var(--tav-shadow-2);
  padding: 26px; display: flex; flex-direction: column; gap: 14px;
}
.th-bubble { max-width: 85%; padding: 13px 17px; border-radius: 16px; font-size: .95rem; line-height: 1.45; }
.th-bubble-user { align-self: flex-end; background: var(--tav-primary); color: #fff; border-bottom-right-radius: 6px; }
.th-bubble-tavina { align-self: flex-start; background: var(--tav-canvas); border: 1px solid var(--tav-line); border-bottom-left-radius: 6px; }
.th-bubble-tavina .th-who { font-family: var(--tav-font-display); font-weight: 700; font-size: 1.2rem; color: var(--tav-primary); display: block; margin-bottom: 2px; }
.th-prompt {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--tav-line); border-radius: 99px;
  padding: 12px 18px; color: var(--tav-muted); font-size: .92rem; font-style: italic; background: var(--tav-surface);
}
.th-prompt i { color: var(--tav-primary); font-style: normal; }

/* ── Steps ── */
.th-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.th-step {
  background: var(--tav-surface); border-radius: var(--tav-radius-card);
  padding: 30px 28px; box-shadow: var(--tav-shadow-1);
  transition: transform var(--tav-dur) var(--tav-ease-out), box-shadow var(--tav-dur) var(--tav-ease-out);
}
.th-step:hover { transform: translateY(-4px); box-shadow: var(--tav-shadow-2); }
.th-step .th-num { font-family: var(--tav-font-display); font-weight: 700; font-size: 2.4rem; color: var(--tav-accent); line-height: 1; margin-bottom: 10px; }
.th-step h3 { font-family: var(--tav-font-display); font-weight: 600; font-size: 1.65rem; margin-bottom: 8px; }
.th-step p { font-size: .95rem; color: var(--tav-ink-soft); }

/* ── Anthem band ── */
.th-anthem {
  background: var(--tav-primary); color: #fff; border-radius: 28px;
  padding: 72px 56px; text-align: center; position: relative; overflow: hidden;
}
.th-anthem::before {
  content: ""; position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.th-anthem h2 {
  font-family: var(--tav-font-display); font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1.08; margin-bottom: 16px; position: relative;
}
.th-anthem p { font-size: 1.1rem; opacity: .88; max-width: 36rem; margin: 0 auto 30px; position: relative; }

/* ── Pricing ── */
.th-pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 26rem)); gap: 22px; justify-content: center; }
.th-price {
  background: var(--tav-surface); border-radius: 20px; padding: 36px 34px; box-shadow: var(--tav-shadow-1);
  transition: transform var(--tav-dur) var(--tav-ease-out), box-shadow var(--tav-dur) var(--tav-ease-out);
  display: flex; flex-direction: column; gap: 16px;
}
.th-price:hover { transform: translateY(-4px); box-shadow: var(--tav-shadow-2); }
.th-price-featured { outline: 2px solid var(--tav-primary); }
.th-price .th-tier { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tav-accent); }
.th-price h3 { font-family: var(--tav-font-display); font-weight: 700; font-size: 2.1rem; }
.th-price .th-amount { font-size: 2.6rem; font-weight: 700; letter-spacing: -.02em; }
.th-price .th-amount small { font-size: 1rem; font-weight: 500; color: var(--tav-muted); letter-spacing: 0; }
.th-price ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: .95rem; color: var(--tav-ink-soft); margin: 0; padding: 0; }
.th-price li { display: flex; gap: 10px; align-items: flex-start; }
.th-price li i { color: var(--tav-primary); margin-top: 3px; }
.th-price .th-btn { margin-top: auto; justify-content: center; }

/* ── Footer ── */
.th-footer { border-top: 1px solid var(--tav-line); padding: 44px var(--tav-wrap-pad) 56px; margin-top: 40px; }
.th-foot-grid { max-width: var(--tav-wrap); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.th-foot-brand { font-family: var(--tav-font-display); font-weight: 700; font-size: 1.8rem; }
.th-foot-tag { color: var(--tav-muted); font-size: .9rem; margin-top: 4px; }
.th-foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.th-foot-cols h4 { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tav-muted); margin-bottom: 12px; }
.th-foot-cols a { display: block; color: var(--tav-ink-soft); text-decoration: none; font-size: .92rem; margin-bottom: 8px; transition: color var(--tav-dur); }
.th-foot-cols a:hover { color: var(--tav-primary); }
.th-foot-legal {
  max-width: var(--tav-wrap); margin: 36px auto 0; padding-top: 20px;
  border-top: 1px solid var(--tav-line); font-size: .82rem; color: var(--tav-muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ── Entrance: single play, staggered ── */
.th-rise { opacity: 0; transform: translateY(12px); animation: th-rise .55s var(--tav-ease-out) forwards; }
.th-d1 { animation-delay: .08s; } .th-d2 { animation-delay: .16s; } .th-d3 { animation-delay: .24s; }
.th-d4 { animation-delay: .32s; } .th-d5 { animation-delay: .4s; } .th-d6 { animation-delay: .48s; }
@keyframes th-rise { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .th-rise { animation: none; opacity: 1; transform: none; }
  * { transition: none !important; }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .th-hero { grid-template-columns: 1fr; padding-top: 52px; }
  .th-cards, .th-steps { grid-template-columns: 1fr; }
  .th-demo { grid-template-columns: 1fr; padding: 36px 26px; }
  .th-pricing { grid-template-columns: minmax(0, 26rem); }
  .th-nav .th-navlink { display: none; }
  .th-anthem { padding: 52px 26px; }
}
