/* =========================================================
   ATHAR · Adopt & gift page (gifts.html)
   Two equal paths (client, 13 Oct 2026): adopt a tree for yourself, or give one as a gift.
   Hero (the tree in an arch, two plates naming the paths) · the two paths with their occasions ·
   THE MOMENT: one tree, presented three ways (the tree first, its card and box hanging from it on
   the deck's brown connector line) · where to find ATHAR · one next step (the app).
   No prices, no contents. ATHAR Zayed is a tribute, not an offering: it is not on this page.
   Product photos are shot on the page cream (#FCF8EF), so they sit on the page with no frame.
   Logical properties only; offsets inside transforms use --dir (1, or -1 in Arabic).
   ========================================================= */

body[data-page="gifts"] { --dir: 1; }
html[dir="rtl"] body[data-page="gifts"] { --dir: -1; }

/* headlines break in balanced lines; short copy avoids a one-word last line */
body[data-page="gifts"] :is(.display, .h2) > span { text-wrap: balance; }
body[data-page="gifts"] :is(.lead, .path-line, .gf-body .line, .get-way .text) { text-wrap: pretty; }
/* a term that must not break across lines: "5 or 10 years", «لها رقمها وصفحتها» */
body[data-page="gifts"] .nobr { white-space: nowrap; }
/* phones: a touch smaller h2 (all of this page's, so they stay equal) keeps
   "or for someone you love." on one line instead of leaving "you love." alone */
@media (max-width: 420px) {
  html[lang="en"] body[data-page="gifts"] .h2 { font-size: min(2.1rem, 8.2vw); }
}

/* ---------- hero: the tree in an arch, two plates for the two paths ---------- */
.gifts-hero .hero-actions { margin-top: 2rem; }
.gifts-hero .hero-actions .btn .ms { font-size: 1.25em; }

.gh-stage { position: relative; display: grid; place-items: center; }
/* the arch is fitted to the hero height (the shared contract), and leaves room for the plates */
.gh-frame {
  --ah: clamp(360px, calc(100svh - var(--header-h) - 9rem), 640px);
  position: relative; width: min(calc(100% - 3rem), calc(var(--ah) * .8)); aspect-ratio: 4 / 5;
}
/* a window onto the tree. The source canopy runs off its top edge, so the arch is a flatter dome
   (26% of the height) than the home's semicircle: the shoulders no longer slice the crown */
.gh-arch {
  position: absolute; inset: 0; margin: 0; overflow: hidden; isolation: isolate;
  border-radius: 50% 50% 24px 24px / 26% 26% 24px 24px;
  background: var(--athar-tan);
  box-shadow: 0 30px 70px rgba(104, 73, 37, .2), 0 4px 12px rgba(104, 73, 37, .08);
}
.gh-arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.gh-arch-line {
  position: absolute; inset: -14px; pointer-events: none;
  border: 1px solid rgba(104, 73, 37, .32);
  border-radius: 50% 50% 36px 36px / 26% 26% 36px 36px;
}

/* the two plates: equal, one per path */
.gh-plate {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: .7em;
  padding-block: .7em; padding-inline: .7em 1.2em;
  border-radius: 18px; background: rgba(255, 253, 248, .97);
  box-shadow: 0 16px 38px rgba(56, 40, 20, .18), 0 2px 6px rgba(56, 40, 20, .08);
  font-size: clamp(.8125rem, 1.05vw, .975rem); line-height: 1.3; white-space: nowrap;
}
.gh-plate strong { display: block; color: var(--athar-green); font-weight: 800; }
.gh-plate small { display: block; color: var(--muted); font-size: .9em; }
html[lang="ar"] .gh-plate { font-size: clamp(.875rem, 1.1vw, 1.0625rem); }
html[lang="ar"] .gh-plate strong { font-family: var(--font-arabic-display); font-weight: 700; }
.gh-plate .ic { width: 2.5em; height: 2.5em; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--athar-green); color: var(--athar-cream); }
.gh-plate .ic.brown { background: var(--athar-brown); }
.gh-plate .ic .ms { font-size: 1.35em; }
/* both plates sit on the sand (not on the crown) and stay inside the shell: the frame is 1.5rem in */
.gh-plate.p1 { inset-block-start: 33%; inset-inline-start: -1.5rem; }
.gh-plate.p2 { inset-block-end: 15%; inset-inline-end: -1.5rem; }

