@import url("../fonts/_faces.css");

/* =========================================================
   דוד דהן · תכנון גינות — design tokens
   RTL-first. Logical properties only (see rtl-hebrew-ui).
   ========================================================= */
:root {
  /* surfaces */
  --ivory: #fffcf5;
  --sand: #f6f2e7;
  --pistachio: #ebeccc;
  --eucalyptus: #cdd4b1;
  --peach: #feecd0;

  /* ink */
  --forest: #2f3a2c;
  --ink: #2e3328;
  /* passes 4.5:1 on every surface token, including eucalyptus (4.69:1),
     which is the darkest background body copy sits on. */
  --ink-soft: #54594c;
  --ink-faint: #949b8a;

  /* accents.
     --clay is DECORATIVE ONLY (rules, borders, gradient stops). White text on
     it is 3.01:1 and fails WCAG AA. Anything that carries white text or a white
     icon must use --clay-solid (4.92:1) or --clay-deep (6.32:1). */
  --moss: #5c6a3f;
  --sage: #8a9a5f;
  --clay: #c4875c;
  --clay-solid: #a2603a;
  --clay-deep: #8f4f2b;
  --terra: #a2603a;

  /* type — Open Sans throughout (headings + body). Self-hosted, Hebrew + Latin
     subsets, Latin subset to used glyphs. See assets/fonts/_faces.css. */
  --serif: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --nav-h: 72px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* elevation — soft and warm, never grey */
  --sh-sm: 0 2px 10px -6px rgba(47, 58, 44, 0.35);
  --sh-md: 0 14px 34px -22px rgba(47, 58, 44, 0.45);
  --sh-lg: 0 34px 70px -38px rgba(47, 58, 44, 0.5);
}

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Belongs on html, never on body: `overflow-x` on body promotes body to the
     scroll container, which leaves documentElement.scrollTop pinned at 0 and
     breaks window.scrollTo(), anchor jumps and scroll restoration.
     Nothing actually overflows here (the hero strip is clipped by .hero), so
     this is only a guard against future regressions. */
  overflow-x: hidden;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.14;
  color: var(--forest);
  /* No negative tracking: tight Latin spacing reads cramped on Hebrew glyphs. */
  letter-spacing: normal;
  text-wrap: balance;
}

p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

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

::selection { background: var(--eucalyptus); color: var(--forest); }

/* Numbers, phone, email stay LTR inside RTL text */
bdi, .ltr { unicode-bidi: isolate; direction: ltr; }

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--gutter);
  z-index: 200;
  background: var(--forest);
  color: var(--ivory);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: inset-block-start 0.2s var(--ease);
}
.skip-link:focus { inset-block-start: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------- layout primitives ---------------- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(76px, 11vw, 132px); }
section[id] { scroll-margin-block-start: calc(var(--nav-h) + 12px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-block-end: 1rem;
  font-family: var(--sans);
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--moss);
}
.eyebrow::before {
  content: "";
  inline-size: 28px;
  block-size: 1.5px;
  background: var(--clay);
  flex: none;
}

