:root {
  --paper: #FAF6F0;
  --paper-2: #F2EDE3;
  --ink: #1A1A1A;
  --ink-2: #4A4A4A;
  --ink-3: #8A8478;
  --sage: #2F6B4A;
  --sage-deep: #224D37;
  --sage-soft: #E8EFE8;
  --ochre: #C89555;
  --ochre-soft: #F3E6D0;
  --terracotta: #B8654A;
  --terracotta-soft: #F7E4DE;
  --line: #E5DFD4;

  --serif: 'Fraunces', 'Iowan Old Style', 'Georgia', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(2rem, 4.2vw, 3rem);
  --fs-xxl: clamp(2.5rem, 6.5vw, 4.5rem);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(26,26,26,0.06);
  --shadow-md: 0 12px 32px rgba(26,26,26,0.08);
  --shadow-lg: 0 24px 60px rgba(26,26,26,0.12);
  --shadow-sage: 0 18px 40px rgba(47,107,74,0.18);

  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);

  --content: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(200, 149, 85, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 88% 62%, rgba(47, 107, 74, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; color: var(--sage); }

p { margin: 0; }
a { color: var(--sage-deep); text-decoration-color: rgba(47,107,74,0.3); text-underline-offset: 3px; transition: var(--transition); }
a:hover { text-decoration-color: var(--sage); }

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

.container { max-width: var(--content); margin: 0 auto; padding: 0 1.25rem; }

.skip { position: absolute; top: -40px; left: 1rem; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; border-radius: var(--radius-sm); z-index: 100; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 1rem; }

/* NAV */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 240, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  transition: box-shadow var(--transition), background var(--transition);
  border-bottom: 1px solid transparent;
}
.nav-wrap.is-scrolled {
  background: rgba(250, 246, 240, 0.93);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; gap: 2rem; }

.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-size: var(--fs-md); font-weight: 500; letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sage); color: var(--paper);
  font-family: var(--serif); font-weight: 700; font-size: 0.85rem; letter-spacing: -0.04em;
  transform: rotate(-4deg);
  transition: transform var(--transition);
}
.brand:hover .brand-mark { transform: rotate(0); }
.brand-name em { font-style: italic; color: var(--sage); font-weight: 500; }

.nav-links { display: none; align-items: center; gap: 1.5rem; }
.nav-links a { font-size: var(--fs-sm); text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink); color: var(--paper) !important;
  padding: 0.55rem 1.05rem; border-radius: 999px;
  font-weight: 500; transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: var(--sage-deep); transform: translateY(-1px); }

@media (min-width: 760px) { .nav-links { display: flex; } }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.8rem; border-radius: 999px;
  font-family: var(--sans); font-size: var(--fs-base); font-weight: 500;
  text-decoration: none; border: none; cursor: pointer;
  transition: all var(--transition);
  font-variant-ligatures: none;
}
.btn:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.btn--primary { background: var(--sage); color: var(--paper); box-shadow: var(--shadow-sage); }
.btn--primary:hover { background: var(--sage-deep); transform: translateY(-1px); box-shadow: 0 22px 50px rgba(47,107,74,0.25); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--paper-2); border-color: var(--ink-3); }
.btn--ghost-sage { background: transparent; color: var(--sage-deep); border: 1px solid var(--sage-soft); }
.btn--ghost-sage:hover { background: var(--sage-soft); border-color: var(--sage); }
.btn--block { width: 100%; }
.btn--lg { padding: 1.05rem 1.8rem; font-size: var(--fs-md); }
.btn:disabled { opacity: 0.7; cursor: wait; }

/* SECTION PRIMITIVES */
section { padding: 4.5rem 0; }
.section-title { font-size: var(--fs-xl); margin-bottom: 1rem; max-width: 22ch; font-weight: 500; }
.kicker {
  font-family: var(--sans); font-size: var(--fs-sm); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--sage); margin-bottom: 1rem;
}
.kicker--warm { color: var(--terracotta); }

