/* ==========================================================================
   Dr. Sara Sebaey — portfolio
   Palette + type derived from the brand seal (logo.png) and banner artwork.
   ========================================================================== */

/* ── 1. Tokens ───────────────────────────────────────────────────────────── */
:root {
  /* colour — sampled from the seal and the banner */
  --paper:      #F7F1E6;
  --paper-2:    #FCF8F1;
  --card:       #FFFDF9;
  --sand:       #EADAC0;
  --sand-2:     #DCC5A2;
  --brass:      #A8792F;
  --brass-lit:  #CFA659;
  --brass-deep: #7C5820;
  --olive:      #5F6B41;
  --olive-lit:  #8B9663;
  --ink:        #241B12;
  --ink-2:      #5A4A3B;
  --ink-3:      #8A7965;

  --line:       rgba(168, 121, 47, .26);
  --line-soft:  rgba(36, 27, 18, .09);

  --sh-1: 0 2px 10px rgba(90, 63, 25, .06);
  --sh-2: 0 14px 40px -14px rgba(90, 63, 25, .24);
  --sh-3: 0 28px 70px -22px rgba(90, 63, 25, .36);

  /* type */
  --f-display: "Amiri", "Times New Roman", serif;
  --f-body:    "Tajawal", "Segoe UI", system-ui, sans-serif;
  --f-latin:   "Bodoni Moda", "Didot", Georgia, serif;
  --f-util:    "Jost", "Segoe UI", system-ui, sans-serif;

  /* metrics */
  --nav-h: 78px;
  --shell: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ── 2. Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* Clip, not hidden: `hidden` still leaves the page pannable sideways on
     iOS Safari, and in an RTL document any inline-start overflow is real
     scrollable width. `clip` cannot be scrolled at all. */
  overflow-x: hidden;   /* fallback: Safari < 16 */
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 14px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

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

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

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.28;
  margin: 0;
  letter-spacing: 0;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

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

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--brass-lit); color: #fff; }

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

.skip-link {
  position: fixed;
  inset-block-start: -100px;
  inset-inline-start: 1rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: .7rem 1.2rem;
  border-radius: var(--radius);
  transition: inset-block-start .2s var(--ease);
}
.skip-link:focus { inset-block-start: 1rem; }

/* ── 3. Utilities ────────────────────────────────────────────────────────── */
.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

/* Honeypot: still in the DOM and fillable by bots, but takes no space and
   never sits outside the page. Never use `left: -9999px` here — in an RTL
   document that is scrollable overflow, not "off-screen". */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

/* Latin label — the small-caps utility voice used across the brand */
.eyebrow {
  font-family: var(--f-util);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 .9rem;
  /* Latin runs inside an RTL block: isolate so the dots and words keep
     their own order, but let the block itself align with the Arabic title. */
  unicode-bidi: isolate;
  text-align: start;
}
.hero__eyebrow { text-align: start; }

/* THE SIGNATURE: a hairline with a seal-dot at its centre.
   Lifted from the banner's TRAIN · HEAL · TRANSFORM divider and reused
   as the marker for every section on the page. */
.rule {
  display: block;
  position: relative;
  width: 132px;
  height: 1px;
  margin: 1.35rem 0 0;
  background: linear-gradient(to left, transparent, var(--brass) 22%, var(--brass) 78%, transparent);
}
.rule::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px var(--paper);
}
.section--services .rule::after,
.section--accred .rule::after { box-shadow: 0 0 0 4px var(--paper-2); }
.sec-head--center .rule { margin-inline: auto; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .92rem 2.1rem;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: .98rem;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease),
              box-shadow .3s var(--ease);
}
.btn--solid {
  background: var(--ink);
  color: var(--paper-2);
  box-shadow: var(--sh-1);
}
.btn--solid:hover {
  background: var(--brass-deep);
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}
.btn--ghost {
  border-color: var(--brass);
  color: var(--brass-deep);
}
.btn--ghost:hover {
  background: var(--brass);
  color: var(--paper-2);
  transform: translateY(-2px);
}
.btn--sm { padding: .72rem 1.5rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ── 4. Navigation ───────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
  border-block-end: 1px solid transparent;
}
.nav.is-stuck,
.nav.is-menu {
  background: rgba(247, 241, 230, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block-end-color: var(--line);
  box-shadow: 0 1px 24px rgba(90, 63, 25, .07);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - (var(--gutter) * 2), 1320px);
}

.brand { display: flex; align-items: center; gap: .8rem; }
.brand__seal {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  transition: transform .5s var(--ease);
}
.brand:hover .brand__seal { transform: rotate(14deg); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; direction: ltr; }
.brand__name {
  font-family: var(--f-latin);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
}
.brand__role {
  font-family: var(--f-util);
  font-size: .56rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-block-start: 3px;
}

