﻿/* ==========================================================================
   St-Takla.org — كتاب شفيعي الأنبا تكلا (قسم التلوين)
   Palette and ornament lifted from the printed back cover: Ethiopian-manuscript
   teal, manuscript gold, deep red, and aged-parchment cream.

   Everything is scoped under .stk so it cannot leak into the shared site
   navbar/footer, and so the site-wide `h1 * { font-size:24pt!important }` rule
   in common-1-head-ar.php cannot reach inside our headings.
   ========================================================================== */

/* The palette lives on :root, not on .stk.
   The photo viewer is a direct child of <body> — it has to be, so that its
   position:fixed can never be trapped by a transformed ancestor — which put it
   outside .stk. Custom properties declared on .stk therefore did not reach it,
   and every var() inside the viewer resolved to nothing: no parchment panel,
   no gold border, and a caption with no colour of its own. Declaring them on
   :root costs nothing (a custom property only does anything where it is
   actually referenced) and covers both. */
:root {
  --teal-900: #0d4f57;
  --teal-800: #12646d;
  --teal-700: #16717a;
  --teal-600: #1f8d97;
  --teal-400: #57bfc6;
  --teal-100: #d9f0f2;

  --gold-700: #a9761f;
  --gold-600: #c8902a;
  --gold-500: #e6b23c;
  --gold-300: #f3d488;
  --gold-100: #fbeecb;

  --red-700: #8f2a24;
  --red-600: #b33a32;
  --red-400: #d9695f;

  --parch-300: #f9f0dc;
  --parch-400: #f4e5c4;
  --parch-500: #eddcb0;

  --ink: #22303c;
  --ink-soft: #4a5c6b;
  --paper: #fffdf8;

  --radius: 18px;
  --shadow-sm: 0 2px 6px rgba(13, 79, 87, .12);
  --shadow-md: 0 8px 24px rgba(13, 79, 87, .16);
  --shadow-lg: 0 18px 48px rgba(13, 79, 87, .22);

  --font-ar: "Segoe UI", "Tahoma", "Arabic Typesetting", "Traditional Arabic", "Noto Naskh Arabic", sans-serif;
}

.stk {
  direction: rtl;
  text-align: right;
  font-family: var(--font-ar);
  color: var(--ink);
  line-height: 1.85;
  font-size: 17px;
}

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

