/* Nasiri Trading — public site
   Typography pairs a serif for headings, echoing the wordmark in the logo, with
   a system sans for text. All fonts are system-resident: no external requests. */

:root {
  --ink: #0f1519;
  --ink-2: #38434c;
  --muted: #6b7780;
  --paper: #ffffff;
  --sand: #f6f4f0;
  --sand-2: #eeebe4;
  --line: #e2ded6;
  --brand: #12333d;
  --brand-deep: #0a2028;
  --accent: #b5813c;
  --accent-2: #8f6329;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1180px;
  --radius: 3px;
  --shadow: 0 1px 2px rgba(15, 21, 25, .05), 0 8px 24px rgba(15, 21, 25, .06);
  --shadow-lg: 0 2px 4px rgba(15, 21, 25, .06), 0 18px 48px rgba(15, 21, 25, .1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.012em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-size: 1.24rem; }

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

a { color: var(--brand); text-decoration-color: rgba(18, 51, 61, .3); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }

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

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: .7rem 1.1rem; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- layout helpers ---------- */

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 780px; margin-inline: auto; }
.center { text-align: center; }
.mt-m { margin-top: 1.5rem; }
.mt-l { margin-top: 2.75rem; }
.pt-0 { padding-top: 0; }

.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-alt { background: var(--sand); border-block: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: 3rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 .9rem;
}
.eyebrow.light { color: #d9b47a; }

.lede { font-size: 1.12rem; color: var(--ink-2); }
.muted { color: var(--muted); }
.note { font-size: .93rem; color: var(--muted); }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; }
.brand img { width: auto; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-size: 1.06rem; color: var(--ink); letter-spacing: .02em; }
.brand-text em {
  font-style: normal; font-size: .64rem; letter-spacing: .19em;
  text-transform: uppercase; color: var(--muted); margin-top: .18rem;
}

.site-nav { display: flex; align-items: center; gap: 2rem; }
/* :not(.btn) keeps this rule off the call-to-action button — it is more
   specific than `.btn`, so without the exclusion it would strip the button's
   padding and colour. */
.site-nav a:not(.btn) {
  font-size: .93rem; font-weight: 500; color: var(--ink-2);
  text-decoration: none; padding: .35rem 0; position: relative;
}
.site-nav a:not(.btn):hover { color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.15rem;
  height: 2px; background: var(--accent);
}
.site-nav a.btn::after { display: none; }

.nav-toggle, .nav-burger { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans); font-size: .93rem; font-weight: 600;
  letter-spacing: .01em; text-decoration: none;
  padding: .82rem 1.6rem; border-radius: var(--radius);
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
  cursor: pointer;
}
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; transform: translateY(-1px); }

.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