.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.9rem); }
.nav__links > a {
  position: relative;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-2);
  padding-block: .4rem;
  transition: color .25s var(--ease);
}
.nav__links > a::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 0;
  height: 1px;
  background: var(--brass);
  transition: width .3s var(--ease);
}
.nav__links > a:hover { color: var(--ink); }
.nav__links > a:hover::after,
.nav__links > a.is-active::after { width: 100%; }
.nav__links > a.is-active { color: var(--brass-deep); }

.nav__cta {
  background: var(--ink);
  color: var(--paper-2) !important;
  padding: .62rem 1.35rem !important;
  border-radius: 999px;
  transition: background-color .3s var(--ease);
}
.nav__cta::after { display: none !important; }
.nav__cta:hover { background: var(--brass-deep); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .32s var(--ease), opacity .2s var(--ease);
}
.burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── 5. Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block-start: calc(var(--nav-h) + clamp(1.4rem, 4vh, 2.8rem));
  padding-block-end: 0;
  overflow: hidden;
}

/* soft sand + olive fields echoing the banner's blocked shapes — no image, so
   it never competes with the real banner sitting on top of it */
.hero__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 48% at 82% 6%,  rgba(220, 197, 162, .55) 0%, transparent 62%),
    radial-gradient(46% 40% at 10% 18%, rgba(139, 150, 99, .18)  0%, transparent 62%),
    radial-gradient(70% 52% at 46% 104%, rgba(207, 166, 89, .20) 0%, transparent 66%),
    var(--paper);
}

/* two columns: copy on the reading side (right in RTL), seal on the other */
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.8rem, 5vw, 5rem);
  padding-block-end: clamp(2.2rem, 5vh, 4rem);
}

/* THE BANNER — the brand's own lockup, shown at full fidelity.
   A gold hairline draws itself around it as the page loads. */