.stk img { max-width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   Link colours — restated at !important on purpose.

   /resources/common.css forces every anchor site-wide:
       a         { color:#1668cd !important }
       a:hover   { color:#0c458a !important }
       a:visited { color:#4f29b0 !important }
   Without matching that weight, every button, pill and phone number in this
   section renders link-blue or visited-purple no matter what we set. The
   selectors below are all more specific than a bare `a`, so they win.
   -------------------------------------------------------------------------- */

.stk a.stk-btn,
.stk a.stk-btn:link,
.stk a.stk-btn:visited,
.stk a.stk-btn:hover,
.stk a.stk-btn:focus            { color: #fff !important; }

.stk a.stk-btn-gold,
.stk a.stk-btn-gold:link,
.stk a.stk-btn-gold:visited,
.stk a.stk-btn-gold:hover,
.stk a.stk-btn-gold:focus       { color: #3a2807 !important; }

.stk a.stk-btn-ghost,
.stk a.stk-btn-ghost:link,
.stk a.stk-btn-ghost:visited    { color: var(--teal-800) !important; }
.stk a.stk-btn-ghost:hover,
.stk a.stk-btn-ghost:focus      { color: var(--teal-900) !important; }

/* The pill label lives in its own <span> so its colour is set on an element
   that is not an anchor. `a { color:#1668cd !important }` in the site-wide
   common.css beats any non-important rule of ours, and matching it with
   !important everywhere turns every state into a specificity duel. A span is
   invisible to that rule, so plain specificity settles it. */
.stk .stk-pill-txt,
.stk .stk-pill-ico { color: var(--teal-900); transition: color .2s; }

.stk .stk-pill:hover .stk-pill-txt,
.stk .stk-pill:focus .stk-pill-txt,
.stk .stk-pill.is-active .stk-pill-txt,
.stk .stk-pill:hover .stk-pill-ico,
.stk .stk-pill:focus .stk-pill-ico,
.stk .stk-pill.is-active .stk-pill-ico { color: #fff; }

.stk a.stk-pick,
.stk a.stk-pick:link,
.stk a.stk-pick:visited,
.stk a.stk-pick:hover           { color: var(--ink) !important; }

.stk .stk-order a,
.stk .stk-order a:link,
.stk .stk-order a:visited,
.stk .stk-order a:hover         { color: var(--gold-300) !important; }

.stk .stk-order a.stk-tel,
.stk .stk-order a.stk-tel:link,
.stk .stk-order a.stk-tel:visited,
.stk .stk-order a.stk-tel:hover,
.stk .stk-order a.stk-tel:focus { color: #fff !important; }

.stk .stk-note a,
.stk .stk-note a:link,
.stk .stk-note a:visited,
.stk .stk-note a:hover          { color: var(--red-700) !important; }

.stk .stk-section-lead a,
.stk .stk-section-lead a:link,
.stk .stk-section-lead a:visited,
.stk .stk-section-lead a:hover  { color: var(--red-700) !important; }

.stk-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.stk-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 42px;
  background:
    radial-gradient(1200px 420px at 50% -140px, var(--teal-400) 0%, transparent 62%),
    linear-gradient(180deg, var(--teal-700) 0%, var(--teal-800) 55%, var(--teal-900) 100%);
}

/* faint manuscript lattice, drawn in CSS so the page pulls no extra requests */
.stk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.5) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.5) 75%),
    linear-gradient(45deg, rgba(255,255,255,.5) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.5) 75%);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
}

.stk-hero > * { position: relative; }

.stk-eyebrow {
  margin: 0 0 6px;
  text-align: center;
  font-size: 15px !important;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-300);
}
.stk-eyebrow * { font-size: 15px !important; }

.stk-hero h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: clamp(28px, 5.2vw, 46px);
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.18), 0 10px 30px rgba(0,0,0,.25);
}
.stk-hero h1 * { font-size: inherit !important; }

.stk-hero-sub {
  margin: 0 auto 26px;
  max-width: 640px;
  text-align: center;
  font-size: 17px;
  color: var(--teal-100);
}

.stk-hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.stk-cover-shot {
  flex: 0 0 auto;
  width: min(300px, 72vw);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
  transition: transform .35s ease, box-shadow .35s ease;
}
.stk-cover-shot:hover { transform: rotate(0deg) scale(1.02); }

.stk-hero-card {
  flex: 1 1 340px;
  max-width: 500px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--gold-500);
  background: linear-gradient(180deg, var(--parch-300), var(--parch-400));
  box-shadow: var(--shadow-md);
}
.stk-hero-card p { margin: 0 0 12px; font-size: 17.5px; }
.stk-hero-card p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Sticky section nav
   -------------------------------------------------------------------------- */

.stk-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 248, .94);
  border-bottom: 2px solid var(--gold-500);
  box-shadow: 0 4px 14px rgba(13, 79, 87, .12);
}
@supports (backdrop-filter: blur(8px)) {
  .stk-nav { backdrop-filter: blur(8px); }
}

