/* =========================================================================
   پایدار گستر ساختمان سبک فولادی
   Design language: "the framed panel".

   Everything here is drawn from the subject: cold-formed steel framing.
   The palette is galvanized zinc and red-oxide primer, not the warm cream a
   construction site normally gets. Structure is drawn, not implied — the hero
   is a real stud-wall elevation, section markers are studs with the service
   hole punched through the web, and every corner carries the 2px radius that
   sheet steel actually takes when it is folded.
   ========================================================================= */

/* -------------------------------------------------------------- fonts -- */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* ------------------------------------------------------------- tokens -- */

:root {
  /* galvanized sheet, cool and slightly blue — never cream */
  --zinc-0: #f5f7f8;
  --zinc-1: #e9edf0;
  --zinc-2: #d3dade;
  --zinc-3: #bcc5cb;
  --steel: #5c666d;
  --graphite: #171b1e;
  --graphite-2: #232a2f;

  /* red-oxide primer: the colour steel wears before it is clad */
  --oxide: #8c1f1c;
  --oxide-2: #a8322c;
  --oxide-wash: #f6eceb;

  --ink: var(--graphite);
  --bg: var(--zinc-0);
  --panel: #fff;
  --rule: var(--zinc-2);
  --muted: var(--steel);
  --accent: var(--oxide);
  --accent-ink: #fff;

  /* the bend radius of folded sheet steel */
  --r: 2px;

  /* Vazirmatn everywhere — one variable file covers 100–900, and it is the
     only font the page loads, so no glyph can fall back to a system face. */
  --display: "Vazirmatn", system-ui, sans-serif;
  --body: "Vazirmatn", system-ui, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.28rem, 1.15rem + 0.6vw, 1.5rem);
  --step-3: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
  --step-4: clamp(1.9rem, 1.25rem + 2.6vw, 3rem);
  --step-5: clamp(2.05rem, 1.35rem + 2.9vw, 3.5rem);

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1240px;
  --stud: 88px; /* the pitch the page frames itself on */

  /* always-dark surface, for the footer and reversed bands */
  --invert-bg: #171b1e;
  --invert-fg: #f5f7f8;
  --invert-muted: #98a3aa;
  --invert-rule: #343d43;
  --invert-accent: #dc635b;

  --shadow: 0 1px 2px rgb(23 27 30 / 0.05), 0 8px 24px -14px rgb(23 27 30 / 0.28);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --invert-bg: #0e1215;
    --zinc-0: #13171a;
    --zinc-1: #1b2126;
    --zinc-2: #2b3238;
    --zinc-3: #3b444b;
    --steel: #97a2a9;
    --graphite: #eef2f4;
    --graphite-2: #dfe6ea;
    --oxide: #dc635b;
    --oxide-2: #e8817a;
    --oxide-wash: #241615;
    --panel: #191f23;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px -16px rgb(0 0 0 / 0.7);
  }
}
:root[data-theme="dark"] {
  --invert-bg: #0e1215;
  --zinc-0: #13171a;
  --zinc-1: #1b2126;
  --zinc-2: #2b3238;
  --zinc-3: #3b444b;
  --steel: #97a2a9;
  --graphite: #eef2f4;
  --graphite-2: #dfe6ea;
  --oxide: #dc635b;
  --oxide-2: #e8817a;
  --oxide-wash: #241615;
  --panel: #191f23;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px -16px rgb(0 0 0 / 0.7);
}