/* THE SEAL — the logo is a rotary badge, so the page treats it as one */
.seal {
  position: relative;
  width: clamp(200px, 27vw, 350px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.seal__logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(168, 121, 47, .35), var(--sh-3);
}
.seal__ring, .seal__dots {
  position: absolute;
  inset: -7%;
  width: auto;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.seal__dots { inset: -15%; }
.seal__ring-line {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1;
  stroke-dasharray: 604;
  stroke-dashoffset: 604;
  opacity: .7;
}
.seal__dots-line {
  fill: none;
  stroke: var(--brass-lit);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: .5 13;
  opacity: 0;
  transform-origin: 100px 100px;
}
.is-loaded .seal__ring-line { animation: ringDraw 1.9s var(--ease) .25s forwards; }
.is-loaded .seal__dots-line { animation: dotsIn .9s ease 1.5s forwards, dotsSpin 78s linear 1.5s infinite; }

@keyframes ringDraw { to { stroke-dashoffset: 0; } }
@keyframes dotsIn   { to { opacity: .85; } }
@keyframes dotsSpin { to { transform: rotate(360deg); } }

.hero__title {
  font-size: clamp(2.05rem, 1.15rem + 3.7vw, 3.6rem);
  line-height: 1.24;
  margin-block-end: 1.15rem;
  max-width: 16ch;
}
.hero__title .line { display: block; }
.hero__title .line--accent {
  color: var(--brass-deep);
  font-style: normal;
}

.hero__lede {
  max-width: 48ch;
  color: var(--ink-2);
  font-size: clamp(1rem, .95rem + .3vw, 1.12rem);
  line-height: 1.9;
  margin-block-end: 1.7rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  justify-content: flex-start;
  margin-block-end: clamp(1.6rem, 3vw, 2.4rem);
}

.hero__script {
  font-family: var(--f-display);
  font-size: clamp(1.02rem, .95rem + .4vw, 1.32rem);
  color: var(--olive);
  margin: 0;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line);
  width: min(100%, 560px);
}

/* hero load choreography — gated on .is-loaded so the page still reads
   fully if JavaScript never runs */
.is-loaded .hero__eyebrow                  { animation: riseIn .9s var(--ease)  .55s both; }
.is-loaded .hero__title .line:nth-child(1) { animation: riseIn .9s var(--ease)  .68s both; }
.is-loaded .hero__title .line:nth-child(2) { animation: riseIn .9s var(--ease)  .78s both; }
.is-loaded .hero__title .line:nth-child(3) { animation: riseIn .9s var(--ease)  .88s both; }
.is-loaded .hero__lede                     { animation: riseIn .9s var(--ease) 1.02s both; }
.is-loaded .hero__actions                  { animation: riseIn .9s var(--ease) 1.14s both; }
.is-loaded .hero__script                   { animation: riseIn .9s var(--ease) 1.26s both; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* pillar strip — the banner's four-column device, rebuilt */
.pillars {
  position: relative;
  z-index: 1;
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  text-align: center;
  padding: clamp(1.5rem, 3vw, 2.3rem) 1rem;
  border-inline-start: 1px solid var(--line);
}
.pillar:first-child { border-inline-start: 0; }
.pillar svg {
  width: 30px;
  height: 30px;
  fill: var(--brass);
  transition: fill .3s var(--ease), transform .4s var(--ease);
}
.pillar:hover svg { fill: var(--olive); transform: translateY(-3px); }
.pillar span {
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.5;
}

/* ── 6. Section shell ────────────────────────────────────────────────────── */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--about  { background: var(--paper); }
.section--services { background: var(--paper-2); border-block: 1px solid var(--line); }
.section--certs  { background: var(--paper); }
.section--accred { background: var(--paper-2); border-block: 1px solid var(--line); }
.section--contact { background: var(--paper); }

.sec-head { margin-block-end: clamp(2.4rem, 5vw, 3.6rem); }
.sec-title {
  font-size: clamp(1.85rem, 1.2rem + 2.4vw, 3rem);
  line-height: 1.25;
}
.sec-lede {
  margin-block-start: 1.35rem;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 1.02rem;
}

/* ── 7. About ────────────────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: minmax(230px, 320px) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about__portrait { position: sticky; inset-block-start: calc(var(--nav-h) + 2rem); }
.frame {
  position: relative;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
}
.frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.frame img {
  width: 100%;
  /* the photo's own ratio — the seal wall and the figure are one composition,
     so nothing is cropped out of it */
  aspect-ratio: 695 / 755;
  object-fit: cover;
  object-position: center;
  filter: saturate(.94) contrast(1.03);
}
.frame__cap {
  margin: 1rem 0 0;
  text-align: center;
  font-family: var(--f-display);
  font-size: 1.02rem;
  color: var(--ink-2);
}

.about__lead {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 1.05rem + .9vw, 1.72rem);
  line-height: 1.62;
  color: var(--ink);
  margin-block-end: 1.4rem;
}
.about__body p { color: var(--ink-2); }
.about__body strong { color: var(--ink); font-weight: 700; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-block-start: 2.4rem;
  background: var(--line);
  border: 1px solid var(--line);
}
.stats li {
  background: var(--paper);
  padding: 1.25rem .7rem;
  text-align: center;
}
.stats b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem);
  font-weight: 700;
  color: var(--brass-deep);
  line-height: 1.1;
}
.stats span {
  display: block;
  margin-block-start: .35rem;
  font-size: .78rem;
  color: var(--ink-3);
  line-height: 1.45;
}

/* the banner, shown properly, framed as a brand plate */
.plate {
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: clamp(.5rem, 1.2vw, .9rem);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
}
.plate img { width: 100%; }

/* ── 8. Services ─────────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.1rem, 2vw, 1.7rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 2.6vw, 2.2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease),
              border-color .45s var(--ease), opacity .8s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  background: linear-gradient(to left, var(--brass-lit), var(--brass), var(--olive));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-2);
  border-color: var(--brass-lit);
}
.card:hover::before { transform: scaleX(1); }

.card__kicker {
  font-family: var(--f-util);
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 .7rem;
  direction: ltr;
}
.card__title {
  font-size: clamp(1.25rem, 1.1rem + .55vw, 1.6rem);
  margin-block-end: .75rem;
}
.card__text {
  color: var(--ink-2);
  font-size: .96rem;
  line-height: 1.85;
  margin-block-end: 1.15rem;
}

.card__list { margin-block-end: 1.3rem; }
.card__list li {
  position: relative;
  padding-inline-start: 1.15rem;
  margin-block-end: .5rem;
  font-size: .93rem;
  color: var(--ink-2);
}
.card__list li::before {
  content: "";
  position: absolute;
  inset-block-start: .72em;
  inset-inline-start: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass-lit);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  margin-block-end: 1.4rem;
}
.tags li {
  font-size: .82rem;
  line-height: 1.5;
  padding: .32rem .72rem;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.card:hover .tags li { border-color: var(--line); }
.tags li:hover { background: var(--sand); border-color: var(--brass-lit); color: var(--ink); }

.card__link {
  margin-block-start: auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .93rem;
  font-weight: 500;
  color: var(--brass-deep);
  align-self: flex-start;
}
.card__link span { transition: transform .3s var(--ease); display: inline-block; }
.card__link:hover span { transform: translateX(-5px); }

/* لينك بيطلّع برّه الموقع — السهم بيشاور لبرّه، والحركة بتتبعه */
.card__link--out:hover span { transform: translate(4px, -4px); }

