/* SevaCircle — public site.
 *
 * Shares tokens.css with the panel so the two read as one product, and adds
 * nothing the panel needs. Material in the sense that matters: elevation that
 * means depth, motion on a real easing curve, and a state for every surface a
 * finger can land on — not a component library bolted on (D5: no framework).
 *
 * Every animation is opt-out. `prefers-reduced-motion` is honoured once, at the
 * bottom, rather than remembered per rule.
 */

:root {
  --site-max: 1140px;
  --site-gut: 24px;

  /* Material's standard curve: fast out, slow in. One curve everywhere keeps
     unrelated elements feeling like one system. */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* Elevation as light, not as a grey box. Two shadows per level: a tight one
     for the contact edge, a wide soft one for the cast. */
  --el-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .10);
  --el-2: 0 2px 4px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .08);
  --el-3: 0 4px 8px rgba(16, 24, 40, .06), 0 12px 28px rgba(16, 24, 40, .12);
  --el-4: 0 8px 16px rgba(16, 24, 40, .08), 0 24px 48px rgba(16, 24, 40, .16);

  --site-radius: 16px;
  --site-radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.site {
  margin: 0;
  background: var(--sc-surface);
  color: var(--sc-text);
  font-family: Inter, "Inter var", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.site-container { max-width: var(--site-max); margin: 0 auto; padding: 0 var(--site-gut); }

a { color: var(--sc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1rem; }

/* Keyboard users get to the content without walking the nav. */
.site-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--sc-primary); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.site-skip:focus { left: 0; }

:focus-visible { outline: 3px solid rgba(var(--sc-primary-rgb), .45); outline-offset: 2px; border-radius: 6px; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
/* The header only earns a shadow once there is something scrolled beneath it. */
.site-header.is-stuck { box-shadow: var(--el-1); border-bottom-color: var(--sc-border); }

.site-header-inner { display: flex; align-items: center; gap: 16px; height: 72px; }

.site-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sc-text); font-weight: 700; letter-spacing: -.02em; }
.site-brand:hover { text-decoration: none; }
.site-brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--sc-primary), #6d4aff); color: #fff;
  box-shadow: var(--el-2);
}
.site-brand-name { font-size: 1.12rem; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav-link {
  position: relative; color: var(--sc-text-muted); font-weight: 550; padding: 10px 14px; border-radius: 10px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.site-nav-link:hover { color: var(--sc-text); background: var(--sc-surface-2); text-decoration: none; }
/* The current page is stated, not merely coloured. */
.site-nav-link.is-current { color: var(--sc-primary); }
.site-nav-link.is-current::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--sc-primary); border-radius: 2px;
}

.site-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; }
.site-burger span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--sc-text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.site-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

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

.site-btn {
  --ripple: rgba(255, 255, 255, .5);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease);
}
.site-btn:hover { text-decoration: none; transform: translateY(-1px); }
.site-btn:active { transform: translateY(0); }

.site-btn-primary { background: var(--sc-primary); color: var(--sc-on-primary); box-shadow: var(--el-2); }
.site-btn-primary:hover { background: var(--sc-primary-hover); box-shadow: var(--el-3); color: #fff; }

.site-btn-ghost { --ripple: rgba(var(--sc-primary-rgb), .18); background: var(--sc-surface); color: var(--sc-text); border-color: var(--sc-border); box-shadow: var(--el-1); }
.site-btn-ghost:hover { background: var(--sc-surface-2); box-shadow: var(--el-2); color: var(--sc-text); }

.site-btn-lg { padding: 15px 28px; font-size: 1.02rem; border-radius: 14px; }

/* Touch feedback that starts where the finger did. Purely decorative — the
   button works identically with JS off. */
.site-ripple {
  position: absolute; border-radius: 50%; transform: scale(0); pointer-events: none;
  background: var(--ripple); animation: site-ripple .55s var(--ease-out);
}
@keyframes site-ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---------- Sections ----------------------------------------------------- */

.site-section { padding: clamp(56px, 8vw, 104px) 0; }
.site-section--tint { background: var(--sc-bg); }

.site-eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sc-primary); background: var(--sc-primary-subtle);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.site-lede { font-size: 1.13rem; color: var(--sc-text-muted); max-width: 62ch; }
.site-head-center { text-align: center; }
.site-head-center .site-lede { margin-inline: auto; }

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

.site-hero { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 8vw, 96px); }
.site-hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 130%;
  background:
    radial-gradient(50% 50% at 20% 20%, rgba(var(--sc-primary-rgb), .16), transparent 70%),
    radial-gradient(45% 45% at 80% 10%, rgba(109, 74, 255, .14), transparent 70%);
  pointer-events: none;
}
.site-hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.site-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.site-hero-note { margin-top: 18px; font-size: .92rem; color: var(--sc-text-muted); }

/* A product shot drawn in markup: no screenshot to go stale, and it reads in
   both a browser and a screen reader. */