@media (min-width: 760px) { section { padding: 6rem 0; } }

/* HERO */
.hero { padding: 4rem 0 5.5rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: var(--fs-xxl); margin-bottom: 1.5rem; font-weight: 500; }
.lead { font-size: var(--fs-md); color: var(--ink-2); max-width: 36ch; margin-bottom: 2rem; line-height: 1.5; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.hero-note { font-size: var(--fs-sm); color: var(--ink-3); }
.hero-note strong { color: var(--ink-2); font-weight: 600; }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-visual svg { width: 100%; max-width: 340px; }

@media (min-width: 900px) {
  .hero { padding: 6rem 0 8rem; }
  .hero-grid { grid-template-columns: 1.2fr 0.9fr; gap: 4rem; }
}

/* PAIN */
.pain { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pain .section-title { margin-bottom: 2.5rem; }
.pain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.pain-list li {
  font-family: var(--serif); font-style: italic;
  font-size: var(--fs-lg); line-height: 1.4;
  color: var(--ink-2);
  padding: 1.1rem 0 1.1rem 1.5rem;
  border-left: 3px solid var(--terracotta);
}
.pain-list li em { color: var(--ink); font-style: normal; font-weight: 500; }

@media (min-width: 760px) {
  .pain-list { grid-template-columns: 1fr 1fr; gap: 0.75rem 3rem; }
}

/* STEPS */
.steps .section-title { margin-bottom: 3rem; }
.step-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.5rem; }
.step-list li { position: relative; padding-left: 3.75rem; }
.step-num {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--paper); color: var(--sage);
  border: 1.5px solid var(--sage);
  font-family: var(--serif); font-weight: 500; font-size: var(--fs-lg);
}
.step-list h3 { font-size: var(--fs-lg); margin-bottom: 0.5rem; font-weight: 500; }
.step-list p { color: var(--ink-2); max-width: 36ch; }