.card--note {
  background: linear-gradient(150deg, var(--sand) 0%, var(--paper-2) 70%);
  justify-content: center;
  text-align: center;
  align-items: center;
}
.card--note .card__text { margin-block-end: 1.6rem; }

/* ── 9. Certificates — documents laid out on a desk ──────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block-end: clamp(2rem, 4vw, 3rem);
}
.filter {
  padding: .55rem 1.25rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease);
}
.filter:hover { border-color: var(--brass); color: var(--ink); }
.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-2);
}

/* horizontal carousel: native scroll-snap, so touch and trackpad work for free */
.cert-carousel { position: relative; }

.cert-track {
  display: flex;
  align-items: stretch;
  gap: clamp(.9rem, 1.8vw, 1.5rem);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: 6px 14px;     /* room for the hover lift and shadow */
  padding-inline: 2px;
}
.cert-track::-webkit-scrollbar { display: none; }

.cert-item {
  --ty: 0px;
  flex: 0 0 auto;
  width: clamp(228px, 23vw, 296px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 0;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  cursor: zoom-in;
  text-align: start;
  transform: translateY(var(--ty));
  opacity: 0;
  transition: transform .32s var(--ease), box-shadow .32s var(--ease),
              opacity .5s var(--ease), border-color .3s var(--ease);
}
.cert-item:not(.is-in) { --ty: 20px; }
.cert-item.is-in { opacity: 1; --ty: 0px; }

.cert-item:hover,
.cert-item:focus-visible {
  transform: translateY(-7px);
  box-shadow: var(--sh-3);
  border-color: var(--brass-lit);
}

.cert-item__shot {
  display: block;            /* it is a <span>: without this, overflow is ignored */
  position: relative;
  overflow: hidden;
  background: var(--paper);
  aspect-ratio: 3 / 4;        /* one uniform window for mixed-shape documents */
}
.cert-item__shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;        /* never crop a certificate */
  transition: transform .45s var(--ease);
}

/* arrows */
.cert-nav {
  position: absolute;
  inset-block-start: calc(50% - 22px);
  z-index: 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  line-height: 1;
  padding-block-end: 5px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--sh-2);
  transition: background-color .25s var(--ease), color .25s var(--ease),
              opacity .25s var(--ease), transform .25s var(--ease);
}
.cert-nav:hover { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.cert-nav:disabled { opacity: 0; pointer-events: none; }
.cert-nav--prev { inset-inline-start: -14px; }
.cert-nav--next { inset-inline-end: -14px; }

/* progress */
.cert-progress {
  margin-block-start: 1.4rem;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.cert-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brass);
  border-radius: 2px;
  transition: width .18s linear;
}
.cert-item:hover .cert-item__shot img { transform: scale(1.035); }