.site-mock {
  background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: 20px;
  box-shadow: var(--el-4); overflow: hidden;
}
.site-mock-bar { display: flex; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--sc-border); background: var(--sc-surface-2); }
.site-mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sc-surface-3); }
.site-mock-body { padding: 20px; display: grid; gap: 12px; }
.site-mock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--sc-border); border-radius: 12px; }
.site-mock-row strong { font-variant-numeric: tabular-nums; }
.site-mock-label { color: var(--sc-text-muted); font-size: .9rem; }
.site-pill { font-size: .78rem; font-weight: 650; padding: 4px 10px; border-radius: 999px; }
.site-pill--paid { background: var(--sc-success-subtle); color: var(--sc-on-success-subtle); }
.site-pill--due { background: var(--sc-warning-subtle); color: var(--sc-on-warning-subtle); }
.site-pill--over { background: var(--sc-danger-subtle); color: var(--sc-on-danger-subtle); }

/* ---------- Cards -------------------------------------------------------- */

.site-grid { display: grid; gap: 22px; }
.site-grid-3 { grid-template-columns: repeat(3, 1fr); }
.site-grid-2 { grid-template-columns: repeat(2, 1fr); }

.site-card {
  background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: var(--site-radius);
  padding: 26px; box-shadow: var(--el-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.site-card:hover { transform: translateY(-4px); box-shadow: var(--el-3); border-color: rgba(var(--sc-primary-rgb), .28); }
.site-card p:last-child { margin-bottom: 0; }

.site-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  background: var(--sc-primary-subtle); color: var(--sc-primary); margin-bottom: 16px;
}
.site-icon--green { background: var(--sc-success-subtle); color: var(--sc-on-success-subtle); }
.site-icon--amber { background: var(--sc-warning-subtle); color: var(--sc-on-warning-subtle); }

/* ---------- Steps -------------------------------------------------------- */

.site-steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.site-step { position: relative; padding-top: 8px; }
.site-step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%; background: var(--sc-primary); color: #fff; font-weight: 700;
  box-shadow: var(--el-2);
}

/* ---------- Stats -------------------------------------------------------- */

.site-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.site-stat { text-align: center; padding: 22px 14px; border-radius: var(--site-radius); background: var(--sc-surface); border: 1px solid var(--sc-border); }
.site-stat-num { display: block; font-size: 1.8rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.site-stat-label { color: var(--sc-text-muted); font-size: .92rem; }

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

.site-cta {
  position: relative; overflow: hidden; border-radius: 24px; padding: clamp(36px, 5vw, 64px);
  background: linear-gradient(135deg, var(--sc-primary), #6d4aff); color: #fff; box-shadow: var(--el-4);
}
.site-cta h2 { color: #fff; }
.site-cta p { color: rgba(255, 255, 255, .88); max-width: 56ch; }
.site-cta .site-btn-ghost { background: #fff; border-color: transparent; color: var(--sc-primary); }

/* ---------- Prose (privacy, terms) --------------------------------------- */

.site-prose { max-width: 74ch; }
.site-prose h2 { margin-top: 2.2em; font-size: 1.4rem; }
.site-prose h2:first-of-type { margin-top: 1em; }
.site-prose ul { padding-left: 1.15rem; }
.site-prose li { margin-bottom: .5rem; }
.site-prose .site-updated { color: var(--sc-text-muted); font-size: .92rem; }

/* ---------- Contact ------------------------------------------------------ */

.site-contact-card { display: flex; gap: 16px; align-items: flex-start; }
.site-contact-card a { font-weight: 600; word-break: break-word; }

.site-field { display: block; margin-bottom: 16px; }
.site-field span { display: block; font-weight: 600; margin-bottom: 6px; font-size: .94rem; }
.site-field input, .site-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--sc-border); border-radius: 12px;
  font: inherit; color: inherit; background: var(--sc-surface);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-field input:focus, .site-field textarea:focus {
  outline: none; border-color: var(--sc-primary); box-shadow: 0 0 0 4px rgba(var(--sc-primary-rgb), .16);
}

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

.site-footer { background: var(--sc-text); color: rgba(255, 255, 255, .74); padding: 64px 0 28px; margin-top: 0; }
.site-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer a { display: block; color: rgba(255, 255, 255, .74); padding: 5px 0; transition: color .2s var(--ease); }
.site-footer a:hover { color: #fff; }
.site-footer-title { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.site-footer-blurb { max-width: 42ch; margin-top: 14px; }
.site-brand--footer .site-brand-name { color: #fff; }
.site-footer-base {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .9rem;
}

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

/* Only elements JS has claimed are hidden, so with JS off nothing disappears. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 900px) {
  .site-hero-grid, .site-grid-2 { grid-template-columns: 1fr; }
  .site-grid-3, .site-steps { grid-template-columns: repeat(2, 1fr); }
  .site-stats { grid-template-columns: repeat(2, 1fr); }
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-burger { display: block; }
  .site-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--sc-surface); border-bottom: 1px solid var(--sc-border);
    padding: 14px var(--site-gut) 22px; box-shadow: var(--el-3);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav-link.is-current::after { display: none; }
  .site-nav .site-btn { margin-top: 8px; }
  .site-grid-3, .site-steps, .site-footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Motion, opted out -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
