/* The Dia Fund — shared styles.
   Look: warm and quiet, after the Orendaa template. Libre Baskerville headings,
   Instrument Sans text, cream and soft-gray panels, deep brown pill buttons,
   forest green tags. Logo colors (navy, flame orange, leaf green) stay as accents. */

:root {
    --bg: #ffffff;
    --cream: #f8f4ec;
    --mist: #f2f3f7;
    --surface: #ffffff;
    --ink: #292929;
    --muted: #5a5753;
    --faint: #85817b;
    --brown: #4a1c00;
    --brown-2: #6b2b00;
    --forest: #12450e;
    --flame: #d97706;
    --navy: #1e3a8a;
    --line: #ebe5da;
    --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --wrap: 1180px;
    --r: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
a { color: var(--brown-2); }
img, video { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Header: a floating white pill ---------- */
.site-header { position: sticky; top: 14px; z-index: 50; padding: 0 16px; height: 0; overflow: visible; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 760px; margin: 0 auto; padding: 8px 8px 8px 18px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 999px; box-shadow: 0 10px 30px -14px rgba(40, 20, 0, 0.35); }
.site-header .logo img { display: block; height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: var(--brown-2); }
.site-nav .btn { color: #fff; }
/* Pages without a full-bleed hero: leave room under the floating header */
body:not(.home) main { padding-top: 96px; }

/* ---------- Buttons: brown pill with a round arrow chip ---------- */
.btn { display: inline-flex; white-space: nowrap; align-items: center; gap: 14px; background: var(--brown); color: #fff; text-decoration: none; font: 500 15px/1 var(--sans); padding: 6px 6px 6px 22px; min-height: 46px; border-radius: 999px; border: 0; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }
.btn::after { content: '→'; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--brown); font-size: 16px; transition: transform 0.2s ease; }
.btn:hover { background: var(--brown-2); }
.btn:hover::after { transform: translateX(2px); }
.btn.light { background: #fff; color: var(--ink); }
.btn.light::after { background: var(--brown); color: #fff; }
.btn.light:hover { background: var(--cream); }
.btn-small { min-height: 40px; padding: 5px 5px 5px 18px; font-size: 14px; gap: 10px; }
.btn-small::after { width: 30px; height: 30px; font-size: 14px; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.panel { background: var(--cream); border-radius: 32px; margin: 0 16px; }
.panel.mist { background: var(--mist); }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 500; color: var(--forest); margin-bottom: 12px; }
.section-head { max-width: 660px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 18px; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.section-head.split > div { max-width: 660px; }

/* ---------- Hero: video inside a rounded frame ---------- */
.hero { position: relative; margin: 12px 12px 0; min-height: min(860px, 94vh); border-radius: 32px; overflow: hidden; color: #fff; display: flex; align-items: flex-end; padding: 0;
    background: #2a1406 url(/media/diyas-poster.jpg) center / cover no-repeat; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20, 8, 0, 0.35) 0%, rgba(20, 8, 0, 0.05) 35%, rgba(20, 8, 0, 0.55) 72%, rgba(20, 8, 0, 0.8) 100%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding-bottom: 56px; }
.hero-copy { max-width: 640px; }
.hero h1 { color: #fff; font-size: clamp(42px, 6vw, 74px); line-height: 1.08; margin-bottom: 18px; }
.hero p { color: rgba(255, 255, 255, 0.86); font-size: clamp(17px, 1.5vw, 19px); max-width: 560px; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-card { flex: none; display: flex; gap: 14px; align-items: stretch; width: 340px; padding: 10px; background: #fff; color: var(--ink); border-radius: 20px; text-decoration: none; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.5); transition: transform 0.2s ease; }
.hero-card:hover { transform: translateY(-3px); }
.hero-card img { width: 112px; height: 112px; object-fit: cover; border-radius: 14px; }
.hero-card div { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 4px 2px 0; flex: 1; }
.hero-card b { font: 400 19px/1.3 var(--serif); }
.hero-card small { display: flex; justify-content: space-between; font-size: 13px; color: var(--faint); }

/* ---------- Causes: photo cards ---------- */
.causes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.cause { grid-column: span 2; background: var(--surface); border-radius: var(--r); padding: 10px 10px 22px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(40, 20, 0, 0.04); }
.cause:nth-child(4), .cause:nth-child(5) { grid-column: span 3; }
.cause-photo { position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; margin-bottom: 18px; }
.cause-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.cause:hover .cause-photo img { transform: scale(1.04); }
.cause-top { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 0 12px; margin-bottom: 12px; }
.cause-label { font-size: 12px; font-weight: 500; color: #fff; background: var(--forest); padding: 4px 10px; border-radius: 999px; }
.cause-meta { font-size: 13px; color: var(--faint); }
.cause h3 { font-size: 23px; margin: 0 12px 10px; }
.cause p { color: var(--muted); font-size: 16px; margin: 0 12px 20px; flex-grow: 1; }
.cause-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 12px 0; margin: 0 0; border-top: 1px solid var(--line); }
.cause-actions .more { font-size: 14px; color: var(--muted); text-decoration: none; }
.cause-actions .more:hover { color: var(--brown-2); }

.give-footnote { margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: #fff; border-radius: var(--r); padding: 22px 28px; color: var(--muted); font-size: 15px; }
.give-total { display: flex; align-items: baseline; gap: 12px; padding-right: 24px; border-right: 1px solid var(--line); }
.give-total strong { font: 400 34px/1 var(--serif); color: var(--forest); }

/* ---------- About letter ---------- */
.letter-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.letter-side h2 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 18px; }
.letter-side img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); margin-top: 28px; }
.letter p { font-family: var(--serif); font-size: clamp(19px, 1.8vw, 23px); line-height: 1.7; color: #3a3631; margin-bottom: 22px; }
.letter p:first-child { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.4; color: var(--ink); }
.letter .signoff { font-style: italic; color: var(--brown-2); margin-top: 8px; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.faq-wrap .section-head { position: sticky; top: 110px; margin: 0; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--mist); border-radius: 18px; padding: 0 24px; transition: background 0.2s ease; }
.faq details[open] { background: var(--cream); }
.faq summary { cursor: pointer; list-style: none; font: 400 19px/1.4 var(--serif); color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--brown); font: 400 20px/1 var(--sans); transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--brown); color: #fff; }
.faq details p { color: var(--muted); font-size: 16px; padding-bottom: 22px; margin-top: -6px; }

/* ---------- Say hi form ---------- */
.hello-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.hello-form { display: grid; gap: 16px; background: #fff; border-radius: var(--r); padding: 30px; }
.hello-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hello-form label { display: grid; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.hello-form input, .hello-form textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); color: var(--ink); }
.hello-form input:focus, .hello-form textarea:focus { outline: 2px solid var(--brown-2); outline-offset: 1px; border-color: transparent; background: #fff; }
.hello-form textarea { resize: vertical; }
.hello-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hello-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hello-form button { font-family: var(--sans); }
.hello-form button:disabled { opacity: 0.6; cursor: default; }
.hello-status { font-size: 15px; color: var(--muted); }
.hello-status.ok { color: var(--forest); }
.hello-status.err { color: #b91c1c; }

/* ---------- What's new ---------- */
.post-list { display: grid; gap: 18px; }
.post-card { display: block; background: var(--cream); border-radius: 20px; padding: 26px 28px; text-decoration: none; color: inherit; }
.post-date { font-size: 13px; color: var(--faint); margin-bottom: 6px; }
.post-card h3 { font-size: 22px; margin-bottom: 6px; }
.post-card p { color: var(--muted); font-size: 16px; }

/* ---------- Article pages ---------- */
.article { padding: 64px 0 96px; }
.article .wrap { background: var(--cream); border-radius: 32px; padding: 56px 56px 48px; }
.article h1 { font-size: clamp(34px, 4.4vw, 48px); margin-bottom: 24px; }
.article p, .article li { font-family: var(--serif); font-size: 19px; line-height: 1.75; color: #3a3631; margin-bottom: 20px; }
.article ul { padding-left: 22px; margin-bottom: 20px; }
.article h2 { font-size: 27px; margin: 40px 0 14px; }
main > section > .wrap.narrow { background: var(--cream); border-radius: 32px; padding: 56px; }

/* ---------- Footer: a deep brown panel ---------- */
.site-footer { background: var(--brown); color: rgba(255, 255, 255, 0.78); padding: 64px 0 36px; font-size: 15px; margin: 16px 16px 16px; border-radius: 32px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.site-footer img { width: 220px; height: auto; display: block; margin-bottom: 14px; }
.site-footer p { font-family: var(--serif); font-style: italic; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 48px; }
.footer-note { width: 100%; max-width: 62ch; font-family: var(--sans, inherit); font-style: normal !important; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.footer-credit { width: 100%; border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 22px; margin-top: 18px; color: rgba(255, 255, 255, 0.55); font-size: 13px; }

/* ---------- Entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
    .js .rise { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
    .js .rise.in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .hero .wrap { flex-direction: column; align-items: flex-start; }
    .hero-card { width: 100%; max-width: 420px; }
    .causes { grid-template-columns: 1fr 1fr; }
    .cause, .cause:nth-child(4), .cause:nth-child(5) { grid-column: span 1; }
    .cause:nth-child(5) { grid-column: span 2; }
    .letter-wrap, .faq-wrap, .hello-wrap { grid-template-columns: 1fr; gap: 32px; }
    .faq-wrap .section-head { position: static; }
    .letter-side img { display: none; }
}
@media (max-width: 680px) {
    body { font-size: 16px; }
    section { padding: 64px 0; }
    .wrap { padding: 0 18px; }
    .panel { margin: 0 8px; border-radius: 24px; }
    .site-header { top: 10px; padding: 0 10px; }
    .site-header .wrap { padding: 6px 6px 6px 14px; }
    .site-header .logo img { height: 34px; }
    .site-nav { gap: 14px; }
    .site-nav .nav-hide { display: none; }
    .hero { margin: 8px 8px 0; border-radius: 24px; min-height: 88vh; }
    .hero .wrap { padding-bottom: 28px; }
    .hero::before { background: linear-gradient(180deg, rgba(20, 8, 0, 0.35) 0%, rgba(20, 8, 0, 0.2) 25%, rgba(20, 8, 0, 0.72) 50%, rgba(20, 8, 0, 0.88) 100%); }
    .hero-ctas .btn { white-space: nowrap; }
    .hero-card img { width: 88px; height: 88px; }
    .causes { grid-template-columns: 1fr; }
    .cause, .cause:nth-child(4), .cause:nth-child(5) { grid-column: span 1; }
    .give-footnote { grid-template-columns: 1fr; padding: 20px; }
    .give-total { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
    .hello-form { padding: 20px; }
    .hello-row { grid-template-columns: 1fr; }
    .article .wrap, main > section > .wrap.narrow { padding: 32px 22px; border-radius: 24px; }
    .article p, .article li, .letter p { font-size: 18px; }
    .site-footer { margin: 8px; border-radius: 24px; padding: 48px 0 28px; }
}

.skip-link {
    position: absolute;
    left: 0;
    top: -100px;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #000;
    z-index: 1000;
}
.skip-link:focus {
    top: 0;
}