.cert-item__zoom {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-end: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(36, 27, 18, .82);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.cert-item__zoom svg { width: 17px; height: 17px; fill: var(--paper-2); }
.cert-item:hover .cert-item__zoom,
.cert-item:focus-visible .cert-item__zoom { opacity: 1; transform: none; }

.cert-item__cap { display: block; flex: 1; padding: .85rem .25rem 1rem; }
.cert-item__title {
  display: block;
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}
.cert-item__meta {
  display: block;
  margin-block-start: .3rem;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.cert-empty {
  text-align: center;
  color: var(--ink-3);
  padding-block: 3rem;
}

/* ── 10. Accreditations ──────────────────────────────────────────────────── */
.accred__layout {
  display: grid;
  grid-template-columns: minmax(250px, 340px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.accred__feature { margin: 0; }
.accred__featureBtn {
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  cursor: zoom-in;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.accred__featureBtn:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-3);
}
.accred__feature figcaption {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-block-start: 1.15rem;
  text-align: center;
}
.accred__featureTag {
  align-self: center;
  font-family: var(--f-util);
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--paper-2);
  background: var(--olive);
  padding: .28rem .8rem;
  border-radius: 999px;
}
.accred__feature figcaption strong {
  font-family: var(--f-display);
  font-size: 1.06rem;
  line-height: 1.5;
}
.accred__feature figcaption > span:last-child {
  font-size: .82rem;
  color: var(--ink-3);
  line-height: 1.65;
}

.bodies {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.body {
  display: flex;
  align-items: center;
  gap: .95rem;
  padding: 1.15rem 1.25rem;
  background: var(--paper-2);
  transition: background-color .35s var(--ease);
}
.body:hover { background: var(--card); }
.body__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--brass-lit);
  background: var(--paper);
  font-family: var(--f-util);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--brass-deep);
  direction: ltr;
  transition: background-color .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease);
}
.body:hover .body__mark {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--paper-2);
}
.body div { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.body strong {
  font-size: .93rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}
.body span {
  font-size: .78rem;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ── 11. Contact ─────────────────────────────────────────────────────────── */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: clamp(1.5rem, 4vw, 3.2rem);
  align-items: start;
}

.contact__side { display: flex; flex-direction: column; gap: .8rem; }
.chan {
  display: flex;
  align-items: center;
  gap: .95rem;
  padding: 1.15rem 1.25rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
}
a.chan:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
  border-color: var(--brass-lit);
}
.chan svg { flex: 0 0 auto; width: 24px; height: 24px; fill: var(--brass); }
.chan span { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.chan b { font-size: .93rem; font-weight: 700; }
.chan em {
  font-style: normal;
  font-size: .84rem;
  color: var(--ink-3);
  line-height: 1.55;
  word-break: break-word;
}
.chan--static { background: transparent; }

.form {
  padding: clamp(1.5rem, 3.2vw, 2.5rem);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-1);
}
.field { margin-block-end: 1.15rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}
.field label {
  display: block;
  margin-block-end: .48rem;
  font-size: .87rem;
  font-weight: 500;
  color: var(--ink-2);
}
.field label i { color: var(--brass); font-style: normal; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: .82rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .96rem;
  line-height: 1.6;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder,
.field textarea::placeholder { color: #B6A794; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(168, 121, 47, .13);
}
.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: #B4553C; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: 1.1rem;
  width: 8px;
  height: 8px;
  border-left: 1.5px solid var(--brass);
  border-bottom: 1.5px solid var(--brass);
  transform: translateY(-70%) rotate(-45deg);
  pointer-events: none;
}
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 2.5rem;
  cursor: pointer;
}

.err {
  display: block;
  min-height: 1.05rem;
  margin-block-start: .32rem;
  font-size: .78rem;
  color: #A9482F;
  line-height: 1.4;
}

.form__note {
  margin: 1rem 0 0;
  font-size: .87rem;
  line-height: 1.6;
  color: var(--ink-3);
  text-align: center;
}
.form__note.is-ok { color: var(--olive); font-weight: 500; }
.form__note.is-bad { color: #A9482F; }

/* ── 12. Footer ──────────────────────────────────────────────────────────── */
.foot {
  background: var(--ink);
  color: rgba(247, 241, 230, .8);
  padding-block: clamp(2.8rem, 6vw, 4.2rem);
}
.foot__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  text-align: center;
}
.foot__seal {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(207, 166, 89, .4);
}
.foot__script {
  font-family: var(--f-display);
  font-size: clamp(1.02rem, .95rem + .35vw, 1.24rem);
  color: var(--brass-lit);
  margin: 0;
}
.foot__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.6rem;
  padding-block: 1.1rem;
  border-block: 1px solid rgba(207, 166, 89, .22);
  width: min(100%, 680px);
}
.foot__links a {
  font-size: .92rem;
  transition: color .25s var(--ease);
}
.foot__links a:hover { color: var(--brass-lit); }
.foot__copy {
  margin: 0;
  font-size: .82rem;
  color: rgba(247, 241, 230, .5);
}

