/* Derafsh website (docs/decisions/0060, revision 2, 2026-11-24). One stylesheet for every page. The site sits in the
   game's daylight: cream ground, dark-brown ink, firuzeh and banner red for accents, gold for the one thing to press.
   Pictures are the site's own low-poly art (art/site); the page around them stays plain so they carry it. */

@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Baloo Bhaijaan 2"; src: url("/fonts/BalooBhaijaan2-Variable.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }

:root {
  --bg: #f8efdc; --bg-2: #f0e2c4; --card: #fffaf0; --line: #e2cfa8;
  --ink: #2b1c12; --ink-dim: #6a5544;
  --firuzeh: #17968f; --firuzeh-dk: #0c6661; --firuzeh-hi: #8fe0d8;
  --red: #a8261c; --gold-hi: #ffd766; --gold: #f4b52e; --gold-lo: #cf8409;
  --sky: #6fb7ea; --sky-lo: #b4d8f2;
  --green: #2e7d32; --err: #a8261c;
  --display: "Baloo Bhaijaan 2", "Vazirmatn", system-ui, sans-serif;
  --body: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.9;
  -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.25; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(30px, 4.6vw, 46px); }
h3 { font-size: 22px; }
p { margin: 0; }
a { color: var(--firuzeh-dk); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--firuzeh); outline-offset: 3px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 30; }
.skip:focus { top: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 720px; }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--firuzeh-dk); }
.eyebrow a { color: inherit; }
.lede { color: var(--ink-dim); font-size: 18px; max-width: 58ch; }

/* ---- buttons: one chunky shape, a flat face on a darker foot ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 6px 26px 8px;
  border: 0; border-radius: 16px; cursor: pointer; text-decoration: none; font-family: var(--display); font-weight: 800;
  font-size: 20px; line-height: 1.1; color: var(--ink); background: var(--c); box-shadow: 0 4px 0 var(--lo); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lo); }
.btn.gold { --c: var(--gold); --lo: var(--gold-lo); }
.btn.teal, .btn.green { --c: var(--firuzeh); --lo: var(--firuzeh-dk); color: #fff; }
.btn.plain { --c: var(--card); --lo: var(--line); }
.btn.sm { min-height: 42px; font-size: 17px; padding: 4px 16px 6px; border-radius: 13px; }
.btn.lg { min-height: 60px; font-size: 23px; padding: 8px 32px 10px; border-radius: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .1s, filter .1s; }
  .btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
  .btn:active { transform: translateY(3px); }
}

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(248,239,220,.94); border-bottom: 2px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px); backdrop-filter: blur(8px); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 8px var(--gutter-r) 8px var(--gutter); display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--red); font-family: var(--display);
  font-weight: 800; font-size: 30px; line-height: 1; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; padding: 4px 12px; border-radius: 10px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg-2); }
.top-cta { flex: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .top-cta { margin-inline-start: auto; }
}
/* on the landing page the header floats over the sky until the page moves */
body.home .top { position: fixed; inset: 0 0 auto; background: transparent; border-color: transparent; backdrop-filter: none; }
body.home.scrolled .top { background: rgba(248,239,220,.94); border-color: var(--line); backdrop-filter: blur(8px); }
@media (prefers-reduced-motion: no-preference) { body.home .top { transition: background .25s, border-color .25s; } }

