/* ===========================================================
   Marekh Auto — design system
   Dark automotive brand palette. One stylesheet serves both
   directions: layout uses logical properties (inline-start /
   inline-end) so nothing needs mirroring for Arabic.
   =========================================================== */

:root {
  color-scheme: dark;

  --bg:          #0B0D0F;
  --bg-2:        #101316;
  --surface:     #15181C;
  --surface-2:   #1C2126;
  --border:      #262C33;
  --border-soft: #1E242A;

  --text:        #ECEFF2;
  --text-2:      #B4BDC6;
  --muted:       #8A939D;

  /* Brand red, taken from the workshop's own signage and print material.
     --accent is the fill red (white or near-black sits on it); --accent-soft
     is the lighter red used for text ON the dark ground, because pure
     #E31E24 on #0B0D0F only reaches ~4:1 and fails for small type. */
  --accent:      #E31E24;
  --accent-soft: #FF5E63;
  --accent-dim:  rgba(227, 30, 36, .12);
  --accent-line: rgba(227, 30, 36, .32);

  --ok:          #4F9D69;
  --warn:        #D8A13A;
  --danger:      #C4553F;

  --radius:      14px;
  --radius-lg:   22px;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.32);
  --shadow-lg:   0 2px 6px rgba(0,0,0,.45), 0 24px 60px rgba(0,0,0,.45);

  --gutter:      20px;
  --maxw:        1180px;
  --header-h:    68px;

  --ff-ar: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --ff-en: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-ar);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { font-family: var(--ff-en); line-height: 1.68; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; }
h1 { font-size: clamp(1.85rem, 1.2rem + 2.7vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.15rem); }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); }
p  { margin: 0 0 1.1em; color: var(--text-2); }

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 7vw, 92px); }
.section--tight { padding-block: clamp(34px, 5vw, 60px); }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--border-soft); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent-soft);
  margin-bottom: 14px;
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: .84rem; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent-line); }

.lead { font-size: clamp(1.02rem, .98rem + .3vw, 1.16rem); color: var(--text-2); max-width: 68ch; }
.section-head { max-width: 72ch; margin-bottom: 34px; }

/* ---------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .97rem; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #F5333A; }
.btn--ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent-line); background: var(--surface-2); }
.btn--wa { background: #1FA855; color: #fff; }
.btn--wa:hover { background: #25c065; }
.btn--lg { padding: 16px 30px; font-size: 1.03rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------- header */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11,13,15,.86);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header__in { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; font-size: 1.04rem; letter-spacing: -.01em; }
.logo__sub { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* Wordmark rebuilt from the workshop's own logo: MAREKH set in a dark
   plate, "auto" in italic brand red beside it. Drawn in CSS rather than
   shipped as a bitmap so it stays sharp on every screen and costs 0 KB. */
.wordmark { display: inline-flex; align-items: stretch; height: 30px; flex: none; border-radius: 5px; overflow: hidden; font-family: var(--ff-en); }
.wordmark__a, .wordmark__b { display: flex; align-items: center; padding-inline: 8px; }
.wordmark__a { background: #2A2F35; color: #fff; font-weight: 700; font-size: .72rem; letter-spacing: .06em; }
.wordmark__b { background: var(--accent); color: #fff; font-weight: 800; font-size: .95rem; font-style: italic; letter-spacing: -.02em; }
.footer .wordmark, .hero .wordmark { height: 34px; }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
  padding: 9px 13px; border-radius: 8px; text-decoration: none;
  font-size: .93rem; font-weight: 500; color: var(--text-2); transition: color .15s, background .15s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }

.header__cta { display: flex; align-items: center; gap: 9px; margin-inline-start: 10px; }
.lang-switch {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: .84rem; font-weight: 600; text-decoration: none; color: var(--text-2);
}
.lang-switch:hover { border-color: var(--accent-line); color: var(--text); }

.burger { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; cursor: pointer; margin-inline-start: auto; }
.burger span { display: block; width: 19px; height: 2px; background: var(--text); border-radius: 2px; }
.burger span + span { margin-top: 4px; }

@media (max-width: 960px) {
  .nav { display: none; }
  .header__cta .btn { display: none; }
  .burger { display: block; }
  .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; inset-inline: var(--gutter); top: calc(var(--header-h) + 6px);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-lg);
  }
  .nav.is-open a { padding: 12px 14px; }
}

