/* ============ SAF Rain Room theme — tokens ============ */
:root {
  --saf-ink: rgba(37, 43, 54, .95);
  --saf-black: #000;
  --saf-white: #fff;
  --saf-gray: #858585;
  --saf-line: #e2e2e2;
  --saf-panel: #f0f0f0;
  /* the system's only accent, reserved for validation errors */
  --saf-red: #e54b61;
  /* the brand red is 3.8:1 on white — right for a 2px border or an icon
     (3:1 is the bar for non-text) but under the 4.5:1 AA minimum for the
     12px message text, so the text takes a deeper shade of the same hue
     (351°, 5.6:1). Set this to var(--saf-red) to make the text literal. */
  --saf-red-ink: #c62740;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  --font-demi: "FranklinGothicDemi", Arial, sans-serif;
  --font-cond: "FranklinGothicBookCondensed", "Arial Narrow", Arial, sans-serif;
  --font-display: "FranklinGothicDemiCompressed", "Arial Narrow", Arial, sans-serif;
  --font-serif: "Spectral", Georgia, serif;
  --nav-track: .10em;
  /* width of the page column; anything that has to line up with the
     content (the toast rail, for one) reads it from here */
  --saf-page-max: 1400px;
}
[dir="rtl"] {
  --font-body: "Zarid", "Segoe UI", Tahoma, sans-serif;
  --font-demi: "Vazirmatn", "Segoe UI", sans-serif;
  --font-cond: "Vazirmatn", "Segoe UI", sans-serif;
  --font-display: "Alexandria", "Segoe UI", sans-serif;
  --font-serif: "Zarid", "Segoe UI", Tahoma, sans-serif;
  --nav-track: 0;
}

/* ============ base ============ */
/* Reserve the scrollbar gutter always. Steps 1 and 2 scroll while 3 and 4
   do not, so without this the centred page column shifts sideways by half
   a scrollbar each time the visitor moves between steps. */
html { scrollbar-gutter: stable; }
body.saf {
  /* Page column: capped and centered on wide screens (global) */
  max-width: var(--saf-page-max);
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--saf-ink);
  background: var(--saf-white);
  /* Sticky footer: main stretches so the social footer sits at the
     bottom of the viewport even when the page content is short */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.saf-main { flex: 1 0 auto; }
body.saf h1, body.saf h2, body.saf h3 { margin: 0; color: var(--saf-black); }
body.saf a { color: inherit; }
body.saf img { max-width: 100%; }

/* No focus ring on mouse click (Bootstrap/browser default shows one);
   keyboard focus stays clearly visible for accessibility */
body.saf a:focus:not(:focus-visible),
body.saf button:focus:not(:focus-visible) { outline: none; }
body.saf a:focus-visible,
body.saf button:focus-visible { outline: 2px solid var(--saf-black); outline-offset: 2px; }

/* ============ top bar ============ */
.saf-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0; background: var(--saf-white);
  border-bottom: 1px solid var(--saf-black);
}
.saf-logo { display: flex; align-items: center; text-decoration: none; }
.saf-logo img { height: 46px; width: auto; display: block; }
.saf-nav { display: flex; align-items: center; gap: 28px; }
.saf-nav a {
  font-family: var(--font-cond); font-size: 15px; font-weight: 500;
  letter-spacing: var(--nav-track); text-transform: uppercase;
  text-decoration: none; color: var(--saf-black);
  padding-bottom: 4px; border-bottom: 2px solid transparent;
}
.saf-nav a:hover, .saf-nav a:focus { border-bottom-color: var(--saf-black); }
.saf-nav a.active { border-bottom-color: var(--saf-black); }
.saf-lang {
  font-family: "Zarid", "FranklinGothicBook", "Segoe UI", sans-serif;
  font-size: 15px; color: var(--saf-gray); cursor: pointer;
  background: none; border: 0; padding: 0;
}
.saf-lang:hover { color: var(--saf-black); }
.saf-nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.saf-nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--saf-black);
  margin: 5px 0;
}