.section-head { max-width: 46rem; margin-block-end: clamp(2.5rem, 5vw, 3.75rem); }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.section-head p {
  margin-block-start: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
  max-width: 42rem;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.75rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
              color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { inline-size: 18px; block-size: 18px; flex: none; }

.btn--primary { background: var(--clay-solid); color: #fff; box-shadow: var(--sh-md); }
.btn--primary:hover { background: var(--clay-deep); box-shadow: var(--sh-lg); }

.btn--dark { background: var(--forest); color: var(--ivory); }
.btn--dark:hover { background: #3d4b39; }

.btn--ghost { border-color: rgba(47, 58, 44, 0.3); color: var(--forest); }
.btn--ghost:hover { border-color: var(--forest); background: rgba(47, 58, 44, 0.05); }

/* Directional glyph — must mirror with direction (rtl-hebrew-ui) */
.i-arrow { transition: transform 0.25s var(--ease); }
[dir="rtl"] .i-arrow { transform: scaleX(-1); }
.btn:hover .i-arrow { transform: translateX(3px); }
[dir="rtl"] .btn:hover .i-arrow { transform: scaleX(-1) translateX(3px); }

/* =========================================================
   SCROLL PROGRESS
   ========================================================= */
.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  z-index: 120;
  background: linear-gradient(to right, var(--sage), var(--clay));
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
[dir="rtl"] .progress { transform-origin: 100% 50%; }

@supports (animation-timeline: scroll()) {
  .progress {
    animation: progress-grow linear;
    animation-timeline: scroll(root block);
  }
  @keyframes progress-grow { to { transform: scaleX(1); } }
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 110;
  block-size: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-block-end: 1px solid transparent;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
/* The frosted bar lives on a pseudo-element: `backdrop-filter` on the header
   itself would make it the containing block of the fixed mobile drawer, which
   trapped the menu inside the 72px bar instead of the viewport. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 252, 245, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: background-color 0.35s var(--ease);
}
.nav.is-stuck::before { background: rgba(255, 252, 245, 0.94); }
.nav.is-stuck {
  border-block-end-color: rgba(47, 58, 44, 0.1);
  box-shadow: 0 8px 30px -24px rgba(47, 58, 44, 0.6);
}

.nav__inner {
  inline-size: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; flex: none; }
.brand__mark { inline-size: 38px; block-size: 38px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text b { font-family: var(--serif); font-size: 1.22rem; font-weight: 700; color: var(--forest); }
.brand__text span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--terra);
}

.nav__links { display: flex; align-items: center; gap: 0.15rem; flex-wrap: nowrap; }
.nav__links a {
  position: relative;
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav__links a:hover { background: rgba(205, 212, 177, 0.45); }
.nav__links a[aria-current="true"] { color: var(--terra); font-weight: 700; }

.nav__cta {
  margin-inline-start: 0.5rem;
  background: var(--forest);
  color: var(--ivory) !important;
  font-weight: 700 !important;
  padding: 0.55rem 1.15rem !important;
}
.nav__cta:hover { background: var(--terra); }

.nav__toggle {
  display: none;
  position: relative;
  z-index: 120; /* stays above the open drawer so the close button is reachable */
  inline-size: 44px;
  block-size: 44px;
  place-items: center;
  border-radius: 50%;
}
.nav__toggle span {
  display: block;
  inline-size: 24px;
  block-size: 2px;
  margin-block: 5px;
  border-radius: 2px;
  background: var(--forest);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(12px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-12px) rotate(-45deg); }

.nav__scrim {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(47, 58, 44, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.nav__scrim.is-open { opacity: 1; visibility: visible; }

/* Between the desktop bar and the drawer the links tighten up
   so they never crowd the brand or wrap. */
@media (max-width: 1240px) and (min-width: 1081px) {
  .nav__links a { padding-inline: 0.6rem; font-size: 0.92rem; }
  .nav__cta { margin-inline-start: 0.35rem; padding: 0.5rem 0.9rem !important; }
  .brand__text b { font-size: 1.1rem; }
}

@media (max-width: 1080px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    z-index: 106;
    inline-size: min(80vw, 330px);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.35rem;
    padding: 2rem 1.5rem;
    background: var(--ivory);
    box-shadow: var(--sh-lg);
    visibility: hidden;
    transition: transform 0.4s var(--ease-out), visibility 0.4s;
  }
  /* The panel is pinned to the inline-end edge, so it hides toward the left in
     RTL and toward the right in LTR. */
  [dir="rtl"] .nav__links { transform: translateX(-105%); }
  [dir="ltr"] .nav__links { transform: translateX(105%); }
  .nav__links.is-open { transform: translateX(0); visibility: visible; }
  .nav__links a { font-size: 1.2rem; padding: 0.7rem 1rem; }
  .nav__cta { margin-inline-start: 0; margin-block-start: 0.75rem; text-align: center; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-block-size: 100svh;
  display: flex;
  align-items: center;
  padding-block-start: var(--nav-h);
  overflow: hidden;
  background: var(--eucalyptus);
}

.hero__strip {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 14px;
  padding: 14px;
  inline-size: max-content;
  animation: strip-scroll 80s linear infinite;
  will-change: transform;
}
.hero__strip:hover { animation-play-state: paused; }
.hero__cell {
  position: relative;
  flex: none;
  inline-size: min(30vw, 360px);
  block-size: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.75);
}
.hero__cell img { inline-size: 100%; block-size: 100%; object-fit: cover; }

/* The strip is duplicated in markup, so -50% is one seamless lap.
   Direction of travel flips with writing direction. */
@keyframes strip-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
[dir="rtl"] .hero__strip { animation-name: strip-scroll-rtl; }
@keyframes strip-scroll-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(115% 95% at 50% 38%, rgba(255, 252, 245, 0.2), rgba(255, 252, 245, 0.55) 76%),
    linear-gradient(to top, rgba(205, 212, 177, 0.78) 3%, rgba(255, 252, 245, 0.18) 48%);
}

.hero__content { position: relative; z-index: 3; inline-size: 100%; }

.hero__panel {
  max-width: min(41rem, 100%);
  padding: clamp(1.75rem, 3.4vw, 3rem);
  background: rgba(255, 252, 245, 0.84);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
}

.hero__tag {
  display: inline-block;
  margin-block-end: 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  color: var(--moss);
}
.hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.4rem);
  font-weight: 800; /* Open Sans tops out at 800 */
  line-height: 1.03;
}
.hero h1 em { display: block; font-style: normal; color: var(--terra); }
.hero__lead {
  margin-block: 1.4rem 2.1rem;
  max-width: 40ch;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--ink-soft);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.hero__scroll {
  position: absolute;
  inset-block-end: 22px;
  inset-inline: 0;
  z-index: 3;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--moss);
}
.hero__scroll i {
  display: block;
  inline-size: 1px;
  block-size: 32px;
  margin: 0.55rem auto 0;
  background: linear-gradient(var(--clay), transparent);
  animation: hint 2.2s ease-in-out infinite;
}
@keyframes hint {
  0%, 100% { opacity: 0.25; transform: scaleY(0.55); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* =========================================================
   STATS BAR
   ========================================================= */
.stats { background: var(--forest); color: var(--ivory); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--peach);
}
/* "20+" is a number plus a neutral character. Under bidi the "+" resolves to
   the RTL side and renders as "+20". Isolating it keeps it as "20+". */
.stat b[data-count] { unicode-bidi: isolate; direction: ltr; }
.badge b { unicode-bidi: isolate; direction: ltr; }
.stat span {
  display: block;
  margin-block-start: 0.4rem;
  font-size: 0.9rem;
  color: rgba(255, 252, 245, 0.72);
}
@media (max-width: 700px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1rem; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(2rem, 5.5vw, 4.5rem);
  align-items: center;
}
.about__copy p { margin-block-end: 1.15rem; color: var(--ink-soft); }
.about__copy p strong { color: var(--forest); font-weight: 600; }

.vision {
  margin-block-start: 1.9rem;
  padding: 1.6rem 1.8rem;
  background: var(--pistachio);
  border-inline-start: 4px solid var(--clay);
  border-radius: var(--r-md);
}
.vision b {
  display: block;
  margin-block-end: 0.35rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--terra);
}
.vision p { margin: 0; color: var(--ink); }

