/* =============================================================
   Services DomiaTech - hand-written stylesheet (no Tailwind, no build)
   Token values mirror apps/web/src/index.css (HSL CSS variables).
   ============================================================= */

:root {
  /* Light theme tokens - mirror apps/web/src/index.css :root */
  --background: 60 16% 96%;
  --foreground: 220 23% 15%;
  --primary: 240 60% 60%;
  --primary-foreground: 0 0% 100%;
  --accent: 166 51% 37%;
  --accent-foreground: 0 0% 100%;
  --card: 220 55% 96%;
  --card-foreground: 220 23% 15%;
  --muted: 221 32% 92%;
  --muted-foreground: 220 12% 38%;
  --border: 221 26% 88%;
  --input: 0 0% 100%;
  --ring: 240 60% 60%;
  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 100%;
  --radius: 0.5rem;

  /* Hero design tokens */
  --hero-gradient-start: 240 62% 58%;
  --hero-gradient-end: 233 42% 26%;
  --hero-accent: 166 58% 40%;
  --hero-overlay: 236 34% 16%;

  /* Layout */
  --max-content: 80rem;
  --max-prose: 56rem;          /* Tailwind max-w-4xl, used by React for narrow sections */

  /* Reveal */
  --reveal-distance: 20px;
  --reveal-duration: 600ms;
  --reveal-delay: 0ms;
}

/* Dark mode tokens retained for future toggle (no UI yet). */
.dark {
  --background: 220 22% 10%;
  --foreground: 60 16% 95%;
  --primary: 240 68% 68%;
  --accent: 166 45% 44%;
  --card: 220 20% 14%;
  --card-foreground: 60 16% 95%;
  --muted: 220 16% 18%;
  --muted-foreground: 220 10% 70%;
  --border: 220 16% 24%;
  --input: 220 16% 18%;
  --ring: 240 68% 68%;
  --hero-gradient-start: 240 58% 34%;
  --hero-gradient-end: 233 42% 16%;
  --hero-accent: 166 52% 38%;
  --hero-overlay: 236 36% 10%;
}

/* DM Sans variable font (one face, weight axis 100-1000). Self-hosted woff2
   files live in /public_html/fonts/ and are produced by tools/download-fonts.sh.
   The unicode-range split mirrors Google Fonts' CSS so latin-ext only loads
   when accented Eastern-European glyphs appear on the page. */
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/DMSans-Variable.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/DMSans-Variable-Ext.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Reset + base ---------- */

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

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
  overflow-x: clip;
  line-height: 1.5;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

img { max-width: 100%; height: auto; }

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

/* Tailwind Preflight, partial. Component classes still set their own
   typography/colors; these rules only neutralize UA defaults so a missed
   utility never falls back to browser defaults. */
button, [role="button"] {
  background-color: transparent;
  background-image: none;
  cursor: pointer;
}
button:disabled, [role="button"][aria-disabled="true"] { cursor: not-allowed; }

input, textarea, select, button {
  font: inherit;
  color: inherit;
  margin: 0;
}
input::placeholder, textarea::placeholder {
  color: hsl(var(--muted-foreground));
  opacity: 1;
}

:where(h1, h2, h3, h4, h5, h6) {
  font-size: inherit;
  font-weight: inherit;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  letter-spacing: -0.02em;
  margin: 0;
}

p { text-wrap: pretty; margin: 0; }

ul, ol { margin: 0; padding: 0; }

sup {
  font-size: 0.6em;
  position: relative;
  top: -1em;
}

::selection {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

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

.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ---------- Layout primitives ---------- */

.main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4rem);
}

.section {
  padding: 4rem 0;
}
.section--white { background: hsl(var(--background)); }
.section--tinted { background: hsl(var(--primary) / 0.05); }
.section--muted { background: hsl(var(--muted) / 0.3); }