/* ============ immersive hero (home) ============ */
.saf-hero {
  position: relative; min-height: 74vh; display: flex;
  flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center;
  color: var(--saf-white);
}
.saf-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.05) 40%, rgba(0,0,0,.55) 100%);
}
.saf-hero-content {
  position: relative; padding: 0 34px 48px; max-width: 720px;
}
body.saf .saf-hero-content h1 {
  font-family: var(--font-display); font-weight: 700; color: var(--saf-white);
  font-size: clamp(44px, 8vw, 76px); line-height: .98;
  letter-spacing: .015em; text-transform: uppercase;
  margin: 0 0 12px; text-shadow: 0 1px 14px rgba(0,0,0,.4);
  text-wrap: balance;
}
[dir="rtl"] .saf-hero-content h1 { text-transform: none; letter-spacing: 0; }
.saf-hero-content p {
  font-size: 16px; line-height: 1.55; color: #f2f2f2;
  margin: 0 0 24px; max-width: 50ch;
}
.saf-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ buttons ============ */
/* Buttons are <a> elements: every color-bearing rule is body.saf-prefixed
   so it outranks the `body.saf a { color: inherit }` base rule */
body.saf .saf-btn {
  display: inline-block; background: var(--saf-black); color: var(--saf-white);
  font-family: var(--font-cond); font-size: 14px; font-weight: 600;
  letter-spacing: var(--nav-track); text-transform: uppercase;
  padding: 14px 28px; border: 1.5px solid var(--saf-black);
  border-radius: 2px; text-decoration: none; cursor: pointer;
}
body.saf .saf-btn:hover, body.saf .saf-btn:focus { background: var(--saf-white); color: var(--saf-black); }
body.saf .saf-btn--ghost { background: transparent; color: var(--saf-black); }
body.saf .saf-btn--ghost:hover, body.saf .saf-btn--ghost:focus { background: var(--saf-black); color: var(--saf-white); }
body.saf .saf-btn--onphoto { background: var(--saf-white); color: var(--saf-black); border-color: var(--saf-white); }
body.saf .saf-btn--onphoto:hover, body.saf .saf-btn--onphoto:focus { background: var(--saf-black); color: var(--saf-white); }
body.saf .saf-btn--onphoto-ghost { background: transparent; color: var(--saf-white); border-color: var(--saf-white); }
body.saf .saf-btn--onphoto-ghost:hover, body.saf .saf-btn--onphoto-ghost:focus { background: var(--saf-white); color: var(--saf-black); }

/* ============ info strip (home, below hero) ============ */
/* On the hero page the strip fills the whole band between hero and
   footer; column content centers vertically and the dividers run the
   full band height. (:has-less browsers fall back to a compact strip.) */
.saf-main:has(> .saf-hero) { display: flex; flex-direction: column; }
.saf-main:has(> .saf-hero) > .saf-hero { flex: 0 0 auto; }
.saf-main:has(> .saf-hero) > .saf-strip,
.saf-main:has(> .saf-hero) > .saf-strip-cms { flex: 1 0 auto; }

.saf-strip { display: grid; grid-template-columns: repeat(3, 1fr); }
.saf-strip > div {
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 34px; border-inline-end: 1px solid var(--saf-line);
  font-size: 16px; line-height: 1.6; color: #333;
}
.saf-strip > div:last-child { border-inline-end: 0; }
.saf-strip b {
  display: block; font-family: var(--font-demi); font-size: 18px;
  font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 10px; color: var(--saf-black);
}
[dir="rtl"] .saf-strip b { letter-spacing: 0; }
.saf-strip-cms {
  display: flex; flex-direction: column; justify-content: center;
  padding: 28px 34px; max-width: 76ch;
}

