/* =========================================================
   THREADLINE — design system (shared across every page)
   Warm-cream base, ink-navy text, one confident coral accent.
   Fraunces (warm display serif) + Outfit (rounded humanist sans).
   ========================================================= */

:root{
  --cream:      #faf1e2;
  --cream-2:    #f3e5cb;
  --cream-3:    #ecdcbe;
  --white:      #fffdf8;
  --coral:      #ff6a4d;
  --coral-deep: #e14e30;
  --coral-text: #b8391f;
  --coral-light:#ffe1d3;
  --coral-tint: #fff2ec;
  --sage:       #7c9473;
  --sage-tint:  #edf1e6;
  --ink:        #1c2233;
  --ink-2:      #2c3452;
  --ink-dim:    #565f7f;
  --ink-faint:  #5c6386;
  --line:       #e6d6b2;
  --line-2:     #ddc79a;

  --display: "Fraunces", Georgia, serif;
  --body:    "Outfit", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow-lg: 0 34px 70px -30px rgba(28,34,51,.22);
  --shadow-md: 0 20px 44px -20px rgba(28,34,51,.18);
  --shadow-sm: 0 10px 24px -14px rgba(28,34,51,.16);
}

*, *::before, *::after{ box-sizing: border-box; }
html, body{ overflow-x: clip; }

body{
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4{ margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
p{ margin: 0; }
button{ font-family: inherit; }

.wrap{ max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.skip-link{
  position: absolute; left: -999px; top: 0;
  background: var(--coral); color: var(--white); padding: 12px 18px;
  z-index: 999; font-weight: 600; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; top: 0; }

em{ font-style: italic; }

/* ============ kicker ============ */
.kicker{
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 12.5px;
  color: var(--coral-text);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.kicker::before{
  content: "";
  width: 20px; height: 2px; background: var(--coral);
  border-radius: 2px;
  display: inline-block;
}
.kicker.center{ justify-content: center; }

/* ============ buttons ============ */
.btn{
  display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 26px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15.5px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.9,.25,1.3), box-shadow .3s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn svg{ width: 17px; height: 17px; flex: none; }
.btn-coral{
  background: var(--coral); color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-coral:hover{ background: var(--coral-deep); transform: translateY(-2px); box-shadow: 0 18px 32px -12px rgba(255,106,77,.45); }
.btn-ghost{
  background: transparent; color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover{ border-color: var(--coral); color: var(--coral-deep); transform: translateY(-2px); }
.btn-dark{
  background: var(--ink); color: var(--white);
}
.btn-dark:hover{ background: var(--ink-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-block{ width: 100%; justify-content: center; }
.btn-sm{ padding: 11px 20px; font-size: 14px; }

/* ============ header / nav ============ */
.site-header{
  position: sticky; top: 0; z-index: 500;
  background: rgba(250,241,226,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease, background .3s ease;
}
.site-header.is-scrolled{ box-shadow: 0 12px 30px -20px rgba(28,34,51,.28); border-color: var(--line); }
.nav-bar{
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 28px;
}
.brand{ display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark{ width: 38px; height: 38px; flex: none; }
.brand-name{
  font-family: var(--display); font-weight: 600; font-size: 21px;
  color: var(--ink); line-height: 1;
}

.nav-links{
  display: flex; align-items: center; gap: 34px;
  font-family: var(--body); font-weight: 500; font-size: 15px;
}
.nav-links a:not(.btn){ color: var(--ink-dim); padding: 6px 2px; position: relative; transition: color .2s ease; }
.nav-links a:not(.btn)::after{
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px;
  background: var(--coral); border-radius: 2px; transition: right .28s ease;
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn)[aria-current="page"]{ color: var(--ink); }
.nav-links a:not(.btn):hover::after, .nav-links a:not(.btn)[aria-current="page"]::after{ right: 0; }
.nav-mobile-cta{ display: none; }

.nav-cta{ display: flex; align-items: center; gap: 18px; flex: none; }

.nav-toggle{
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span{ width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ============ hero ============ */
.hero{ position: relative; overflow: clip; padding: 76px 0 40px; }
.hero-bg{ position: absolute; inset: 0; z-index: 0; overflow: clip; pointer-events: none; }
.blob{
  position: absolute; border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  animation: blobDrift 22s ease-in-out infinite;
}
.blob-1{ width: 480px; height: 480px; background: var(--coral-light); top: -160px; left: -120px; animation-duration: 26s; }
.blob-2{ width: 380px; height: 380px; background: var(--sage-tint); top: 80px; right: -100px; animation-duration: 20s; animation-delay: -6s; }
.blob-3{ width: 300px; height: 300px; background: var(--cream-3); bottom: -140px; left: 30%; animation-duration: 24s; animation-delay: -12s; }
@keyframes blobDrift{
  0%, 100%{ transform: translate(0,0) scale(1); }
  33%{ transform: translate(30px,-24px) scale(1.08); }
  66%{ transform: translate(-24px,18px) scale(.96); }
}

.hero-inner{ position: relative; z-index: 2; display: grid; grid-template-columns: 1fr; gap: 26px; text-align: center; max-width: 780px; margin: 0 auto; }
.h-hero{
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -.015em;
}
.h-hero em{ font-style: italic; color: var(--coral-deep); }
.hero-lede{ margin: 4px auto 0; max-width: 52ch; font-size: 18.5px; color: var(--ink-dim); }
.hero-actions{ display: flex; gap: 16px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.hero-note{ font-size: 13px; color: var(--ink-faint); margin-top: -6px; }

/* ---- hero product mockup ---- */
.hero-visual{ position: relative; z-index: 2; margin: 56px auto 0; max-width: 980px; }
.browser-frame{
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: clip;
}
.browser-bar{
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--cream-2);
}
.browser-dot{ width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.browser-bar-url{
  margin: 0 auto; flex: 1; max-width: 320px;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 14px;
  font-size: 12px; color: var(--ink-faint); text-align: center;
}
.browser-frame img{ width: 100%; display: block; }

/* floating toast decorations over the hero mockup */
.float-toast{
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 12px 16px; font-size: 13.5px; font-weight: 500;
  opacity: 0;
}
.float-toast .dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex: none; box-shadow: 0 0 0 4px var(--coral-tint); }
.toast-ticket{ top: -22px; left: -18px; }
.toast-typing{ bottom: -20px; right: -14px; }
.typing-dots{ display: inline-flex; gap: 3px; align-items: center; }
.typing-dots span{ width: 5px; height: 5px; border-radius: 50%; background: var(--coral); animation: typingBounce 1.2s ease-in-out infinite; }
.typing-dots span:nth-child(2){ animation-delay: .15s; }
.typing-dots span:nth-child(3){ animation-delay: .3s; }
@keyframes typingBounce{
  0%, 60%, 100%{ transform: translateY(0); opacity: .5; }
  30%{ transform: translateY(-4px); opacity: 1; }
}

/* ============ stat strip ============ */
.stat-strip{
  background: var(--white);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat-inner{ display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item{
  padding: 32px 22px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.stat-item:last-child{ border-right: none; }
.stat-num{ font-family: var(--display); font-weight: 600; font-size: clamp(26px,3vw,34px); color: var(--ink); display: block; }
.stat-num .accent{ color: var(--coral-deep); }
.stat-label{ display: block; font-size: 13px; color: var(--ink-dim); margin-top: 6px; }

/* ============ section scaffolding ============ */
section{ position: relative; }
.section{ padding: 108px 0; }
.section-tight{ padding: 80px 0; }
.section-head{ max-width: 640px; margin-bottom: 54px; }
.section-head.center{ margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2{ font-size: clamp(30px, 4vw, 44px); line-height: 1.08; margin-top: 16px; }
.section-head p{ margin-top: 18px; color: var(--ink-dim); font-size: 17px; max-width: 54ch; }
.section-head.center p{ margin-left: auto; margin-right: auto; }
.section-alt{ background: var(--cream-2); }
.section-white{ background: var(--white); }

/* ============ home: feature highlight cards ============ */
.feat-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .4s cubic-bezier(.2,.8,.2,1.1), box-shadow .3s ease, border-color .3s ease;
}
.feat-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.feat-icon{
  width: 52px; height: 52px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--coral-tint); color: var(--coral-deep);
  margin-bottom: 22px;
  transition: transform .45s cubic-bezier(.2,.7,.15,1.4), background .3s ease, color .3s ease;
}
.feat-icon svg{ width: 26px; height: 26px; }
.feat-card:hover .feat-icon{
  transform: scale(1.1) rotate(-4deg);
  background: var(--coral); color: var(--white);
}
.feat-card h3{ font-size: 20px; margin-bottom: 10px; }
.feat-card p{ color: var(--ink-dim); font-size: 15px; }
.feat-card .feat-link{
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-weight: 600; font-size: 14px; color: var(--coral-text);
}
.feat-card .feat-link svg{ width: 14px; height: 14px; transition: transform .3s ease; }
.feat-card:hover .feat-link svg{ transform: translateX(4px); }

/* ============ live inbox demo (signature motion) ============ */
.demo-wrap{ display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: center; }
.demo-copy .demo-list-steps{ display: flex; flex-direction: column; gap: 20px; margin-top: 30px; }
.demo-step{ display: flex; gap: 16px; }
.demo-step-num{
  font-family: var(--display); font-size: 14px; color: var(--coral-deep);
  border: 1px solid var(--coral-light); background: var(--coral-tint); border-radius: 50%;
  width: 32px; height: 32px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.demo-step h4{ font-size: 16.5px; margin-bottom: 4px; }
.demo-step p{ color: var(--ink-dim); font-size: 14.5px; }

.demo-frame{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: clip;
}
.demo-toolbar{
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--cream-2);
  font-size: 13px; font-weight: 600; color: var(--ink-dim);
}
.demo-toolbar .live-dot{ width: 8px; height: 8px; border-radius: 50%; background: #57b378; box-shadow: 0 0 0 4px rgba(87,179,120,.18); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse{ 0%,100%{ opacity: 1; } 50%{ opacity: .45; } }
.demo-list{ padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.demo-row{
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px;
  padding: 14px 14px; border-radius: var(--radius-sm);
  background: var(--cream);
  opacity: 0; transform: translateX(46px);
}
.demo-row.is-fresh{ background: var(--coral-tint); border: 1px solid var(--coral-light); }
.demo-avatar{
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--white);
  background: var(--ink-2);
}
.demo-row:nth-child(1) .demo-avatar{ background: #e2502f; }
.demo-row:nth-child(2) .demo-avatar{ background: #2c3452; }
.demo-row:nth-child(3) .demo-avatar{ background: #7c9473; }
.demo-row:nth-child(4) .demo-avatar{ background: #c98a3d; }
.demo-row:nth-child(5) .demo-avatar{ background: #4d6ee2; }
.demo-mid{ min-width: 0; }
.demo-name{ font-weight: 600; font-size: 14.5px; color: var(--ink); }
.demo-subj{ font-size: 13.5px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.demo-right{ display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.demo-tag{
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px;
  background: var(--sage-tint); color: #4d6b45;
}
.demo-row.is-fresh .demo-tag{ background: var(--coral-light); color: var(--coral-deep); }
.demo-time{ font-size: 11.5px; color: var(--ink-faint); }

/* ============ testimonials / social proof ============ */
.testi-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.testi-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px;
}
.testi-logo{ font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--ink); margin-bottom: 16px; letter-spacing: -.01em; }
.testi-card blockquote{ margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.testi-who{ margin-top: 18px; display: flex; flex-direction: column; }
.testi-who strong{ font-size: 13.5px; }
.testi-who span{ font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* ============ integrations strip ============ */
.integrations-grid{ display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.integration-item{
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; padding: 26px 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s ease, box-shadow .3s ease;
}
.integration-item:hover{ transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.integration-icon{
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--cream-2); color: var(--coral-deep);
  display: flex; align-items: center; justify-content: center;
  transition: transform .45s cubic-bezier(.2,.7,.15,1.4), background .3s ease, color .3s ease;
}
.integration-item:hover .integration-icon{ transform: scale(1.1) rotate(-4deg); background: var(--coral); color: var(--white); }
.integration-icon svg{ width: 22px; height: 22px; }
.integration-item span{ font-size: 12.5px; font-weight: 600; color: var(--ink-dim); }

/* ============ CTA band ============ */
.cta-band{
  background: linear-gradient(120deg, var(--ink) 0%, var(--ink-2) 100%);
  padding: 92px 0;
  position: relative; overflow: clip;
}
.cta-band h2{ color: var(--white); }
.cta-band .kicker{ color: var(--coral-light); }
.cta-band .kicker::before{ background: var(--coral); }
.cta-inner{ display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-inner p{ color: #c7cbdc; margin-top: 12px; max-width: 40ch; }
.cta-inner h2{ font-size: clamp(28px, 3.6vw, 40px); max-width: 15ch; margin-top: 14px; }
.cta-actions{ display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.cta-actions .hero-note{ color: #9aa0bc; width: 100%; margin-top: 4px; }

/* ============ footer ============ */
.site-footer{ background: var(--ink); color: var(--cream); padding-top: 72px; }
.footer-grid{
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 56px;
}
.footer-brand .brand-name{ color: var(--white); }
.footer-brand p{ margin-top: 18px; color: #9aa0bc; font-size: 14.5px; max-width: 34ch; }
.footer-social{ display: flex; gap: 10px; margin-top: 22px; }
.footer-social a{
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #3a4160;
  display: flex; align-items: center; justify-content: center; color: #c7cbdc;
  transition: border-color .2s ease, color .2s ease;
}
.footer-social a:hover{ border-color: var(--coral); color: var(--coral-light); }
.footer-social svg{ width: 16px; height: 16px; }
.footer-col h5{
  font-family: var(--body); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 12px;
  color: #8990b4; margin-bottom: 18px;
}
.footer-col ul{ display: flex; flex-direction: column; gap: 12px; }
.footer-col a{ color: #c7cbdc; font-size: 14.5px; }
.footer-col a:hover{ color: var(--coral-light); }
.footer-bottom{
  border-top: 1px solid #2f3654;
  padding: 22px 0 30px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: #767ca0;
}
.footer-bottom a{ color: #767ca0; }
.footer-bottom a:hover{ color: var(--coral-light); }

/* ============ generic page hero (interior pages) ============ */
.page-hero{
  padding: 168px 0 64px;
  background: radial-gradient(ellipse at 18% 0%, var(--coral-tint), transparent 55%), var(--cream);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-hero .kicker{ margin-bottom: 18px; justify-content: center; }
.page-hero h1{ font-size: clamp(36px, 5.2vw, 58px); max-width: 18ch; margin: 0 auto; }
.page-hero p{ margin: 20px auto 0; color: var(--ink-dim); font-size: 17.5px; max-width: 58ch; }
.breadcrumb{
  display: flex; gap: 8px; align-items: center; justify-content: center;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11.5px;
  color: var(--ink-faint); margin-bottom: 26px;
}
.breadcrumb a{ color: var(--ink-faint); }
.breadcrumb a:hover{ color: var(--coral-text); }

/* ============ reveal-on-scroll base state ============ */
.rv{ opacity: 0; transform: translateY(26px); }
.rv-in{ opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px){
  .feat-grid{ grid-template-columns: repeat(3, 1fr); }
  .testi-grid{ grid-template-columns: repeat(2, 1fr); }
  .integrations-grid{ grid-template-columns: repeat(3, 1fr); }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .stat-inner{ grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2){ border-right: none; }
  .demo-wrap{ grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 860px){
  .nav-links{
    display: flex !important;
    position: fixed; top: 70px; right: 0; left: 0; height: calc(100vh - 70px); background: var(--cream);
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 24px 28px; transform: translateX(100%); transition: transform .35s ease;
    font-size: 16px; overflow-y: auto; box-sizing: border-box; z-index: 400;
  }
  .nav-links.open{ transform: translateX(0); }
  .nav-links a:not(.btn){ padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-mobile-cta{ display: block; margin-top: 16px; text-align: center; }
  .nav-cta{ display: none; }
  .nav-toggle{ display: flex; }
  .feat-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px){
  .section{ padding: 76px 0; }
  .feat-grid, .testi-grid, .integrations-grid{ grid-template-columns: 1fr 1fr; }
  .stat-inner{ grid-template-columns: 1fr 1fr; }
  .footer-grid{ grid-template-columns: 1fr; gap: 36px; }
  .cta-inner{ flex-direction: column; align-items: flex-start; }
  .hero{ padding: 56px 0 20px; }
  .hero-visual{ margin-top: 40px; }
  .float-toast{ display: none; }
  .demo-row{ grid-template-columns: 34px 1fr auto; gap: 10px; padding: 12px 10px; }
  .demo-subj{ max-width: 34vw; }
}

@media (max-width: 480px){
  .wrap{ padding: 0 20px; }
  .h-hero{ font-size: 34px; }
  .page-hero{ padding: 148px 0 52px; }
  .feat-grid, .testi-grid, .integrations-grid{ grid-template-columns: 1fr; }
  .stat-inner{ grid-template-columns: 1fr; }
  .stat-item{ border-right: none !important; border-bottom: 1px solid var(--line); }
  .stat-item:last-child{ border-bottom: none; }
}