.section__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1rem;          /* px-4 */
}
@media (min-width: 640px) { .section__inner { padding: 0 1.5rem; } }   /* sm:px-6 */
@media (min-width: 1024px) { .section__inner { padding: 0 2rem; } }    /* lg:px-8 */
.section__inner--narrow { max-width: var(--max-prose); }

.section__intro {
  max-width: 48rem;
  margin: 0 auto 3rem;
  text-align: center;
}
.section__title {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
  /* Tailwind text-4xl ships with line-height: 2.5rem (40px) at font-size 36px,
     i.e. ~1.111. Matches React, which keeps the per-utility default. */
  line-height: 1.111;
}
.section__subtitle {
  font-size: 1.125rem;
  color: hsl(var(--foreground) / 0.8);
  line-height: 1.625;     /* leading-relaxed */
}
.section__ctas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 2rem 0;
  margin: 0 auto;
  width: 100%;
  max-width: 28rem;
}
/* React renders this CTA pair as `grid-cols-1 sm:grid-cols-2 gap-3 py-8 w-1/2`,
   centered. From sm+, two columns at half the section width. */
@media (min-width: 640px) {
  .section__ctas {
    grid-template-columns: 1fr 1fr;
    width: 50%;
    max-width: none;
  }
}

/* Section is vertical-only padding; horizontal padding belongs to .section__inner. */

/* ---------- Buttons ----------
   Faithful to shadcn's buttonVariants() cva config in
   apps/web/src/components/ui/button.jsx. Tokens come from CSS variables;
   shadows match Tailwind's `shadow` and `shadow-sm` exactly. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem;            /* shadcn default size = h-9 */
  padding: 0.5rem 1rem;       /* px-4 py-2 */
  border-radius: 0.375rem;    /* rounded-md */
  font-size: 0.875rem;        /* text-sm */
  font-weight: 500;
  line-height: 1.25rem;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.button:active { transform: scale(0.98); }
.button:disabled { opacity: 0.5; pointer-events: none; }
.button__icon { flex: 0 0 auto; }