/* ── 13. Lightbox ────────────────────────────────────────────────────────── */
.lb {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.lb[hidden] { display: none; }
.lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 17, 11, .88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.lb.is-open .lb__backdrop { opacity: 1; }

.lb__panel {
  position: relative;
  z-index: 1;
  max-width: min(100%, 1000px);
  max-height: 100%;
  display: flex;
  opacity: 0;
  transform: scale(.96) translateY(12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.lb.is-open .lb__panel { opacity: 1; transform: none; }

.lb__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  max-height: 100%;
  min-width: 0;
}
.lb__figure img {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  margin-inline: auto;
  object-fit: contain;
  background: var(--card);
  padding: 8px;
  border-radius: 2px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
}
.lb__cap {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  text-align: center;
  color: var(--paper);
}
.lb__cap strong { font-family: var(--f-display); font-size: 1.1rem; line-height: 1.5; }
.lb__cap span { font-size: .85rem; color: rgba(247, 241, 230, .68); line-height: 1.6; }
.lb__cap em {
  font-style: normal;
  font-family: var(--f-util);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--brass-lit);
  direction: ltr;
}

.lb__close,
.lb__nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(247, 241, 230, .1);
  border: 1px solid rgba(247, 241, 230, .25);
  color: var(--paper);
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.lb__close:hover,
.lb__nav:hover { background: rgba(247, 241, 230, .24); }

.lb__close {
  inset-block-start: -8px;
  inset-inline-end: -8px;
  width: 42px;
  height: 42px;
  font-size: 1.6rem;
  line-height: 1;
  padding-block-end: 4px;
}
.lb__nav {
  inset-block-start: 34%;
  width: 46px;
  height: 46px;
  font-size: 2rem;
  line-height: 1;
  padding-block-end: 6px;
}
.lb__nav[hidden] { display: none; }
/* RTL reading order: previous sits on the right, next on the left */
.lb__nav--prev { inset-inline-start: -22px; }
.lb__nav--next { inset-inline-end: -22px; }
.lb__nav--prev:hover { transform: translateX(3px); }
.lb__nav--next:hover { transform: translateX(-3px); }

/* ── 14. Back to top ─────────────────────────────────────────────────────── */
.totop {
  position: fixed;
  inset-block-end: 1.5rem;
  inset-inline-start: 1.5rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: var(--sh-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .35s var(--ease), transform .35s var(--ease),
              visibility .35s, background-color .3s var(--ease);
}
.totop.is-shown { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--brass-deep); }
.totop svg { width: 20px; height: 20px; fill: var(--paper-2); }

/* ── 15. Responsive ──────────────────────────────────────────────────────── */

/* Short viewports — 768px/800px laptops and small phones. Scale the hero to
   the viewport HEIGHT so the booking buttons stay above the fold. */
/* Short viewports — 768px/800px laptops and small phones. Scale the hero to
   the viewport HEIGHT so the booking buttons stay above the fold. */
@media (max-height: 820px) {
  .hero { padding-block-start: calc(var(--nav-h) + 1rem); }
  .hero__inner { padding-block-end: clamp(1.4rem, 3vh, 2.2rem); }
  .hero__title { font-size: clamp(1.9rem, 5.2vh, 3.2rem); margin-block-end: .9rem; }
  .hero__lede { font-size: 1rem; line-height: 1.8; margin-block-end: 1.35rem; }
  .hero__actions { margin-block-end: clamp(1.2rem, 2.5vh, 1.8rem); }
  .hero__script { padding-block-start: 1.1rem; }
}

@media (max-height: 700px) {
  .hero__title { font-size: clamp(1.72rem, 4.6vh, 2.6rem); margin-block-end: .75rem; }
  .hero__lede { line-height: 1.7; margin-block-end: 1.1rem; }
  .hero__eyebrow { margin-block-end: .6rem; }
}


@media (max-width: 1080px) {
  .cert-item { width: clamp(220px, 34vw, 280px); }
}

@media (max-width: 960px) {
  :root { --nav-h: 66px; }

  .burger { display: flex; }

  .nav__links {
    position: fixed;
    inset-block-start: var(--nav-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gutter) 2rem;
    background: rgba(247, 241, 230, .98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-block-end: 1px solid var(--line);
    box-shadow: 0 20px 40px -20px rgba(90, 63, 25, .3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links > a {
    padding-block: .95rem;
    font-size: 1.02rem;
    border-block-end: 1px solid var(--line-soft);
  }
  .nav__links > a::after { display: none; }
  .nav__cta {
    margin-block-start: 1.1rem;
    text-align: center;
    border-block-end: 0 !important;
    padding: .95rem 1.35rem !important;
  }

  /* stack the hero: seal on top, copy centred underneath */
  .hero__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: clamp(1.2rem, 3vw, 1.8rem);
    text-align: center;
  }
  .seal { order: -1; width: clamp(168px, 42vw, 250px); }
  .hero__eyebrow { text-align: center; }
  .hero__title, .hero__lede { margin-inline: auto; }
  .hero__actions { justify-content: center; }

  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { position: static; max-width: 300px; margin-inline: auto; }

  .accred__layout { grid-template-columns: 1fr; }
  .accred__feature { max-width: 340px; margin-inline: auto; }

  .contact__grid { grid-template-columns: 1fr; }

  .lb__nav--prev { inset-inline-start: 4px; }
  .lb__nav--next { inset-inline-end: 4px; }
  .lb__close { inset-block-start: 4px; inset-inline-end: 4px; }
}

@media (max-width: 720px) {
  .pillars__grid { grid-template-columns: repeat(2, 1fr); }
  .pillar:nth-child(odd) { border-inline-start: 0; }
  .pillar:nth-child(n+3) { border-block-start: 1px solid var(--line); }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .bodies { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }


  .cert-nav { display: none; }              /* phones swipe instead */
  .cert-item { width: min(78vw, 320px); }

  .totop { inset-block-end: 1rem; inset-inline-start: 1rem; width: 42px; height: 42px; }
}

@media (max-width: 420px) {
  .brand__text { display: none; }
  .hero__actions .btn { width: 100%; }
}

/* Only once the hero is stacked does the seal compete for vertical room —
   side by side it keeps its width-based size. Declared last so it wins over
   the width-only rules above. */
@media (max-width: 960px) and (max-height: 820px) {
  .seal { width: clamp(150px, 25vh, 230px); }
}
@media (max-width: 960px) and (max-height: 700px) {
  .seal { width: clamp(100px, 16.5vh, 150px); }
  .hero__inner { gap: .85rem; }
  .hero__lede { font-size: .95rem; line-height: 1.62; }
}

/* ── 16. Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .cert-item { opacity: 1 !important; --tilt: 0deg !important; --ty: 0px !important; }
  .seal__ring-line { stroke-dashoffset: 0; }
  .seal__dots-line { opacity: .85; }
}

/* ── 17. Print ───────────────────────────────────────────────────────────── */
@media print {
  .nav, .totop, .lb, .filters, .hero__actions { display: none !important; }
  body { background: #fff; }
  [data-reveal], .cert-item { opacity: 1 !important; transform: none !important; }
}

/* ── 18. Book ────────────────────────────────────────────────────── */
.section--book { background: var(--paper-2); border-block: 1px solid var(--line); }
.section--book[hidden] { display: none; }

.books {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 285px));
  gap: clamp(1.2rem, 2.6vw, 1.8rem);
  /* start = the right edge in RTL, so the card sits under the section title */
  justify-content: start;
  /* each card sizes to its own content — otherwise opening «اقرأ المزيد»
     on one card stretches the others into empty space */
  align-items: start;
}

/* a tall product card: cover on top, everything else stacked under it */
.bk {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-1);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.bk:hover { transform: translateY(-5px); box-shadow: var(--sh-2); border-color: var(--brass-lit); }

.bk__cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--sand);
  border-block-end: 1px solid var(--line);
}
.bk__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.bk:hover .bk__cover img { transform: scale(1.04); }
.bk__cover--empty {
  display: grid; place-items: center;
  font-family: var(--f-display); color: var(--brass-deep);
  text-align: center; padding: 1.2rem; line-height: 1.6;
}