@media (min-width: 900px) {
  .step-list { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .step-list li { padding-left: 0; padding-top: 3.75rem; }
}

/* PRICING */
.pricing { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.pricing .section-title { margin-bottom: 0.75rem; }
.pricing-lead { color: var(--ink-2); margin-bottom: 3rem; max-width: 44ch; }
.plans { display: grid; gap: 1.5rem; margin-bottom: 2rem; align-items: stretch; }
.plan {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.plan-head { margin-bottom: 1.5rem; }
.plan h3 { font-size: var(--fs-xl); margin-bottom: 0.25rem; font-weight: 500; line-height: 1.1; }
.plan-tagline { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: var(--fs-base); }
.price { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 1.75rem; }
.price-num { font-family: var(--serif); font-size: 3.25rem; font-weight: 500; color: var(--ink); line-height: 1; }
.price-unit { font-family: var(--sans); font-size: var(--fs-sm); color: var(--ink-3); }
.plan-features { list-style: none; padding: 0; margin: 0 0 1.75rem; flex: 1; }
.plan-features li {
  padding: 0.7rem 0 0.7rem 1.9rem;
  border-top: 1px solid var(--line);
  position: relative; font-size: var(--fs-sm);
  color: var(--ink-2); line-height: 1.45;
}
.plan-features li:first-child { border-top: none; }
.plan-features li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1.1rem; height: 1.1rem; margin-top: -0.55rem; border-radius: 50%;
  background-color: var(--sage-soft);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 8.5L6.5 11L12 5.5' stroke='%232F6B4A' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 0.8rem; background-position: center; background-repeat: no-repeat;
}

.plan--featured {
  background: linear-gradient(160deg, var(--sage) 0%, var(--sage-deep) 100%);
  color: var(--paper);
  box-shadow: var(--shadow-sage);
  border-color: transparent;
}
.plan--featured:hover { transform: translateY(-6px); box-shadow: 0 32px 68px rgba(34, 77, 55, 0.32); }
.plan--featured h3 { color: var(--paper); }
.plan--featured .plan-tagline { color: rgba(250, 246, 240, 0.88); }
.plan--featured .price-num { color: var(--paper); }
.plan--featured .price-unit { color: rgba(250, 246, 240, 0.78); }
.plan--featured .plan-features li { color: rgba(250, 246, 240, 0.92); border-top-color: rgba(250, 246, 240, 0.15); }
.plan--featured .plan-features li::before {
  background-color: rgba(250,246,240,0.22);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 8.5L6.5 11L12 5.5' stroke='%23FAF6F0' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.plan--featured .btn--primary { background: var(--paper); color: var(--sage-deep); box-shadow: 0 12px 28px rgba(0,0,0,0.18); }
.plan--featured .btn--primary:hover { background: #FFFFFF; box-shadow: 0 18px 40px rgba(0,0,0,0.25); }

.plan-badge {
  position: absolute; top: -13px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--terracotta); color: var(--paper);
  font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.4rem 0.95rem; border-radius: 999px;
  box-shadow: 0 6px 14px rgba(184, 101, 74, 0.4);
}

.pricing-compare {
  font-family: var(--serif); font-style: italic;
  font-size: var(--fs-md); color: var(--ink-2);
  max-width: 58ch; line-height: 1.5;
}
.pricing-compare strong { color: var(--ink); font-style: normal; font-weight: 600; font-family: var(--sans); }
.pricing-note { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 0.5rem; }

@media (min-width: 900px) {
  .plans { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .plan { padding: 2.5rem 2rem; }
  .plan--featured { transform: translateY(-10px); }
  .plan--featured:hover { transform: translateY(-14px); }
}

/* VOICES */
.voices { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.voices .section-title { margin-bottom: 2.5rem; }
.quote-grid { display: grid; gap: 1.25rem; }
.quote {
  margin: 0; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.quote:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quote blockquote {
  font-family: var(--serif); font-size: var(--fs-md);
  line-height: 1.45; margin: 0; color: var(--ink);
  font-weight: 400; position: relative;
}
.quote blockquote::before {
  content: "\201C";
  display: block;
  font-family: var(--serif);
  color: var(--ochre);
  font-size: 3.25rem; line-height: 0.5;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.quote figcaption { display: flex; align-items: center; gap: 0.9rem; font-size: var(--fs-sm); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--avatar-c, var(--sage)); color: var(--paper);
  font-family: var(--serif); font-weight: 500;
  font-size: 0.9rem; letter-spacing: -0.02em;
  flex-shrink: 0;
}
.quote .who { display: flex; flex-direction: column; }
.quote .who strong { font-family: var(--sans); font-weight: 600; color: var(--ink); }
.quote .who small { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 2px; }

@media (min-width: 760px) {
  .quote-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

/* FAQ */
.faq-wrap { max-width: 760px; }
.faq .section-title { margin-bottom: 2.5rem; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); padding: 1.4rem 0; }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: flex-start;
  cursor: pointer;
  font-family: var(--serif); font-size: var(--fs-md); font-weight: 500;
  list-style: none; gap: 1rem; color: var(--ink);
  line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--serif); font-weight: 300;
  font-size: 1.75rem; color: var(--sage);
  transition: transform var(--transition);
  line-height: 1; flex-shrink: 0; margin-top: -4px;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p {
  margin-top: 0.9rem; color: var(--ink-2);
  font-size: var(--fs-base); line-height: 1.6;
  animation: fade-in 260ms ease-out;
}

/* FORM */
.form-section { background: linear-gradient(180deg, var(--paper) 0%, var(--ochre-soft) 100%); }
.form-wrap { max-width: 720px; }
.form-section .section-title { margin-bottom: 0.75rem; }
.form-lead { color: var(--ink-2); margin-bottom: 2.25rem; max-width: 52ch; font-size: var(--fs-md); }

#lead-form {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  box-shadow: 0 24px 60px rgba(26, 26, 26, 0.06);
}
.field-row { display: grid; gap: 1.1rem; margin-bottom: 1.1rem; }
label { display: block; font-size: var(--fs-sm); color: var(--ink-2); }
label > span { display: block; margin-bottom: 0.4rem; font-weight: 500; color: var(--ink); }
label > span small { font-weight: 400; color: var(--ink-3); }
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--fs-base);
  transition: var(--transition);
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus {
  outline: none; border-color: var(--sage);
  box-shadow: 0 0 0 4px var(--sage-soft);
}
input::placeholder { color: var(--ink-3); opacity: 0.7; }

.checks { border: none; padding: 0; margin: 2rem 0 1.5rem; }
.checks legend {
  font-size: var(--fs-base); font-weight: 500;
  color: var(--ink); margin-bottom: 1rem;
  font-family: var(--serif);
}
.checks legend small {
  font-family: var(--sans); font-size: var(--fs-sm);
  color: var(--ink-3); font-weight: 400;
  display: block; margin-top: 0.25rem;
}

.check {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.6rem 0; cursor: pointer;
  color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.4;
  transition: color 140ms;
}
.check:hover { color: var(--ink); }
.check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 1.3rem; height: 1.3rem;
  border: 1.5px solid var(--ink-3);
  border-radius: 5px;
  background: var(--paper); cursor: pointer;
  flex-shrink: 0; margin-top: 1px;
  position: relative;
  transition: all var(--transition);
}
.check input[type="checkbox"]:hover { border-color: var(--sage); }
.check input[type="checkbox"]:checked { background: var(--sage); border-color: var(--sage); }
.check input[type="checkbox"]:checked::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5 L6.5 11.5 L12.5 5.5' stroke='%23FAF6F0' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 1rem;
  background-repeat: no-repeat; background-position: center;
  animation: check-pop 300ms cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

.form-msg { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: var(--radius-md); font-size: var(--fs-sm); line-height: 1.45; }
.form-msg.ok { background: var(--sage-soft); color: var(--sage-deep); border: 1px solid var(--sage); }
.form-msg.err { background: var(--terracotta-soft); color: #8A3B22; border: 1px solid var(--terracotta); }
.form-legal { margin-top: 1.1rem; font-size: var(--fs-xs); color: var(--ink-3); text-align: center; }

@media (min-width: 640px) {
  #lead-form { padding: 2.5rem 2.25rem; }
  .field-row { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1.75rem; }
  .checks legend { grid-column: 1 / -1; }
}

/* TRUST */
.trust { padding: 2.5rem 0; background: var(--ink); color: var(--paper-2); }
.trust-row {
  display: flex; flex-wrap: wrap;
  gap: 1.1rem 2rem; justify-content: center;
  font-size: var(--fs-sm);
}
.trust-row span {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--paper-2); opacity: 0.82;
}
.trust-row svg { flex-shrink: 0; opacity: 0.9; }

/* FOOTER */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.footer-brand { margin-bottom: 1rem; }
.footer-note { color: var(--ink-2); font-size: var(--fs-sm); max-width: 48ch; line-height: 1.55; }
.footer-note a { color: var(--sage-deep); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-content: flex-start; }
.footer-links a { font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--sage); text-decoration: underline; }
.footer-bottom { padding-top: 1.25rem; font-size: var(--fs-xs); color: var(--ink-3); text-align: center; }

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: flex-start; }
}