/* Tailwind shadow tokens, lifted verbatim so the boxes look identical. */
.button--primary,
.button--accent {
  /* `shadow` — 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) */
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}
.button--outline,
.button--secondary {
  /* `shadow-sm` — 0 1px 2px 0 rgb(0 0 0 / 0.05) */
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.button--primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.button--primary:hover:not(:disabled) { background: hsl(var(--primary) / 0.9); }

.button--accent {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border-color: hsl(var(--accent));
}
.button--accent:hover:not(:disabled) { background: hsl(var(--accent) / 0.9); }

.button--secondary {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.button--secondary:hover:not(:disabled) { background: hsl(var(--muted) / 0.8); }

.button--outline {
  /* shadcn: `border border-input bg-background`. --input is the field-fill
     token (white in light theme); --border is the divider token, used by the
     React app's `border-border` override on these CTAs. We pick --border to
     match the rendered divider color seen on the React side. */
  background: hsl(var(--background));
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}
.button--outline:hover:not(:disabled) { background: hsl(var(--muted)); }

.button--ghost {
  background: transparent;
  border-color: transparent;
  color: hsl(var(--foreground));
}
.button--ghost:hover:not(:disabled) {
  background: hsl(var(--muted));
  color: hsl(var(--primary));
}

/* shadcn's stock `lg` size — used by home services-section CTAs and other
   "lg without h-14 override" callsites. */
.button--lg {
  height: 2.5rem;             /* h-10 */
  padding: 0 2rem;             /* px-8 */
  border-radius: 0.375rem;    /* rounded-md (already from base, restated for clarity) */
}

/* The hero override pattern: h-14 px-8 text-lg rounded-xl. Used by every
   "lg + custom big" callsite on the home hero. */
.button--large {
  height: 3.5rem;             /* h-14 */
  padding: 0 2rem;            /* px-8 */
  font-size: 1.125rem;        /* text-lg */
  line-height: 1.75rem;
  border-radius: 0.75rem;     /* rounded-xl */
}

/* The "padded" override pattern: shadcn lg + className "py-6 px-8 text-lg".
   Used by the services-page hero CTAs. With border-box + height equal to the
   total padding, the box renders ~48px tall while the flex centering places
   the text. This matches what React renders despite the math looking odd. */
.button--padded {
  height: 3rem;               /* 48px — matches React's computed declared height */
  padding: 1.5rem 2rem;       /* py-6 px-8 */
  font-size: 1.125rem;        /* text-lg */
  line-height: 1.75rem;
  border-radius: 0.375rem;    /* rounded-md (NOT rounded-xl — different from .button--large) */
}

/* Variant override: outline button colored with --primary instead of --border.
   Stand-alone — does NOT combine with .button--outline. Hover inverts to filled. */
.button--outline-primary {
  background: hsl(var(--background));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.button--outline-primary:hover:not(:disabled) {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}
.site-header__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  /* No `justify-content`. The right-side cluster (nav + actions) is pushed to
     the page edge by `margin-left: auto` on the leftmost visible-on-this-bp
     element after the logo (see below); nav + actions then sit tight against
     each other with the inner `gap` providing 3rem spacing. */
  gap: 2rem;
  height: 4rem;
}
@media (min-width: 768px) {
  .site-header__inner { padding: 0 1.5rem; height: 5rem; }
}
@media (min-width: 1024px) {
  .site-header__inner { padding: 0 2rem; }
}

/* Mobile/tablet: nav is hidden, actions is the one that gets pushed right. */
.site-header__actions { margin-left: auto; }
/* Desktop: nav becomes visible and absorbs the auto-margin instead, so the
   nav sits flush-left against the actions block (with the 3rem inner gap). */
@media (min-width: 1024px) {
  .site-header__nav { margin-left: auto; }
  .site-header__actions { margin-left: 0; }
}

.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 2.25rem; width: auto; }
@media (min-width: 768px) { .site-header__logo img { height: 2.5rem; } }

.site-header__nav {
  display: none;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 1024px) { .site-header__nav { display: flex; } }

.site-header__link {
  font-weight: 500;
  color: hsl(var(--foreground));
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.site-header__link:hover { color: hsl(var(--primary)); }
.site-header__link--active {
  color: hsl(var(--primary));
}
.site-header__link--active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.5rem;
  height: 2px;
  background: hsl(var(--primary));
}

.site-header__actions { display: flex; align-items: center; gap: 2rem; }

.lang-switch {
  display: inline-flex;
  background: hsl(var(--muted) / 0.5);
  border-radius: var(--radius);
  padding: 0.25rem;
}
.lang-switch__option {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: calc(var(--radius) - 0.125rem);
  color: hsl(var(--muted-foreground));
  transition: background-color 0.2s, color 0.2s;
}
.lang-switch__option--active {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px hsl(0 0% 0% / 0.05);
}
.lang-switch__option:hover:not(.lang-switch__option--active) { color: hsl(var(--foreground)); }

.site-header__cta { display: none; }
@media (min-width: 1024px) { .site-header__cta { display: inline-flex; } }

.site-header__menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: none;
  color: hsl(var(--foreground));
  border-radius: var(--radius);
  transition: color 0.2s;
}
.site-header__menu-toggle:hover { color: hsl(var(--primary)); }
@media (min-width: 1024px) { .site-header__menu-toggle { display: none; } }

.site-header__mobile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.site-header__mobile[hidden] { display: none; }
@media (min-width: 1024px) { .site-header__mobile { display: none !important; } }

.site-header__mobile-link {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 0.2s, color 0.2s;
}
.site-header__mobile-link:hover { background: hsl(var(--muted)); }
.site-header__mobile-link--active {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}
.site-header__mobile-cta {
  margin-top: 0.5rem;
  width: 100%;
}

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

.site-footer {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  margin-top: auto;
}
.site-footer__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 3rem 1rem;
}
@media (min-width: 768px) { .site-footer__inner { padding: 3rem 1.5rem; } }