.bk__body {
  display: flex; flex-direction: column; flex: 1;
  padding: clamp(1.1rem, 2.4vw, 1.5rem);
}

.bk__title { font-size: 1.25rem; line-height: 1.45; margin-block-end: .3rem; }
.bk__sub { color: var(--brass-deep); font-size: .89rem; margin-block-end: .8rem; }

/* two lines, then «اقرأ المزيد» */
.bk__text {
  color: var(--ink-2);
  font-size: .92rem;
  line-height: 1.85;
  margin-block-end: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* back to a normal block when open — an unclamped -webkit-box keeps its
   flex-ish sizing and blows the card height up */
.bk__text.is-open {
  display: block;
  overflow: visible;
}

.bk__more {
  align-self: flex-start;
  font-size: .86rem; font-weight: 500;
  color: var(--brass-deep);
  padding: .15rem 0;
  margin-block-end: .9rem;
  border-block-end: 1px solid var(--brass-lit);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.bk__more:hover { color: var(--ink); border-block-end-color: var(--brass); }
.bk__more[hidden] { display: none; }

.bk__points { margin-block-end: 1.1rem; }
.bk__points li {
  position: relative;
  padding-inline-start: 1.25rem;
  margin-block-end: .38rem;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.bk__points li::before {
  content: "";
  position: absolute;
  inset-block-start: .62em;
  inset-inline-start: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass-lit);
}

.bk__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin-block-start: auto;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--line);
}
.bk__price {
  font-family: var(--f-display);
  font-size: 1.45rem;
  color: var(--brass-deep);
}
.bk__pages { font-size: .85rem; color: var(--ink-3); }
.bk__buy {
  display: flex;
  gap: .5rem;
  width: 100%;
  margin-block-start: .6rem;
}
.bk__buy .btn {
  flex: 1;
  padding-inline: .7rem;
  white-space: nowrap;
}