/* --------------------------------------------------------------- base -- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.95 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.005em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
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-weight: 700; }
h5 { font-size: var(--step-0); font-weight: 700; }

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

a {
  color: inherit;
  text-decoration-color: color-mix(in oklab, var(--accent) 55%, transparent);
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
  transition: color 0.15s var(--ease);
}
a:hover { color: var(--accent); }

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

img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 1.4rem 0.2rem 0;
  border-right: 3px solid var(--accent);
  color: var(--ink);
  font-size: var(--step-1);
}

ul, ol { margin: 0 0 1.15em; padding-inline-start: 1.35em; }
li { margin-bottom: 0.4em; }
li::marker { color: var(--accent); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
th, td {
  border: 1px solid var(--rule);
  padding: 0.6em 0.8em;
  text-align: start;
}
th { background: var(--zinc-1); font-weight: 600; }

::selection { background: var(--accent); color: #fff; }

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.7em 1.2em;
}
.skip:focus { inset-inline-start: 0; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 780px; }
.wrap--wide { max-width: 1440px; }

.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section--dark {
  background: var(--invert-bg);
  color: var(--invert-fg);
  --ink: var(--invert-fg);
  --rule: var(--invert-rule);
  --muted: var(--invert-muted);
  --panel: #1e252a;
  --accent: var(--invert-accent);
  border-top: 0 !important;
}

/* -------------------------------------------------- the stud motif --- */

/* A short length of steel stud, seen in elevation, with the service hole
   punched through the web. It marks every section the way a stud marks a
   wall: at the start, at a constant pitch. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font: 600 0.84rem/1.5 var(--body);
  color: var(--accent);
}
/* the L-section from the mark, at label scale */
.eyebrow::before {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  margin-bottom: 0.15em;
}
.eyebrow--plain::before { display: none; }
.eyebrow--muted { color: var(--muted); }

.section-head {
  display: grid;
  gap: 0.5rem 2.5rem;
  margin-bottom: clamp(1.8rem, 3vw, 3rem);
}
@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    align-items: start;
  }
}
/* An article body: prose keeps a readable measure while pictures, galleries
   and download cards break out to the full width of the page. Widening the
   text itself would not help — at 17px Vazirmatn a 780px column already runs
   to ~107 characters, past the comfortable maximum for the script. */
.article-body {
  display: grid;
  grid-template-columns:
    [full-start] minmax(0, 1fr)
    [text-start] min(780px, 100%) [text-end]
    minmax(0, 1fr) [full-end];
  row-gap: clamp(1.2rem, 2.5vw, 2rem);
}
.article-body > * { grid-column: text; }
.article-body > figure,
.article-body > .gallery,
.article-body > .video,
.article-body > .bleed { grid-column: full; }
.article-body > figure figcaption,
.article-body > .video + * { max-width: 780px; }

/* A lead image is bounded by height rather than cropped, so a square one does
   not fill the viewport and a wide one still spans the page. */
.figure--lead img {
  width: auto;
  max-width: 100%;
  max-height: 68vh;
  margin-inline: auto;
}

.section-head p { color: var(--muted); margin: 0; }
.section-head .prose { color: var(--muted); }
.section-head .prose p + p { margin-top: 0.8em; }
.section-head h2 { margin: 0; }

/* --------------------------------------------------------- masthead -- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.masthead__in {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  padding-block: 0.5rem;
  flex: none;
}
.brand__mark {
  width: 30px;
  color: var(--oxide);
  flex: none;
}
:root[data-theme="dark"] .brand__mark,
.section--dark .brand__mark { color: var(--oxide-2); }
.brand__name {
  display: grid;
  line-height: 1.25;
}
.brand__fa {
  font: 800 1.0625rem/1.25 var(--display);
  letter-spacing: -0.01em;
}
/* Latin only — tracking is safe here */
.brand__en {
  font: 500 0.6rem/1.4 var(--body);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: var(--r);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.nav a:hover { background: var(--zinc-1); color: var(--accent); }
.nav a[aria-current] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.nav__item { position: relative; }
.nav__sub {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 15rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 0.35rem;
  display: grid;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease),
              visibility 0.16s;
}
.nav__item:hover > .nav__sub,
.nav__item:focus-within > .nav__sub {
  opacity: 1; visibility: visible; transform: none;
}
.nav__sub a { font-weight: 400; }

.navtoggle {
  display: none;
  margin-inline-start: auto;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  color: inherit;
  cursor: pointer;
}
.navtoggle svg { width: 20px; height: 20px; }
.navtoggle__x { display: none; }
.navtoggle[aria-expanded="true"] .navtoggle__x { display: block; }
.navtoggle[aria-expanded="true"] .navtoggle__bars { display: none; }