/* ---------------------------------------------------- hero */
.hero { position: relative; padding-block: clamp(54px, 9vw, 116px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 80% at 78% 12%, rgba(227,30,36,.13), transparent 62%),
    radial-gradient(48% 62% at 12% 88%, rgba(70,96,130,.13), transparent 60%),
    var(--bg);
}
html[dir="rtl"] .hero::before { background:
    radial-gradient(60% 80% at 22% 12%, rgba(227,30,36,.13), transparent 62%),
    radial-gradient(48% 62% at 88% 88%, rgba(70,96,130,.13), transparent 60%),
    var(--bg); }
.hero::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; z-index: -1;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}
.hero__grid { display: grid; gap: 40px; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: center; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: 30px; } }
.hero h1 { margin-bottom: .45em; }
.hero h1 .hl { color: var(--accent-soft); }
.hero__lead { font-size: clamp(1.03rem, .98rem + .4vw, 1.2rem); color: var(--text-2); max-width: 56ch; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  font-size: .82rem; font-weight: 600; color: var(--accent-soft);
}

.hero__card {
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-lg);
}
.hero__card h3 { font-size: 1.08rem; margin-bottom: 4px; }
.hero__card .sub { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }

/* ---------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1px; background: var(--border-soft); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-2); padding: 22px 18px; text-align: center; }
.stat__n { font-size: clamp(1.5rem,1.2rem+1vw,2rem); font-weight: 800; color: var(--accent-soft); line-height: 1.1; }
.stat__l { font-size: .85rem; color: var(--muted); margin-top: 5px; }

/* ---------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--accent-line); transform: translateY(-2px); background: var(--surface-2); }
.card h3 { margin-bottom: .4em; }
.card p { font-size: .94rem; margin-bottom: 0; }
.card__ico {
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: 15px;
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  display: grid; place-items: center; color: var(--accent-soft);
}
.card__ico svg { width: 21px; height: 21px; }
.card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .88rem; font-weight: 600; color: var(--accent-soft); }
html[dir="rtl"] .card__more .arw { transform: scaleX(-1); }

.brand-card { display: flex; flex-direction: column; gap: 4px; }
.brand-card .models { font-size: .8rem; color: var(--muted); line-height: 1.6; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 7px 14px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); font-size: .87rem; color: var(--text-2);
  text-decoration: none; transition: border-color .15s, color .15s;
}
a.pill:hover { border-color: var(--accent-line); color: var(--text); }

/* ---------------------------------------------------- process */
.steps { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(215px,1fr)); }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px 22px; }
.step::before {
  counter-increment: s; content: counter(s,decimal-leading-zero);
  position: absolute; top: 16px; inset-inline-end: 18px;
  font-size: 1.6rem; font-weight: 800; color: var(--accent); opacity: .22; line-height: 1;
}
.step h3 { font-size: 1rem; margin-bottom: .35em; padding-inline-end: 34px; }
.step p { font-size: .9rem; margin: 0; }

/* ---------------------------------------------------- lists */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-inline-start: 30px; color: var(--text-2); font-size: .96rem; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .52em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-dim); border: 1px solid var(--accent-line);
}
.ticks li::after {
  content: ""; position: absolute; inset-inline-start: 5px; top: .78em;
  width: 5px; height: 8px; border: solid var(--accent-soft);
  border-width: 0 1.6px 1.6px 0; transform: rotate(42deg);
}
html[dir="rtl"] .ticks li::after { inset-inline-start: 6px; }

.numlist { list-style: none; counter-reset: n; padding: 0; margin: 0; display: grid; gap: 18px; }
.numlist li { counter-increment: n; position: relative; padding-inline-start: 44px; }
.numlist li::before {
  content: counter(n); position: absolute; inset-inline-start: 0; top: 0;
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  color: var(--accent-soft); font-weight: 700; font-size: .88rem;
}
.numlist strong { display: block; color: var(--text); margin-bottom: 2px; }
.numlist p { font-size: .93rem; margin: 0; }