/* ── order modal ─────────────────────────────────────────────────── */
.ord { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: clamp(.8rem, 3vw, 2rem); }
.ord[hidden] { display: none; }
.ord__backdrop {
  position: absolute; inset: 0;
  background: rgba(23, 17, 11, .82);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.ord.is-open .ord__backdrop { opacity: 1; }

.ord__panel {
  position: relative; z-index: 1;
  width: min(100%, 620px);
  max-height: 92vh; overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}
.ord.is-open .ord__panel { opacity: 1; transform: none; }

.ord__close {
  position: absolute; inset-block-start: 10px; inset-inline-end: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; color: var(--ink-2);
  display: grid; place-items: center;
  transition: background-color .2s var(--ease);
}
.ord__close:hover { background: var(--sand); }

.ord__title { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem); margin-block-end: .3rem; }
.ord__book { color: var(--brass-deep); font-size: .95rem; margin-block-end: 1.3rem; }

.pay {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-block-end: 1.5rem;
}
.pay__lead { font-size: .9rem; color: var(--ink-2); margin-block-end: .9rem; }
.pay__rows { display: grid; gap: .6rem; }
.pay__row {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .65rem .9rem;
}
.pay__label { font-size: .84rem; font-weight: 500; color: var(--ink-2); min-width: 92px; }
.pay__val { font-family: var(--f-util); font-size: 1rem; letter-spacing: .04em; color: var(--ink); direction: ltr; }
.pay__who { font-size: .8rem; color: var(--ink-3); }
.pay__copy {
  margin-inline-start: auto;
  font-size: .78rem; font-weight: 500;
  padding: .28rem .8rem;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--brass-deep);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.pay__copy:hover { background: var(--brass); color: var(--paper-2); border-color: var(--brass); }
.pay__note { font-size: .84rem; color: var(--ink-2); line-height: 1.8; margin: .9rem 0 0; }

.ord__form .field { margin-block-end: 1rem; }
.ord__form label { display: block; margin-block-end: .45rem; font-size: .87rem; font-weight: 500; color: var(--ink-2); }
.ord__form label i { color: var(--brass); font-style: normal; }
.ord__form input[type=text], .ord__form input[type=tel],
.ord__form input[type=email], .ord__form select, .ord__form textarea {
  width: 100%; padding: .78rem .95rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: .95rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.ord__form textarea { resize: vertical; min-height: 84px; }
.ord__form input:focus, .ord__form select:focus, .ord__form textarea:focus {
  outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(168,121,47,.13);
}
.ord__form .field.has-error input,
.ord__form .field.has-error .filebox { border-color: #B4553C; }
.hintline { display: block; margin-block-start: .3rem; font-size: .78rem; color: var(--ink-3); }

.filebox {
  display: flex; align-items: center; gap: .7rem;
  padding: .95rem 1rem;
  background: var(--card);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  cursor: pointer; font-size: .9rem; color: var(--ink-2);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.filebox:hover { border-color: var(--brass); background: var(--paper-2); }
.filebox svg { width: 22px; height: 22px; fill: var(--brass); flex: 0 0 auto; }
.filebox input { display: none; }
.filebox__preview {
  max-width: 190px; margin-block-start: .8rem;
  border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: var(--card);
}

.ord__done { text-align: center; padding-block: 1rem; }
.ord__tick {
  display: grid; place-items: center;
  width: 62px; height: 62px; margin: 0 auto 1.1rem;
  border-radius: 50%; background: var(--olive); color: #fff; font-size: 1.7rem;
}
.ord__done p { color: var(--ink-2); }
.ord__codewrap {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  margin-block: 1.5rem 1.1rem;
  padding: 1.1rem 1rem;
  background: var(--sand);
  border: 1px dashed var(--brass);
  border-radius: var(--radius);
}
.ord__codelabel { font-size: .84rem; color: var(--ink-2); }
.ord__code {
  font-family: var(--f-util); font-size: 1.75rem; font-weight: 500;
  letter-spacing: .18em; color: var(--brass-deep); direction: ltr;
  line-height: 1.2;
}
.ord__copy {
  margin-block-start: .3rem;
  font-size: .8rem; font-weight: 500;
  padding: .35rem 1.1rem;
  color: var(--brass-deep);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.ord__copy:hover { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }

.ord__warn {
  font-size: .87rem; line-height: 1.85; color: var(--ink-2);
  background: var(--paper-2);
  border-inline-start: 3px solid var(--brass);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  text-align: start;
}
.ord__warn strong { color: var(--ink); }
.ord__doneActions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-block-start: 1.4rem; }

@media (max-width: 640px) {
  .books { grid-template-columns: minmax(0, 340px); justify-content: stretch; }
}

.ord__wahint {
  font-size: .85rem;
  line-height: 1.8;
  color: var(--olive);
  background: #EDF3E6;
  border-radius: var(--radius);
  padding: .7rem .9rem;
  margin-block: .9rem 0;
}
.ord__wahint[hidden] { display: none; }