/* ---- landing: the sky ---- */
.hero { position: relative; min-height: max(100svh, 58vw); display: flex; overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-lo) 46%, #f7e6cc 70%); }
.hero-art { position: absolute; inset: auto 0 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.hero::after { content: ""; position: absolute; inset: auto 0 -1px; height: clamp(28px, 5vw, 64px); background: var(--bg);
  clip-path: polygon(0 100%, 0 62%, 9% 20%, 17% 55%, 28% 8%, 39% 48%, 50% 22%, 61% 60%, 72% 14%, 83% 50%, 92% 26%, 100% 58%, 100% 100%); }
.hero-in { position: relative; z-index: 1; width: 100%; padding-top: clamp(84px, 13vh, 150px); padding-bottom: 40px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.kicker { font-family: var(--display); font-weight: 700; font-size: clamp(16px, 2.2vw, 20px); color: #17405f; }
.wordmark { font-size: clamp(88px, 15vw, 168px); line-height: 1.05; color: var(--red);
  text-shadow: 0 4px 0 var(--gold-hi), 0 9px 0 rgba(43,28,18,.16); }
.tagline { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2.9vw, 30px); line-height: 1.5; color: var(--ink); max-width: 22ch; text-wrap: balance;
  text-shadow: 0 0 14px rgba(255,246,225,.95), 0 0 4px rgba(255,246,225,.9); }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 18px; }
@media (max-width: 760px) {
  .hero { min-height: 100svh; }
  .hero-art { height: 60%; object-position: 82% 100%;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%); mask-image: linear-gradient(180deg, transparent, #000 30%); }
  .ctas { flex-direction: column; align-items: stretch; width: min(100%, 320px); }
}

/* ---- landing: one picture, a few words ---- */
.feature { padding-block: clamp(36px, 6vw, 72px); }
.feature-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 72px); align-items: center; }
.feature:nth-of-type(even) .feature-art { order: 2; }
.feature-art { position: relative; display: grid; place-items: center; }
.feature-art::before { content: ""; position: absolute; inset: 12% 6% 4%; border-radius: 50%; z-index: 0;
  background: radial-gradient(closest-side, var(--halo, #f6d98f), transparent); opacity: .75; }
.feature-art img { position: relative; width: min(100%, 520px); filter: drop-shadow(0 18px 14px rgba(70,45,20,.22)); }
.feature-art.wide img { width: min(100%, 600px); }
.feature-copy { display: flex; flex-direction: column; gap: 12px; }
.feature-copy .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.feature-copy .eyebrow::before { content: ""; width: 14px; height: 14px; background: var(--red); clip-path: polygon(0 0, 100% 50%, 0 100%); transform: scaleX(-1); }
.chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 2px 14px; font-size: 15px; font-weight: 700; }
.chips b { font-family: var(--display); font-size: 18px; color: var(--red); margin-inline-end: 4px; }
@media (max-width: 760px) {
  .feature-in { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-art { order: 0; }
  .feature-art img { width: min(86%, 400px); }
  .feature-art.wide img { width: min(100%, 460px); }
}
@media (prefers-reduced-motion: no-preference) {
  .feature-art img { animation: floaty 7s ease-in-out infinite; }
  .feature:nth-of-type(even) .feature-art img { animation-delay: -3.5s; }
  @keyframes floaty { 50% { transform: translateY(-10px); } }
  .js .rv { opacity: 0; transform: translateY(26px); transition: opacity .6s, transform .6s; }
  .js .rv.in { opacity: 1; transform: none; }
}

/* ---- landing: every day ---- */
.daily { background: var(--bg-2); }
.daily .section-head { margin-inline: auto; align-items: center; text-align: center; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.tiles li { background: var(--card); border-radius: 18px; padding: 16px 18px 18px; border-bottom: 4px solid var(--line); }
.tiles b { display: block; font-family: var(--display); font-size: 22px; color: var(--firuzeh-dk); }
.tiles span { font-size: 15px; color: var(--ink-dim); line-height: 1.8; display: block; }

/* ---- join band and form ---- */
.join { background: var(--firuzeh-dk); color: #fff; }
.join .section-head { margin-inline: auto; align-items: center; text-align: center; }
.join .eyebrow { color: var(--gold-hi); }
.join .lede { color: #d9f1ee; }
.join-in { max-width: 640px; }
.panel { border-radius: 20px; background: var(--card); color: var(--ink); padding: 18px 20px; border-bottom: 4px solid var(--line); }
.panel p { color: var(--ink-dim); }
.join .panel { border-bottom-color: rgba(0,0,0,.25); }
.prereg { display: flex; flex-direction: column; gap: 10px; }
.prereg label { font-weight: 700; color: var(--ink); }
.prereg-row { display: flex; flex-wrap: wrap; gap: 10px; }
.prereg input { flex: 1 1 240px; min-width: 0; min-height: 52px; font: inherit; font-size: 18px; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 14px; padding: 6px 14px; }
.prereg .btn { --c: var(--gold); --lo: var(--gold-lo); color: var(--ink); }
.prereg .hint { font-size: 14px; color: var(--ink-dim); }
.prereg .msg { font-weight: 700; font-size: 16px; min-height: 1.9em; }
.prereg .msg.ok { color: var(--green); }
.prereg .msg.err { color: var(--err); }
.prereg button[disabled] { filter: grayscale(.6); cursor: progress; }

/* ---- news ---- */
.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.news-item a { display: grid; gap: 2px; text-decoration: none; color: var(--ink); background: var(--card); border-radius: 16px;
  padding: 12px 18px 14px; border-bottom: 4px solid var(--line); }
.news-item time { font-size: 14px; color: var(--firuzeh-dk); font-weight: 700; }
.news-title { font-family: var(--display); font-weight: 800; font-size: 22px; }
.news-sum { color: var(--ink-dim); font-size: 15px; }
.post { padding-block: 40px 72px; max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.post h2 { font-size: 28px; margin-top: 12px; }
.post img { border-radius: 16px; }

/* ---- page head for inner pages ---- */
.page-head { padding-block: clamp(36px, 6vw, 64px) 8px; display: flex; flex-direction: column; gap: 12px; }
.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 14px; }
.prose ul { margin: 0; padding-inline-start: 22px; }

/* ---- footer ---- */
.foot { background: var(--ink); color: #eadcc4; }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 32px var(--gutter-r) calc(32px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.foot-brand { display: flex; gap: 10px; align-items: center; }
.foot-brand img { border-radius: 12px; }
.foot-name { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--gold); line-height: 1.1; }
.foot-line { font-size: 14px; color: #c9b79b; }
.foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.foot-nav a { color: #eadcc4; text-decoration: none; font-size: 15px; }
.foot-nav a:hover { color: var(--gold-hi); }
.foot-bayt { font-size: 15px; line-height: 2.1; color: #c9b79b; border-inline-start: 3px solid var(--gold-lo); padding-inline-start: 12px; }
.foot-bayt span { display: block; font-size: 13px; color: var(--gold); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }
