:root {
  --bg: #fdf8f3;
  --surface: #ffffff;
  --text: #2a2233;
  --muted: #6b5f75;
  --primary: #6f5596;
  --on-primary: #ffffff;
  --accent: #a85f4c;
  --border: #e8dcef;
  --focus: #6f5596;

  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-sm: clamp(0.875rem, 0.851rem + 0.109vw, 0.9375rem);
  --fs-body: clamp(1rem, 0.951rem + 0.217vw, 1.125rem);
  --fs-lead: clamp(1.0625rem, 0.99rem + 0.33vw, 1.25rem);
  --fs-h3: clamp(1.1875rem, 1.09rem + 0.43vw, 1.4375rem);
  --fs-h2: clamp(1.625rem, 1.283rem + 1.522vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.565rem + 3.043vw, 4rem);

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 72px;
  --section-y: clamp(56px, 40px + 5vw, 112px);

  --radius-card: 20px;
  --radius-btn: 999px;
  --radius-media: 20px;
  --shadow: 0 8px 24px rgb(42 34 51 / 0.08);

  --header-h: 64px;
  --container: 1160px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
a, button, summary { touch-action: manipulation; }

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

.sr-only {
  position: absolute !important;
  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: 16px; top: -100px; z-index: 100;
  padding: 12px 16px; border-radius: 8px;
  background: var(--primary); color: var(--on-primary);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}
@media (min-width: 640px) { .container { padding-inline: 24px; } }
.container-narrow { max-width: 760px; }

.icon { flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-row {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px;
  text-decoration: none; margin-right: auto;
}
.brand-mark { width: 40px; height: auto; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem; letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 359px) {
  .header-row { gap: var(--sp-2); }
  .brand-mark { width: 32px; }
  .brand-name { font-size: 0.9375rem; letter-spacing: 0.08em; }
}

.nav { display: none; }
.nav-list {
  list-style: none;
  display: flex; gap: var(--sp-5);
  font-size: var(--fs-sm);
}
.nav-list a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--muted); font-weight: 500;
}

.lang-toggle {
  display: inline-grid; place-items: center;
  min-width: 44px; height: 44px; padding: 0 var(--sp-3);
  border: 1px solid var(--border); border-radius: 12px;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.08em;
  text-decoration: none;
}

@media (min-width: 960px) { .nav { display: block; } }
@media (hover: hover) {
        }

/* Bottom tab bar */
.dock { display: none; }
@media (max-width: 959px) {
  :root { --header-h: 56px; --dock-h: 62px; --dock-space: 86px; }
  html { scroll-padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 16px); }
  .dock {
    position: fixed; inset: auto 0 0 0; z-index: 45;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    backdrop-filter: saturate(140%) blur(16px);
    border-top: 1px solid var(--border);
    -webkit-user-select: none; user-select: none;
    -webkit-touch-callout: none;
  }
  .dock a {
    display: grid; justify-items: center; align-content: end; gap: 3px;
    min-height: 50px; padding: 4px 2px 2px;
    border-radius: 12px;
    font-size: 0.6875rem; font-weight: 500; line-height: 1.15; text-align: center;
    color: var(--muted); text-decoration: none;
    transition: color 0.2s, transform 0.15s var(--ease);
  }
  .dock a span { max-width: 100%; overflow-wrap: anywhere; }
  .dock a:active { transform: scale(0.94); }
  .dock-tab[aria-current="true"] { color: var(--primary); font-weight: 600; }
  .dock-tab .icon { transition: transform 0.25s var(--ease); }
  .dock-tab[aria-current="true"] .icon { transform: translateY(-1px) scale(1.08); }
  .dock .dock-wa { color: var(--primary); font-weight: 600; }
  .dock-wa-btn {
    display: grid; place-items: center;
    width: 54px; height: 54px; margin-top: -24px;
    border-radius: 50%;
    background: var(--primary); color: var(--on-primary);
    box-shadow: 0 0 0 5px var(--bg), 0 8px 18px rgb(46 42 36 / 0.22);
  }
  .dock-wa-btn .icon { width: 26px; height: 26px; }
}
@media (max-width: 959px) and (max-height: 480px) and (orientation: landscape) {
  :root { --dock-h: 52px; --dock-space: 60px; }
  .dock { padding-top: 2px; padding-bottom: calc(2px + env(safe-area-inset-bottom)); }
  .dock a { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; }
  .dock-wa-btn { width: 40px; height: 40px; margin-top: 0; box-shadow: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 52px; padding: 0 var(--sp-5);
  border-radius: var(--radius-btn); border: 1px solid transparent;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background-color 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); }