/* LEGAL PAGES */
.legal { padding: 4rem 0 5rem; }
.legal-wrap { max-width: 720px; }
.legal h1 { font-size: var(--fs-xl); margin-bottom: 1rem; }
.legal-lead { font-family: var(--serif); font-style: italic; font-size: var(--fs-lg); color: var(--ink-2); margin-bottom: 2.5rem; max-width: 48ch; line-height: 1.45; }
.legal h2 { font-size: var(--fs-lg); margin-top: 2rem; margin-bottom: 0.6rem; font-weight: 500; }
.legal p { color: var(--ink-2); margin-bottom: 1rem; line-height: 1.6; }
.legal p a { color: var(--sage-deep); }
.legal-back { margin-top: 3rem; font-family: var(--sans); }

/* ANIMATIONS */
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes check-pop { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal-visual { from { opacity: 0; transform: translateY(24px) rotate(-6deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }

.hero-copy > * { animation: reveal 650ms cubic-bezier(0.2, 0.6, 0.2, 1) backwards; }
.hero-copy .kicker { animation-delay: 0ms; }
.hero-copy h1 { animation-delay: 80ms; }
.hero-copy .lead { animation-delay: 160ms; }
.hero-copy .hero-ctas { animation-delay: 240ms; }
.hero-copy .hero-note { animation-delay: 320ms; }
.hero-visual svg { animation: reveal-visual 900ms cubic-bezier(0.2, 0.6, 0.2, 1) backwards; animation-delay: 200ms; }

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

/* CHAT WIDGET */
.chat-launcher {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--paper);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sage);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.chat-launcher:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 22px 50px rgba(47, 107, 74, 0.32); }
.chat-launcher:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }
.chat-launcher.is-open { background: var(--sage-deep); transform: rotate(8deg); }
.chat-launcher svg { width: 26px; height: 26px; }

