/* ============================================================
   Fayla marketing site
   Palette sampled from the product logo: navy text, off-white
   background, blue -> purple gradient accent. Aesthetic is
   "friendly small-business SaaS" — not editorial/cream, not a
   data dashboard: warm off-white with a confident brand gradient.
   Fonts: Sora (display) + Plus Jakarta Sans (body/UI), loaded via
   Google Fonts link tags in index.html — no build step required.
   ============================================================ */

:root {
  /* Softened slightly from the original brand pull: near-black ink and fully-saturated
     blue/purple read as harsh over long stretches of body text, so ink is eased toward a warm
     slate and the accent hues are pulled back a touch - same identity, easier on the eyes. */
  --bg: #f7f7fb;
  --bg-alt: #ffffff;
  --ink: #1e293b;
  --ink-soft: #4b5768;
  --ink-faint: #7a869e;
  --line: #e4e6f0;
  --line-soft: #ececf3;

  --blue: #4f6bf5;
  --purple: #8a6ef2;
  --grad: linear-gradient(120deg, var(--blue), var(--purple));

  --blue-tint: #eef1ff;
  --purple-tint: #f3eefe;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 20, 60, 0.08);
  --shadow-lg: 0 20px 48px rgba(30, 30, 90, 0.12);

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;

  --wrap: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141f;
    --bg-alt: #10142240;
    --ink: #e8eaf3;
    --ink-soft: #b7bfd6;
    --ink-faint: #838ea9;
    --line: #232a42;
    --line-soft: #1c2236;
    --blue-tint: #161c33;
    --purple-tint: #1c1830;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; }

.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;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75em 1.25em;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.9em;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------- Buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85em 1.6em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--blue); background: var(--blue-tint); }

.btn-small { padding: 0.6em 1.25em; font-size: 0.85rem; }
.btn-large { padding: 1em 2em; font-size: 1rem; }

/* -------------------- Header -------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

/* Inline SVGs (not <img>) so nothing needs a background chip — the mark itself
   is transparent, and the wordmark text is set via CSS to follow --ink. */
.brand-mark {
  height: 26px;
  width: auto;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.footer-mark {
  height: 30px;
  width: auto;
  margin-bottom: 0.5rem;
}

.site-nav {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--purple); }

@media (max-width: 760px) {
  .site-nav { display: none; }
}

/* -------------------- Hero -------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(60% 100% at 30% 0%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 70%),
              radial-gradient(50% 100% at 80% 10%, color-mix(in srgb, var(--purple) 16%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero-copy { max-width: 620px; }

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
}

.hero-lede {
  font-size: 1.15rem;
  max-width: 620px;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.hero-fineprint {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0;
}

/* -------------------- Hero queue demo -------------------- */

.queue-demo {
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.queue-demo-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.queue-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.queue-demo-title {
  margin-left: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.queue-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.queue-tab {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.4em 0.9em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.queue-tab:hover { border-color: var(--purple); }

.queue-tab.is-active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

.queue-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.queue-list.is-hidden { display: none; }

.queue-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 0.7em 0.9em;
}

.queue-name {
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 600;
}

.queue-tag {
  font-size: 0.72rem;
  color: var(--purple);
  font-weight: 700;
  white-space: nowrap;
}

.queue-demo-caption {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-faint);
  text-align: center;
}

/* -------------------- Not-a-CRM strip -------------------- */

.crm-strip {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 1.5rem 0;
  text-align: center;
}
.crm-strip p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.crm-strip strong { color: var(--purple); }

/* -------------------- Tone-picker demo -------------------- */

.tone-demo {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}

.tone-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.tone-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.35em 0.8em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tone-btn:hover { border-color: var(--purple); }

.tone-btn.is-active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

.tone-sample {
  margin: 0;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-soft);
}

.tone-sample.is-hidden { display: none; }

/* -------------------- Scroll reveal -------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* -------------------- Section rhythm -------------------- */

.section { padding: 88px 0; }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.section-sub { font-size: 1.05rem; }