.btn-outline { border-color: currentColor; color: var(--text); background: transparent; }
.btn-ghost { color: var(--text); text-decoration: underline; text-underline-offset: 4px; padding-inline: var(--sp-3); }
.btn-lg { min-height: 56px; padding: 0 var(--sp-6); font-size: 1.0625rem; }
@media (max-width: 479px) { .btn-block-mobile { width: 100%; } }

/* Typography helpers */
.eyebrow {
  font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
.section { padding-block: var(--section-y); }
.section-title { font-size: var(--fs-h2); margin-bottom: var(--sp-4); }
.section-lead { color: var(--muted); font-size: var(--fs-lead); max-width: 60ch; }
.section-head { margin-bottom: var(--sp-6); }

/* Trust list */
.trust-list { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); color: var(--muted); }
.trust-list li { display: inline-flex; align-items: center; gap: var(--sp-2); }
.trust-list .icon { width: 14px; height: 14px; color: var(--accent); }

/* Services */
.service-list { display: grid; gap: var(--sp-4); }
@media (min-width: 720px) { .service-list { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); } }
.service-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.service-index { font-family: var(--font-display); font-size: 0.9375rem; color: var(--accent); letter-spacing: 0.1em; }
.service-title { font-size: var(--fs-h3); }
.service-card p { color: var(--muted); }
.service-link {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px;
  font-weight: 600; color: var(--primary); text-decoration: none;
}
.service-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.service-link:hover { text-decoration: underline; }
.service-card:has(.service-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.service-link:focus-visible { outline: none; }

/* Pillars */
.pillar-list { display: grid; gap: var(--sp-5); margin-top: var(--sp-6); }
@media (min-width: 800px) { .pillar-list { grid-template-columns: repeat(3, 1fr); } }
.pillar h3 { font-size: var(--fs-h3); margin-bottom: var(--sp-2); }
.pillar p { color: var(--muted); }

/* Steps */
.steps { display: grid; gap: var(--sp-5); margin-top: var(--sp-6); counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; gap: var(--sp-4); align-items: flex-start; }
.step-num {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--font-display); font-size: 1.25rem;
}
.step h3 { font-size: var(--fs-h3); margin-bottom: var(--sp-1); }
.step p { color: var(--muted); }

/* About */
.about-grid { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }
.about-media { margin: 0; }
.about-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-media); }
.about-body > p { color: var(--muted); margin-bottom: var(--sp-5); }
.check-list { display: grid; gap: var(--sp-3); }
.check-list li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.check-list .icon { color: var(--primary); margin-top: 3px; }

/* Testimonials */
.testimonials-card { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 900px) { .testimonials-card { grid-template-columns: 0.9fr 1.1fr; gap: var(--sp-8); } }
.testimonials-media { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-media); }
.testimonials-body > p { color: var(--muted); margin-bottom: var(--sp-5); }

/* FAQ */
.faq-list { margin-top: var(--sp-5); border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
  min-height: 60px; padding-block: var(--sp-3);
  font-weight: 600; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq-item summary { -webkit-user-select: none; user-select: none; transition: color 0.2s; }
.faq-item summary:active { color: var(--primary); }
@supports (interpolate-size: allow-keywords) {
  .faq-item { interpolate-size: allow-keywords; }
  .faq-item::details-content { block-size: 0; overflow: clip; transition: block-size 0.3s var(--ease), content-visibility 0.3s allow-discrete; }
  .faq-item[open]::details-content { block-size: auto; }
}
.faq-item p { padding-bottom: var(--sp-4); color: var(--muted); max-width: 65ch; }

/* CTA */
.cta-box { text-align: center; display: grid; justify-items: center; gap: var(--sp-4); }
.cta-box p { color: var(--muted); font-size: var(--fs-lead); }
.cta-box .section-title { margin-bottom: 0; }

/* Footer */
.site-footer {
  padding-block: var(--sp-7) calc(var(--sp-7) + var(--dock-space, 0px) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.footer-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr 1.4fr; } }
.footer-brand { display: flex; align-items: center; gap: var(--sp-3); }
.footer-brand .brand-mark { width: 56px; }
.footer-title { font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.contact-list { display: grid; gap: var(--sp-1); }
.contact-list a { display: inline-flex; align-items: center; gap: var(--sp-3); min-height: 44px; text-decoration: none; }
.disclaimer, .copyright { grid-column: 1 / -1; color: var(--muted); max-width: 80ch; }
.footer-lang { display: inline-block; margin-left: var(--sp-2); padding-block: 14px; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* Reveal on scroll */
.can-reveal [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.can-reveal [data-reveal].is-revealed { opacity: 1; transform: none; }

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