.btn-ghost-dark { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost-dark:hover { background: var(--sand); border-color: var(--muted); color: var(--ink); }

.btn-sm { padding: .55rem 1.05rem; font-size: .86rem; }
.btn-wide { width: 100%; text-align: center; }

.link-arrow {
  display: inline-block; margin-top: .4rem;
  font-size: .93rem; font-weight: 600; color: var(--brand);
  text-decoration: none; border-bottom: 1px solid rgba(18, 51, 61, .25); padding-bottom: 2px;
}
.link-arrow::after { content: " →"; transition: none; }
.link-arrow:hover { color: var(--accent-2); border-color: var(--accent); }

/* ---------- hero ---------- */

.hero { position: relative; color: #fff; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(105deg, rgba(8, 26, 32, .93) 0%, rgba(10, 32, 40, .82) 45%, rgba(10, 32, 40, .45) 100%);
}
.hero-inner { padding: clamp(5rem, 12vw, 9.5rem) 0; max-width: 760px; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .lede { color: rgba(255, 255, 255, .87); font-size: 1.18rem; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }

.pagehead {
  background: var(--brand-deep); color: #fff;
  padding: clamp(3.2rem, 7vw, 5.5rem) 0 clamp(2.8rem, 6vw, 4.5rem);
}
.pagehead h1 { color: #fff; }
.pagehead .lede { color: rgba(255, 255, 255, .82); max-width: 620px; }

/* ---------- trust strip ---------- */

.strip { background: var(--brand); color: #fff; }
.strip-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255, 255, 255, .14);
  border-inline: 1px solid rgba(255, 255, 255, .14);
}
.strip-grid > div {
  background: var(--brand); padding: 1.7rem 1.4rem;
  display: flex; flex-direction: column; gap: .25rem;
}
.strip-grid strong { font-family: var(--serif); font-size: 1.18rem; color: #fff; }
.strip-grid span { font-size: .87rem; color: rgba(255, 255, 255, .72); }

/* ---------- split ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-media { margin: 0; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.split-text h2 { margin-bottom: .9rem; }

/* ---------- service tiles ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.7rem 1.9rem; position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.tile:hover { border-color: rgba(181, 129, 60, .5); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile-num {
  font-family: var(--serif); font-size: .82rem; font-weight: 700;
  letter-spacing: .1em; color: var(--accent); display: block; margin-bottom: .9rem;
}
.tile h3 { margin-bottom: .4rem; }
.tile-claim { font-weight: 600; color: var(--ink); margin-bottom: .55rem; }
.tile p:last-child { font-size: .95rem; color: var(--muted); }

/* ---------- numbered steps (services page) ---------- */

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 2.5rem; }
.steps > li {
  counter-increment: step; position: relative;
  padding-inline-start: 4.6rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line);
}
.steps > li:last-child { border-bottom: 0; padding-bottom: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; inset-inline-start: 0; top: .1rem;
  font-family: var(--serif); font-size: 1.6rem; font-weight: 700;
  color: var(--sand-2); line-height: 1;
}
.steps h2 { font-size: 1.45rem; margin-bottom: .35rem; }
.steps p:last-child { color: var(--muted); font-size: .97rem; }

.ticks { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .65rem; }
.ticks li { position: relative; padding-inline-start: 1.7rem; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .55em;
  width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(181, 129, 60, .16);
}

/* ---------- machine cards ---------- */

.card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card:hover { border-color: rgba(181, 129, 60, .5); box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--sand-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-empty {
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(135deg, var(--sand) 0 12px, var(--sand-2) 12px 24px);
}
.card-media-empty.tall { aspect-ratio: 3 / 2; }

.card-body { padding: 1.5rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card-body .eyebrow { margin-bottom: .5rem; }
.card-body h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.card-body h3 a { text-decoration: none; color: var(--ink); }
.card-body h3 a:hover { color: var(--brand); }
.card-body .muted { font-size: .94rem; }
.card-body .link-arrow { margin-top: auto; padding-top: 1rem; align-self: flex-start; }

.chip {
  position: absolute; top: .85rem; inset-inline-start: .85rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: .32rem .7rem; border-radius: 2px; color: #fff; background: var(--brand);
}
.chip-available { background: #1f6b4d; }
.chip-reserved { background: var(--accent-2); }
.chip-sold { background: #6b7780; }
.chip-static { position: static; display: inline-block; margin-bottom: 1.1rem; }

.specs-inline { display: grid; gap: .3rem; margin: .9rem 0 0; }
.specs-inline > div { display: flex; gap: .5rem; font-size: .88rem; }
.specs-inline dt { color: var(--muted); min-width: 6.5rem; margin: 0; }
.specs-inline dd { margin: 0; color: var(--ink-2); font-weight: 500; }

/* ---------- machine detail ---------- */

.crumbs { font-size: .87rem; color: var(--muted); padding: 1.6rem 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs span[aria-hidden] { margin-inline: .35rem; opacity: .5; }
.crumbs span[aria-current] { color: var(--ink-2); }

.detail { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; padding-top: 2rem; }
.detail-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.detail-info h1 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); }

.specs { margin: 1.8rem 0 2rem; border-top: 1px solid var(--line); }
.specs > div {
  display: grid; grid-template-columns: 11rem 1fr; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--line);
}
.specs dt { color: var(--muted); font-size: .92rem; margin: 0; }
.specs dd { margin: 0; color: var(--ink); font-weight: 500; }

.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose .note { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* ---------- empty state ---------- */

.empty {
  text-align: center; max-width: 620px; margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 4rem) 2rem;
  background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius);
}
.empty h3 { font-size: 1.5rem; }
.empty p { color: var(--muted); margin-bottom: 1.8rem; }

/* ---------- CTA ---------- */

.cta { background: var(--brand-deep); color: #fff; }
.cta-inner { padding: clamp(3.5rem, 7vw, 5.5rem) 0; text-align: center; max-width: 680px; margin-inline: auto; }
.cta h2 { color: #fff; }
.cta .lede { color: rgba(255, 255, 255, .78); margin-bottom: 2rem; }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1.35fr .8fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }

.form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .38rem; margin-bottom: 1.1rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.req { color: var(--accent-2); }

.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  font: inherit; font-size: .97rem; color: var(--ink);
  padding: .72rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(181, 129, 60, .14);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b4402f; }
.field textarea { resize: vertical; min-height: 8rem; }
.field ::placeholder { color: #a4aab0; }

.field-check .check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; font-size: .93rem; color: var(--ink-2); }
.field-check input { margin-top: .28rem; accent-color: var(--accent); width: 1rem; height: 1rem; flex: none; }

.err { font-size: .85rem; color: #b4402f; }

/* Honeypot: off-screen but still reachable by naive form-filling bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.captcha {
  display: flex; align-items: center; gap: .6rem;
  background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1rem; margin: 1.3rem 0 0; font-size: .88rem; color: var(--muted);
}
.captcha-state::before { content: "◔ "; color: var(--accent); }
.captcha.is-ready { border-color: rgba(31, 107, 77, .4); background: rgba(31, 107, 77, .06); color: #1f6b4d; }
.captcha.is-ready .captcha-state::before { content: "✓ "; color: #1f6b4d; }
.captcha.is-error { border-color: rgba(180, 64, 47, .45); background: rgba(180, 64, 47, .05); color: #b4402f; }
.captcha.is-error .captcha-state::before { content: "! "; color: #b4402f; }

.alert { padding: 1.1rem 1.3rem; border-radius: var(--radius); margin-bottom: 1.6rem; }
.alert h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.alert-ok { background: rgba(31, 107, 77, .08); border: 1px solid rgba(31, 107, 77, .35); color: #17573e; }
.alert-ok h2 { color: #17573e; }
.alert-error { background: rgba(180, 64, 47, .06); border: 1px solid rgba(180, 64, 47, .35); color: #97341f; }

.panel {
  background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.7rem; margin-bottom: 1.5rem;
}
.panel-quiet { background: var(--paper); }
.panel h2 { font-size: 1.3rem; margin-bottom: .2rem; }
.panel h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.panel address { font-style: normal; margin: 1.1rem 0; color: var(--ink-2); }

.contact-list { margin: 0; display: grid; gap: .8rem; }
.contact-list > div { display: flex; flex-direction: column; }
.contact-list dt { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: .1rem 0 0; color: var(--ink); font-weight: 500; }

/* ---------- footer ---------- */

.site-foot { background: var(--brand-deep); color: rgba(255, 255, 255, .72); padding-top: clamp(3rem, 6vw, 4.5rem); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 2.5rem; padding-bottom: 3rem; }
/* The full lockup needs this width for its wordmark to stay legible. */
.foot-brand img {
  width: 190px; height: auto; margin-bottom: 1.2rem;
  filter: invert(1) brightness(2); opacity: .92;
}
.foot-brand p { font-size: .95rem; max-width: 26ch; }

.site-foot h3 {
  color: #fff; font-family: var(--sans); font-size: .76rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1rem;
}
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-foot a { color: rgba(255, 255, 255, .78); text-decoration: none; font-size: .95rem; }
.site-foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-foot address { font-style: normal; font-size: .95rem; line-height: 1.7; }
.foot-contact { margin-top: .9rem; font-size: .95rem; }

.foot-base {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .13);
  padding: 1.4rem 0; font-size: .85rem; color: rgba(255, 255, 255, .55);
}
.foot-base p { margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  body { font-size: 16px; }

  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; cursor: pointer;
  }
  .nav-burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem;
    box-shadow: var(--shadow); display: none;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* Same exclusion as the desktop rule: the button keeps its own padding. */
  .site-nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav a.btn { margin-top: .9rem; text-align: center; }

  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; }
  .form .row-2 { grid-template-columns: 1fr; }
  .specs > div { grid-template-columns: 1fr; gap: .1rem; }
}

@media (max-width: 560px) {
  .grid-3 { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .steps > li { padding-inline-start: 0; padding-top: 2.6rem; }
  .steps > li::before { top: 0; }
}

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

@media print {
  .site-head, .site-foot, .cta, .hero-actions, .skip { display: none; }
  body { font-size: 12pt; color: #000; }
}

/* ==========================================================================
   Languages, gallery and right-to-left
   ========================================================================== */

/* ---------- script-specific type ----------
   Georgia has no CJK or Arabic glyphs, so those languages get families that
   actually contain their script. All are system-resident: still no downloads. */

html[lang="zh-Hans"] {
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans CJK SC", system-ui, sans-serif;
}
/* Chinese headings carry weight better without negative tracking. */
html[lang="zh-Hans"] h1,
html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] h3 { letter-spacing: 0; }
html[lang="zh-Hans"] .eyebrow { letter-spacing: .08em; text-transform: none; }

html[lang="fa"] {
  --serif: "SF Arabic", "Geeza Pro", "Vazirmatn", "IRANSans", Tahoma,
           "Noto Naskh Arabic", serif;
  --sans: "SF Arabic", "Geeza Pro", "Vazirmatn", "IRANSans", Tahoma,
          "Noto Sans Arabic", system-ui, sans-serif;
}
html[lang="fa"] body { line-height: 1.9; }
html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3 { letter-spacing: 0; line-height: 1.4; }
html[lang="fa"] .eyebrow { letter-spacing: 0; text-transform: none; }

/* ---------- right-to-left ----------
   Most of the layout mirrors on its own thanks to logical properties and
   flex/grid. These are the pieces that need an explicit flip. */

[dir="rtl"] .skip { left: auto; right: -9999px; }
[dir="rtl"] .skip:focus { right: 0; }

[dir="rtl"] .hero::after {
  background: linear-gradient(255deg,
    rgba(8, 26, 32, .93) 0%, rgba(10, 32, 40, .82) 45%, rgba(10, 32, 40, .45) 100%);
}

/* The arrow has to point the way the text runs. */
[dir="rtl"] .link-arrow::after { content: " ←"; }

[dir="rtl"] .steps > li::before { direction: ltr; }
[dir="rtl"] .foot-base { flex-direction: row-reverse; }

/* Latin data stays left-to-right even inside an RTL page. */
[dir="rtl"] [dir="ltr"] { display: inline-block; text-align: left; }

/* ---------- language switcher ---------- */

.flag-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.flag {
  width: 1.35rem; height: .9rem; flex: none; border-radius: 1px;
  /* A hairline keeps the white stripes of the German and Iranian flags from
     bleeding into a light background. */
  box-shadow: 0 0 0 1px rgba(15, 21, 25, .16);
}

.langswitch { position: relative; }

.langswitch > summary {
  display: flex; align-items: center; gap: .5rem;
  padding: .42rem .6rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper);
  font-size: .85rem; font-weight: 600; color: var(--ink-2);
  cursor: pointer; list-style: none; user-select: none;
  transition: border-color .15s ease, background .15s ease;
}
/* Hide the native disclosure triangle in every engine. */
.langswitch > summary::-webkit-details-marker { display: none; }
.langswitch > summary::marker { content: ""; }