.stk-nav-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  max-width: 1120px;
  margin: 0 auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.stk-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--teal-100);
  color: var(--teal-900);
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.stk-pill:hover,
.stk-pill:focus {
  background: var(--teal-600);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.stk-pill.is-active {
  background: var(--teal-700);
  border-color: var(--gold-500);
  color: #fff;
}
.stk-pill .stk-pill-ico { font-size: 17px; line-height: 1; }

/* --------------------------------------------------------------------------
   Sections + ornamental dividers
   -------------------------------------------------------------------------- */

.stk-body { background: var(--paper); padding-bottom: 10px; }

.stk-section {
  padding: 34px 0 10px;
  scroll-margin-top: 130px;
}

.stk-section h2 {
  margin: 0 0 6px;
  text-align: center;
  font-size: clamp(23px, 3.4vw, 32px);
  font-weight: 800;
  color: var(--teal-800);
}
.stk-section h2 * { font-size: inherit !important; }

.stk-section-lead {
  margin: 0 auto 24px;
  max-width: 720px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 16.5px;
}

.stk-divider {
  display: block;
  width: min(560px, 90%);
  height: 34px;
  margin: 26px auto 4px;
  color: var(--gold-600);
  opacity: .9;
}

/* --------------------------------------------------------------------------
   Book flipper
   -------------------------------------------------------------------------- */

/* 100% rather than 88vw: vw ignores the 16px padding on .stk-wrap, so on a
   phone the stage came out wider than the column that holds it and the page
   image spilled past its white card. */
.stk-flip-stage {
  position: relative;
  width: min(430px, 100%);
  margin: 0 auto;
  aspect-ratio: 771 / 1100;
  perspective: 1800px;

  /* Not the default: this hands vertical scrolling and pinch-zoom to the
     browser but keeps horizontal gestures for us. Without it a sideways swipe
     is claimed by the page scroller, which fires pointercancel and silently
     kills the page-turn drag on phones — which is exactly what broke it. */
  touch-action: pan-y pinch-zoom;
}
/* aspect-ratio fallback for older WebKit */
@supports not (aspect-ratio: 1) {
  .stk-flip-stage { height: 0; padding-bottom: 142.7%; }
}

.stk-leaf {
  position: absolute;
  inset: 0;
  transform-origin: right center;   /* RTL: the spine is on the right */
  transform-style: preserve-3d;
  backface-visibility: hidden;
  border-radius: 4px 12px 12px 4px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  /* Coming back: fade in at once. The sheet is hidden by backface-visibility
     until it passes 90° anyway, so the fade is never actually seen — what you
     get is a clean rotation from edge-on to flat. */
  transition: transform .72s cubic-bezier(.42, 0, .2, 1), opacity .2s ease 0s;
  will-change: transform;
}

.stk-leaf img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--paper);
  pointer-events: none;
  user-select: none;
}

/* the sheet's inner shading, strongest at the spine */
.stk-leaf::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(270deg, rgba(13,79,87,.20) 0%, rgba(13,79,87,.05) 7%, transparent 18%);
}

/* Turning away: hold the sheet fully opaque through the rotation and only fade
   it at the very end.
   A transition takes its timing from the state being moved *to*, so the delay
   here applies to leaving and the 0s above applies to returning. Without it the
   0.3s fade finished while the page was still almost flat — the forward turn
   looked like a dissolve while the backward one looked like a real page turn.
   Same rotation both ways now. */
.stk-leaf.is-turned {
  transform: rotateY(-172deg);
  opacity: 0;
  pointer-events: none;
  transition: transform .72s cubic-bezier(.42, 0, .2, 1), opacity .18s ease .54s;
}

/* the stack of pages still to come, peeking out past the spine */
.stk-flip-stage::before,
.stk-flip-stage::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: -6px;
  width: 12px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, var(--parch-500), var(--parch-400));
  box-shadow: var(--shadow-sm);
}
.stk-flip-stage::after { right: -11px; top: 12px; bottom: 12px; opacity: .7; }

.stk-flip-hint {
  margin: 14px auto 0;
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
}

/* prev | dots | next on one row that never wraps — the flex version broke onto
   two lines on a phone and looked broken. The dots column takes the slack and
   scrolls if there are ever more pages than fit. */
.stk-flip-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(430px, 100%);
  margin: 16px auto 0;
}

