/* ==========================================================================
   Arad Pistachio Rafsanjan — Core Stylesheet
   Design tokens + base typography + layout primitives.
   Component-level styles live in components.css, breakpoints in responsive.css
   ========================================================================== */

/* ---- Font loading --------------------------------------------------------
   Fraunces, Manrope and Vazirmatn are loaded via Google Fonts <link> tags
   in each page's <head>. Fallback stacks below cover the case where the
   font request fails or is blocked. */

:root {
  /* Color tokens — Minimal Luxury / Modern Agricultural palette */
  --color-forest: #1B3227;      /* Deep Forest Green — primary dark */
  --color-forest-soft: #24402F; /* lighter forest, for panels */
  --color-pistachio: #8BA888;   /* Pistachio Green — accent, used sparingly */
  --color-pistachio-deep: #5E7C5C;
  --color-paper: #F6F3EA;       /* Warm Off-White — primary background */
  --color-paper-dim: #EEE9DB;   /* slightly deeper paper for section separation */
  --color-charcoal: #24231F;    /* body text */
  --color-charcoal-soft: #55534A;
  --color-clay: #A9793C;        /* Bronze/Gold accent — used very sparingly */
  --color-line: #DAD4C2;        /* hairline borders on paper */
  --color-line-dark: rgba(246, 243, 234, 0.16); /* hairline borders on forest */

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  --font-fa: 'Vazirmatn', 'Manrope', sans-serif;

  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --step-3: clamp(2.25rem, 1.85rem + 1.8vw, 3.25rem);
  --step-4: clamp(2.75rem, 2.1rem + 3vw, 4.5rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  --container-max: 1240px;
  --measure: 62ch; /* comfortable reading line length */

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Reset --------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, picture, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ---- Base ---------------------------------------------------------------*/
body {
  font-family: var(--font-body);
  background: var(--color-paper);
  color: var(--color-charcoal);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* RTL support: switch body copy font + text direction per language.
   Django/templating note: set <html lang="{{ LANGUAGE_CODE }}" dir="{{ LANGUAGE_BIDI|yesno:'rtl,ltr' }}"> */
html[dir="rtl"] body { font-family: var(--font-fa); }
html[dir="rtl"] .site-header__nav,
html[dir="rtl"] .footer__grid { direction: rtl; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-forest);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 700; }

p { max-width: var(--measure); }
p.lede { font-size: var(--step-1); color: var(--color-charcoal-soft); }

a.link {
  color: var(--color-forest);
  text-decoration: underline;
  text-decoration-color: var(--color-pistachio-deep);
  text-underline-offset: 3px;
}
a.link:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--color-clay);
  outline-offset: 3px;
}

/* ---- Layout primitives ---------------------------------------------------*/
.wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

section { padding-block: var(--space-6); }
section.tight { padding-block: var(--space-5); }
section.on-forest {
  background: var(--color-forest);
  color: var(--color-paper);
}
section.on-forest h2, section.on-forest h3 { color: var(--color-paper); }
section.on-dim { background: var(--color-paper-dim); }

.grid {
  display: grid;
  gap: var(--space-4);
}
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.eyebrow {
  font-size: 0.8125rem;
  color: var(--color-clay);
  font-weight: 700;
  margin-bottom: var(--space-2);
  display: inline-block;
}

.section-head {
  max-width: 40rem;
  margin-bottom: var(--space-4);
}
.section-head--wide { max-width: 52rem; }

hr.rule {
  border: none;
  border-top: 1px solid var(--color-line);
  margin-block: var(--space-4);
}
section.on-forest hr.rule { border-top-color: var(--color-line-dark); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-forest);
  color: var(--color-paper);
  padding: var(--space-2) var(--space-3);
  z-index: 200;
}
.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

/* ---- Utility -------------------------------------------------------------*/
.u-center { text-align: center; margin-inline: auto; }
.u-mt-0 { margin-top: 0; }

/* Multilingual / RTL */
.lang-switch { display:flex; align-items:center; gap:.45rem; white-space:nowrap; }
.lang-switch a { font-size:.72rem; font-weight:700; letter-spacing:.04em; color:inherit; opacity:.72; text-decoration:none; padding:.25rem .15rem; }
.lang-switch a:hover,.lang-switch a.is-active { opacity:1; color:var(--color-clay); }
.lang-switch--top { margin-inline:.35rem; }
html[dir="rtl"] body { font-family:'Vazirmatn', sans-serif; }
html[dir="rtl"] .site-header__brand,
html[dir="rtl"] .footer__brand,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { letter-spacing:0; }
html[dir="rtl"] .process__step { text-align:right; }
html[dir="rtl"] .price-table caption,
html[dir="rtl"] .price-table th { text-align:right; }
html[dir="rtl"] .hero__ctas { flex-direction:row-reverse; }
html[dir="rtl"] .hero__meta { justify-content:flex-start; }
/* =========================================
   LANGUAGE SWITCHER
========================================= */

.language-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.language-switcher__button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-switcher__button:hover {
    background: rgba(255,255,255,0.08);
}

.language-switcher__arrow {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.language-switcher.is-open .language-switcher__arrow {
    transform: rotate(180deg);
}

.language-switcher__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;

    min-width: 145px;
    padding: 6px;

    background: var(--color-paper, #f6f3ea);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-5px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;

    z-index: 1000;
}

.language-switcher.is-open .language-switcher__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.language-switcher__menu a {
    display: flex;
    align-items: center;
    width: 100%;

    padding: 10px 12px;

    border-radius: 5px;

    color: var(--color-charcoal, #222);
    text-decoration: none;

    font-size: 0.9rem;

    transition: background 0.2s ease;
}

.language-switcher__menu a:hover {
    background: rgba(0,0,0,0.06);
}

.language-switcher__menu a.is-active {
    font-weight: 700;
}