.langswitch > summary:hover { border-color: var(--muted); background: var(--sand); }
.langswitch[open] > summary { border-color: var(--accent); background: var(--sand); }

.langswitch .chev { width: .6rem; height: .38rem; color: var(--muted); transition: transform .18s ease; }
.langswitch[open] .chev { transform: rotate(180deg); }

.langswitch-menu {
  position: absolute; z-index: 60; inset-inline-end: 0; top: calc(100% + .4rem);
  min-width: 11rem; margin: 0; padding: .3rem;
  list-style: none;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}

.site-nav .langswitch-menu a {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .6rem; border-radius: 2px;
  font-size: .88rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.site-nav .langswitch-menu a:hover { background: var(--sand); color: var(--brand); }
.site-nav .langswitch-menu a.on { background: var(--sand-2); color: var(--ink); font-weight: 600; }
.site-nav .langswitch-menu a::after { display: none; }

/* ---------- sold banner ---------- */

.sold-banner {
  position: absolute; top: .9rem; inset-inline-start: .9rem;
  background: #b4402f; color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  padding: .35rem .8rem; border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.sold-banner-lg {
  top: 1.2rem; inset-inline-start: 1.2rem;
  font-size: .95rem; padding: .55rem 1.4rem; letter-spacing: .16em;
}
/* Sold stock stays visible but visibly past-tense. */
.card.is-sold .card-media img { filter: grayscale(.75) contrast(.92); }
.card.is-sold:hover .card-media img { filter: grayscale(.4) contrast(.96); }

.photo-count {
  position: absolute; bottom: .8rem; inset-inline-end: .8rem;
  background: rgba(10, 32, 40, .78); color: #fff;
  font-size: .74rem; font-weight: 600;
  padding: .22rem .55rem; border-radius: 2px;
}

/* ---------- machine gallery ----------
   Radio inputs select the visible photo, so the whole thing works with CSS
   alone and keeps working if JavaScript fails. */

.gallery { position: relative; }
.gallery-stage { position: relative; }

.shot { margin: 0; display: none; }
.shot img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 2; object-fit: cover; background: var(--sand-2);
}
.shot figcaption { font-size: .88rem; color: var(--muted); margin-top: .7rem; }

