/* Ripple Automations marketing site
   Design read: B2B service landing page for accounting/bookkeeping firm owners.
   Practical, skeptical, ROI-driven buyers. Trust-first professional language,
   restrained motion, one deliberate accent tied to the Ripple name. */

:root {
  --bg: #fafaf9;
  --bg-raised: #ffffff;
  --text: #17181a;
  --text-muted: #55585e;
  --border: #e6e5e2;
  --accent: #0d7a5f;
  --accent-strong: #095c47;
  --accent-contrast: #f4fbf8;
  --accent-tint: #e8f5f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(23 24 26 / 0.06);
  --shadow-md: 0 12px 32px -12px rgb(23 24 26 / 0.18);
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101211;
    --bg-raised: #17191a;
    --text: #f2f2f0;
    --text-muted: #a6a9a6;
    --border: #2a2c2b;
    --accent: #2fd6a7;
    --accent-strong: #58e0bb;
    --accent-contrast: #06120e;
    --accent-tint: #16241e;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 20px 44px -16px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #101211;
  --bg-raised: #17191a;
  --text: #f2f2f0;
  --text-muted: #a6a9a6;
  --border: #2a2c2b;
  --accent: #2fd6a7;
  --accent-strong: #58e0bb;
  --accent-contrast: #06120e;
  --accent-tint: #16241e;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 20px 44px -16px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

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

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

p { color: var(--text-muted); margin: 0; }

a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, background 0.18s ease;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  margin-right: auto;
}
.brand-mark { color: var(--accent); display: inline-flex; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-size: 0.92rem; color: var(--text-muted); font-weight: 500; }
.main-nav a:hover { color: var(--text); }
.nav-cta { margin-left: 4px; }
.nav-toggle { display: none; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--border);
}
.mobile-nav a {
  padding: 12px 4px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.mobile-nav .btn { margin-top: 12px; width: 100%; }

@media (max-width: 860px) {
  .main-nav, .nav-cta { display: none; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }
  .mobile-nav.open { display: flex; }
}

/* ---------- Hero ---------- */
.hero { padding-top: 64px; padding-bottom: 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  min-height: min(70dvh, 620px);
}
.hero-copy h1 {
  font-size: clamp(2.1rem, 4.3vw, 3.4rem);
  line-height: 1.08;
  max-width: 15ch;
}
.hero-sub {
  margin-top: 20px;
  font-size: 1.08rem;
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-media { order: -1; aspect-ratio: 16/10; }
  .hero-media img { aspect-ratio: 16/10; }
}

/* ---------- Problem ---------- */
.problem { padding-block: 64px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.problem-inner { max-width: 780px; }
.problem-text {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.45;
  color: var(--text);
  font-weight: 500;
}

/* ---------- Section heads ---------- */
.section-head {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  max-width: 20ch;
}
.section-sub { margin-top: 10px; max-width: 52ch; font-size: 1.02rem; }

/* ---------- Two ways we help ---------- */
.help { padding-block: 88px; }
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 40px;
}
.help-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.help-index {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}
.help-card h3 { margin-top: 14px; font-size: 1.35rem; }
.help-card p { margin-top: 12px; }
.help-points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.help-points li {
  padding-left: 22px;
  position: relative;
  font-size: 0.94rem;
  color: var(--text);
}
.help-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

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

/* ---------- Process ---------- */
.process { padding-block: 88px; background: var(--bg-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 44px;
}
.process-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  color: var(--accent);
  display: inline-block;
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-weight: 600;
}
.process-step h3 { margin-top: 16px; font-size: 1.15rem; }
.process-step p { margin-top: 10px; font-size: 0.96rem; }

@media (max-width: 780px) {
  .process-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Free tools bento ---------- */
.tools { padding-block: 88px; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.tool-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.tool-card h3 { font-size: 1.1rem; }
.tool-card p { margin-top: 10px; font-size: 0.95rem; }
.tool-card--wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
}
.tool-media { position: relative; min-height: 220px; }
.tool-media img { width: 100%; height: 100%; object-fit: cover; }
.tool-card--wide .tool-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.tool-card--wide h3 { font-size: 1.3rem; }

@media (max-width: 780px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool-card--wide { grid-column: span 1; grid-template-columns: 1fr; }
  .tool-media { min-height: 180px; }
}

/* ---------- Guarantee ---------- */
.guarantee {
  background: var(--accent);
  color: var(--accent-contrast);
  padding-block: 96px;
}
.guarantee-inner { max-width: 760px; }
.guarantee h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.18;
  color: var(--accent-contrast);
}
.guarantee p {
  margin-top: 18px;
  color: color-mix(in srgb, var(--accent-contrast) 82%, transparent);
  font-size: 1.05rem;
  max-width: 60ch;
}

/* ---------- CTA ---------- */
.cta { padding-block: 96px; text-align: center; }
.cta-inner { max-width: 620px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta .btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-top: 48px; }
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 32px;
}
.footer-tag { margin-top: 10px; font-size: 0.9rem; max-width: 30ch; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-links a { font-size: 0.92rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent-strong); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 20px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ---------- Focus, icons, shared polish ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
button, summary, a { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--accent);
}
.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.main-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.mobile-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- Inner page hero ---------- */
.page-hero { padding-top: 56px; padding-bottom: 48px; border-bottom: 1px solid var(--border); }
.page-hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  line-height: 1.12;
  max-width: 17ch;
}
.page-hero p {
  margin-top: 18px;
  font-size: 1.06rem;
  max-width: 52ch;
}