.about__visual { position: relative; }
.about__frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--sh-lg);
}
.about__frame img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.about__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: inherit;
  pointer-events: none;
}

.badge {
  position: absolute;
  inset-block-end: -20px;
  inset-inline-start: -16px;
  padding: 0.9rem 1.35rem;
  background: var(--clay-solid);
  color: #fff;
  border-radius: var(--r-md);
  text-align: center;
  box-shadow: var(--sh-md);
}
.badge b { display: block; font-family: var(--serif); font-size: 2.05rem; line-height: 1; }
.badge span { font-size: 0.78rem; font-weight: 600; }

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__visual { max-width: 26rem; margin-inline: auto; }
}

/* =========================================================
   WHY / VALUE CARDS
   ========================================================= */
.why { margin-block-start: clamp(3.5rem, 7vw, 5.5rem); }
.why__title {
  margin-block-end: 2.6rem;
  text-align: center;
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
}
.why__title::after {
  content: "";
  display: block;
  inline-size: 56px;
  block-size: 3px;
  margin: 0.85rem auto 0;
  border-radius: 3px;
  background: linear-gradient(to right, var(--sage), var(--clay));
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
  max-width: 60rem;
  margin-inline: auto;
}
.card--why:nth-child(1),
.card--why:nth-child(2) { grid-column: span 3; }
.card--why:nth-child(3),
.card--why:nth-child(4),
.card--why:nth-child(5) { grid-column: span 2; }

