/* The website's home page (site.html). Warm, quiet colours taken from the portrait (a study in lamp
   light: cream, espresso, a navy cushion) with one rust accent for the actions. Persian is set in
   Vazirmatn; English in Instrument Serif (headings) and Newsreader (text). Text aligns to the start of
   the line (right in Persian), never centred in long blocks. */
@font-face { font-family: "Vazirmatn"; src: url("vazir/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("vazir/Vazirmatn-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("vazir/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #f7f2eb;      /* page */
  --sand: #efe6da;       /* hero backdrop */
  --surface: #fffcf8;    /* panels */
  --ink: #2b2320;        /* espresso text */
  --muted: #6b5e55;
  --line: #e2d6c8;
  --accent: #a4472a;     /* rust: buttons and marks (white text on it: about 6:1) */
  --accent-deep: #87391f;
  --navy: #1f2b42;       /* closing section, from the cushion */
  --navy-text: #f1e9de;
  --display: "Instrument Serif", Georgia, serif;
  --text: "Newsreader", Georgia, serif;
  --wide: 1160px;
  --gutter: clamp(18px, 4vw, 40px);
}
html[lang=fa] { --display: "Vazirmatn", Tahoma, sans-serif; --text: "Vazirmatn", Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.site { margin: 0; background: var(--paper); color: var(--ink); font: 400 19px/1.7 var(--text); }
html[lang=fa] body.site { font-size: 17px; line-height: 1.95; }
:where(.site) h1, :where(.site) h2, :where(.site) h3, :where(.site) p, :where(.site) ul, :where(.site) ol,
:where(.site) dl, :where(.site) dd, :where(.site) figure { margin: 0; padding: 0; }
:where(.site) a { color: inherit; }
.site a:focus-visible, .site summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.s-skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 30; }
.s-skip:focus { top: 12px; }

/* buttons */
.s-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px;
  border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font: 500 17px/1 var(--text);
  border: 1.5px solid var(--accent); transition: background-color .15s, color .15s, border-color .15s; white-space: nowrap; }
html[lang=fa] .s-btn { font-weight: 600; font-size: 16px; }
.s-btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.s-btn-small { min-height: 42px; padding: 0 20px; font-size: 15px; }
html[lang=fa] .s-btn-small { font-size: 14.5px; }
.s-btn-ghost { background: transparent; color: var(--ink); border-color: rgba(43, 35, 32, .35); }
.s-btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
.s-btn-light { background: var(--navy-text); color: var(--navy); border-color: var(--navy-text); }
.s-btn-light:hover { background: #fff; border-color: #fff; }
.s-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* header */
.s-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 242, 235, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.s-bar { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); min-height: 76px; display: flex; align-items: center; gap: 32px; }
.s-brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; }
.s-name { font: 400 1.6rem/1.1 var(--display); letter-spacing: -0.01em; }
html[lang=fa] .s-name { font-size: 1.25rem; font-weight: 700; letter-spacing: 0; }
.s-role { font-size: .95rem; color: var(--muted); padding-inline-start: 10px; border-inline-start: 1px solid var(--line); }
.s-nav { display: flex; gap: 28px; margin-inline-start: auto; font-size: 16px; }
html[lang=fa] .s-nav { font-size: 15px; }
.s-nav a, .s-signin, .s-lang { text-decoration: none; color: var(--ink); }
.s-nav a:hover, .s-signin:hover, .s-lang:hover { color: var(--accent); }
.s-tools { display: flex; align-items: center; gap: 20px; font-size: 15px; }
html[lang=fa] .s-tools { font-size: 14.5px; }
.s-lang { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.s-lang[lang=fa] { font-family: "Vazirmatn", Tahoma, sans-serif; }
.s-lang[lang=en] { font-family: "Newsreader", Georgia, serif; font-size: 15px; }

.s-menu { display: none; margin-inline-start: auto; }
.s-menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; }
.s-menu summary::-webkit-details-marker { display: none; }
.s-menu summary span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.s-menu nav { position: absolute; inset-inline: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line);
  display: grid; padding: 8px var(--gutter) 24px; box-shadow: 0 18px 30px rgba(43, 35, 32, .08); }
