/* maryamghodrat.com — sage and linen. Colours are set here. */
:root {
  --bg: #F6F2EA;          /* linen background */
  --tint: #EDE5D7;        /* soft panels */
  --ph: #E8DFD0;          /* image placeholders */
  --ink: #2F3A34;         /* text */
  --muted: #535C56;       /* secondary text */
  --accent: #4A6652;      /* sage: links and buttons */
  --line: #DDD3C2;        /* dividers */
  --field: #FBF8F2;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --fa: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 7vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif);
       font-size: 20px; line-height: 1.65; overflow-wrap: break-word; }
html[lang="fa"] body { font-family: var(--fa); font-size: 18px; line-height: 1.95; }
[lang="fa"] { font-family: var(--fa); }
[lang="en"] { font-family: var(--serif); }
[lang="fa"] em { font-style: normal; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-weight: 400; line-height: 1.2; margin: 0; }
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3 { font-weight: 500; line-height: 1.5; }
h1 { font-size: clamp(36px, 6vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 24px; }
html[lang="fa"] h1 { font-size: clamp(30px, 5vw, 52px); }
html[lang="fa"] h2 { font-size: clamp(22px, 3vw, 32px); }
html[lang="fa"] h3 { font-size: 21px; }
p { margin: 0; }

.muted { color: var(--muted); }
.eyebrow { font-size: 15px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); }
html[lang="fa"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 16px; font-weight: 500; }
.lede { font-size: 22px; max-width: 720px; }

/* Skip link (visible when focused with the keyboard) */
.skip { position: absolute; top: -100px; inset-inline-start: 16px; z-index: 10; padding: 10px 16px;
        background: var(--ink); color: var(--bg); border-radius: 4px; }
.skip:focus { top: 16px; color: var(--bg); }

/* Header */
.site-header { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between;
               padding: 24px var(--gutter); border-bottom: 1px solid var(--line); }
.wordmark { font-size: 30px; font-weight: 500; color: var(--ink); letter-spacing: .5px; text-decoration: none; }
html[lang="fa"] .wordmark { font-size: 26px; letter-spacing: 0; }
.wordmark:hover { color: var(--accent); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; font-size: 18px; }
.site-header nav a { text-decoration: none; padding: 8px 0; }
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.lang-switch { padding: 6px 16px !important; border: 1px solid var(--accent); border-radius: 999px; line-height: 1.4; }
.lang-switch:hover { background: var(--accent); color: var(--bg); text-decoration: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 8px 24px;
       border-radius: 4px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg);
       font: inherit; font-size: 18px; line-height: 1.3; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Images and placeholders */
.ph { background: var(--ph); color: var(--muted); font-style: italic; font-size: 18px;
      display: flex; align-items: center; justify-content: center; border-radius: 3px; }
.portrait { width: min(420px, 100%); flex-shrink: 0; margin: 0; }
.portrait img { width: 100%; border-radius: 3px; }
.portrait figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }
.hero-cover { width: min(400px, 100%); flex-shrink: 0; }
.hero-cover img, .covers img { border-radius: 2px; box-shadow: 0 1px 2px rgba(47,58,52,.12), 0 8px 24px rgba(47,58,52,.12); }
.covers { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; align-items: end; width: min(520px, 100%); flex-shrink: 0; }
.covers a { display: block; }

/* Sections */
main > section { padding-left: var(--gutter); padding-right: var(--gutter); }
.page-title { padding-top: 80px; padding-bottom: 48px; display: grid; gap: 12px; }
.hero, .bio, .book { display: flex; flex-wrap: wrap; gap: 48px 80px; align-items: flex-start; padding-top: 80px; padding-bottom: 80px; }
.hero { align-items: center; }
.hero-text, .book-text { flex: 1 1 340px; display: grid; gap: 18px; max-width: 640px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); }
html[lang="fa"] .hero h1 { font-size: clamp(32px, 5vw, 56px); }
.bio { padding-top: 0; }
.bio-text { flex: 1 1 340px; display: grid; gap: 22px; max-width: 640px; font-size: 21px; }
html[lang="fa"] .bio-text { font-size: 19px; }