/* ---------------------------------------------------- faq */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq details[open] { border-color: var(--accent-line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 17px 22px;
  font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-inline-start: auto; font-size: 1.35rem; font-weight: 400;
  color: var(--accent-soft); line-height: 1; flex: none;
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 22px 19px; }
.faq .answer p { margin: 0; font-size: .95rem; }

/* ---------------------------------------------------- table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 460px; }
th, td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--border-soft); }
thead th { background: var(--surface-2); font-weight: 600; font-size: .86rem; color: var(--muted); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface); }
td.price { font-weight: 700; color: var(--accent-soft); white-space: nowrap; }

/* ---------------------------------------------------- case */
.case { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.case__hd { padding: 20px 22px 0; }
.case__car { font-size: .8rem; font-weight: 600; color: var(--accent-soft); margin-bottom: 4px; }
.case__body { padding: 16px 22px 22px; display: grid; gap: 14px; }
.case__row { border-inline-start: 2px solid var(--border); padding-inline-start: 15px; }
.case__row strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
html[dir="rtl"] .case__row strong { text-transform: none; letter-spacing: 0; font-size: .84rem; }
.case__row p { font-size: .93rem; margin: 0; }
.case__row--win { border-inline-start-color: var(--accent); }
.case__row--win p { color: var(--text); }

/* ---------------------------------------------------- quotes */
.quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.quote p { font-size: .97rem; color: var(--text); margin-bottom: 16px; }
.quote footer { display: flex; align-items: center; gap: 11px; font-size: .86rem; color: var(--muted); }
.quote__av { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 700; color: var(--accent-soft); font-size: .85rem; flex: none; }
.stars { color: var(--accent); letter-spacing: 2px; font-size: .9rem; margin-bottom: 10px; }

/* ---------------------------------------------------- CTA band */
.cta {
  background: linear-gradient(140deg, rgba(227,30,36,.14), rgba(28,33,38,.6)), var(--surface);
  border: 1px solid var(--accent-line); border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 46px); text-align: center;
}
.cta h2 { margin-bottom: .35em; }
.cta p { max-width: 58ch; margin-inline: auto; }
.cta .btn-row { justify-content: center; margin-top: 22px; }

/* ---------------------------------------------------- notice */
.notice {
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: 19px 22px;
}
.notice p { margin: 0; font-size: .95rem; color: var(--text); }
.notice strong { color: var(--accent-soft); }

.alert {
  background: rgba(196,85,63,.1); border: 1px solid rgba(196,85,63,.35);
  border-radius: var(--radius); padding: 19px 22px;
}
.alert p { margin: 0; font-size: .95rem; color: var(--text); }

/* ---------------------------------------------------- breadcrumbs */
.crumbs { font-size: .84rem; color: var(--muted); padding-block: 16px 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--accent-soft); }
.crumbs li + li::before { content: "/"; margin-inline-end: 7px; color: var(--border); }
html[dir="rtl"] .crumbs li + li::before { content: "\\"; }

