/* =========================================================
   OhhChat landing — styles
   Change the brand colour in ONE place: --accent below.
   ========================================================= */

:root {
  /* Brand colour — azure blue. Retune the whole site from these tokens.
     Note: pure --accent (#0178E5) + white is 4.36:1, just under WCAG AA (4.5:1),
     so solid blue surfaces that carry WHITE text (buttons, CTA band, badges) and
     blue TEXT on light backgrounds use the slightly deeper --accent-hover (#0166C4,
     5.7:1). --accent itself stays for borders, the focus ring, tints, and
     decorative marks where contrast rules don't bite. */
  --accent: #0178E5;          /* primary brand blue — borders, focus ring, tints base, decorative */
  --accent-hover: #0166C4;    /* deeper azure — solid fills under white text, key links, hover/active */
  --accent-press: #014F99;    /* darker still — button/CTA hover & active */
  --accent-soft: #E7F1FD;     /* soft azure tint background (eyebrow, step markers, icons) */

  /* Palette */
  --bg: #FBFCFE;              /* cool off-white page background */
  --ink: #0E1726;            /* primary text */
  --muted: #5B6573;          /* secondary / supporting text */
  --border: #E6EBF1;         /* hairlines and card borders */
  --card-bg: #FFFFFF;        /* card / raised surfaces */
  --tint: #F4F8FD;           /* cool section-tint background */

  /* Type */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* Shape */
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, 0.05), 0 2px 8px rgba(14, 23, 38, 0.05);
  --shadow-md: 0 4px 16px rgba(14, 23, 38, 0.07), 0 12px 32px rgba(14, 23, 38, 0.07);
  --maxw: 1120px;
  --ease: 150ms ease;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 760px; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 10px; z-index: 200; transition: top var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: 16px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform var(--ease), background var(--ease), box-shadow var(--ease), color var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 15px; }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-press); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-1px); }

.btn-on-accent { background: #fff; color: var(--accent-hover); box-shadow: var(--shadow-sm); }
.btn-on-accent:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.text-link {
  font-weight: 500; color: var(--ink); border-bottom: 1.5px solid var(--border);
  padding-bottom: 2px; transition: border-color var(--ease), color var(--ease);
}
.text-link:hover { color: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 252, 254, 0.7);
  border-bottom: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease), backdrop-filter var(--ease);
}
.site-header.scrolled {
  background: rgba(251, 252, 254, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }

.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.02em;
}
.wordmark-mark {
  width: 18px; height: 18px; border-radius: 50% 50% 50% 4px;
  background: var(--accent); flex: none;
}

.nav { display: flex; gap: 30px; }
.nav a { color: var(--muted); font-size: 15.5px; font-weight: 500; transition: color var(--ease); }
.nav a:hover, .nav a:focus-visible { color: var(--accent-hover); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 42px; height: 42px; background: transparent; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 0 auto; border-radius: 2px; transition: transform var(--ease), opacity var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 24px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding: 11px 0; color: var(--ink); font-weight: 500; font-size: 17px; }
.mobile-nav .btn { margin-top: 10px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-hover); background: var(--accent-soft);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 6vw, 60px); font-weight: 500; max-width: 16ch; }
.subhead {
  font-size: clamp(17px, 2.2vw, 20px); color: var(--muted);
  margin-top: 22px; max-width: 50ch; line-height: 1.55;
}
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 32px; }
.microcopy { font-size: 14.5px; color: var(--muted); margin-top: 16px; }

/* ---------- Hero visual (the loop) ---------- */
.hero-visual { display: flex; justify-content: center; }
.loop { position: relative; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}

.mock-site { padding: 0; overflow: hidden; position: relative; }
.mock-browser-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.mock-browser-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.mock-browser-bar span:first-child { background: var(--accent); opacity: 0.5; }
.mock-site-body { padding: 18px 16px 30px; display: flex; flex-direction: column; gap: 11px; }
.mock-line { height: 9px; border-radius: 5px; background: var(--border); }
.w-90 { width: 90%; } .w-60 { width: 60%; } .w-40 { width: 40%; }

.chat-widget {
  position: absolute; right: 14px; bottom: 14px; width: 200px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-md); overflow: hidden;
}
.chat-widget-head { background: var(--accent-hover); color: #fff; font-size: 12.5px; font-weight: 600; padding: 9px 12px; }
.bubble {
  font-size: 13px; line-height: 1.4; padding: 9px 12px; border-radius: 12px; max-width: 90%;
}
.bubble-visitor { margin: 11px; background: var(--bg); color: var(--ink); border-bottom-left-radius: 4px; }

.slack-head {
  display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px;
  padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--ink);
}
.slack-hash { color: var(--muted); font-weight: 500; }
.slack-msg { display: flex; gap: 10px; padding: 11px 16px; }
.slack-avatar {
  width: 30px; height: 30px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff;
}
.slack-avatar-visitor { background: var(--muted); }
.slack-avatar-you { background: var(--accent-hover); }
.slack-body { min-width: 0; }
.slack-name { font-size: 13.5px; font-weight: 600; }
.slack-time { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.slack-text { font-size: 13.5px; color: var(--ink); }
.slack-reply { background: var(--accent-soft); border-radius: 12px; margin: 0 8px 8px; }

.loop-arrow { text-align: center; font-size: 22px; color: var(--accent); line-height: 1; }

.floating-reply {
  align-self: flex-end; background: var(--accent-hover); color: #fff;
  border-bottom-right-radius: 4px; box-shadow: var(--shadow-md);
  font-weight: 500;
}

/* gentle looping animation — transform-only so text contrast stays stable */
.floating-reply { animation: bob 4.5s ease-in-out infinite; }
.loop-arrow-down { animation: nudgeDown 4.5s ease-in-out infinite; }
.loop-arrow-up { animation: nudgeUp 4.5s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); }
}
@keyframes nudgeDown {
  0%, 100% { transform: translateY(-2px); } 20%, 35% { transform: translateY(2px); }
}
@keyframes nudgeUp {
  0%, 100% { transform: translateY(2px); } 65%, 80% { transform: translateY(-2px); }
}