.chat-launcher-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--sage);
  opacity: 0.5;
  animation: chat-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}
.chat-launcher.is-open .chat-launcher-pulse { display: none; }

@keyframes chat-pulse {
  0%   { transform: scale(1); opacity: 0.5; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.chat-panel {
  position: fixed;
  bottom: 5.25rem;
  right: 1.25rem;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(580px, calc(100vh - 7rem));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chat-in 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.chat-panel[hidden] { display: none; }

@keyframes chat-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-head {
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-deep) 100%);
  color: var(--paper);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--sage-deep);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.chat-head-text { flex: 1; line-height: 1.25; }
.chat-head-text strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1rem; }
.chat-head-text small { color: rgba(250, 246, 240, 0.78); font-size: 0.75rem; }
#chat-close {
  background: transparent;
  border: none;
  color: var(--paper);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
#chat-close:hover { background: rgba(255, 255, 255, 0.18); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--paper);
  scroll-behavior: smooth;
}

.chat-msg {
  padding: 0.7rem 0.95rem;
  border-radius: 16px;
  max-width: 88%;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: chat-msg-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.chat-msg a { color: var(--sage-deep); text-decoration-color: rgba(47, 107, 74, 0.3); }
.chat-msg strong { font-weight: 600; color: var(--ink); }
.chat-msg em { font-style: italic; color: var(--ink-2); }
.chat-msg--bot {
  background: var(--paper-2);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg--user {
  background: var(--sage);
  color: var(--paper);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  word-break: break-word;
}
.chat-msg--user a { color: var(--paper); }

@keyframes chat-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg--typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 0.9rem 0.95rem;
}
.chat-msg--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: chat-typing 1.1s infinite ease-in-out;
}
.chat-msg--typing span:nth-child(2) { animation-delay: 0.18s; }
.chat-msg--typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes chat-typing {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 1rem 0.25rem;
  background: var(--paper);
}
.chat-sugg {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.chat-sugg:hover {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--sage-deep);
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.chat-input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.chat-input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.chat-input::placeholder { color: var(--ink-3); opacity: 0.7; }
.chat-form button[type="submit"] {
  background: var(--sage);
  color: var(--paper);
  border: none;
  border-radius: 50%;
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.chat-form button[type="submit"]:hover { background: var(--sage-deep); transform: translateY(-1px); }

.chat-note {
  padding: 0.5rem 1rem 0.75rem;
  font-size: 0.68rem;
  color: var(--ink-3);
  text-align: center;
  background: var(--paper);
  border-top: 1px solid var(--paper-2);
}
.chat-note a { color: var(--sage-deep); font-weight: 500; }

@media (max-width: 480px) {
  .chat-launcher { width: 52px; height: 52px; bottom: 1rem; right: 1rem; }
  .chat-panel { bottom: 4.5rem; right: 1rem; left: 1rem; width: auto; max-height: calc(100vh - 7rem); }
}