@media (max-width: 1080px) {
  .navtoggle { display: flex; }
  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 0.6rem var(--gutter) 1.4rem;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    display: none;
  }
  .nav[data-open] { display: flex; }
  .nav a { padding: 0.8rem 0; font-size: 1.05rem; border-radius: 0; }
  .nav a:hover { background: none; }
  .nav__item + .nav__item { border-top: 1px solid var(--rule); }
  .nav__sub {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; padding: 0 0 0.6rem;
    background: none;
    min-width: 0;
  }
  .nav__sub a {
    padding: 0.42rem 0;
    padding-inline-start: 1.1rem;
    font-size: 0.95rem;
    color: var(--muted);
    border-inline-start: 1px solid var(--rule);
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(180deg, var(--zinc-1), var(--bg) 70%);
}
.hero__in {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding-block: clamp(3.2rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
  position: relative;
  z-index: 1;
}
@media (min-width: 980px) {
  .hero__in {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
  }
}

.hero h1 {
  font-size: var(--step-5);
  font-weight: 900;
  line-height: 1.34;
  letter-spacing: -0.015em;
  margin: 0 0 1.1rem;
  max-width: 15ch;
}
.hero h1 .accent { color: var(--accent); }
.hero__lead {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 2rem;
}

/* the wall panel: this is the signature element */
.frame {
  width: 100%;
  height: auto;
  color: color-mix(in oklab, var(--steel) 62%, transparent);
  overflow: visible;
}
.frame .member {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.frame .track { stroke-width: 1.8; color: var(--steel); }
.frame .noggin { stroke-width: 1.2; opacity: 0.75; }
.frame .brace { stroke: var(--accent); stroke-width: 1.8; }
.frame .hole { fill: none; stroke: currentColor; stroke-width: 1.1; opacity: 0.85; }
.frame .dim { stroke: var(--accent); stroke-width: 0.9; opacity: 0.6; }
.frame .dimtext {
  font: 500 9px var(--body);
  fill: var(--accent);
  opacity: 0.85;
}

/* raise the frame member by member, the way a wall actually goes up */
@media (prefers-reduced-motion: no-preference) {
  .frame [data-raise] {
    animation: raise 0.55s var(--ease) backwards;
    transform-box: fill-box;
    transform-origin: bottom;
  }
  @keyframes raise {
    from { transform: scaleY(0.02); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
  .frame .brace,
  .frame .noggin,
  .frame .dim,
  .frame .dimtext {
    animation: fade 0.5s var(--ease) 0.75s backwards;
  }
  @keyframes fade { from { opacity: 0; } }
}

/* ------------------------------------------------------- title block -- */

/* A drawing title block: the strip of verified facts an engineer reads first. */
/* gap-drawn dividers so the cells stay separated when they stack on a phone */
.titleblock {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
}
.titleblock > div {
  padding: 0.95rem 1.1rem;
  background: var(--panel);
}
.titleblock dt {
  font: 500 0.8rem/1.5 var(--body);
  color: var(--muted);
  margin: 0 0 0.2rem;
}
.titleblock dd {
  margin: 0;
  font: 700 1.05rem/1.5 var(--display);
}
.titleblock .num { color: var(--accent); }

/* -------------------------------------------------------------- grid -- */

.grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.75rem);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

/* ------------------------------------------------------------- panel -- */

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--r);
}

/* The logo's L-section, drawn in the corner of anything you can click.
   It grows on hover — the one piece of motion the cards get. */
.bracket { position: relative; }
.bracket::after {
  content: "";
  position: absolute;
  inset-inline-start: -1px;
  bottom: -1px;
  width: 18px;
  height: 18px;
  border-inline-start: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-end-start-radius: var(--r);
  opacity: 0;
  transition: width 0.28s var(--ease), height 0.28s var(--ease),
              opacity 0.2s var(--ease);
  pointer-events: none;
}
.bracket:hover::after,
.bracket:focus-within::after {
  opacity: 1;
  width: 46px;
  height: 46px;
}

/* -------------------------------------------------------------- card -- */

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), transform 0.28s var(--ease);
}
.card:hover { border-color: var(--zinc-3); color: inherit; }
.card__media {
  position: relative;
  overflow: hidden;
  background: var(--zinc-1);
  aspect-ratio: 4 / 3;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.04); }