.intro { display: flex; flex-wrap: wrap; gap: 20px 60px; align-items: center; justify-content: space-between;
         margin: 0 var(--gutter); padding: 56px 0 !important; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.intro p { flex: 1 1 360px; font-size: 26px; line-height: 1.5; }
html[lang="fa"] .intro p { font-size: 22px; line-height: 1.9; }

.two-up, .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 28px; }
.two-up { padding-top: 80px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.panel { border: 1px solid var(--line); border-radius: 4px; padding: clamp(24px, 4vw, 48px); display: grid; gap: 14px; align-content: start; justify-items: start; }
.panel-tint { background: var(--tint); border-color: var(--tint); }
.card { border: 1px solid var(--line); border-radius: 4px; padding: 28px; display: grid; gap: 8px; align-content: start; }
.card a { overflow-wrap: anywhere; }
.dl { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }

.quote { margin: 0 var(--gutter); padding: clamp(36px, 6vw, 72px) clamp(20px, 8vw, 120px) !important; background: var(--tint);
         border-radius: 4px; text-align: center; display: grid; gap: 18px; justify-items: center; }
.quote-fa { font-size: clamp(21px, 2.6vw, 28px); line-height: 1.9; max-width: 820px; }
.quote-en { font-size: clamp(23px, 3vw, 34px); font-style: italic; line-height: 1.45; max-width: 820px; }

.book-title { font-size: clamp(34px, 4.5vw, 52px); }
.fa-title { font-size: 26px; }
.en-title { font-size: 24px; color: var(--muted); }
.details { margin: 0; display: grid; gap: 10px; }
.details div { display: grid; grid-template-columns: minmax(120px, 170px) 1fr; gap: 4px 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); font-size: 17px; }
.details dd { margin: 0; }
.nowrap { white-space: nowrap; display: inline-block; }
.buy-label { margin-top: 8px; }
.excerpt { margin: 8px 0; display: grid; gap: 12px; }
.excerpt blockquote { margin: 0; padding-inline-start: 24px; border-inline-start: 2px solid var(--accent); display: grid; gap: 14px; }
.excerpt blockquote p { font-style: italic; font-size: 20px; }
html[lang="fa"] .excerpt blockquote p { font-style: normal; font-size: 18px; }

.banner { margin: 0 var(--gutter); padding: clamp(28px, 5vw, 56px) !important; background: var(--tint); border-radius: 4px;
          display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.banner > div { display: grid; gap: 8px; }

.list-section { padding-bottom: 64px; display: grid; gap: 24px; }
.cards:empty { display: none; }
.empty { color: var(--muted); padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event { display: grid; grid-template-columns: 140px 1fr auto; gap: 16px 40px; align-items: center;
         padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event-date { display: grid; }
.event-date .day { font-size: 44px; line-height: 1.1; }
.rule-section { margin: 0 var(--gutter); padding: 48px 0 !important; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.cards-3 + .rule-section { margin-top: 56px; }
.narrow { max-width: 840px; }

/* 404 */
.not-found { min-height: 60vh; display: grid; justify-items: center; align-content: center; gap: 20px;
             padding: 72px var(--gutter); text-align: center; }
.not-found h1 { font-size: clamp(28px, 4.5vw, 46px); max-width: 760px; }
.not-found .actions { justify-content: center; margin-top: 8px; }
.nf-fa { font-size: 20px; color: var(--muted); }
.door { width: 110px; height: auto; color: var(--accent); }

/* Newsletter + footer */
.signup { display: flex; flex-wrap: wrap; gap: 32px 80px; align-items: center; padding: 80px var(--gutter); }
.signup > div, .signup-form { flex: 1 1 min(320px, 100%); min-width: 0; display: grid; gap: 10px; }
.signup-form { grid-template-columns: minmax(0, 1fr); }
.signup-form label { font-size: 17px; }
.signup-form .row { display: flex; flex-wrap: wrap; gap: 12px; }
.signup-form input { flex: 1 1 180px; min-width: 0; width: 100%; min-height: 48px; padding: 0 16px; font: inherit; font-size: 18px;
                     border: 1px solid #8F8574; border-radius: 4px; background: var(--field); color: var(--ink); }
html[lang="fa"] .signup-form input { text-align: left; }
.form-status:empty { display: none; }
.form-status { font-size: 19px; color: var(--ink); background: var(--tint); border-radius: 4px; padding: 14px 18px; }
.signup-form.done label, .signup-form.done .row { display: none; }
.site-footer { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between;
               padding: 32px var(--gutter); border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 32px; }

a:focus-visible, .btn:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 700px) {
  body { font-size: 18px; }
  .site-header { padding-top: 18px; padding-bottom: 14px; gap: 8px; }
  .site-header nav { gap: 0 18px; font-size: 17px; }
  .hero, .bio, .book { padding-top: 40px; padding-bottom: 56px; gap: 32px; }
  .hero-cover { width: min(240px, 70%); }
  .portrait { width: min(300px, 80%); }
  .covers { width: min(340px, 100%); }
  .page-title { padding-top: 48px; padding-bottom: 32px; }
  .two-up { padding-top: 56px; }
  .intro p { font-size: 22px; }
  .bio-text { font-size: 19px; }
  .event { grid-template-columns: 1fr; }
  .details div { grid-template-columns: 1fr; }
  .signup { padding-top: 56px; padding-bottom: 56px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .site-header nav, .signup, .skip { display: none; } }
