/* SANAZ ATARODI — editorial, minimal. Palette 70 / 20 / 7 / 3. */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('../fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('../fonts/vazirmatn-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('../fonts/vazirmatn-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/cormorant-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }

:root {
  --ivory: #F7F1E8;
  --ivory-deep: #EFE6D8;
  --brown: #4A3528;
  --brown-soft: rgba(74, 53, 40, .74);
  --line: rgba(74, 53, 40, .18);
  --terracotta: #B55E3C;
  --olive: #7A7F5A;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif-italic: 'Cormorant Garamond', Georgia, serif;
  --container: min(1280px, calc(100% - 2 * clamp(20px, 5vw, 64px)));
  --header-h: 84px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
:lang(fa) { --sans: 'Vazirmatn', 'Manrope', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--ivory); color: var(--brown);
  font-family: var(--sans); font-size: 17px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 4px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { clip: auto !important; width: auto; height: auto; top: 8px; inset-inline-start: 8px; padding: 10px 16px; background: var(--ivory); z-index: 1000; }

.sa-container { width: var(--container); margin-inline: auto; }
.sa-main { min-height: 60vh; }

/* Typography */
h1, h2, h3 { font-weight: 500; letter-spacing: -.025em; line-height: 1.08; color: var(--brown); }
h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); letter-spacing: -.015em; }
.sa-label { font-size: .72rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--brown-soft); }
.sa-label--accent { color: var(--brown); }
.sa-label--accent::before { content: ''; display: inline-block; width: 22px; height: 1px; margin-inline-end: 12px; vertical-align: middle; background: var(--terracotta); }
:lang(fa) .sa-label, :lang(fa) h1, :lang(fa) h2, :lang(fa) h3, :lang(fa) .sa-wordmark, :lang(fa) .sa-nav a { letter-spacing: 0; text-transform: none; }
:lang(fa) .sa-wordmark { letter-spacing: .18em; }
:lang(fa) body, :lang(fa) { line-height: 1.9; }
:lang(fa) .sa-label { font-size: .88rem; font-weight: 500; }
:lang(fa) .sa-nav a, :lang(fa) .sa-link, :lang(fa) .sa-btn, :lang(fa) .sa-card__cta { font-size: .92rem; letter-spacing: 0; }
:lang(fa) .sa-lang a { font-size: .8rem; }

/* Buttons and links */
.sa-btn { display: inline-flex; align-items: center; gap: 14px; padding: 16px 28px; background: var(--brown); color: var(--ivory); font-size: .84rem; font-weight: 600; letter-spacing: .06em; border: 1px solid var(--brown); transition: background .3s var(--ease), color .3s var(--ease); }
.sa-btn:hover { background: transparent; color: var(--brown); }
.sa-btn--light { background: var(--ivory); color: var(--brown); border-color: var(--ivory); }
.sa-btn--light:hover { background: transparent; color: var(--ivory); }
.sa-link { display: inline-flex; align-items: center; gap: 12px; font-size: .84rem; font-weight: 600; letter-spacing: .06em; padding-bottom: 4px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .35s var(--ease); }
[dir="rtl"] .sa-link { background-position: 100% 100%; }
.sa-link:hover { background-size: 40% 1px; }
.sa-arrow { flex: none; transition: transform .3s var(--ease); }
[dir="rtl"] .sa-arrow { transform: scaleX(-1); }
a:hover > .sa-arrow, .sa-btn:hover .sa-arrow, .sa-link:hover .sa-arrow { transform: translateX(5px); }
[dir="rtl"] a:hover > .sa-arrow, [dir="rtl"] .sa-btn:hover .sa-arrow, [dir="rtl"] .sa-link:hover .sa-arrow { transform: scaleX(-1) translateX(5px); }

/* Header */
.sa-header { position: sticky; top: 0; z-index: 100; background: rgba(247, 241, 232, .94); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.sa-header.is-scrolled { border-color: var(--line); }
.sa-header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.sa-wordmark { font-size: .95rem; font-weight: 700; letter-spacing: .22em; white-space: nowrap; }
.sa-header__panel { display: flex; align-items: center; gap: clamp(28px, 3.4vw, 56px); }
.sa-nav ul { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 38px); }
.sa-nav a { position: relative; display: block; padding: 8px 0; font-size: .8rem; font-weight: 500; letter-spacing: .04em; white-space: nowrap; }
.sa-nav a::after { content: ''; position: absolute; inset-inline: 0; bottom: 2px; height: 1px; background: var(--terracotta); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
[dir="rtl"] .sa-nav a::after { transform-origin: right; }
.sa-nav a:hover::after, .sa-nav a:focus-visible::after { transform: scaleX(1); }
.sa-lang ul { display: flex; gap: 14px; }
.sa-lang a { font-size: .72rem; font-weight: 600; letter-spacing: .14em; color: var(--brown-soft); padding: 6px 0; }
.sa-lang a:hover, .sa-lang a[aria-current] { color: var(--brown); }
.sa-lang a[aria-current] { border-bottom: 1px solid var(--terracotta); }
.sa-menu-toggle { display: none; }

/* Hero */
.sa-hero { padding-block: clamp(40px, 6vw, 88px) clamp(56px, 8vw, 112px); }
.sa-hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(32px, 6vw, 104px); }
.sa-hero__copy { display: grid; gap: 28px; justify-items: start; }
.sa-hero__title { font-size: clamp(2.8rem, 5.6vw, 5.4rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.02; }
.sa-hero__support { font-family: var(--serif-italic); font-style: italic; font-size: clamp(1.3rem, 1.9vw, 1.75rem); line-height: 1.35; color: var(--brown-soft); max-width: 24em; }
:lang(fa) .sa-hero__support { font-family: var(--sans); font-style: normal; font-size: 1.15rem; }
.sa-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 8px; }
.sa-hero__media { position: relative; aspect-ratio: 4 / 5; max-height: 78vh; overflow: hidden; background: var(--ivory-deep); justify-self: end; width: 100%; }
.sa-img { width: 100%; height: 100%; object-fit: cover; }