.card__body {
  padding: 1.1rem 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}
.card__title {
  font: 700 var(--step-1)/1.5 var(--display);
  margin: 0;
}
.card:hover .card__title { color: var(--accent); }
.card__meta {
  font: 400 0.82rem/1.6 var(--body);
  color: var(--muted);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}
.card__meta .dot { color: var(--zinc-3); }
.card__text { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card__more {
  margin-top: auto;
  padding-top: 0.7rem;
  font: 600 0.85rem/1 var(--body);
  color: var(--accent);
}

/* --------------------------------------------------- publication card -- */

/* These numbers are the company's credential — 612 and 613 are the national
   publications they wrote. They get to be the biggest thing on the card. */
.pub {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
  padding: 1.35rem 1.4rem;
  text-decoration: none;
  color: inherit;
}
.pub__num {
  font: 800 clamp(1.9rem, 1.4rem + 1.7vw, 2.6rem)/1 var(--display);
  color: var(--accent);
  letter-spacing: -0.01em;
  padding-inline-end: 1.2rem;
  border-inline-end: 1px solid var(--rule);
  min-width: 4.2ch;
}
.pub__num small {
  display: block;
  font: 500 0.75rem/1.6 var(--body);
  color: var(--muted);
  margin-top: 0.4rem;
}
.pub h3 { margin: 0 0 0.3rem; font-size: var(--step-1); }
.pub:hover h3 { color: var(--accent); }
.pub p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.pub__cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--zinc-1);
}

/* ---------------------------------------------------------- documents -- */

.doc {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
}
.doc__icon {
  flex: none;
  width: 38px; height: 46px;
  display: grid; place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: var(--r);
  color: var(--accent);
  font: 600 0.62rem/1 var(--body);
  letter-spacing: 0.06em;
  position: relative;
}
.doc__icon::before {
  content: "";
  position: absolute;
  top: -1.5px;
  inset-inline-end: -1.5px;
  border-block-start: 11px solid var(--panel);
  border-inline-start: 11px solid transparent;
}
.doc__text { flex: 1; }
.doc__go { flex: none; color: var(--zinc-3); transition: color 0.2s var(--ease); }
.doc__go svg { width: 20px; height: 20px; display: block; }
.doc:hover .doc__go { color: var(--accent); }
.doc__t { font-weight: 600; display: block; line-height: 1.5; }
.doc:hover .doc__t { color: var(--accent); }
.doc__s {
  font: 400 0.8rem/1.6 var(--body);
  color: var(--muted);
}

/* ------------------------------------------------------------- prose -- */