.site-footer__columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .site-footer__columns { grid-template-columns: repeat(3, 1fr); }
}

.site-footer__brand {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.site-footer__desc {
  color: hsl(var(--primary-foreground) / 0.9);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.site-footer__location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--primary-foreground) / 0.9);
  font-size: 0.875rem;
  margin: 0;
}

.site-footer__heading {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.site-footer__links a {
  color: hsl(var(--primary-foreground) / 0.9);
  transition: color 0.2s;
}
.site-footer__links a:hover { color: hsl(var(--primary-foreground)); }

.site-footer__contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.site-footer__contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--primary-foreground) / 0.9);
}
.site-footer__contact a:hover { color: hsl(var(--primary-foreground)); }

.site-footer__icon { flex: 0 0 auto; }

.site-footer__bottom {
  border-top: 1px solid hsl(var(--primary-foreground) / 0.2);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .site-footer__bottom { flex-direction: row; justify-content: space-between; }
}

.site-footer__copyright {
  font-size: 0.875rem;
  color: hsl(var(--primary-foreground) / 0.8);
}
.site-footer__terms {
  font-size: 0.875rem;
  color: hsl(var(--primary-foreground) / 0.8);
  transition: color 0.2s;
}
.site-footer__terms:hover { color: hsl(var(--primary-foreground)); }

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: hsl(var(--muted));
  padding: 2rem 0;
  overflow: hidden;
}
@media (min-width: 1024px) { .hero { padding: 3rem 0; } }

.hero__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 768px) { .hero__inner { padding: 0 1.5rem; } }
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr 1fr; gap: 3rem; padding: 0 2rem; }
}

.hero__copy { position: relative; z-index: 2; }
.hero__heading {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  font-weight: 800;
  line-height: 1;            /* matches React's computed 1.0 — see plan §5 */
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
  text-shadow: 0 4px 12px hsl(0 0% 0% / 0.08);
}
.hero__subtitle {
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  /* Tailwind text-xl ships with 1.75rem (28px) line-height — `leading-relaxed`
     in the JSX doesn't override this in the React app's compiled CSS. Match. */
  line-height: 1.75rem;
  color: hsl(var(--foreground) / 0.8);
  margin-bottom: 2rem;
  max-width: 36rem;
}

.hero__ctas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.hero__cta-primary {
  grid-column: 1 / -1;
  /* React JSX: `shadow-lg shadow-primary/20` — overrides the default black
     `shadow` from .button--primary with a primary-tinted larger glow. */
  box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.2),
              0 4px 6px -4px hsl(var(--primary) / 0.2);
}
@media (min-width: 640px) {
  .hero__ctas { grid-template-columns: 1fr 1fr; }
  .hero__cta-primary { grid-column: 1 / -1; }
}

.hero__art {
  position: relative;
  width: 100%;
  height: 300px;
  margin-top: 1.5rem;
}
@media (min-width: 640px) { .hero__art { height: 400px; } }
@media (min-width: 1024px) { .hero__art { height: 500px; margin-top: 0; } }

.hero__art-frame {
  position: absolute;
  inset: 0;
  border-radius: 2.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px hsl(0 0% 0% / 0.25);
}
.hero__art-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsl(var(--hero-gradient-start)), hsl(var(--hero-gradient-end)));
}
.hero__art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: overlay;
  opacity: 0.5;
}
.hero__art-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsl(var(--hero-gradient-end)), transparent 60%);
  opacity: 0.9;
}
.hero__art-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Badge carousel (in hero art) ----------
   The active slide flows in normal layout so it sizes the wrapper; the other
   slides overlay via `position: absolute; inset: 0`. Without this, all slides
   would be absolute and the wrapper would collapse to height 0. */

.badge-carousel {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  z-index: 3;
}
@media (min-width: 640px) { .badge-carousel { bottom: 3rem; left: 3rem; right: 3rem; } }