/* ---------- Detail blocks (services) ---------- */
.detail { padding-block: 80px; border-bottom: 1px solid var(--border); }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.detail:nth-of-type(even) .detail-media { order: -1; }
.detail-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.detail-media img { width: 100%; aspect-ratio: 5/4; object-fit: cover; }
/* A person, not a scene. Square to match the source file so no part of the face
   is cropped away, and capped so the founder photo does not tower over the copy
   beside it on a wide screen. */
.detail-media--portrait { max-width: 360px; }
.detail-media--portrait img { aspect-ratio: 1/1; }
.detail h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.detail p { margin-top: 14px; }
.detail-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.detail-list li { padding-left: 24px; position: relative; color: var(--text); font-size: 0.97rem; }
.detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
}
.detail-list strong { font-weight: 600; }

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .detail:nth-of-type(even) .detail-media { order: 0; }
}

/* ---------- Plain feature rows ---------- */
.rows { padding-block: 80px; }
.row-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding-block: 28px;
  border-top: 1px solid var(--border);
  align-items: start;
}
.row-item:last-child { border-bottom: 1px solid var(--border); }
.row-item h3 { font-size: 1.1rem; }
.row-item p { font-size: 0.97rem; }

@media (max-width: 720px) {
  .row-item { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- FAQ ---------- */
.faq { padding-block: 80px; background: var(--bg-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.faq-list { margin-top: 36px; display: grid; gap: 4px; max-width: 820px; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding-block: 18px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.03rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: 14px; max-width: 68ch; font-size: 0.98rem; }

/* ---------- Principles ---------- */
.principles { padding-block: 80px; }
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 56px;
  margin-top: 44px;
}
.principle h3 { font-size: 1.12rem; }
.principle p { margin-top: 10px; font-size: 0.97rem; }
.principle-mark {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

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

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 48px;
  padding-block: 72px;
  align-items: start;
}
.booking-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-raised);
  min-height: 680px;
}
.booking-frame iframe { width: 100%; height: 680px; border: 0; display: block; }
.contact-options { display: grid; gap: 22px; margin-top: 28px; }
.contact-option {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--bg-raised);
}
.contact-option h3 { font-size: 1.03rem; }
.contact-option p { margin-top: 8px; font-size: 0.94rem; }
.contact-option a.inline-link { color: var(--accent-strong); font-weight: 600; text-decoration: underline; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- Mobile refinement ---------- */
@media (max-width: 768px) {
  body { font-size: 16px; -webkit-text-size-adjust: 100%; }
  .wrap { padding-inline: 20px; }

  /* Vertical rhythm: desktop section padding is far too tall on a phone,
     where it reads as empty scrolling rather than breathing room. */
  .hero { padding-top: 32px; padding-bottom: 44px; }
  .problem { padding-block: 44px; }
  .help, .process, .tools, .rows, .principles, .detail, .faq { padding-block: 52px; }
  .guarantee { padding-block: 56px; }
  .cta { padding-block: 56px; }
  .page-hero { padding-top: 34px; padding-bottom: 34px; }

  /* Copy leads on mobile: the value proposition should be the first thing
     read, with the image supporting it underneath rather than pushing it
     below the fold. */
  .hero-grid { gap: 28px; }
  .hero-media { order: 0; }
  .hero-copy h1 { font-size: clamp(2rem, 8.4vw, 2.5rem); max-width: 18ch; }
  .hero-sub { font-size: 1rem; margin-top: 14px; }
  .hero-actions { margin-top: 24px; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .hero-media img { aspect-ratio: 3/2; }
  .page-hero h1 { font-size: clamp(1.85rem, 7.6vw, 2.3rem); max-width: 20ch; }
  .page-hero p { font-size: 1rem; margin-top: 14px; }

  .section-head { font-size: clamp(1.5rem, 6.4vw, 1.9rem); max-width: 24ch; }
  .problem-text { font-size: 1.16rem; line-height: 1.5; }

  .help-grid { gap: 18px; margin-top: 28px; }
  .help-card { padding: 26px 22px; }
  .help-card h3 { font-size: 1.2rem; }

  .process-grid { margin-top: 30px; gap: 26px; }
  .detail-grid { gap: 26px; }
  .detail-list { gap: 12px; }

  .tools-grid { gap: 16px; margin-top: 28px; }
  .tool-card { padding: 24px 22px; }
  .tool-card--wide .tool-body { padding: 24px 22px; }

  .guarantee h2 { font-size: clamp(1.55rem, 6.6vw, 2rem); }
  .guarantee p { font-size: 1rem; margin-top: 14px; }

  .cta-inner { gap: 12px; }
  .cta-inner .btn { width: 100%; }
  .cta h2 { font-size: clamp(1.5rem, 6.4vw, 1.9rem); }

  .faq summary { font-size: 1rem; }
  .principles-grid { margin-top: 30px; }

  /* Booking iframe: a fixed tall frame overflows small screens and traps the
     page scroll, so it shortens and scrolls internally instead. */
  .booking-frame, .booking-frame iframe { min-height: 0; height: 560px; }
  .contact-grid { padding-block: 40px; }
  .contact-option { padding: 20px; }

  /* Comfortable tap target for the menu button (44px minimum). */
  .nav-toggle { width: 44px; height: 44px; margin-right: -6px; }
  .header-row { height: 62px; gap: 12px; }
  .brand { font-size: 1rem; }
  .mobile-nav a { padding: 14px 4px; }

  .footer-grid { gap: 24px; padding-bottom: 26px; }
  .footer-links { gap: 14px 20px; }
}

@media (max-width: 380px) {
  .wrap { padding-inline: 16px; }
  .hero-copy h1 { font-size: 1.85rem; }
  .help-card, .tool-card { padding: 22px 18px; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