.stk-flip-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}
.stk-flip-dots::-webkit-scrollbar { display: none; }

@media (max-width: 420px) {
  .stk-flip-controls { gap: 6px; }
  .stk-flip-controls .stk-btn-sm { padding: 6px 10px; font-size: 14px; }
  .stk-flip-dots { gap: 5px; }
}
.stk-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--teal-600);
  background: transparent;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.stk-dot.is-active { background: var(--gold-500); border-color: var(--gold-600); transform: scale(1.25); }

/* --------------------------------------------------------------------------
   Caption panel under the flipper
   -------------------------------------------------------------------------- */

.stk-caption {
  max-width: 760px;
  margin: 22px auto 0;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--gold-500);
  background: linear-gradient(180deg, var(--parch-300), var(--parch-400));
  box-shadow: var(--shadow-sm);
}

.stk-caption-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--gold-600);
}

.stk-caption-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--teal-800);
}

.stk-lang-group { display: flex; gap: 6px; }

.stk-lang-btn {
  min-width: 46px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid var(--teal-600);
  background: #fff;
  color: var(--teal-800);
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.stk-lang-btn:hover { background: var(--teal-100); }
.stk-lang-btn.is-active { background: var(--teal-700); color: #fff; border-color: var(--teal-800); }

/* Story and body prose is justified in every language, per the book's own
   typography. `last: right` keeps a short final line from being stretched. */
.stk-caption-text {
  margin: 0;
  white-space: pre-line;
  font-size: 17.5px;
  line-height: 2;
  text-align: justify;
  text-align-last: right;
  text-justify: inter-word;
}
.stk-caption-text[lang="en"],
.stk-caption-text[lang="fr"] {
  direction: ltr;
  text-align: justify;
  text-align-last: left;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.stk-card > p,
.stk-hero-card p {
  text-align: justify;
  text-align-last: right;
  text-justify: inter-word;
}

.stk-caption-cta { margin: 16px 0 0; text-align: center; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.stk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal-600), var(--teal-800));
  color: #fff;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.stk-btn:hover,
.stk-btn:focus {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.06);
}
.stk-btn:active { transform: translateY(0); }
.stk-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.stk-btn-gold { background: linear-gradient(180deg, var(--gold-500), var(--gold-700)); color: #3a2807; }
.stk-btn-gold:hover, .stk-btn-gold:focus { color: #3a2807; }
.stk-btn-red { background: linear-gradient(180deg, var(--red-400), var(--red-700)); }
.stk-btn-ghost {
  background: #fff;
  color: var(--teal-800);
  border: 2px solid var(--teal-600);
}
.stk-btn-ghost:hover, .stk-btn-ghost:focus { background: var(--teal-100); color: var(--teal-900); }
.stk-btn-sm { min-height: 38px; padding: 6px 16px; font-size: 15px; }

/* --------------------------------------------------------------------------
   Colouring picker grid
   -------------------------------------------------------------------------- */

/* Two up on a phone, three up from tablet width — a fixed count rather than
   auto-fill, so six pictures never land as an awkward 5 + 1. */
.stk-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 8px;
}
@media (min-width: 700px) {
  .stk-pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.stk-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 3px solid var(--gold-500);
  background: var(--paper);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .25s, border-color .2s;
}
.stk-pick:hover,
.stk-pick:focus {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-600);
  text-decoration: none;
  color: inherit;
}

.stk-pick-img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
}

.stk-pick-label {
  padding: 10px 12px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--teal-800);
  background: linear-gradient(180deg, var(--parch-300), var(--parch-400));
  border-top: 2px solid var(--gold-500);
}

.stk-pick-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold-500);
  color: #3a2807;
  font-size: 19px;
  box-shadow: var(--shadow-sm);
}
.stk-pick.is-done .stk-pick-badge { display: flex; }