/* ---------- Trust band ---------- */
.trust-band {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 22px 0; text-align: center;
}
.trust-band p { color: var(--muted); font-size: 15.5px; font-weight: 500; letter-spacing: 0.01em; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 110px) 0; }
.section-tint { background: linear-gradient(180deg, var(--card-bg) 0%, var(--tint) 100%); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 48px; text-align: center; }

/* Problem */
.problem h2 { font-size: clamp(28px, 4.4vw, 44px); max-width: 22ch; }
.problem p { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); margin-top: 26px; line-height: 1.6; max-width: 62ch; }
.problem .accent-line { color: var(--ink); font-weight: 500; font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 26px); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-hover);
  font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 20px;
}
.step h3 { font-size: 21px; margin-bottom: 9px; }
.step p { color: var(--muted); font-size: 16px; }

/* Cards (features) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { padding: 30px 28px; transition: transform var(--ease), box-shadow var(--ease); box-shadow: var(--shadow-sm); }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-hover); margin-bottom: 20px;
}
.feature-card h3 { font-size: 20px; margin-bottom: 11px; line-height: 1.2; }
.feature-card p { color: var(--muted); font-size: 16px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 760px; margin: 0 auto; }
.price-card { padding: 34px 30px; position: relative; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.price-card-pro { border-color: var(--accent); box-shadow: 0 8px 30px rgba(1, 120, 229, 0.18); }
.price-badge {
  position: absolute; top: -13px; left: 30px;
  background: var(--accent-hover); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; letter-spacing: 0.02em;
}
.price-name { font-size: 23px; margin-bottom: 10px; }
.price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 24px; }
.price-amount { font-family: var(--font-display); font-size: 44px; font-weight: 600; }
.price-period { color: var(--muted); font-size: 16px; }
.price-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; flex: 1; }
.price-list li { position: relative; padding-left: 28px; color: var(--ink); font-size: 16px; }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%230166C4' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.price-footnote { text-align: center; color: var(--muted); font-size: 15.5px; margin-top: 28px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 0; }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font-weight: 500; font-size: 18px; font-family: var(--font-display);
  transition: color var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 24px; color: var(--accent-hover); font-weight: 400; transition: transform var(--ease);
  font-family: var(--font-body);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--accent-hover); }
.faq details p { color: var(--muted); font-size: 16.5px; padding: 0 40px 24px 0; max-width: 64ch; }

/* Final CTA */
.final-cta { background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-press) 100%); color: #fff; text-align: center; padding: clamp(64px, 9vw, 100px) 0; }
.final-cta h2 { font-size: clamp(28px, 4.4vw, 44px); max-width: 18ch; margin: 0 auto 32px; color: #fff; }
.final-sub { margin-top: 18px; font-size: 16px; color: #fff; }

/* Footer */
.site-footer { padding: 56px 0 36px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-tagline { color: var(--muted); font-size: 15px; margin-top: 10px; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { color: var(--muted); font-size: 15px; transition: color var(--ease); }
.footer-links a:hover { color: var(--ink); }
.footer-copy { color: var(--muted); font-size: 14px; margin-top: 36px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; margin-top: 8px; }
  .hero h1 { max-width: 100%; }
  .nav { display: none; }
  .header-actions .btn-sm { display: none; }
  .nav-toggle { display: flex; }
  .steps { grid-template-columns: 1fr; gap: 32px; max-width: 480px; margin: 0 auto; }
  .cards { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding-inline: 20px; }
  .hero { padding-top: 40px; }
  .hero-cta { gap: 16px; }
  .loop { max-width: 340px; }
}

/* Show mobile CTA inside menu only; hide header button text on tiny screens handled above */
@media (min-width: 881px) {
  .mobile-nav { display: none !important; }
}

/* ---------- Legal pages (privacy / terms) ---------- */
.legal { max-width: 740px; padding: 48px 0 96px; }
.legal .back-link { display: inline-block; color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.legal .back-link:hover { color: var(--ink); }
.legal h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 15px; margin-bottom: 36px; }
.legal h2 { font-size: 21px; margin: 36px 0 12px; }
.legal p { color: var(--ink); margin-bottom: 16px; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; color: var(--ink); }
.legal li { margin-bottom: 8px; }
.legal a:not(.back-link) { color: var(--accent-hover); text-decoration: underline; }

/* ---------- Reduced motion ---------- */
@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; }
  .floating-reply { opacity: 1; transform: none; }
  .slack-reply { opacity: 1; }
  .bubble-visitor { opacity: 1; }
}