.s-menu nav a { text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.s-menu nav a.s-btn { margin-top: 18px; border-bottom: 0; color: #fff; justify-self: start; }

/* hero */
.s-hero { background: linear-gradient(to bottom, var(--sand), var(--paper)); }
.s-hero-in { max-width: var(--wide); margin: 0 auto; padding: 72px var(--gutter) 88px; display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 72px; align-items: center; }
.s-eyebrow { color: var(--accent); font-size: 1rem; margin-bottom: 18px; }
html[lang=fa] .s-eyebrow { font-weight: 600; font-size: 15px; }
.s-hero h1 { font: 400 clamp(2.5rem, 5vw, 4rem)/1.05 var(--display); letter-spacing: -0.02em; white-space: pre-line; max-width: 15em; }
html[lang=fa] .s-hero h1 { font-weight: 700; font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 1.5; letter-spacing: 0; }
.s-lead { margin-top: 18px; font-size: 1.2rem; color: var(--muted); max-width: 32em; white-space: pre-line; }
html[lang=fa] .s-lead { font-size: 1.1rem; }
.s-hero-text .s-lead + .s-lead { margin-top: 6px; }
.s-note { margin-top: 16px; font-size: .95rem; color: var(--muted); white-space: pre-line; }
.s-portrait { position: relative; justify-self: center; width: min(100%, 420px); }
.s-portrait::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1.5px solid var(--accent);
  border-radius: 999px 999px 18px 18px; opacity: .55; }
[dir=rtl] .s-portrait::before { inset: 18px 18px -18px -18px; }
.s-portrait img { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  object-position: 50% 18%; border-radius: 999px 999px 18px 18px; background: var(--sand);
  box-shadow: 0 30px 60px -30px rgba(43, 35, 32, .45); }

/* sections: heading in a narrow column, content beside it */
.s-section { max-width: var(--wide); margin: 0 auto; padding: 88px var(--gutter) 0; display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 64px; }
.s-section > h2 { font: 400 clamp(1.9rem, 3vw, 2.5rem)/1.12 var(--display); letter-spacing: -0.015em; }
html[lang=fa] .s-section > h2 { font-weight: 700; font-size: clamp(1.45rem, 2.2vw, 1.8rem); line-height: 1.55; letter-spacing: 0; }
.s-prose p { max-width: 38em; }
.s-prose p + p { margin-top: 1em; }
.s-after { margin-top: 26px; color: var(--muted); max-width: 38em; white-space: pre-line; }
.s-after.s-first { margin: 0 0 30px; }

.s-topics { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.s-topics li { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line);
  font: 400 1.3rem/1.35 var(--display); }
html[lang=fa] .s-topics li { font-size: 1.08rem; font-weight: 600; }
.s-topics li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.s-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.s-steps li { border-top: 2px solid var(--ink); padding-top: 18px; }
.s-num { display: block; font: 400 2.6rem/1 var(--display); color: var(--accent); margin-bottom: 14px; }
html[lang=fa] .s-num { font-weight: 700; font-size: 2rem; }
.s-steps h3 { font: 500 1.2rem/1.3 var(--text); margin-bottom: 8px; }
html[lang=fa] .s-steps h3 { font-weight: 700; font-size: 1.05rem; }
.s-steps p { color: var(--muted); font-size: .98rem; }

.s-rows { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px 32px; }
.s-rows > div { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: 8px 32px; padding: 22px 0; }
.s-rows > div + div { border-top: 1px solid var(--line); }
.s-rows dt { font: 400 1.35rem/1.3 var(--display); }
html[lang=fa] .s-rows dt { font-weight: 700; font-size: 1.02rem; line-height: 1.8; }
.s-rows dd { color: var(--muted); }

/* closing section */
.s-end { margin-top: 104px; background: var(--navy); color: var(--navy-text); }
.s-end-in { max-width: 780px; margin: 0 auto; padding: 84px var(--gutter); text-align: center; }
.s-end h2 { font: 400 clamp(2rem, 4vw, 3rem)/1.1 var(--display); letter-spacing: -0.015em; }
html[lang=fa] .s-end h2 { font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.55; letter-spacing: 0; }
.s-end-in > p { margin: 18px auto 0; max-width: 34em; opacity: .85; }
.s-end .s-actions { justify-content: center; }
.s-end .s-contact { margin-top: 22px; font-size: .95rem; opacity: .9; }
.s-end .s-contact a { color: #fff; text-underline-offset: 4px; }

/* footer */
.s-footer { background: #171f31; color: rgba(241, 233, 222, .78); font-size: 15px; }
.s-foot-in { max-width: var(--wide); margin: 0 auto; padding: 56px var(--gutter) 64px; display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; }
.s-footer .s-brand { color: var(--navy-text); }
.s-footer .s-role { color: rgba(241, 233, 222, .6); border-color: rgba(241, 233, 222, .25); }
.s-foot-note { margin-top: 14px; max-width: 30em; white-space: pre-line; }
.s-foot-col { display: grid; gap: 8px; align-content: start; }
.s-foot-head { color: var(--navy-text); font-weight: 600; margin-bottom: 4px; }
.s-foot-col a { text-decoration: none; }
.s-foot-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* narrower screens */
@media (max-width: 1020px) {
  .s-nav, .s-tools { display: none; }
  .s-menu { display: block; }
  .s-bar { position: relative; min-height: 64px; }
}
@media (max-width: 860px) {
  .s-hero-in { grid-template-columns: 1fr; gap: 48px; padding-top: 40px; padding-bottom: 64px; }
  .s-portrait { order: -1; width: min(78%, 340px); }
  .s-section { grid-template-columns: 1fr; padding-top: 64px; }
  .s-steps { grid-template-columns: 1fr; gap: 22px; }
  .s-foot-in { grid-template-columns: 1fr 1fr; }
  .s-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .s-topics { grid-template-columns: 1fr; }
  .s-rows { padding: 4px 20px; }
  .s-rows > div { grid-template-columns: 1fr; }
  .s-actions .s-btn { flex: 1 1 100%; }
  .s-end { margin-top: 72px; }
  .s-end-in { padding: 64px var(--gutter); }
}