/* -------------------- Problem -------------------- */

.problem {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

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

.problem-story {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.problem-story li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.story-num {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.problem-story p { margin: 0; padding-top: 0.25em; color: var(--ink); }

.problem-callout {
  background: linear-gradient(160deg, var(--blue-tint), var(--purple-tint));
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  border: 1px solid var(--line-soft);
}

.problem-callout p { color: var(--ink-soft); }
.callout-strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0;
}

/* -------------------- Features -------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card--wide { grid-column: span 3; }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card--wide { grid-column: span 2; }
}

@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card--wide { grid-column: span 1; }
}

.feature-card {
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--purple) 30%, var(--line-soft));
}

.feature-card--wide {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}
.feature-card--wide h3 { margin-top: 0.15em; }

.feature-icon {
  width: 44px;
  height: 44px;
  flex: none;
  margin-bottom: 1rem;
}
.feature-card--wide .feature-icon { margin-bottom: 0; }
.feature-icon svg { width: 100%; height: 100%; }

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
}
.feature-card p { margin: 0; font-size: 0.96rem; }

.roadmap-note {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--purple);
  background: var(--purple-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.roadmap-note p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.roadmap-note strong { color: var(--ink); }

/* -------------------- Pricing -------------------- */

.pricing { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
  max-width: 820px;
}

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

.price-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
}

.price-card--featured {
  border-color: transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              var(--grad) border-box;
  border: 2px solid transparent;
  box-shadow: var(--shadow-lg);
}

.price-badge {
  align-self: flex-start;
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.price-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3em;
}

.price-amount {
  margin: 0 0 0.3em;
  display: flex;
  align-items: baseline;
  gap: 0.3em;
}
.price-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--ink);
}
.price-period { color: var(--ink-faint); font-size: 0.95rem; }

.price-desc { font-size: 0.92rem; color: var(--ink-faint); margin-bottom: 1.5rem; }

.price-features {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.price-features li {
  position: relative;
  padding-left: 1.6em;
  font-size: 0.94rem;
  color: var(--ink);
}
.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  background: var(--grad);
}

.price-card .btn { align-self: flex-start; }

.pricing-compare {
  max-width: 640px;
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.byok-note {
  max-width: 640px;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.byok-note strong { color: var(--ink-soft); }

/* -------------------- Privacy -------------------- */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

.privacy-card {
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: var(--bg-alt);
}
.privacy-card h3 { font-size: 1.05rem; margin-bottom: 0.5em; }
.privacy-card p { font-size: 0.93rem; margin: 0; }

/* -------------------- CTA -------------------- */

.cta {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  margin: 0 24px 88px;
  padding: 72px 0;
}

.cta-inner {
  max-width: 560px;
  text-align: center;
  margin: 0 auto;
}

.cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta p { color: #c4cae0; }

.waitlist-form {
  display: flex;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.waitlist-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.85em 1.1em;
  border-radius: 999px;
  border: 1.5px solid #333a56;
  background: #171b2e;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.waitlist-form input[type="email"]::placeholder { color: #7a83a6; }
.waitlist-form input[type="email"]:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
  border-color: var(--purple);
}

.cta-fineprint { font-size: 0.85rem; color: #8a92b2; margin: 0; }
.cta-fineprint a { color: #b9c0ff; text-decoration: underline; }

/* Because .cta sits on a dark card even in light mode, keep its own
   overrides so it doesn't accidentally invert with the dark scheme. */
@media (prefers-color-scheme: dark) {
  .cta { background: #171b2e; border: 1px solid #262c47; }
}

/* -------------------- Footer -------------------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 48px 0 56px;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-tagline { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin: 0; }
.footer-contact, .footer-copy { font-size: 0.85rem; color: var(--ink-faint); margin: 0; }
.footer-contact a { color: var(--purple); text-decoration: underline; }

/* -------------------- Small screens -------------------- */

@media (max-width: 540px) {
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .cta { margin: 0 12px 64px; padding: 56px 20px; }
  .price-card { padding: 1.75rem; }
}