.prose { font-size: var(--step-0); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4em; }
.prose h3, .prose h4, .prose h5 { margin-top: 1.9em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose h5 {
  font-family: var(--display);
  font-size: 1.02rem;
  color: var(--accent);
}
.prose a { text-decoration: underline; }
.prose figure { margin: 2rem 0; }
.prose img { border-radius: var(--r); }
.prose iframe {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  aspect-ratio: 16 / 9;
  height: auto;
}
.prose--lead p:first-of-type {
  font-size: var(--step-1);
  color: var(--ink);
}

figure { margin: 0; }
figcaption {
  margin-top: 0.7rem;
  font: 400 0.86rem/1.75 var(--body);
  color: var(--muted);
  padding-inline-start: 0.9rem;
  border-inline-start: 2px solid var(--rule);
}

/* ------------------------------------------------------------ figures -- */

.figure img { width: 100%; border-radius: var(--r); }
.figure--framed img {
  border: 1px solid var(--rule);
  background: var(--panel);
  padding: clamp(0.5rem, 1.4vw, 1rem);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 0.75rem;
}
.gallery--pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.shot {
  display: block;
  position: relative;
  border: 0;
  padding: 0;
  background: var(--zinc-1);
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}
.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease), opacity 0.2s;
}
.shot:hover img { transform: scale(1.05); }
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgb(23 27 30 / 0.08);
  border-radius: var(--r);
  pointer-events: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 1.3rem;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  font: 600 0.95rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { background: color-mix(in oklab, var(--accent) 84%, #000); color: #fff; }
.btn--ghost {
  background: none;
  color: var(--accent);
}
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--quiet {
  background: none;
  border-color: var(--rule);
  color: var(--ink);
}
.btn--quiet:hover { border-color: var(--accent); color: var(--accent); background: none; }
.btn svg { width: 17px; height: 17px; flex: none; }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

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

.pagehead {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--zinc-1), var(--bg));
  padding-block: clamp(2.4rem, 5vw, 4rem) clamp(1.8rem, 3.5vw, 2.8rem);
}
.pagehead h1 { margin: 0 0 0.5rem; max-width: 22ch; }
.pagehead p {
  color: var(--muted);
  max-width: 52ch;
  margin: 0;
  font-size: var(--step-1);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  font: 400 0.84rem/1.6 var(--body);
  color: var(--muted);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs li::after { content: "/"; margin-inline-start: 0.5rem; color: var(--zinc-3); }
.crumbs li:last-child::after { content: none; }

/* ----------------------------------------------------------- articles -- */

.postlist { display: grid; gap: 0; }
.postlist__item {
  display: grid;
  gap: 0.4rem 1.8rem;
  padding-block: clamp(1.4rem, 3vw, 2.1rem);
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.postlist__item:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) {
  .postlist__item { grid-template-columns: 9.5rem minmax(0, 1fr) auto; align-items: baseline; }
}
.postlist__date {
  font: 500 0.84rem/1.9 var(--body);
  color: var(--muted);
}
.postlist__title { font: 700 var(--step-2)/1.5 var(--display); margin: 0 0 0.35rem; }
.postlist__item:hover .postlist__title { color: var(--accent); }
.postlist__text { color: var(--muted); font-size: 0.96rem; margin: 0; }
.postlist__go {
  color: var(--accent);
  font: 600 0.85rem/1.9 var(--body);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.postlist__item:hover .postlist__go { opacity: 1; transform: none; }
@media (max-width: 759px) { .postlist__go { display: none; } }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; list-style: none; }
.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  font: 400 0.76rem/1.6 var(--body);
  color: var(--muted);
  text-decoration: none;
}
.tag:hover, .tag[aria-current] { border-color: var(--accent); color: var(--accent); }

/* -------------------------------------------------------------- team -- */

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
}
.person {
  background: var(--panel);
  padding: 1.2rem 1.25rem;
  display: grid;
  gap: 0.25rem;
  align-content: start;
}
.person__name { font: 700 1.02rem/1.5 var(--display); margin: 0; }
.person__role { color: var(--accent); font-size: 0.9rem; }
.person__note { color: var(--muted); font-size: 0.85rem; }

/* ----------------------------------------------------------- partners -- */

.partners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(50%, 9.5rem), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
}
.partners li {
  margin: 0;
  background: var(--panel);
  display: grid;
  place-items: center;
  padding: 1.4rem 1rem;
  min-height: 6.5rem;
}
.partners img {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.62;
  transition: filter 0.25s var(--ease), opacity 0.25s var(--ease);
}
.partners li:hover img { filter: none; opacity: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .partners img { filter: grayscale(1) invert(1); opacity: 0.7; }
  :root:not([data-theme="light"]) .partners li:hover img { filter: invert(1); }
}

/* ------------------------------------------------------------ notices -- */