/* ============ editorial inner pages ============ */
/* Horizontal padding 0: content edge aligns with the flush header/footer */
.saf-page { padding: 36px 0 56px; max-width: 900px; }
.saf-crumb {
  font-family: var(--font-cond); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--saf-gray); margin-bottom: 16px;
}
[dir="rtl"] .saf-crumb { letter-spacing: 0; }
.saf-page h1 {
  font-family: var(--font-display); font-size: clamp(34px, 5vw, 48px);
  line-height: 1.05; text-transform: uppercase; margin-bottom: 18px;
}
[dir="rtl"] .saf-page h1 { text-transform: none; font-weight: 700; }
.saf-page .lede {
  font-family: var(--font-serif); font-size: 17px; line-height: 1.65;
  color: #3c3f46; max-width: 62ch; margin: 0 0 22px;
}
/* Heading scale: h1 48 / h2 30 / h3 22, all in the display face.
   Rhythm: ~2:1 space above a heading vs. below it, so headings bind
   to the section they introduce rather than floating between two. */
body.saf .saf-page h2 {
  font-family: var(--font-display); font-size: 30px; line-height: 1.15;
  font-weight: 700; text-transform: uppercase;
  margin: 48px 0 24px; color: var(--saf-black);
}
body.saf .saf-page h2:first-child { margin-top: 0; }
body.saf .saf-page h3 {
  font-family: var(--font-display); font-size: 22px; line-height: 1.2;
  font-weight: 700; text-transform: uppercase;
  margin: 44px 0 16px; color: var(--saf-black);
}
body.saf .saf-page .content-col > h3:first-child { margin-top: 0; }
[dir="rtl"] .saf-page h2, [dir="rtl"] .saf-page h3 {
  text-transform: none;
}
.saf-page p { margin: 0 0 18px; }
.saf-page ul { margin: 0 0 32px; padding-inline-start: 20px; }
.saf-page li { margin-bottom: 0; }
.saf-page .content-col { max-width: 68ch; font-size: 15px; line-height: 1.7; }
.saf-map { border: 0; width: 100%; height: 420px; margin-top: 22px; }

/* ============ status pages (payment outcome) ============ */
.saf-status { text-align: center; padding: 76px 24px 90px; }
.saf-status h1 {
  font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 44px);
  text-transform: uppercase; margin-bottom: 14px;
}
[dir="rtl"] .saf-status h1 { text-transform: none; font-weight: 700; }
.saf-status p { max-width: 52ch; margin: 0 auto 26px; color: var(--saf-ink); }
.saf-status--fail h1 { color: var(--saf-black); }

/* ============ social footer ============ */
.social-footer {
  background: var(--saf-white); color: var(--saf-black); text-align: center;
  padding: 14px 0; border-top: 1px solid var(--saf-black);
}
.social-footer a {
  color: var(--saf-black); font-size: 20px; margin: 0 15px;
  display: inline-block; text-decoration: none;
}
.social-footer a:hover, .social-footer a:focus { opacity: .7; }
.social-footer .x-icon { width: 17px; height: 17px; fill: currentColor; vertical-align: -2px; }
/* home: hero fills the viewport minus bar; footer anchors below content normally */

/* ============ responsive ============ */
@media (max-width: 860px) {
  .saf-bar { padding: 14px 20px; }
  .saf-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--saf-white); border-bottom: 1px solid var(--saf-line);
    padding: 8px 20px 16px; z-index: 1000;
  }
  .saf-nav.open { display: flex; }
  .saf-nav a { padding: 10px 0; border-bottom: 0; }
  .saf-bar { position: relative; }
  .saf-nav-toggle { display: block; }
  .saf-hero-content { padding: 0 20px 34px; }
  .saf-strip { grid-template-columns: 1fr; }
  .saf-strip > div { border-inline-end: 0; border-bottom: 1px solid var(--saf-line); }
  .saf-page { padding: 26px 20px 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .saf-nav a, .saf-btn { transition: all .15s ease; }
}