.card--why {
  --c: var(--sage);
  padding: 1.7rem 1.55rem;
  background: #fff;
  border: 1px solid rgba(47, 58, 44, 0.07);
  border-block-start: 3px solid var(--c);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card--why:hover { transform: translateY(-6px); box-shadow: var(--sh-md); }
.card--why:nth-child(1) { --c: var(--sage); background: var(--eucalyptus); }
.card--why:nth-child(2) { --c: var(--clay-solid); background: var(--peach); }
.card--why:nth-child(3) { --c: var(--moss); background: var(--pistachio); }
.card--why:nth-child(4) { --c: #a86b3c; background: #fae7d4; }
.card--why:nth-child(5) { --c: var(--sage); background: #e4e9cd; }

.card--why .ic {
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  margin-block-end: 0.95rem;
  border-radius: 13px;
  background: var(--c);
  color: #fff;
  transition: transform 0.35s var(--ease), rotate 0.35s var(--ease);
}
.card--why:hover .ic { transform: translateY(-2px) scale(1.07); rotate: -6deg; }
.card--why .ic svg { inline-size: 24px; block-size: 24px; }
.card--why b {
  display: block;
  margin-block-end: 0.3rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--forest);
}
.card--why p { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.62; }

@media (max-width: 860px) {
  .why__grid { grid-template-columns: repeat(2, 1fr); max-width: 34rem; }
  .card--why:nth-child(n) { grid-column: span 1; }
  .card--why:nth-child(5) { grid-column: span 2; max-width: 17rem; margin-inline: auto; }
}
@media (max-width: 520px) {
  .why__grid { grid-template-columns: 1fr; max-width: 22rem; }
  .card--why:nth-child(n) { grid-column: span 1; max-width: none; }
}

/* =========================================================
   SERVICES
   ========================================================= */
.services { background: var(--sand); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.15rem;
}
.card--svc {
  position: relative;
  padding: 1.9rem 1.7rem;
  background: var(--ivory);
  border: 1px solid rgba(47, 58, 44, 0.08);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card--svc::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  background: linear-gradient(to right, var(--sage), var(--clay));
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform 0.45s var(--ease-out);
}
.card--svc:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: transparent; }
.card--svc:hover::before { transform: scaleX(1); }
.card--svc .ic {
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  margin-block-end: 1rem;
  border-radius: 14px;
  background: var(--pistachio);
  color: var(--moss);
}
.card--svc .ic svg { inline-size: 25px; block-size: 25px; }
.card--svc h3 { font-size: 1.2rem; margin-block-end: 0.45rem; }
.card--svc p { font-size: 0.96rem; color: var(--ink-soft); line-height: 1.62; }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery { background: var(--pistachio); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-end: 1.8rem;
}
.filter {
  padding: 0.5rem 1.15rem;
  border: 1.5px solid rgba(47, 58, 44, 0.18);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--forest);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
}
.filter:hover { border-color: var(--moss); background: rgba(255, 255, 255, 0.5); }
.filter[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--ivory); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  grid-auto-rows: 11rem;
  gap: 12px;
}
.tile {
  position: relative;
  grid-row: span 2;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--eucalyptus);
  box-shadow: var(--sh-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.tile.is-tall { grid-row: span 3; }
.tile img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}
/* Purely a depth/hover effect — legibility lives on .tile__cap. */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 38, 28, 0.35), rgba(30, 38, 28, 0.02) 60%);
  opacity: 0.8;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.tile:hover, .tile:focus-visible { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.07); }
.tile:hover::after, .tile:focus-visible::after { opacity: 0.5; }

/* The caption carries its OWN backdrop rather than relying on .tile::after —
   that scrim fades to 0.5 on hover, which dropped the text to ~2.4:1 over a
   pale photo. At 0.88 alpha the worst case (a pure-white photo) is 12.4:1 for
   the title and 8.3:1 for the eyebrow. */