.stk-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 22px auto 0;
  padding: 14px 18px;
  max-width: 680px;
  border-radius: var(--radius);
  border: 2px dashed var(--gold-600);
  background: var(--gold-100);
}
.stk-badge-row-label { font-weight: 700; color: var(--gold-700); }
.stk-star {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--gold-600);
  background: #fff;
  font-size: 17px;
  color: #d6d0c0;
}
.stk-star.is-on { background: var(--gold-500); color: #fff; }

/* --------------------------------------------------------------------------
   Ethiopia trip gallery
   -------------------------------------------------------------------------- */

.stk-eth-intro { max-width: 900px; margin-bottom: 22px; }
.stk-eth-intro p { line-height: 2.05; }

.stk .stk-eth-intro a,
.stk .stk-eth-intro a:link,
.stk .stk-eth-intro a:visited { color: var(--red-700) !important; font-weight: 700; }
.stk .stk-eth-intro a:hover,
.stk .stk-eth-intro a:focus  { color: var(--red-600) !important; }

.stk-eth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 620px) { .stk-eth-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .stk-eth-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Photo-corner look: thick cream mount, gold rule, a playful tilt on hover. */
.stk-eth-shot {
  position: relative;
  display: block;
  padding: 7px;
  border: 3px solid var(--gold-500);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--parch-300), var(--parch-400));
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .25s ease, border-color .2s;
}
.stk-eth-shot:hover,
.stk-eth-shot:focus {
  transform: translateY(-5px) rotate(-1.2deg) scale(1.03);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-600);
  outline: none;
}
.stk-eth-shot:nth-child(even):hover { transform: translateY(-5px) rotate(1.2deg) scale(1.03); }

.stk-eth-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
}
@supports not (aspect-ratio: 1) {
  .stk-eth-shot img { height: 140px; }
}

.stk-eth-zoom {
  position: absolute;
  inset-inline-end: 12px;
  inset-block-end: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(13, 79, 87, .82);
  color: #fff;
  font-size: 17px;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .2s, transform .2s;
}
.stk-eth-shot:hover .stk-eth-zoom,
.stk-eth-shot:focus .stk-eth-zoom { opacity: 1; transform: scale(1); }

/* --------------------------------------------------------------------------
   Photo viewer
   -------------------------------------------------------------------------- */

/* Living outside .stk, the viewer has to restate the basics for itself —
   direction, font and border-box sizing all come from .stk otherwise. */
.stk-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 33, 37, .88);
  animation: stk-fade .2s ease-out;
  direction: rtl;
  font-family: var(--font-ar);
  color: var(--ink);
  line-height: 1.85;
}
.stk-modal,
.stk-modal *,
.stk-modal *::before,
.stk-modal *::after { box-sizing: border-box; }

.stk-modal[hidden] { display: none; }

@keyframes stk-fade { from { opacity: 0; } to { opacity: 1; } }

.stk-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  max-height: 94vh;
  padding: 14px;
  border: 3px solid var(--gold-500);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--parch-300), var(--parch-400));
  box-shadow: 0 26px 70px rgba(0, 0, 0, .55);
}

.stk-modal-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.stk-modal-stage img {
  max-width: 100%;
  max-height: 66vh;
  display: block;
  object-fit: contain;
}

.stk-modal-spin {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-800);
  font-size: 22px;
  font-weight: 700;
  background: var(--parch-300);
}
.stk-modal-spin[hidden] { display: none; }

.stk-modal-cap {
  margin: 14px 6px 0;
  max-height: 20vh;
  overflow-y: auto;
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 600;
  line-height: 1.9;
  color: var(--ink);
  text-align: justify;
  text-align-last: center;
}
.stk-modal-cap[lang="en"],
.stk-modal-cap[lang="fr"] {
  direction: ltr;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* "7 / 10" is spaces-around-a-slash, which bidi treats as neutral text and
   reorders inside an RTL box — it was rendering as "10 / 7". Isolating the
   counter as its own LTR run keeps it the right way round. */
.stk-modal-count {
  margin: 6px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal-800);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

.stk-modal-close,
.stk-modal-nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold-500);
  border-radius: 50%;
  background: rgba(13, 79, 87, .92);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s, transform .15s;
}
.stk-modal-close:hover,
.stk-modal-nav:hover { background: var(--teal-600); transform: scale(1.08); }