.badge-carousel__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: hsl(0 0% 100% / 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsl(0 0% 100% / 0.20);
  border-radius: 1rem;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.badge-carousel__slide--active {
  position: relative;        /* sizes the parent .badge-carousel */
  opacity: 1;
  transform: translateY(0);
}
.badge-carousel__slide--leaving {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(-100%);
}

.badge-carousel__icon {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: hsl(var(--hero-accent));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px hsl(0 0% 0% / 0.1);
}

.badge-carousel__copy { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.badge-carousel__title {
  color: white;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: 0.025em;
}
.badge-carousel__desc {
  color: hsl(0 0% 100% / 0.8);
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  .badge-carousel__slide { transition: opacity 0.3s; transform: none; }
  .badge-carousel__slide--leaving { transform: none; }
}

/* ---------- Card grid + service card ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .card-grid--two { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .card-grid--three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid--three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .card-grid--four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid--four { grid-template-columns: repeat(4, 1fr); } }

.service-card {
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;     /* rounded-xl, matches shadcn Card */
  padding: 1.5rem;
  height: 100%;
  /* Tailwind `shadow` token at rest. Cards visibly sit above their background. */
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  /* Match React's Tailwind `transition-all duration-300`: 0.3s with the
     standard Material easing curve, NOT the CSS default `ease`. */
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover {
  /* Tailwind `shadow-lg`. */
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transform: translateY(-4px);   /* `-translate-y-1` */
}
.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  margin-bottom: 1rem;
}
.service-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
  line-height: 1.375;     /* leading-snug */
}
.service-card__body {
  color: hsl(var(--card-foreground));
  line-height: 1.625;     /* leading-relaxed */
}

/* ---------- Callout (image + copy) ---------- */

.callout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  background: hsl(var(--card));
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px hsl(0 0% 0% / 0.1);
}
@media (min-width: 768px) { .callout { padding: 2rem; } }
@media (min-width: 1024px) {
  .callout { grid-template-columns: 1fr 1fr; }
  .callout--reverse .callout__image { order: 1; }
  .callout--reverse .callout__copy { order: 2; }
}

.callout__title {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
  line-height: 1.111;     /* text-4xl default 2.5rem at 36px font */
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.callout__title-icon { color: hsl(var(--accent)); }
.callout__desc {
  font-size: 1.125rem;
  line-height: 1.625;     /* leading-relaxed */
  color: hsl(var(--card-foreground) / 0.8);
  margin-bottom: 1.25rem;
}
.callout__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.callout__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: hsl(var(--card-foreground) / 0.8);
}
.callout__check {
  flex: 0 0 auto;
  color: hsl(var(--primary));
  margin-top: 0.125rem;
}
.callout__image {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* "Bare" variant: same two-column layout, no surrounding box. The right
   column is expected to bring its own card treatment (e.g. .help-cards). */
.callout--bare {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  gap: 2.5rem;          /* React renders this section with gap-10, not gap-8. */
}
@media (min-width: 768px) { .callout--bare { padding: 0; } }

/* ---------- Page hero (services pages) ---------- */

.page-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.05), hsl(var(--accent) / 0.05));
  padding: 3rem 0;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}
.page-hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) { .page-hero__inner { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .page-hero__inner { padding: 0 2rem; } }

.page-hero__copy { max-width: 48rem; }
.page-hero__title {
  /* React: text-4xl md:text-5xl lg:text-6xl. Discrete steps, not a clamp.
     `leading-tight` in the JSX doesn't override Tailwind text-6xl's intrinsic
     line-height: 1 in the actual compiled CSS — match that. */
  font-size: 2.25rem;          /* text-4xl 36px */
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
  line-height: 1;
}
@media (min-width: 768px) {
  .page-hero__title { font-size: 3rem; }      /* md:text-5xl 48px */
}
@media (min-width: 1024px) {
  .page-hero__title { font-size: 3.75rem; }   /* lg:text-6xl 60px */
}
.page-hero__subtitle {
  /* React: text-xl md:text-2xl leading-relaxed. Tailwind's responsive
     font-size utilities reset line-height (text-2xl → 2rem), overriding
     `leading-relaxed` in the compiled CSS — match that ~1.333 ratio. */
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  color: hsl(var(--foreground) / 0.8);
  line-height: 1.333;
  margin-bottom: 1.5rem;
}
.page-hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .page-hero__ctas { flex-direction: row; }
}

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