.tile__cap {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 2;
  padding: 2.2rem 1rem 0.9rem;
  background: linear-gradient(to top,
    rgba(20, 26, 18, 0.88) 0%,
    rgba(20, 26, 18, 0.75) 55%,
    rgba(20, 26, 18, 0) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  pointer-events: none;
}
.tile__cap small {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f7dcbc;
}
.tile.is-hidden { display: none; }

.gallery__note {
  margin-block-start: 1.6rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* =========================================================
   BEFORE / AFTER
   ========================================================= */
.ba { background: var(--ivory); }
.ba__list { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }
@media (min-width: 900px) {
  .ba__list { grid-template-columns: repeat(2, 1fr); }
}

.ba__item {
  background: #fff;
  border: 1px solid rgba(47, 58, 44, 0.09);
  border-radius: var(--r-lg);
  padding: 0.85rem 0.85rem 1.15rem;
  box-shadow: var(--sh-sm);
  transition: box-shadow 0.4s var(--ease);
}
.ba__item:hover { box-shadow: var(--sh-md); }

/* The comparison viewport.
   `--pos` (0–100) is the split position; it is written by JS and is the
   single source of truth for both the clip and the handle offset. */
.compare {
  --pos: 50;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  background: var(--eucalyptus);
}
.compare img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* "After" sits on top and is revealed from the inline-start edge.
   inset-inline-end works in both directions, so no [dir] override is needed. */
.compare__after {
  clip-path: inset(0 0 0 calc(var(--pos) * 1%));
}
[dir="rtl"] .compare__after {
  clip-path: inset(0 calc(var(--pos) * 1%) 0 0);
}

.compare__label {
  position: absolute;
  inset-block-start: 12px;
  z-index: 3;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(30, 38, 28, 0.62);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.compare__label--before { inset-inline-start: 12px; }
.compare__label--after { inset-inline-end: 12px; }

.compare__divider {
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(var(--pos) * 1%);
  z-index: 4;
  inline-size: 2px;
  margin-inline-start: -1px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.compare__handle {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: calc(var(--pos) * 1%);
  z-index: 5;
  inline-size: 46px;
  block-size: 46px;
  margin-inline-start: -23px;
  margin-block-start: -23px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--forest);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: ew-resize;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.compare__handle:hover { transform: scale(1.08); }
.compare__handle:active { transform: scale(0.96); }
.compare__handle svg { inline-size: 22px; block-size: 22px; }
.compare.is-dragging { cursor: grabbing; }
.compare.is-dragging .compare__label { opacity: 0; }

.ba__caption { padding: 0.95rem 0.75rem 0; }
.ba__caption h3 { font-size: 1.15rem; margin-block-end: 0.2rem; }
.ba__caption p { font-size: 0.92rem; color: var(--ink-soft); }
.ba__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-block-start: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--terra);
}
.ba__hint svg { inline-size: 16px; block-size: 16px; }

/* =========================================================
   PROCESS
   ========================================================= */
.process { background: var(--sand); }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.4rem;
  counter-reset: step;
}
.step { position: relative; padding-block-start: 2.6rem; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--clay);
}
.step::after {
  content: "";
  position: absolute;
  inset-block-start: 1.05rem;
  inset-inline-start: 2.6rem;
  inline-size: calc(100% - 2rem);
  block-size: 1px;
  background: repeating-linear-gradient(to right,
    rgba(47, 58, 44, 0.25) 0 5px, transparent 5px 10px);
}
.step:last-child::after { display: none; }
@media (max-width: 640px) { .step::after { display: none; } }
.step h3 { font-size: 1.12rem; margin-block-end: 0.35rem; }
.step p { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.62; }

/* =========================================================
   PLANS
   ========================================================= */