.notice {
  display: grid;
  gap: 0.4rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  border-inline-start: 3px solid var(--accent);
  background: var(--panel);
}
.notice h3 { margin: 0; font-size: var(--step-1); }
.notice p { margin: 0; color: var(--muted); font-size: 0.95rem; }

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

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
}
.channels { display: grid; gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.channel {
  background: var(--panel);
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.95rem 1.1rem;
  text-decoration: none;
  color: inherit;
}
.channel:hover { color: var(--accent); }
.channel svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.channel__l {
  font: 500 0.78rem/1.5 var(--body);
  color: var(--muted);
  display: block;
}
.channel__v { font-weight: 600; }
.channel__v[dir="ltr"] { display: inline-block; }

.fieldrow { display: grid; gap: 0 1rem; }
@media (min-width: 560px) { .fieldrow { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; align-content: start; }
.field label {
  font: 500 0.84rem/1.5 var(--body);
  color: var(--muted);
}
.field input, .field textarea {
  font: 400 1rem/1.7 var(--body);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}
.field textarea { min-height: 9rem; resize: vertical; }

.map {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--zinc-1);
}
@media (min-width: 900px) { .map { aspect-ratio: 21 / 9; } }

/* ---------------------------------------------------------- lightbox -- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  border: 0;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  background: rgb(12 15 17 / 0.94);
  display: none;
  place-items: center;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgb(12 15 17 / 0.9); }
.lightbox img {
  max-width: min(94vw, 1400px);
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--r);
}
.lightbox__bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  color: #cfd6da;
  font: 400 0.86rem/1.6 var(--body);
}
.lightbox button {
  background: none;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: var(--r);
  color: #eef2f4;
  width: 42px; height: 42px;
  cursor: pointer;
  display: grid; place-items: center;
}
.lightbox button:hover { border-color: #fff; }
.lightbox__nav { position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%);
  display: flex; justify-content: space-between; padding-inline: clamp(0.5rem, 3vw, 2rem); }
.lightbox__close { position: absolute; top: 1rem; inset-inline-end: 1rem; }

/* ------------------------------------------------------------- video -- */

.video {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: #000;
  aspect-ratio: 3 / 2;
}

/* ------------------------------------------------------------- pager -- */

.pager {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.pager > span { background: var(--bg); }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  background: var(--bg);
  padding: 1.15rem 1.3rem;
  text-decoration: none;
  display: grid;
  gap: 0.3rem;
}
.pager a:hover { background: var(--panel); }
.pager span {
  font: 500 0.82rem/1.5 var(--body);
  color: var(--muted);
}
.pager strong { font: 700 1.02rem/1.5 var(--display); }
.pager a:hover strong { color: var(--accent); }
.pager .next { text-align: start; }
.pager .prev { text-align: end; }

/* ---------------------------------------------------------- colophon -- */

.colophon {
  background: var(--invert-bg);
  color: var(--invert-muted);
  border-top: 3px solid var(--oxide);
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
  font-size: 0.95rem;
}
.colophon a { color: #e4e9ec; text-decoration: none; }
.colophon a:hover { color: #fff; }
.colophon__grid {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--invert-rule);
}
@media (min-width: 800px) {
  .colophon__grid { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
}
.colophon h2 {
  font: 600 0.86rem/1.6 var(--body);
  color: var(--invert-muted);
  margin: 0 0 0.9rem;
}
.colophon ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.colophon li { margin: 0; }
.colophon .brand__fa { color: var(--invert-fg); }
.colophon .brand__mark { color: var(--invert-accent); width: 34px; }
.colophon__about { color: var(--invert-muted); max-width: 34em; margin: 1rem 0 0; }
.colophon__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-top: 1.4rem;
  color: var(--invert-muted);
  font-size: 0.82rem;
}
.colophon__legal .mono { letter-spacing: 0.06em; }

.social { display: flex; gap: 0.5rem; margin-top: 1.2rem; }
.social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--invert-rule);
  border-radius: var(--r);
}
.social a:hover { border-color: var(--invert-accent); color: #fff; background: #232a2f; }
.social svg { width: 19px; height: 19px; }

/* --------------------------------------------------------- utilities -- */

/* Latin strings that want a little tracking. Never wrap Persian in this —
   letter-spacing breaks the script's joining. */
.mono { letter-spacing: 0.04em; }
.muted { color: var(--muted); }
.stack { display: grid; gap: clamp(1.2rem, 2.5vw, 2rem); align-content: start; }
.stack--tight { gap: 0.9rem; }
.lead { font-size: var(--step-1); color: var(--muted); }
.measure { max-width: 68ch; }
.center { text-align: center; }
[dir="ltr"] { direction: ltr; }

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

@media print {
  .masthead, .colophon, .pager, .navtoggle, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