.pricing { padding: 2rem 0; background: hsl(var(--background)); }
.pricing__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) { .pricing__inner { padding: 0 1.5rem; } }

.pricing__intro { text-align: center; max-width: 48rem; margin: 0 auto 3rem; }
.pricing__title {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
}
.pricing__subtitle { font-size: 1.125rem; color: hsl(var(--foreground) / 0.8); }

.pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.pricing__grid--two { max-width: 56rem; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .pricing__grid--two { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .pricing__grid--three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pricing__grid--three { grid-template-columns: repeat(3, 1fr); } }

.pricing__card {
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;     /* rounded-xl, matches shadcn Card */
  padding: 1.5rem;
  height: 100%;
  /* Tailwind `shadow` at rest. */
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  /* Match React's Tailwind `transition-all duration-300`: 0.3s with the
     standard Material easing curve, NOT the CSS default `ease`. */
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pricing__card:hover {
  /* `shadow-lg` + `-translate-y-1`. */
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transform: translateY(-4px);
}
.pricing__card--bespoke {
  background: hsl(var(--accent) / 0.05);
  border-color: hsl(var(--accent) / 0.2);
}
.pricing__card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  margin-bottom: 1rem;
}
.pricing__card--bespoke .pricing__card-icon {
  background: hsl(var(--accent) / 0.15);
  color: hsl(var(--accent));
}
.pricing__card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.25rem; }
.pricing__card-price { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.pricing__card-rate {
  font-size: 2.25rem;
  font-weight: 800;
  color: hsl(var(--foreground));
}
.pricing__card-period { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.pricing__card-rule {
  border: 0;
  height: 1px;
  background: hsl(var(--border));
  margin: 1.25rem 0;
}
.pricing__card-extra {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}
.pricing__card-extra svg { color: hsl(var(--primary)); flex: 0 0 auto; }
.pricing__card-desc { font-size: 0.95rem; color: hsl(var(--muted-foreground)); line-height: 1.6; flex: 1; }
.pricing__card-cta { width: 100%; margin-top: 1.5rem; }

.pricing__prepaid {
  position: relative;
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--primary));
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.2);
  border-radius: 0.75rem;     /* rounded-xl, matches shadcn Card */
  overflow: hidden;
  /* Match React's Tailwind `transition-all duration-300`: 0.3s with the
     standard Material easing curve, NOT the CSS default `ease`. */
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pricing__prepaid:hover {
  /* Existing primary ring + Tailwind `shadow-xl`. */
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.2), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  transform: translateY(-4px);
}
@media (min-width: 1024px) { .pricing__prepaid { flex-direction: row; } }

.pricing__prepaid-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  z-index: 2;
}

.pricing__prepaid-info {
  padding: 1.5rem;
  background: hsl(var(--primary) / 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 1024px) {
  .pricing__prepaid-info { width: 40%; padding: 2rem; border-right: 1px solid hsl(var(--border)); }
}
.pricing__prepaid-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  margin-bottom: 1rem;
}
.pricing__prepaid-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
.pricing__prepaid-desc { color: hsl(var(--foreground) / 0.7); line-height: 1.6; }

.pricing__prepaid-blocks {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  flex: 1;
}
@media (min-width: 640px) { .pricing__prepaid-blocks { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pricing__prepaid-blocks { padding: 2rem; } }

.pricing__prepaid-block {
  display: flex;
  flex-direction: column;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px hsl(0 0% 0% / 0.05);
}
.pricing__prepaid-label {
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.25rem;
}
.pricing__prepaid-price {
  font-weight: 700;
  font-size: 1.875rem;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}
.pricing__prepaid-save {
  font-size: 0.875rem;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius);
  text-align: center;
  margin-top: auto;
}