/* Sections */
.sa-section { padding-block: clamp(64px, 9vw, 128px); }
.sa-section__head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4.5vw, 64px); }
.sa-section__head--split { grid-template-columns: 1fr auto; align-items: end; }

/* Three fields */
.sa-fields__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 40px); }
.sa-card { display: grid; align-content: start; gap: 24px; }
.sa-card__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--ivory-deep); }
.sa-card__media .sa-img { transition: transform 1.1s var(--ease); }
.sa-card:hover .sa-card__media .sa-img { transform: scale(1.035); }
.sa-card__body { display: grid; gap: 12px; padding-top: 4px; }
.sa-card__num { font-size: .72rem; font-weight: 600; letter-spacing: .24em; color: var(--terracotta); }
.sa-card__body p { color: var(--brown-soft); max-width: 26em; }
.sa-card__cta { display: inline-flex; align-items: center; gap: 12px; margin-top: 6px; font-size: .84rem; font-weight: 600; letter-spacing: .06em; }

/* About */
.sa-about { background: var(--ivory-deep); }
.sa-about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(32px, 8vw, 128px); }
.sa-about__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--ivory); max-width: 520px; width: 100%; }
.sa-about__copy { display: grid; gap: 24px; justify-items: start; max-width: 36em; }
.sa-about__copy h2 { font-size: clamp(2rem, 3.8vw, 3.6rem); }
.sa-about__text { color: var(--brown-soft); font-size: 1.1rem; max-width: 30em; }

/* Journal */
.sa-journal__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.sa-post { display: grid; align-content: start; gap: 14px; }
.sa-post__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ivory-deep); margin-bottom: 8px; }
.sa-post__media .sa-img { transition: transform 1.1s var(--ease); }
.sa-post:hover .sa-post__media .sa-img { transform: scale(1.035); }
.sa-post h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--terracotta); }
.sa-post p:not(.sa-label) { color: var(--brown-soft); }
.sa-post .sa-link { justify-self: start; margin-top: 6px; }

/* Contact CTA: calm, on the deeper ivory; the brown footer follows it */
.sa-contact { background: var(--ivory-deep); padding-block: clamp(72px, 10vw, 144px); }
.sa-contact__inner { display: grid; justify-items: center; text-align: center; gap: 24px; }
.sa-contact__inner::before { content: ''; width: 44px; height: 2px; background: var(--olive); }
.sa-contact h2 { max-width: 16em; font-size: clamp(2.2rem, 4.4vw, 4rem); }
.sa-contact p { color: var(--brown-soft); max-width: 30em; }
.sa-contact .sa-btn { margin-top: 12px; }

/* Footer: Deep Brown */
.sa-footer { background: var(--brown); color: var(--ivory); padding-top: clamp(56px, 7vw, 96px); }
.sa-footer :focus-visible { outline-color: var(--ivory); }
.sa-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 40px; align-items: start; padding-bottom: 56px; }
.sa-footer__brand { display: grid; gap: 14px; }
.sa-footer__tag { color: rgba(247, 241, 232, .72); font-size: .92rem; max-width: 24em; }
.sa-footer__nav ul { columns: 2; column-gap: 40px; }
.sa-footer__nav a { display: inline-block; padding: 4px 0; font-size: .88rem; color: rgba(247, 241, 232, .72); transition: color .25s; }
.sa-footer__nav a:hover { color: var(--ivory); }
.sa-footer__side { display: grid; gap: 20px; justify-items: start; }
.sa-footer .sa-lang a { color: rgba(247, 241, 232, .66); }
.sa-footer .sa-lang a:hover, .sa-footer .sa-lang a[aria-current] { color: var(--ivory); }
.sa-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 24px; border-top: 1px solid rgba(247, 241, 232, .18); font-size: .8rem; color: rgba(247, 241, 232, .66); }
.sa-footer__bottom ul { display: flex; gap: 24px; }
.sa-footer__bottom a:hover { color: var(--ivory); text-decoration: underline; text-underline-offset: 4px; }

/* Muted Olive: quiet details only */
.sa-about .sa-label::before, .sa-section__head .sa-label::before { content: ''; display: inline-block; width: 22px; height: 1px; margin-inline-end: 12px; vertical-align: middle; background: var(--olive); }
.sa-about__copy h2 { padding-inline-start: 0; }
::selection { background: var(--olive); color: var(--ivory); }

/* Contact form */
.sa-form-wrap { max-width: 40em; margin-top: 32px; }
.sa-form { display: grid; gap: 20px; }
.sa-form p { display: grid; gap: 8px; }
.sa-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sa-form label { font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brown-soft); }
:lang(fa) .sa-form label { font-size: .88rem; letter-spacing: 0; text-transform: none; }
.sa-form input, .sa-form select, .sa-form textarea { width: 100%; font: inherit; color: var(--brown); background: transparent; border: 0; border-bottom: 1px solid var(--brown); border-radius: 0; padding: 12px 0; transition: border-color .25s; }
.sa-form textarea { border: 1px solid var(--line); padding: 14px; resize: vertical; }
.sa-form input:focus, .sa-form select:focus, .sa-form textarea:focus { outline: 0; border-color: var(--terracotta); }
.sa-form__hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sa-form__notice { padding: 14px 18px; border-inline-start: 2px solid var(--olive); background: var(--ivory-deep); }
.sa-form__notice--error { border-color: var(--terracotta); }
@media (max-width: 760px) { .sa-form__row { grid-template-columns: 1fr; } }

/* 404 */
.sa-404 { display: grid; gap: 22px; justify-items: start; min-height: 50vh; align-content: center; }
.sa-page h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }

/* Inner pages (placeholder level) */
.sa-page { padding-block: clamp(56px, 8vw, 112px); }
.sa-prose { max-width: 40em; color: var(--brown-soft); }

/* Reveal: content stays visible without JS */
.sa-js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.sa-js [data-reveal].is-revealed { opacity: 1; transform: none; }
.sa-js [data-reveal-delay="1"] { transition-delay: .12s; }
.sa-js [data-reveal-delay="2"] { transition-delay: .24s; }

/* Tablet */
@media (max-width: 1100px) {
  /* backdrop-filter would make the header the containing block of the fixed menu panel */
  .sa-header { backdrop-filter: none; background: var(--ivory); }
  .sa-menu-toggle { display: inline-flex; align-items: center; gap: 12px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; padding: 10px 0; }
  .sa-menu-toggle__bars { position: relative; width: 22px; height: 10px; }
  .sa-menu-toggle__bars i { position: absolute; inset-inline: 0; height: 1px; background: var(--brown); transition: transform .3s var(--ease), top .3s var(--ease); }
  .sa-menu-toggle__bars i:first-child { top: 0; }
  .sa-menu-toggle__bars i:last-child { top: 9px; }
  .sa-menu-toggle[aria-expanded="true"] i:first-child { top: 4px; transform: rotate(45deg); }
  .sa-menu-toggle[aria-expanded="true"] i:last-child { top: 4px; transform: rotate(-45deg); }
  .sa-header__panel { position: fixed; inset: var(--header-h) 0 0 0; z-index: 99; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 32px; padding: 32px clamp(20px, 5vw, 64px) 40px; background: var(--ivory); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; }
  .sa-header__panel.is-open { opacity: 1; visibility: visible; transform: none; }
  .sa-nav { width: 100%; }
  .sa-nav ul { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .sa-nav li { width: 100%; border-bottom: 1px solid var(--line); }
  .sa-nav a { font-size: 1.35rem; font-weight: 500; letter-spacing: -.01em; padding: 18px 0; }
  .sa-nav a::after { display: none; }
  body.sa-menu-open { overflow: hidden; }
  .sa-hero__grid { gap: 40px; }
  .sa-fields__grid { gap: 20px; }
  .sa-footer__grid { grid-template-columns: 1fr 1fr; }
  .sa-footer__side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
}

/* Mobile */
@media (max-width: 760px) {
  :root { --header-h: 68px; }
  body { font-size: 16px; }
  .sa-hero__grid, .sa-about__grid { grid-template-columns: 1fr; }
  .sa-hero__media { order: -1; aspect-ratio: 4 / 4.2; max-height: none; }
  .sa-hero__copy { gap: 22px; }
  .sa-fields__grid, .sa-journal__grid { grid-template-columns: 1fr; gap: 48px; }
  .sa-card__media { aspect-ratio: 4 / 4.4; }
  .sa-section__head--split { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .sa-about__media { max-width: none; aspect-ratio: 4 / 4.4; }
  .sa-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .sa-footer__side { grid-auto-flow: row; }
  .sa-footer__bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .sa-js [data-reveal] { opacity: 1; transform: none; }
}
