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

/* Smooth scrolling is done explicitly in JS (resources/js/index.js) only on
   anchor-link clicks, so it can respect prefers-reduced-motion and never
   fights ScrollTrigger.refresh(), which saves/restores scroll position
   itself. A global `scroll-behavior: smooth` made every programmatic
   scroll animate, including ones that should be instant. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html {
  /* Stops the browser's automatic scroll-anchoring from nudging the page
     when an animated element's box changes size off-screen. */
  overflow-anchor: none;
  /* Reserves the scrollbar's track permanently, so locking body scroll for
     the menu overlay never shifts the layout by the scrollbar's width. */
  scrollbar-gutter: stable;
}

/* Locking scroll on <html> alone. Also locking <body> turned it into its
   own scroll container — <body> then became the sticky header's offset
   parent instead of the viewport, so it "stuck" to wherever the document
   had scrolled to and the apple button flew off-screen. */
html.menu-is-open {
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  /* `clip` (not `hidden`) — `hidden` on body would create the same
     scroll-container problem for the sticky header described above. */
  overflow-x: clip;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

#about, #plans, #about-consultation, #exclusive-software, #testimonials, #location, #faq {
  scroll-margin-top: var(--header-h);
}

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

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-strong);
  margin: 0;
  line-height: 1.1;
  font-weight: 600;
}

p { margin: 0; }

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -60px;
  z-index: 200;
  background: var(--olive);
  color: var(--on-dark);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-sm);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-sm);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  font-weight: 700;
}

.section-heading {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-sm);
}

.section-intro {
  font-size: var(--fs-lead);
  max-width: 46ch;
  color: var(--ink);
}

.hand-note {
  font-family: var(--font-hand);
  font-size: clamp(1.2rem, 1.6vw, 1.7rem);
  color: var(--olive);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
}

.hand-note svg {
  width: 2.2em;
  height: 2.2em;
  flex-shrink: 0;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.9em 1.6em;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  isolation: isolate;
  overflow: hidden;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
}

.btn-primary {
  background: var(--olive);
  color: var(--on-dark);
}

.btn-primary::before {
  background: var(--brown);
  clip-path: circle(0% at 50% 50%);
  transition: clip-path var(--dur-base) var(--ease-out);
}

.btn-primary:hover::before,
.btn-primary:focus-visible::before {
  clip-path: circle(140% at 50% 50%);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--olive);
  color: var(--olive);
}

.btn-ghost::before {
  background: var(--olive);
  clip-path: circle(0% at 50% 50%);
  transition: clip-path var(--dur-base) var(--ease-out);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--on-dark);
}

.btn-ghost:hover::before,
.btn-ghost:focus-visible::before {
  clip-path: circle(140% at 50% 50%);
}

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

.btn .arrow {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease-out);
}

.btn:hover .arrow,
.btn:focus-visible .arrow {
  transform: rotate(45deg);
}

.whatsapp-float {
  position: fixed;
  right: var(--space-sm);
  bottom: var(--space-sm);
  z-index: 150;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--on-dark);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
}

.whatsapp-float svg { width: 28px; height: 28px; }

@media (prefers-reduced-motion: no-preference) {
  .whatsapp-float {
    animation: pulse-ring 2.6s ease-out infinite;
  }
}

@keyframes pulse-ring {
  0%, 60%, 100% { box-shadow: var(--shadow-md), 0 0 0 0 rgba(var(--olive-rgb), 0); }
  75% { box-shadow: var(--shadow-md), 0 0 0 14px rgba(var(--olive-rgb), 0.18); }
}

.decor { pointer-events: none; }

.aspect-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
}

.aspect-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-note {
  position: absolute;
  inset: auto var(--space-2xs) var(--space-2xs) var(--space-2xs);
  font-size: 0.7rem;
  color: var(--brown);
  background: rgba(247, 243, 236, 0.85);
  padding: 0.25em 0.6em;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
}