.pricing__terms-link { text-align: center; margin: 1.5rem 0 0.5rem; }
.pricing__terms-link a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: underline;
  text-underline-offset: 0.25em;
  transition: color 0.2s;
}
.pricing__terms-link a:hover { color: hsl(var(--foreground)); }

.pricing__disclaimer {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}
.pricing__disclaimer p { margin-bottom: 0.25rem; }

/* When the section is "narrow" (Services-for-Home variant) the prepaid block,
   terms link and disclaimer all cap at the same 56rem the line-1 grid uses,
   matching React's `${!forBusiness ? 'max-w-4xl mx-auto' : ''}` overrides. */
.pricing--narrow .pricing__prepaid,
.pricing--narrow .pricing__terms-link,
.pricing--narrow .pricing__disclaimer {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Timeline (services-home info steps) ---------- */

.timeline {
  list-style: none;
  position: relative;
  padding-left: 1rem;
  margin-left: 1rem;
  border-left: 2px solid hsl(var(--primary) / 0.2);
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
@media (min-width: 768px) { .timeline { margin-left: 2rem; padding-left: 2rem; } }

.timeline__item {
  position: relative;
}
.timeline__marker {
  position: absolute;
  top: 1.25rem;
  /* Center the 32px marker on the OL's 2px left border:
       left = -(padding-left + marker-half-width + border-half-width)
            = -(1rem + 16px + 1px)  on mobile  → -33px
            = -(2rem + 16px + 1px)  at md+      → -49px */
  left: calc(-1rem - 17px);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 4px 6px -1px hsl(0 0% 0% / 0.1);
  outline: 4px solid hsl(var(--muted));
}
@media (min-width: 768px) { .timeline__marker { left: calc(-2rem - 17px); } }

.timeline__card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px hsl(0 0% 0% / 0.05);
  transition: box-shadow 0.3s;
}
.timeline__card:hover { box-shadow: 0 10px 15px -3px hsl(0 0% 0% / 0.1); }
.timeline__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--card-foreground));
  margin-bottom: 0.75rem;
}
.timeline__body {
  color: hsl(var(--card-foreground) / 0.8);
  line-height: 1.6;
}

/* ---------- Help cards (services-home) ---------- */

.help-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: hsl(var(--card));
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 15px -3px hsl(0 0% 0% / 0.1);
}
.help-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.help-card__icon {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.help-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--card-foreground));
  margin-bottom: 0.25rem;
}
.help-card__body {
  font-size: 0.875rem;
  color: hsl(var(--card-foreground) / 0.8);
  line-height: 1.6;
}

/* ---------- Ideal cards (services-business) ---------- */

.ideal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}
@media (min-width: 768px) { .ideal-grid { grid-template-columns: repeat(2, 1fr); } }

.ideal-card {
  background: hsl(var(--card));
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px hsl(0 0% 0% / 0.1);
}
.ideal-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
}
.ideal-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ideal-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--card-foreground) / 0.8);
}
.ideal-card__check {
  flex: 0 0 auto;
  color: hsl(var(--primary));
  margin-top: 0.125rem;
}

.quote {
  margin: 3rem auto 0;
  max-width: 56rem;
  background: hsl(var(--primary) / 0.05);
  border-radius: 1rem;
  padding: 2rem;
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.6;
  text-align: center;
  color: hsl(var(--foreground) / 0.8);
}

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

.contact-section { padding: 5rem 0; }
.contact-section__inner { max-width: 56rem; }

.contact-form {
  background: hsl(var(--card));
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 15px -3px hsl(0 0% 0% / 0.1);
}