@media (prefers-reduced-motion: no-preference) {
  .gh-arch img { animation: gh-zoom 2.6s var(--ease) both; }
  .gh-arch-line { animation: gh-line 1.6s var(--ease) .15s both; }
  .gh-plate { animation: gh-plate .8s cubic-bezier(.2, .9, .3, 1.15) both, gh-bob 7s ease-in-out infinite; }
  .gh-plate.p1 { animation-delay: .55s, 1.6s; }
  .gh-plate.p2 { animation-delay: .85s, 2.1s; animation-duration: .8s, 7.6s; }
}
@keyframes gh-zoom { from { transform: scale(1.07); } to { transform: none; } }
@keyframes gh-line { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes gh-plate { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes gh-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

@media (max-width: 960px) {
  .hero-grid > .gh-stage { height: auto; aspect-ratio: auto; padding-block: 1.75rem .5rem; }
  .gh-frame { width: min(calc(100% - 4rem), 400px); }
}
@media (max-width: 520px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .gh-frame { width: min(calc(100% - 3.5rem), 320px); }
  .gh-plate.p1 { inset-inline-start: -1.75rem; }
  .gh-plate.p2 { inset-inline-end: -1.75rem; }
}

/* ---------- the two paths: for yourself · as a gift ---------- */
.path-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.path-card { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: clamp(1.75rem, 3.5vw, 3rem); transition: box-shadow .3s var(--ease); }
/* the disc and the label read as one eyebrow above the title */
.path-top { display: flex; align-items: center; gap: .85rem; margin-block-end: .9rem; }
.path-top .label { margin: 0; }
.path-title { font-weight: 800; color: var(--athar-green); font-size: clamp(1.9rem, 3vw, 2.75rem); line-height: 1.05; letter-spacing: -0.02em; }
html[lang="ar"] .path-title { font-family: var(--font-arabic-display); font-weight: 700; letter-spacing: 0; line-height: 1.35; }
.path-line { color: var(--muted); max-width: 40ch; }
html[lang="ar"] .path-line { font-size: 1.0625rem; line-height: 1.8; max-width: 46ch; }
.path-pills { --cluster: .5rem; margin-top: 1.25rem; }
/* the occasions sit in a tidy matrix, never one pill alone on a line: 2 + 2 for yourself,
   3 + 3 for a gift (2 + 2 + 2 in a narrow card). A very narrow card keeps the natural wrap. */
.path-card { container-type: inline-size; }
@container (min-width: 275px) {
  .path-pills { display: grid; grid-template-columns: repeat(2, max-content); justify-items: start; }
}
@container (min-width: 440px) {
  #as-gift .path-pills { grid-template-columns: repeat(3, max-content); }
}
.path-pills .pill { background: var(--athar-cream); border: 1px solid var(--line); }
.path-pills .pill .ms { color: var(--athar-green); }
/* arriving from the hero buttons: the chosen card is outlined, so the visitor sees where they landed */
.path-card:target { box-shadow: 0 0 0 2px var(--athar-green), var(--shadow-card); }
/* one column from 900px, like the formats below: two narrow cards made the large pills hang alone */
@media (max-width: 900px) {
  .path-cards { grid-template-columns: 1fr; }
}
/* phones: regular-size pills (Arabic a touch larger) and a slightly tighter card, so the occasions
   wrap in even rows (2 + 2, 2 + 2 + 2) instead of leaving one pill alone on a line */
@media (max-width: 480px) {
  .path-card { padding: 1.375rem; }
  .path-pills .pill.lg { font-size: .8125rem; padding: .42rem .75rem; gap: .35rem; }
  html[lang="ar"] .path-pills .pill.lg { font-size: .9375rem; padding-inline: .85rem; }
}
@media (max-width: 380px) {
  .path-pills { --cluster: .4rem; }
  html[lang="en"] .path-pills .pill.lg { padding-inline: .6rem; }
}

/* ---------- THE MOMENT: one tree, presented three ways ----------
   [the tree in an arch, its ID beneath] —— [a brown bar] —< three presentations, each on a stub
   ending in a dot (the deck's connector lines with end dots). Phones: one centred column. */
.gf {
  --stub: clamp(30px, 3.4vw, 56px);
  --rows-gap: clamp(1.25rem, 2.4vw, 2rem);
  --line-w: 2px;
  display: grid; grid-template-columns: minmax(0, 4fr) clamp(36px, 5vw, 88px) minmax(0, 7fr);
  align-items: center;
}
.gf-root { position: relative; margin: 0; width: 100%; max-width: 520px; justify-self: end; }
.gf-arch {
  display: block; aspect-ratio: 4 / 5; overflow: hidden; isolation: isolate;
  border-radius: 50% 50% 22px 22px / 40% 40% 22px 22px;
  background: var(--athar-tan);
  box-shadow: 0 26px 60px rgba(104, 73, 37, .18), 0 3px 10px rgba(104, 73, 37, .08);
}
.gf-arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
/* the tree's ID, set like the engraving on its tag */
.gf-id {
  position: absolute; inset-block-end: -1.35rem; inset-inline-start: 50%; translate: calc(var(--dir) * -50%) 0;
  display: inline-flex; align-items: center; gap: .6rem;
  padding-block: .55rem; padding-inline: .8rem 1.1rem; border-radius: var(--radius-pill);
  background: var(--athar-ivory); box-shadow: 0 12px 30px rgba(56, 40, 20, .14), 0 2px 5px rgba(56, 40, 20, .06);
  font-family: var(--font-id); font-size: .9375rem; font-weight: 600; letter-spacing: .1em; color: var(--id-grey);
  width: max-content; white-space: nowrap;
}
.gf-id img { width: 18px; height: auto; }
.gf-id > span { direction: ltr; unicode-bidi: isolate; }

/* connectors */
.gf-link { position: relative; align-self: center; height: var(--line-w); background: var(--athar-brown); }
.gf-link::before { content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: -5px; width: 10px; height: 10px; margin-block-start: -5px; border-radius: 50%; background: var(--athar-brown); }
.gf-forms { position: relative; display: grid; grid-auto-rows: 1fr; row-gap: var(--rows-gap); padding-inline-start: var(--stub); }
/* the bar: from the first row's centre to the last row's */
.gf-forms::before {
  content: ""; position: absolute; inset-inline-start: 0; width: var(--line-w);
  inset-block: calc((100% - 2 * var(--rows-gap)) / 6);
  background: var(--athar-brown);
}
.gf-form { position: relative; display: grid; grid-template-columns: clamp(150px, 19vw, 280px) minmax(0, 1fr); gap: clamp(1rem, 2.4vw, 2.25rem); align-items: center; }
.gf-form::before { content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: calc(-1 * var(--stub)); width: calc(var(--stub) - 10px); height: var(--line-w); margin-block-start: calc(var(--line-w) / -2); background: var(--athar-brown); }
.gf-form::after { content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: -14px; width: 10px; height: 10px; margin-block-start: -5px; border-radius: 50%; background: var(--athar-cream); border: 2px solid var(--athar-brown); box-sizing: border-box; }
.gf-photo { margin: 0; aspect-ratio: 5 / 4; }
.gf-photo img { width: 100%; height: 100%; object-fit: contain; }
.gf-body { display: grid; gap: .35rem; justify-items: start; }
.gf-body .for { font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--athar-brown); }
html[lang="ar"] .gf-body .for { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.gf-body .name { font-weight: 800; color: var(--athar-green); font-size: clamp(1.45rem, 2.1vw, 1.95rem); line-height: 1.1; letter-spacing: -0.015em; }
html[lang="ar"] .gf-body .name { font-family: var(--font-arabic-display); font-weight: 700; letter-spacing: 0; line-height: 1.35; }
.gf-body .line { color: var(--muted); max-width: 36ch; }
html[lang="ar"] .gf-body .line { font-size: 1.0625rem; line-height: 1.8; }
/* arriving from the home page (#digital, #uae, #legacy): the name it lands on is underlined */
.gf-form:target .name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

.gift-range .promise { margin-top: clamp(3rem, 5vw, 4.5rem); }

/* the line draws itself from the tree outwards when the composition comes into view; quick, so
   nobody waits on an empty column. Arriving on #digital/#uae/#legacy skips the staging. */
.gf-link { transform-origin: 0 50%; }
html[dir="rtl"] .gf-link { transform-origin: 100% 50%; }
.gf-forms::before { transform-origin: 50% 50%; }
.gf-form::before { transform-origin: 0 50%; }
html[dir="rtl"] .gf-form::before { transform-origin: 100% 50%; }
.gf-link, .gf-forms::before, .gf-form::before { transition: transform .5s var(--ease); }
.gf-link { transition-delay: .1s; }
.gf-forms::before { transition-delay: .2s; }
.gf-form::before { transition-delay: .3s; }
.gf-form::after, .gf-link::before { transition: opacity .3s ease .4s; }
.gf-form > * { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.gf-form:nth-child(1) > * { transition-delay: .25s; }
.gf-form:nth-child(2) > * { transition-delay: .35s; }
.gf-form:nth-child(3) > * { transition-delay: .45s; }
.js .gf.reveal:not(.in, :has(.gf-form:target)) .gf-link { transform: scaleX(0); }
.js .gf.reveal:not(.in, :has(.gf-form:target)) .gf-forms::before { transform: scaleY(0); }
.js .gf.reveal:not(.in, :has(.gf-form:target)) .gf-form::before { transform: scaleX(0); }
.js .gf.reveal:not(.in, :has(.gf-form:target)) .gf-form::after, .js .gf.reveal:not(.in, :has(.gf-form:target)) .gf-link::before { opacity: 0; }
.js .gf.reveal:not(.in, :has(.gf-form:target)) .gf-form > * { opacity: 0; transform: translateY(14px); }
/* the composition itself does not slide; its parts arrive in order */
.js .gf.reveal:not(.in) { opacity: 1; transform: none; }

/* phones and small tablets: one centred column, the line running down from the tree */
@media (max-width: 900px) {
  .gf { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .gf-root { justify-self: center; width: min(76%, 300px); }
  .gf-link { width: var(--line-w); height: 3.25rem; margin-block-start: 2.25rem; transform-origin: 50% 0; }
  html[dir="rtl"] .gf-link { transform-origin: 50% 0; }
  .gf-link::before { inset-block-start: auto; inset-block-end: -5px; inset-inline-start: 50%; margin: 0; translate: calc(var(--dir) * -50%) 0; }
  .js .gf.reveal:not(.in, :has(.gf-form:target)) .gf-link { transform: scaleY(0); }
  .gf-forms { width: 100%; padding: 0; margin-block-start: .75rem; grid-auto-rows: auto; row-gap: 0; }
  .gf-forms::before { display: none; }
  .gf-form { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: .5rem; }
  .gf-form + .gf-form { padding-block-start: 4.25rem; }
  .gf-form::before, .gf-form::after { display: none; }
  .gf-form + .gf-form::before { display: block; inset-block-start: 1rem; inset-inline-start: 50%; width: var(--line-w); height: 2.25rem; margin: 0; translate: calc(var(--dir) * -50%) 0; transform-origin: 50% 0; }
  .gf-form + .gf-form::after { display: block; inset-block-start: 3.25rem; inset-inline-start: 50%; margin: 0; translate: calc(var(--dir) * -50%) 0; background: var(--athar-brown); }
  .js .gf.reveal:not(.in, :has(.gf-form:target)) .gf-form::before { transform: scaleY(0); }
  .gf-photo { width: min(72%, 260px); }
  .gf-body { justify-items: center; }
  .gf-body .line { margin-inline: auto; }
  /* the promise follows the centred column above it */
  .gift-range .promise { justify-content: center; text-align: center; margin-inline: auto; max-width: 34ch; }
  .gift-range .promise > span:last-child { text-wrap: balance; }
  html[lang="ar"] .gift-range .promise { max-width: 40ch; }
}

/* ---------- how to get one ----------
   Source order: copy, the three ways, actions. Desktop puts the actions under the copy, beside the
   ways; one column (<=960px, where .split stacks) ends the section on the action. */
.get-grid { align-items: center; grid-template-areas: "copy ways" "actions ways"; row-gap: 0; }
.get-copy { grid-area: copy; align-self: end; }
.get-actions { grid-area: actions; align-self: start; margin-top: 2rem; --cluster: 1.25rem; }
.get-ways { grid-area: ways; margin: 0; padding: .5rem clamp(1.25rem, 3vw, 2.25rem); background: var(--athar-ivory); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.get-way { display: flex; align-items: center; gap: 1.1rem; padding-block: 1.35rem; }
.get-way + .get-way { border-block-start: 1px solid var(--line); }
.get-way > .divider { align-self: stretch; width: 2px; background: var(--athar-brown); opacity: .85; border-radius: 1px; flex: none; }
.get-way .title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-weight: 800; color: var(--athar-green); font-size: 1.125rem; line-height: 1.25; }
.get-way .text { color: var(--muted); font-size: .975rem; margin-top: .2rem; }
html[lang="ar"] .get-way .title { font-family: var(--font-arabic-display); font-weight: 700; line-height: 1.5; }
html[lang="ar"] .get-way .text { font-size: 1.0625rem; line-height: 1.7; }
@media (max-width: 960px) {
  .get-grid { grid-template-areas: "copy" "ways" "actions"; }
  .get-ways { margin-block-start: clamp(2rem, 5vw, 2.75rem); }
  .get-actions { margin-top: 1.75rem; }
}
@media (max-width: 520px) {
  .get-actions .btn { flex: 1 1 100%; }
}

/* ---------- the one next step ---------- */
.next .next-step { margin-block: 0; }