.stk-modal-close {
  top: -14px;
  inset-inline-end: -14px;
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.stk-modal-nav {
  top: 44%;
  width: 46px;
  height: 46px;
  font-size: 20px;
}
.stk-modal-prev { inset-inline-end: 4px; }   /* RTL: previous sits on the right */
.stk-modal-next { inset-inline-start: 4px; }
.stk-modal-nav[disabled] { opacity: .35; cursor: default; transform: none; }

@media (max-width: 640px) {
  .stk-modal { padding: 10px; }
  .stk-modal-box { padding: 10px; }
  .stk-modal-stage img { max-height: 56vh; }
  .stk-modal-close { top: -10px; inset-inline-end: -8px; width: 38px; height: 38px; }
  .stk-modal-nav { width: 40px; height: 40px; font-size: 17px; }
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.stk-card {
  max-width: 780px;
  margin: 0 auto;
  padding: 26px 26px 28px;
  border-radius: var(--radius);
  border: 2px solid var(--teal-400);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.stk-field { margin-bottom: 16px; }

.stk-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 16px;
  color: var(--teal-800);
}
.stk-req { color: var(--red-600); }

.stk-field input[type="text"],
.stk-field input[type="number"],
.stk-field input[type="file"],
.stk-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--teal-400);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 16.5px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.stk-field input:focus,
.stk-field textarea:focus {
  outline: none;
  border-color: var(--teal-700);
  box-shadow: 0 0 0 4px rgba(87, 191, 198, .28);
}
.stk-field textarea { min-height: 150px; resize: vertical; line-height: 1.8; }

.stk-hint { margin: 5px 2px 0; font-size: 14.5px; color: var(--ink-soft); }
.stk-counter { font-variant-numeric: tabular-nums; }
.stk-counter.is-over { color: var(--red-600); font-weight: 700; }

.stk-captcha {
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px dashed var(--gold-600);
  background: var(--gold-100);
}

/* why we ask — quiet, so it explains without competing with the question */
.stk-captcha-why {
  font-size: 13.5px;
  font-style: italic;
  color: var(--gold-700);
  opacity: .9;
}

/* Keeps the bots busy; real people never see it.
   Deliberately NOT `left: -9999px`: in an RTL document that extends the
   scrollable area by 9999px, which is what put the horizontal scrollbar on
   the phone view and pushed the navbar logo off-screen. The clip pattern
   hides the field without contributing any layout at all. */
.stk-hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap !important;
}