/* ---------------------------------------------------- prose */
.prose h2 { margin-top: 1.9em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose > p, .prose > ul { max-width: 74ch; }
.prose ul { padding-inline-start: 1.3em; }
.prose li { color: var(--text-2); margin-bottom: .5em; }

.split { display: grid; gap: clamp(28px, 4vw, 52px); grid-template-columns: minmax(0,1fr) 300px; align-items: start; }
.split--even { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; }
@media (max-width: 900px) { .split, .split--even { grid-template-columns: 1fr; } }
.aside { position: sticky; top: calc(var(--header-h) + 18px); display: grid; gap: 16px; }
@media (max-width: 900px) { .aside { position: static; } }
.aside .card { padding: 20px; }
.aside h3 { font-size: 1rem; }

/* ---------------------------------------------------- form */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .87rem; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .95rem;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-line); outline: none; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
html[dir="rtl"] .field select { background-position: 14px 20px, 19px 20px; background-image: linear-gradient(135deg, transparent 50%, var(--muted) 50%), linear-gradient(45deg, var(--muted) 50%, transparent 50%); }
.form-note { font-size: .84rem; color: var(--muted); margin: 0; }
.form-grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------- footer */
.footer { background: var(--bg-2); border-top: 1px solid var(--border-soft); padding-block: 52px 0; margin-top: auto; }
.footer__grid { display: grid; gap: 34px; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
html[dir="rtl"] .footer h4 { text-transform: none; letter-spacing: 0; font-size: .92rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a { color: var(--text-2); text-decoration: none; font-size: .92rem; }
.footer a:hover { color: var(--accent-soft); }
.footer address { font-style: normal; font-size: .92rem; color: var(--text-2); line-height: 1.9; }
.socials { display: flex; gap: 9px; margin-top: 14px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.socials a:hover { border-color: var(--accent-line); color: var(--accent-soft); }
.socials svg { width: 18px; height: 18px; }
.footer__bar { margin-top: 42px; border-top: 1px solid var(--border-soft); padding-block: 20px 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; color: var(--muted); }

/* ---------------------------------------------------- mobile action bar */
.actionbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 70;
  display: none; grid-template-columns: repeat(3, 1fr);
  background: rgba(16,19,22,.96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.actionbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px; text-decoration: none; font-size: .74rem; font-weight: 600; color: var(--text-2);
}
.actionbar a svg { width: 19px; height: 19px; }
.actionbar a.is-wa { color: #3ECF6E; }
.actionbar a.is-call { color: var(--accent-soft); }
@media (max-width: 860px) {
  .actionbar { display: grid; }
  body { padding-bottom: 62px; }
}

/* ---------------------------------------------------- media */
/* Every image slot declares its aspect ratio so the browser reserves the
   space before the file arrives — no layout shift as photos load. */
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media--wide   { aspect-ratio: 16 / 9; }
.media--hero   { aspect-ratio: 16 / 8; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall   { aspect-ratio: 4 / 3; }

figure.media-fig { margin: 0 0 1.6em; }
figure.media-fig--narrow { max-width: 520px; }
figure.media-fig figcaption { margin-top: 9px; font-size: .84rem; color: var(--muted); }

/* Hero image sits behind the headline on wide screens and stacks above it
   on a phone, so the first frame always shows a real photograph. */
.hero__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,13,15,.72), rgba(11,13,15,0) 58%);
}
.hero__media img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.hero__tag {
  position: absolute; inset-inline-start: 16px; bottom: 14px; z-index: 2;
  background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 6px 12px; border-radius: 6px;
}

.banner { position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); }
/* object-position: top keeps the workshop signage in frame when the
   photo is trimmed to the banner's proportions. */
.banner img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: center top; display: block; }
.banner__in { position: absolute; inset: 0; display: grid; align-content: end; gap: 6px; padding: clamp(18px, 3vw, 30px); background: linear-gradient(to top, rgba(11,13,15,.9), rgba(11,13,15,.1) 65%); }
.banner__in h2, .banner__in p { margin: 0; }
.banner__in p { color: var(--text-2); font-size: .94rem; max-width: 52ch; }
/* On a phone the overlay would cover everyone's faces, so the caption
   drops below the photo instead. */
@media (max-width: 640px) {
  .banner img { aspect-ratio: 16 / 10; }
  .banner__in { position: static; background: var(--surface); }
}

/* Social grid — square crops of the workshop's own posts. */
.postgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.postgrid a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); transition: border-color .2s, transform .2s; }
.postgrid a:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.postgrid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

.brand-marks { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.brand-marks span { padding: 7px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; color: var(--text-2); background: var(--surface); }

/* ---------------------------------------------------- utils */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack-sm > * + * { margin-top: 10px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.page-head { padding-block: clamp(30px, 4vw, 54px) 0; }
.hr { height: 1px; background: var(--border-soft); border: 0; margin-block: clamp(34px,5vw,58px); }

.ico-inline { width: 1em; height: 1em; vertical-align: -.15em; display: inline-block; }

/* grid children must be allowed to shrink below their content width (contact map + form overflowed at 390px) */
.split > *, .split--even > *, .grid > * { min-width: 0; }
iframe { max-width: 100%; }