/* Each radio reveals its matching figure. */
#shot-0:checked ~ .gallery-stage .shot-0,
#shot-1:checked ~ .gallery-stage .shot-1,
#shot-2:checked ~ .gallery-stage .shot-2,
#shot-3:checked ~ .gallery-stage .shot-3,
#shot-4:checked ~ .gallery-stage .shot-4,
#shot-5:checked ~ .gallery-stage .shot-5,
#shot-6:checked ~ .gallery-stage .shot-6,
#shot-7:checked ~ .gallery-stage .shot-7,
#shot-8:checked ~ .gallery-stage .shot-8,
#shot-9:checked ~ .gallery-stage .shot-9,
#shot-10:checked ~ .gallery-stage .shot-10,
#shot-11:checked ~ .gallery-stage .shot-11 { display: block; }

.gallery.is-sold .shot img { filter: grayscale(.7) contrast(.93); }

.thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: .6rem; margin-top: .9rem;
}
.thumbs label {
  display: block; cursor: pointer; border-radius: 2px; overflow: hidden;
  border: 2px solid transparent; opacity: .68;
  transition: opacity .15s ease, border-color .15s ease;
}
.thumbs label:hover { opacity: 1; }
.thumbs label img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

#shot-0:checked ~ .thumbs .thumb-0,
#shot-1:checked ~ .thumbs .thumb-1,
#shot-2:checked ~ .thumbs .thumb-2,
#shot-3:checked ~ .thumbs .thumb-3,
#shot-4:checked ~ .thumbs .thumb-4,
#shot-5:checked ~ .thumbs .thumb-5,
#shot-6:checked ~ .thumbs .thumb-6,
#shot-7:checked ~ .thumbs .thumb-7,
#shot-8:checked ~ .thumbs .thumb-8,
#shot-9:checked ~ .thumbs .thumb-9,
#shot-10:checked ~ .thumbs .thumb-10,
#shot-11:checked ~ .thumbs .thumb-11 { opacity: 1; border-color: var(--accent); }

.thumbs label:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gallery-hint { margin-top: .7rem; }

/* ---------- misc ---------- */

.alert-quiet {
  background: var(--sand); border: 1px solid var(--line); color: var(--ink-2);
  font-size: .95rem; margin-bottom: 1.4rem;
}
.note-box {
  background: var(--sand); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 2rem;
}

@media (max-width: 820px) {
  /* In the mobile panel the switcher sits first and spans the full width; the
     menu drops in flow rather than floating, so it cannot overflow the panel. */
  .langswitch { order: -1; margin-bottom: .8rem; padding-top: .6rem; }
  .langswitch > summary { justify-content: space-between; padding: .7rem .8rem; font-size: .95rem; }
  .langswitch > summary .langswitch-current { margin-inline-end: auto; }
  .langswitch-menu { position: static; min-width: 0; margin-top: .4rem; box-shadow: none; }
  .site-nav .langswitch-menu a { padding: .7rem .6rem; font-size: .95rem; }
}