.contact-form__intro { margin-bottom: 2rem; }
.contact-form__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 0.5rem;
}
.contact-form__subtitle {
  color: hsl(var(--card-foreground));
  line-height: 1.6;
}

.contact-form__phone-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .contact-form__phone-cta { flex-direction: row; justify-content: space-between; text-align: left; }
}
.contact-form__phone-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}
.contact-form__phone-desc {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.5;
}
.contact-form__phone-number {
  display: block;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-top: 0.25rem;
}
.contact-form__phone-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
@media (min-width: 640px) {
  .contact-form__phone-actions { flex-direction: row; width: auto; }
}

.contact-form__divider {
  display: flex;
  align-items: center;
  margin: 2rem 0;
}
.contact-form__divider::before,
.contact-form__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: hsl(var(--border));
}
.contact-form__divider span {
  padding: 0 1rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
}

.contact-form__banner {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
}
.contact-form__banner--success {
  background: hsl(166 51% 37% / 0.1);
  border: 1px solid hsl(166 51% 37% / 0.3);
  color: hsl(166 51% 25%);
}
.contact-form__banner--error {
  background: hsl(var(--destructive) / 0.1);
  border: 1px solid hsl(var(--destructive) / 0.2);
  color: hsl(var(--destructive));
}

.contact-form__noscript {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.contact-form__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form__field { display: flex; flex-direction: column; }
.contact-form__label {
  font-weight: 500;
  font-size: 0.875rem;
  color: hsl(var(--card-foreground));
  margin-bottom: 0.5rem;
}
.contact-form__required { color: hsl(var(--destructive)); }

.contact-form__input {
  font: inherit;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--input));
  color: hsl(var(--foreground));
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form__input::placeholder { color: hsl(var(--muted-foreground)); }
.contact-form__input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}
.contact-form__input:disabled { opacity: 0.6; cursor: not-allowed; }

.contact-form__textarea {
  resize: vertical;
  min-height: 9rem;
}

.contact-form__submit { width: 100%; }

/* ---------- Terms page ---------- */

.terms-page {
  padding: 4rem 0;
  background: hsl(var(--background));
  flex-grow: 1;
}
.terms-page__inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.terms-page__back { margin-bottom: 2rem; padding-left: 0; }
.terms-page__article { max-width: none; }
.terms-page__title {
  font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 2rem;
  text-wrap: balance;
}

.terms-list {
  list-style: decimal;
  list-style-position: outside;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.5rem 1.5rem 1.5rem 2.5rem;
  color: hsl(var(--foreground) / 0.8);
  line-height: 1.6;
}
@media (min-width: 768px) { .terms-list { padding: 2rem 2rem 2rem 3rem; } }
.terms-list li::marker {
  color: hsl(var(--primary));
  font-weight: 600;
}
.terms-list__item { padding-left: 0.5rem; margin-bottom: 1.5rem; }
.terms-list__heading {
  color: hsl(var(--primary));
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.terms-list__body { line-height: 1.6; }

/* ---------- Reveal animation (IntersectionObserver) ----------
   Implemented as a CSS @keyframes animation rather than a transition so that
   the reveal delay (`--reveal-delay`) does NOT bleed into post-reveal property
   changes like `.service-card:hover { transform: translateY(-4px) }`. With a
   transition-based reveal, every transform change inherits transition-delay,
   making hover lifts feel sluggish on cards with staggered reveal delays. */

.reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
}
.reveal.is-visible {
  animation: reveal-in var(--reveal-duration) ease-out var(--reveal-delay, 0ms) backwards;
}
@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }
  /* `to` omitted — animation lands on the element's natural styles
     (opacity:1, transform:none), then yields the cascade back to whatever
     hover/state rules apply. No `forwards` fill-mode = no leftover lock-in. */
}

@media (prefers-reduced-motion: reduce) {
  .reveal:not(.is-visible) { opacity: 1; transform: none; }
  .reveal.is-visible { animation: none; }
  html { scroll-behavior: auto; }
}