.plans { background: var(--peach); }
.plans__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  .plans__grid { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; }
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.1rem 1.8rem;
  background: #fff;
  border: 1px solid rgba(47, 58, 44, 0.08);
  border-radius: var(--r-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
.plan--featured { background: var(--eucalyptus); border: 2px solid var(--clay); box-shadow: var(--sh-md); }

.plan__flag {
  position: absolute;
  inset-block-start: -13px;
  inset-inline-end: 22px;
  padding: 0.3rem 1rem;
  background: var(--terra);
  color: var(--ivory);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}
.plan__num {
  margin-block-end: 0.55rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--terra);
}
.plan h3 { font-size: 1.45rem; margin-block-end: 0.4rem; }
.plan__sub { margin-block-end: 1.4rem; font-size: 0.95rem; color: var(--ink-soft); }
.plan--featured .plan__sub { color: #545c46; }
.plan ul { display: flex; flex-direction: column; gap: 0.65rem; margin-block-end: 1.7rem; flex: 1; }
.plan li { display: flex; gap: 0.6rem; font-size: 0.98rem; }
.plan li svg { flex: none; inline-size: 19px; block-size: 19px; margin-block-start: 4px; color: var(--moss); }
.plan--featured li svg { color: var(--terra); }
.plan .btn { inline-size: 100%; margin-block-start: auto; }

.plans__note {
  margin-block-start: 1.6rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* =========================================================
   FAQ
   ========================================================= */
.faq__list { max-width: 48rem; }
.faq__item {
  border-block-end: 1px solid rgba(47, 58, 44, 0.13);
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.15rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--forest);
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  flex: none;
  inline-size: 11px;
  block-size: 11px;
  border-inline-end: 2px solid var(--clay);
  border-block-end: 2px solid var(--clay);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(-135deg); }
.faq__item p { padding-block-end: 1.2rem; color: var(--ink-soft); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { background: var(--eucalyptus); }
.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

.contact__info { display: flex; flex-direction: column; gap: 1.25rem; }
.info {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.info .ic {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 13px;
  background: var(--forest);
  color: var(--peach);
}
.info .ic svg { inline-size: 21px; block-size: 21px; }
.info b {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--terra);
}
.info a, .info span { font-size: 1.08rem; font-weight: 600; color: var(--forest); }
.info a:hover { color: var(--terra); text-decoration: underline; text-underline-offset: 3px; }

.form {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background: var(--ivory);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}
.field { margin-block-end: 1.05rem; }
.field label {
  display: block;
  margin-block-end: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: start;
}
.field input,
.field textarea,
.field select {
  inline-size: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid rgba(47, 58, 44, 0.15);
  border-radius: var(--r-sm);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { min-block-size: 7rem; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(196, 135, 92, 0.18);
}
.field :is(input, textarea)[aria-invalid="true"] {
  border-color: #b3452f;
  box-shadow: 0 0 0 3px rgba(179, 69, 47, 0.14);
}
.field__error {
  display: block;
  margin-block-start: 0.35rem;
  min-block-size: 1.15rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #9d3a26;
  text-align: start;
}
.form__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 0.3rem; }
.form__actions .btn { flex: 1 1 11rem; }
.form__note {
  margin-block-start: 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: start;
}

/* honeypot — off-screen, never shown, not announced */
.hp {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* =========================================================
   FOOTER + FLOATING WHATSAPP
   ========================================================= */
.footer {
  background: var(--forest);
  color: rgba(255, 252, 245, 0.75);
  padding-block: 2.6rem;
  font-size: 0.9rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
}
.footer b { display: block; font-family: var(--serif); font-size: 1.18rem; color: var(--ivory); }
.footer a:hover { color: var(--peach); }
.footer__links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

.wa-float {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  background: #128c7e;
  color: #fff;
  box-shadow: 0 10px 26px -8px rgba(18, 140, 126, 0.65);
  transform: scale(0);
  transition: transform 0.35s var(--ease-out), background-color 0.25s var(--ease);
}
.wa-float.is-visible { transform: scale(1); }
.wa-float:hover { background: #0e6f64; }
.wa-float svg { inline-size: 30px; block-size: 30px; }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(24, 30, 22, 0.93);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-inline-size: 100%;
  max-block-size: 82vh;
  inline-size: auto;
  block-size: auto;
  border-radius: var(--r-md);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}
.lightbox__cap {
  margin-block-start: 0.9rem;
  color: rgba(255, 252, 245, 0.85);
  font-size: 0.95rem;
  text-align: center;
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background-color 0.25s var(--ease);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__btn svg { inline-size: 24px; block-size: 24px; }
.lightbox__close { inset-block-start: 18px; inset-inline-end: 18px; }
.lightbox__prev { inset-inline-start: 16px; inset-block-start: 50%; margin-block-start: -24px; }
.lightbox__next { inset-inline-end: 16px; inset-block-start: 50%; margin-block-start: -24px; }
/* prev/next are directional: mirror the glyph, not the position */
[dir="rtl"] .lightbox__prev svg,
[dir="rtl"] .lightbox__next svg { transform: scaleX(-1); }

/* =========================================================
   SCROLL REVEAL
   Progressive enhancement: CSS scroll-driven animation where
   supported, IntersectionObserver (.is-in) everywhere else.
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal-stagger.is-in > * { opacity: 1; transform: none; }
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: 0.07s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: 0.14s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: 0.21s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: 0.35s; }
.reveal-stagger.is-in > *:nth-child(7) { transition-delay: 0.42s; }
.reveal-stagger.is-in > *:nth-child(8) { transition-delay: 0.49s; }

/* =========================================================
   REDUCED MOTION — one authoritative block.
   Anything that moves on its own must stop here.
   ========================================================= */
@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;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-stagger > * { opacity: 1; transform: none; }

  .hero__strip {
    animation: none;
    inline-size: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .hero__cell { scroll-snap-align: center; }
  .hero__scroll i { animation: none; }
  .wa-float { transform: scale(1); }
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
  .nav, .wa-float, .progress, .hero__strip, .lightbox, .filters, .hero__scroll { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