.stk-drop {
  padding: 22px;
  border: 3px dashed var(--teal-400);
  border-radius: var(--radius);
  background: var(--teal-100);
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.stk-drop:hover, .stk-drop.is-over { background: #c9e9ec; border-color: var(--teal-700); }
.stk-drop input[type="file"] { display: none; }
.stk-drop-ico { font-size: 34px; line-height: 1; }
.stk-drop-name { margin-top: 8px; font-weight: 700; color: var(--teal-800); word-break: break-all; }

.stk-preview {
  display: none;
  max-height: 240px;
  margin: 14px auto 0;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.stk-preview.is-on { display: block; }

.stk-alert {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 12px;
  border-inline-start: 6px solid;
  font-size: 16.5px;
  font-weight: 600;
}

/* A successful send is the moment that matters most on this page, so the
   confirmation is deliberately large and unmissable rather than a thin strip. */
.stk-alert-ok {
  border: 3px solid #17864a;
  background: linear-gradient(180deg, #eafaf1, #d8f3e4);
  color: #0d5533;
  padding: 22px 24px;
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 800;
  line-height: 1.75;
  text-align: center;
  box-shadow: 0 6px 22px rgba(23, 134, 74, .22);
  animation: stk-pop .35s ease-out;
}
.stk-alert-ok::before {
  content: "✅";
  display: block;
  font-size: 40px;
  line-height: 1;
  margin-bottom: 10px;
}

@keyframes stk-pop {
  from { transform: scale(.94); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* While the cooldown runs the form is dimmed and inert, so a second copy
   cannot be fired off by an impatient double-tap. */
.stk-form-lock {
  position: relative;
  opacity: .45;
  filter: grayscale(.35);
  pointer-events: none;
  user-select: none;
  transition: opacity .3s;
}

.stk-cooldown {
  margin: 10px 0 0;
  text-align: center;
  font-size: 15.5px;
  font-weight: 700;
  color: #0d5533;
}
.stk-cooldown[hidden] { display: none; }
.stk-alert-err {
  border-color: var(--red-600);
  background: #fdecea;
  color: var(--red-700);
}

.stk-note {
  max-width: 780px;
  margin: 22px auto 0;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 2px solid var(--gold-500);
  background: linear-gradient(180deg, var(--parch-300), var(--parch-400));
  text-align: center;
  font-size: 17px;
}
.stk-note a { color: var(--red-700); font-weight: 800; }

.stk-order {
  max-width: 820px;
  margin: 10px auto 34px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--teal-700), var(--teal-900));
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.stk-order h3 { margin: 0 0 10px; font-size: 21px; font-weight: 800; color: var(--gold-300); }
.stk-order h3 * { font-size: inherit !important; }
.stk-order p { margin: 0; font-size: 17px; line-height: 2; }
.stk-order a { color: var(--gold-300); font-weight: 800; }
.stk-order .stk-tel {
  direction: ltr;
  display: inline-block;
  unicode-bidi: isolate;
  color: #fff;
  text-decoration: underline;
}
.stk-order .stk-tel:hover,
.stk-order .stk-tel:focus { color: #fff; }

/* --------------------------------------------------------------------------
   Inline form errors (validated in the page, never by reloading it)
   -------------------------------------------------------------------------- */

.stk-field.has-error input[type="text"],
.stk-field.has-error input[type="number"],
.stk-field.has-error textarea {
  border-color: var(--red-600);
  background: #fdf4f3;
  box-shadow: 0 0 0 3px rgba(179, 58, 50, .16);
}
.stk-field.has-error > label { color: var(--red-700); }
.stk-field.has-error .stk-drop { border-color: var(--red-600); background: #fdeceb; }
.stk-drop:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(87, 191, 198, .45);
}
.stk-field.has-error.stk-captcha { border-color: var(--red-600); background: #fdeceb; }

.stk-err {
  display: none;
  margin: 6px 2px 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--red-700);
}
.stk-field.has-error .stk-err { display: block; }

.stk-btn.is-busy { opacity: .6; pointer-events: none; }

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .stk { font-size: 16px; }
  .stk-hero { padding: 24px 0 30px; }
  .stk-hero-grid { gap: 20px; }
  .stk-card { padding: 20px 16px 22px; }
  .stk-caption { padding: 16px 16px; }
  .stk-section { padding: 26px 0 6px; }
  .stk-pick-img { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .stk *,
  .stk *::before,
  .stk *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }

  /* The page turn is the feature here, not decoration: flattened to nothing it
     just swaps images and you cannot tell a page moved. Kept, but shortened,
     so the preference is still honoured — that is the difference between
     decorative motion and motion that carries meaning. */
  .stk .stk-leaf {
    transition-duration: .3s, .12s !important;
    transition-delay: 0s, .2s !important;
  }
  .stk .stk-leaf:not(.is-turned) {
    transition-delay: 0s, 0s !important;
  }
}
