/* =====================================================================
   DENWAY — Design System v3
   One frame for every page: a 12-column grid, one row pattern
   (label · English · Persian), one rhythm, square editorial surfaces.
   ===================================================================== */


/* Latin fonts: self-hosted in assets/fonts (see README there) */
@font-face { font-family: "DW Cormorant"; src: url("assets/fonts/cormorant-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "DW Cormorant"; src: url("assets/fonts/cormorant-300i.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "DW Cormorant"; src: url("assets/fonts/cormorant-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DW Cormorant"; src: url("assets/fonts/cormorant-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DW Cormorant"; src: url("assets/fonts/cormorant-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DW Cormorant"; src: url("assets/fonts/cormorant-500i.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "DW Geist"; src: url("assets/fonts/geist-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "DW Geist"; src: url("assets/fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DW Geist"; src: url("assets/fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DW Geist Mono"; src: url("assets/fonts/geist-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }




:root {
  /* Palette */
  --paper:   #ffffff;   /* page background (white) */
  --paper-2: #f4f1ea;   /* cream — accent band only, used sparingly */
  --ink:     #0a0a0a;   /* text, primary button */
  --ink-2:   rgba(10, 10, 10, .68);
  --ink-3:   rgba(10, 10, 10, .48);
  --rule:    rgba(10, 10, 10, .14);
  --umber:   #6b5d4b;   /* quiet accent */
  --onyx:    #0e0d0c;   /* dark band */
  --cream:   #f5f4f1;   /* light text on onyx */

  /* Type */
  --serif: "DW Cormorant", "Cormorant Garamond", "Canela", "YekanBakh", Georgia, serif;   /* swap to licensed Canela here */
  --sans:  "DW Geist", "Geist", "Suisse Intl", "YekanBakh", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --mono:  "DW Geist Mono", "Geist Mono", "YekanBakh", ui-monospace, Menlo, monospace;
  --fa:    "YekanBakh", "Geist", Tahoma, sans-serif;

  /* Frame */
  --max: 1200px;
  --pad: 40px;          /* page margin */
  --gap: 24px;          /* column gap */
  --sec: 96px;          /* section rhythm */
  --header: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-weight: 300; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--paper-2); color: var(--ink); }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ---------- Frame ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; }

/* The one row pattern used everywhere */
.c-label { grid-column: 1 / -1; }
.c-en    { grid-column: 1 / 7; }
.c-fa    { grid-column: 7 / 13; }
.c-body  { grid-column: 1 / -1; margin-top: 16px; }
.c-all   { grid-column: 1 / -1; }

.sec { padding: var(--sec) 0; border-top: 1px solid var(--rule); }
.sec.band { background: var(--paper-2); }
.sec.dark { background: var(--onyx); color: var(--cream); border-top: 0; --rule: rgba(243, 240, 233, .16); --ink-2: rgba(243, 240, 233, .72); --ink-3: rgba(243, 240, 233, .5); }
.sec.dark + .sec, .sec.band + .sec { border-top: 0; }

/* ---------- Type ---------- */
.label { display: flex; gap: 14px; font-family: var(--sans); font-weight: 400; font-size: 11.5px; line-height: 18px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.label .i { font-family: var(--mono); letter-spacing: .04em; }

.display { font-family: var(--serif); font-weight: 300; font-size: clamp(48px, 7vw, 104px); line-height: .92; letter-spacing: -0.015em; text-transform: uppercase; }
.h1      { font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.01em; text-transform: uppercase; }
.h2      { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3vw, 42px); line-height: 1.1; letter-spacing: -0.01em; }
.h3      { font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2vw, 28px); line-height: 1.15; }
.display em, .h1 em, .h2 em, .h3 em { font-style: italic; }
.lead    { font-size: 17px; line-height: 28px; color: var(--ink-2); }
.small   { font-size: 13px; line-height: 20px; color: var(--ink-3); }

.fa      { font-family: var(--fa); direction: rtl; text-align: right; font-weight: 400; }
.fa-lg   { font-size: 20px; line-height: 38px; font-weight: 400; color: var(--ink); }
.fa-md   { font-size: 16px; line-height: 32px; color: var(--ink-2); }
.fa-sm   { font-size: 15px; line-height: 28px; color: var(--ink-2); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 28px; border-radius: 9999px; font-family: var(--sans); font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--ink); transition: background .3s, color .3s; white-space: nowrap; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: transparent; color: var(--ink); }
.btn-line { color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.dark .btn { border-color: var(--cream); }
.dark .btn-primary { background: var(--cream); color: var(--onyx); }
.dark .btn-primary:hover { background: transparent; color: var(--cream); }
.dark .btn-line { color: var(--cream); }
.btn-sm { height: 40px; padding: 0 20px; font-size: 11px; }
.link { display: inline-flex; gap: 8px; font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding-bottom: 4px; border-bottom: 1px solid var(--rule); transition: border-color .3s; }
.link:hover { border-color: currentColor; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; height: var(--header); background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--rule); }
.header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .42em; text-transform: uppercase; }
.nav { display: flex; gap: 36px; margin-left: auto; margin-right: 36px; }
.nav a { font-weight: 400; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: 50%; place-items: center; }
.menu-btn span, .menu-btn span::before { display: block; width: 14px; height: 1px; background: var(--ink); position: relative; }
.menu-btn span::before { content: ""; position: absolute; top: 5px; }
.menu-btn span { top: -2.5px; }
.sheet { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: none; flex-direction: column; padding: 16px var(--pad) 40px; }
.sheet.open { display: flex; }
.sheet .close { display: grid; align-self: flex-end; margin-bottom: 40px; }
.sheet a { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-weight: 300; font-size: 32px; line-height: 1; }
.sheet a .fa { font-size: 15px; color: var(--ink-3); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; font-size: 12px; }
.skip:focus { left: 8px; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 80px; }
.hero .display { grid-column: 1 / -1; margin: 8px 0 16px; }

/* ---------- Columns with hairlines (dimensions, facts, steps) ---------- */
.cols { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.cols > * { padding: 28px 24px 4px; border-left: 1px solid var(--rule); }
.cols > :first-child { padding-left: 0; border-left: 0; }
.cols .i { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.cols .h3 { margin-top: 24px; }
.cols .fa-t { margin-top: 12px; font-family: var(--fa); direction: rtl; text-align: left; font-size: 16px; font-weight: 500; }
.cols .fa-d { margin-top: 14px; font-family: var(--fa); direction: rtl; text-align: left; font-size: 15px; line-height: 28px; color: var(--ink-2); }

/* ---------- Lists ---------- */
.list { list-style: none; border-top: 1px solid var(--rule); }
.list li { display: flex; direction: rtl; justify-content: space-between; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.list .fa { font-size: 17px; line-height: 30px; }
.list .i { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* ---------- Founder ---------- */
.photo { margin: 0; }
.photo img { width: 100%; }
.signature { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 28px; line-height: 1; margin-top: 36px; }
.signature small { display: block; margin-top: 12px; font-family: var(--sans); font-style: normal; font-weight: 400; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Quote ---------- */
.quote { font-family: var(--fa); direction: rtl; text-align: right; font-weight: 400; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.8; }
.cite { margin-top: 24px; text-align: right; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; direction: rtl; font-family: var(--fa); font-size: 17px; line-height: 32px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-weight: 300; font-size: 22px; color: var(--ink-3); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { font-family: var(--fa); direction: rtl; text-align: right; font-size: 16px; line-height: 32px; color: var(--ink-2); padding-bottom: 26px; max-width: 640px; margin-left: auto; }

/* ---------- Form ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gap); }
.form .full { grid-column: 1 / -1; }
.field { display: block; margin-bottom: 28px; }
.field > span { display: flex; justify-content: space-between; font-weight: 400; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.field > span .fa { letter-spacing: 0; text-transform: none; font-size: 13px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 10px 0; appearance: none; transition: border-color .2s; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--ink); }
.field textarea { min-height: 120px; resize: vertical; }
.form-msg { margin-top: 16px; font-size: 13px; color: var(--ink-2); }

/* ---------- Footer: minimal, 12-column, standard ---------- */
.footer { background: var(--onyx); color: var(--cream); padding: 72px 0 28px; --rule: rgba(245, 244, 241, .16); --ink-2: rgba(245, 244, 241, .72); --ink-3: rgba(245, 244, 241, .48); }
.footer .grid { row-gap: 48px; align-items: start; }
.f-brand { grid-column: 1 / 6; }
.f-brand .logo { display: inline-block; font-size: 15px; letter-spacing: .42em; }
.f-brand .f-tag { margin-top: 18px; font-size: 14px; line-height: 24px; color: var(--ink-2); }
.f-brand .fa { margin-top: 8px; font-size: 14px; line-height: 26px; color: var(--ink-2); text-align: left; }
.f-col { min-width: 0; }
.f-col:nth-of-type(2) { grid-column: 6 / 8; }
.f-col:nth-of-type(3) { grid-column: 8 / 10; }
.f-col:nth-of-type(4) { grid-column: 10 / 13; }
.f-col h4 { font-weight: 400; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.f-col ul { list-style: none; }
.f-col li { padding: 4px 0; font-size: 14px; line-height: 22px; color: var(--ink-2); }
.f-col a { transition: color .2s; }
.f-col a:hover { color: var(--cream); }
.footer .legal { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-3); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Mobile: same order, single column ---------- */
@media (max-width: 900px) {
  :root { --pad: 20px; --sec: 64px; --header: 60px; }
  .grid { row-gap: 20px; }
  .c-label, .c-en, .c-fa, .c-body { grid-column: 1 / -1; }
  .nav, .header .btn { display: none; }
  .menu-btn { display: grid; }
  .hero { padding-top: 40px; }
  .cols { grid-template-columns: 1fr; }
  .cols > *, .cols > :first-child { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .cols .h3 { margin-top: 20px; }
  .actions .btn { flex: 1 1 100%; }
  .form { grid-template-columns: 1fr; }
  .footer .legal { flex-direction: column; gap: 6px; }
  .footer { padding: 56px 0 24px; }
  .footer .grid { row-gap: 32px; }
  .f-brand, .f-col:nth-of-type(2), .f-col:nth-of-type(3) { grid-column: span 6; }
  .f-brand { grid-column: 1 / -1; }
  .f-col:nth-of-type(4) { grid-column: 1 / -1; }

}

/* fixes */
.c-label { align-self: start; }

.field > span .fa { font-style: normal; }
::selection { background: #ece9e2; }

/* v3.1 — section label sits on its own line above the bilingual pair */
.c-label.label { padding-bottom: 4px; }
.c-en .h2 + .actions, .c-en .h1 + .actions { margin-top: 24px; }
/* 3-field form in one row on desktop */
.form-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0 var(--gap); align-items: end; }
.form-row .field { margin-bottom: 0; }
.form-row .btn { min-width: 220px; }
@media (max-width: 900px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row .field { margin-bottom: 24px; }
  .form-row .btn { width: 100%; }
}

/* Persian: Yekan Bakh, real weights only, never faux-bold */
.fa, [lang="fa"], .fa-t, .fa-d, .quote, .faq summary, .faq details p { font-synthesis: none; }

.cols .fa-d, .faq details p, .quote, .list .fa, .f-tag.fa { font-weight: 400; }

/* ---------- Persian weights: minimal ----------
   titles / lead lines  → Light 300
   small labels         → Regular 400
   descriptions under a title → Thin 100, full ink for legibility */
.fa, [lang="fa"] { font-weight: 300; }
.fa-lg, .quote, .list .fa, .sheet a .fa { font-weight: 300; }
.cols .fa-t, .faq summary, .field > span .fa { font-weight: 400; }
.fa-md, .fa-sm, .cols .fa-d, .faq details p, .footer .fa.f-tag { font-weight: 100; color: var(--ink); }
.dark .fa-md, .dark .cols .fa-d, .footer .fa.f-tag { color: var(--cream); }
/* Thin needs a touch more size to stay legible */
.fa-md, .cols .fa-d, .faq details p { font-size: 17px; line-height: 32px; }
/* descriptions under headings: smaller */
.fa-md, .cols .fa-d, .faq details p { font-size: 15px; line-height: 28px; }
.fa-sm, .footer .fa.f-tag { font-size: 14px; line-height: 26px; }


/* ================= v3.2 ================= */

/* Hero fills the first screen on every display; nothing below peeks in */
.hero { min-height: calc(100vh - var(--header)); min-height: calc(100svh - var(--header)); display: flex; align-items: center; padding: 56px 0; }
.hero > .wrap { width: 100%; }

/* Mirror: English and Persian blocks are twins — same size, same lines, same weight, same top */
.hero .grid { align-items: start; }
.hero-en { font-family: var(--sans); font-weight: 400; font-size: 18px; line-height: 32px; color: var(--ink); }
.hero-fa { font-weight: 400; font-size: 19px; line-height: 32px; color: var(--ink); }
.mirror .actions { margin-top: 28px; }
.fa-actions { direction: rtl; }
.btn-fa { font-family: var(--fa); font-weight: 400; font-size: 14px; letter-spacing: 0; text-transform: none; }

/* Weights: English headings and the Persian line opposite them match */
.h2, .h1 { font-weight: 400; }
.fa-lg { font-weight: 400; }
.cols .h3 { font-weight: 500; }
/* Descriptions: light, readable */
.fa-md, .fa-sm, .cols .fa-d, .faq details p, .footer .fa.f-tag { font-weight: 300; }

/* Menu: active page clearly marked */
.nav a { color: var(--ink-3); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }

/* Footer wordmark: quiet */
.footer .word { font-size: clamp(30px, 3.4vw, 46px); letter-spacing: .18em; padding-bottom: 32px; }

/* Form: stacked fields, labels bolder and tied to their field */
.form-stack { display: grid; grid-template-columns: 1fr; }
.form-stack .field { margin-bottom: 26px; }
.form-stack .field > span { color: var(--ink); font-weight: 500; margin-bottom: 0; }
.form-stack .field > span .fa { color: var(--ink); font-weight: 400; }
.form-stack .field input { padding: 6px 0 10px; }
.form-stack .btn { width: 100%; margin-top: 8px; }

@media (max-width: 900px) {
  .hero { padding: 40px 0; }
  .hero-en, .hero-fa { font-size: 17px; line-height: 30px; }
  .mirror .actions .btn { flex: 1 1 100%; }
}

/* v3.3 — hero text lighter (same size); descriptions a touch smaller */
.hero-en { font-weight: 300; }
.hero-fa { font-weight: 300; }
.fa-md, .cols .fa-d, .faq details p { font-size: 14px; line-height: 26px; }


/* contact channels */
.chan { list-style: none; border-top: 1px solid var(--rule); }
.chan li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.chan .k { font-weight: 400; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.chan a, .chan .v { font-size: 17px; font-weight: 300; transition: opacity .2s; }
.chan a:hover { opacity: .55; }
.chan .v.fa { font-size: 16px; }

/* privacy text */
.prose { max-width: 720px; }
.prose p { font-family: var(--fa); direction: rtl; text-align: right; font-weight: 300; font-size: 16px; line-height: 32px; margin-bottom: 14px; }
.prose .stamp { font-size: 12px; color: var(--ink-3); text-align: right; direction: rtl; }
.consent { margin-top: 14px; font-family: var(--fa); direction: rtl; text-align: right; font-size: 13px; line-height: 24px; color: var(--ink-2); }
.consent a { text-decoration: underline; text-underline-offset: 3px; }

[hidden] { display: none !important; }
input, textarea, select, button, option { font-family: inherit; }

/* hero / row action buttons sit on their own row (after both languages) */
.rowact .actions, .hero .rowact .actions { margin-top: 0; }

/* deletion request */
.del { margin-top: 28px; max-width: 520px; }
.del .field { margin-bottom: 22px; }
.btn-ghost { height: 42px; padding: 0 22px; border: 1px solid var(--rule); border-radius: 9999px; font-weight: 400; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; transition: border-color .3s, background .3s; }
.btn-ghost:hover, .btn-ghost[aria-expanded="true"] { border-color: var(--ink); }
.prose .btn-ghost { margin-top: 12px; }
