/* ==========================================================================
   Base — design tokens, layout container, shared components, reveal system
   Design reference width: 1920px (content 1420px, 250px gutters)
   ========================================================================== */

:root {
  /* Brand palette (from Figma) */
  --c-teal: #2e7777;
  --c-night: #1e2b2a;
  --c-ink: #2f3e46;
  --c-text: #333333;
  --c-gold: #d7a64b;
  --c-gold-soft: #d0a75a;
  --c-gold-light: #f3d08a;
  --c-coral: #bb6f65;
  --c-rust: #9d5242;
  --c-sage: #9cb298;
  --c-cream: #fbf5ea;
  --c-mist: #f2f4f1;
  --c-stone: #f2f2ef;

  /* Layout: 1420px of content, gutters grow up to 250px at 1920px */
  --gutter: clamp(1.25rem, 5vw, 15.625rem);
  --container-w: min(1420px, 100vw - 2 * var(--gutter));

  /* Section rhythm: 40px on phones → 60px at 1920px */
  --sec-pad: clamp(2.5rem, 2.197rem + 1.294vw, 3.75rem);

  /* Fonts — files are dropped in later via @font-face */
  --font-sans: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Figtree", var(--font-sans);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --nav-offset: 128px;
}

/* Slide-in reveals start off-axis; clip so they never widen the layout viewport */
html,
main > section {
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-offset);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--c-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

::selection {
  background: var(--c-gold-light);
  color: var(--c-night);
}

/* ---------- Container ---------- */
.container-x {
  width: var(--container-w);
  margin-inline: auto;
}

.section-pad {
  padding-block: var(--sec-pad);
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--c-night);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s var(--ease-soft);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 999px;
}

/* ---------- Eyebrow label (dot + uppercase caption) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: clamp(0.875rem, 0.814rem + 0.259vw, 1.125rem);
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 30px;
  background: var(--c-teal);
}

.eyebrow-ink {
  --dot: var(--c-ink);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(1rem, 0.954rem + 0.194vw, 1.1875rem);
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    background-color 0.25s var(--ease-soft), color 0.25s var(--ease-soft);
}

.btn img {
  width: 24px;
  height: 24px;
  flex: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--c-teal);
  color: #fff;
  padding: 16px 26px;
}

.btn-primary:hover {
  background: #286a6a;
  box-shadow: 0 12px 28px -12px rgba(46, 119, 119, 0.65);
}

.btn-outline {
  border: 2px solid var(--c-ink);
  color: var(--c-ink);
  padding: 14px 26px;
}

.btn-outline:hover {
  background: var(--c-ink);
  color: #fff;
}

.btn-outline:hover img {
  filter: brightness(0) invert(1);
}

.btn-outline .btn-arrow {
  transition: transform 0.35s var(--ease-out);
}

.btn-outline:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-light {
  background: #fff;
  color: var(--c-teal);
  padding: 16px 26px;
}

.btn-light:hover {
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45);
}

/* Phone icon "ring" — a short, polite wiggle on hover */
.btn:hover .ring-icon {
  animation: phone-ring-once 0.8s var(--ease-soft);
}

/* Used on the main calls-to-action: rings briefly every few seconds */
.ring-loop .ring-icon {
  animation: phone-ring 5s var(--ease-soft) 2s infinite;
}

@keyframes phone-ring-once {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(-14deg); }
  30% { transform: rotate(12deg); }
  45% { transform: rotate(-10deg); }
  60% { transform: rotate(8deg); }
  75% { transform: rotate(-4deg); }
  90% { transform: rotate(2deg); }
}

@keyframes phone-ring {
  0%, 22%, 100% { transform: rotate(0); }
  3% { transform: rotate(-14deg); }
  6% { transform: rotate(12deg); }
  9% { transform: rotate(-10deg); }
  12% { transform: rotate(8deg); }
  15% { transform: rotate(-4deg); }
  18% { transform: rotate(2deg); }
}

/* ---------- Feature cards ---------- */
.feature-card {
  border-radius: 30px;
  padding: clamp(1.5rem, 1.35rem + 0.39vw, 1.875rem);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -28px rgba(30, 43, 42, 0.35);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: clamp(4.5rem, 4.04rem + 1.94vw, 6.25rem);
  height: clamp(4.5rem, 4.04rem + 1.94vw, 6.25rem);
  border-radius: 50%;
  flex: none;
  transition: transform 0.6s var(--ease-out);
}

.feature-icon img {
  width: 44%;
  height: 44%;
}

.feature-card:hover .feature-icon {
  transform: scale(1.06) rotate(-6deg);
}

/* ---------- CTA banner medallion: soft breathing halo ---------- */
.cta-medallion {
  box-shadow: 0 0 0 0 rgba(243, 208, 138, 0.45);
  animation: medallion-halo 4s ease-in-out infinite;
}

@keyframes medallion-halo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243, 208, 138, 0.35); }
  50% { box-shadow: 0 0 0 14px rgba(243, 208, 138, 0); }
}

/* ---------- Mobile quick-call button (phones only) ---------- */
.call-fab {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  box-shadow: 0 16px 36px -14px rgba(30, 43, 42, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 24px);
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), visibility 0s linear 0.5s;
}

.call-fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.call-fab.is-visible:hover {
  transform: translate(-50%, -2px);
}

@media (min-width: 640px) {
  .call-fab {
    display: none;
  }
}

/* ---------- Scroll reveal ----------
   Content is only hidden when JS is running (html.js), so the page
   never ends up blank without scripts. */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), clip-path 1.1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

/* Hint the compositor only while waiting to reveal. Keeping will-change
   after the reveal pins the element to a cached bitmap, which renders
   images and text soft. */
.js [data-reveal]:not(.is-visible) {
  will-change: opacity, transform;
}

.js [data-reveal="up"] { transform: translateY(36px); }
.js [data-reveal="down"] { transform: translateY(-24px); }
.js [data-reveal="left"] { transform: translateX(-48px); }
.js [data-reveal="right"] { transform: translateX(48px); }
.js [data-reveal="zoom"] { transform: scale(0.94); }
.js [data-reveal="fade"] { transform: none; }

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays (ms), used by scroll reveals and the hero intro */
[data-delay="80"] { --d: 80ms; }
[data-delay="100"] { --d: 100ms; }
[data-delay="120"] { --d: 120ms; }
[data-delay="150"] { --d: 150ms; }
[data-delay="160"] { --d: 160ms; }
[data-delay="220"] { --d: 220ms; }
[data-delay="240"] { --d: 240ms; }
[data-delay="320"] { --d: 320ms; }
[data-delay="360"] { --d: 360ms; }
[data-delay="500"] { --d: 500ms; }

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
