/* ==========================================================================
   SESI — Solar Energy Society of India
   Redesign. Brand-derived palette (solar gold + crimson), daylight surfaces.
   ========================================================================== */

/* ---------- 1. Type ---------- */
@font-face { font-family: "Familjen Grotesk"; src: url("../fonts/familjen-grotesk-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("../fonts/familjen-grotesk-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("../fonts/familjen-grotesk-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Chivo"; src: url("../fonts/chivo-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Chivo"; src: url("../fonts/chivo-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- 2. Tokens ---------- */
:root {
  --paper: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #ecede9;
  --ink: #141018;
  --ink-soft: #5b5663;
  --line: rgba(20, 16, 24, 0.14);
  --line-strong: rgba(20, 16, 24, 0.28);
  --crimson: #d60048;
  --crimson-dark: #a80039;
  --accent-text: #c20040;
  --gold: #f2c200;
  --gold-deep: #d9a900;
  --gold-ink: #7d6200;
  --deep: #17111b;
  --on-deep: #f4f1ea;
  --deep-soft: rgba(244, 241, 234, 0.68);
  --deep-line: rgba(244, 241, 234, 0.16);
  --glass: rgba(245, 245, 242, 0.82);
  --shadow: 0 30px 70px -40px rgba(20, 16, 24, 0.5);
  --shadow-sm: 0 14px 34px -24px rgba(20, 16, 24, 0.5);

  --font-display: "Familjen Grotesk", system-ui, sans-serif;
  --font-brand: "Chivo", system-ui, sans-serif;
  --font-sans: "Archivo", system-ui, sans-serif;

  --t-hero: clamp(2.4rem, 5.6vw, 5.2rem);
  --t-h2: clamp(1.9rem, 3.8vw, 3.2rem);
  --t-h3: clamp(1.15rem, 1.8vw, 1.5rem);
  --t-body: 1.0625rem;

  --container: 1280px;
  --gutter: clamp(1.25rem, 4.5vw, 3.25rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --header-h: 6.5rem;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --paper: #120e16;
  --surface: #1b1520;
  --surface-2: #221b28;
  --ink: #f4f1ea;
  --ink-soft: #b3aab8;
  --line: rgba(244, 241, 234, 0.16);
  --line-strong: rgba(244, 241, 234, 0.3);
  --glass: rgba(18, 14, 22, 0.82);
  --shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.8);
  --deep: #0c0910;
  --accent-text: #ff7aa8;
  --gold-ink: #f2c200;
}

/* ---------- 3. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.5rem); -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.22em; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--crimson); color: #fff; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 3px solid var(--paper); border-radius: 999px; }

/* ---------- 4. Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); scroll-margin-top: 0.5rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--font-display); font-size: 0.936rem; font-weight: 600;
  line-height: 1.1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 0.64em; height: 0.64em; flex: none; background: var(--gold); border-radius: 50%; }
.section__title { font-size: var(--t-h2); line-height: 1.02; max-width: 20ch; text-wrap: balance; margin-top: 0.9rem; }
.section__sub { color: var(--ink-soft); font-size: 1.06rem; max-width: 52ch; margin-top: 0.9rem; }
.lead { font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.45; max-width: 38ch; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--crimson); color: #fff; padding: 0.7rem 1.1rem; border-radius: var(--r-pill); font-size: 0.9rem; text-decoration: none; transition: top 0.25s var(--ease); }
.skip-link:focus { top: 1rem; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; line-height: 1;
  white-space: nowrap; text-decoration: none; border: 1px solid transparent; border-radius: var(--r-pill);
  padding: 0.95rem 1.05rem 0.95rem 1.4rem; cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn__icon { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; flex: none; transition: transform 0.4s var(--ease); }
.btn:hover .btn__icon { transform: translate(2px, -2px); }
.btn--primary { background: var(--crimson); color: #fff; }
.btn--primary:hover { background: var(--crimson-dark); box-shadow: var(--shadow-sm); }
.btn--primary .btn__icon { background: rgba(255, 255, 255, 0.2); }
.btn--sun { background: var(--gold); color: #241c00; }
.btn--sun:hover { background: var(--gold-deep); }
.btn--sun .btn__icon { background: rgba(36, 28, 0, 0.14); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--crimson); color: var(--crimson); }
.btn--ghost .btn__icon { background: var(--surface-2); }
.btn--ondeep { background: var(--on-deep); color: var(--deep); }
.btn--ondeep:hover { background: #fff; }
.btn--ondeep .btn__icon { background: rgba(23, 17, 27, 0.12); }
.btn--wide { width: 100%; justify-content: space-between; }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 6. Header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding: clamp(0.6rem, 1.4vw, 1rem) clamp(0.75rem, 3vw, 1.5rem); pointer-events: none; }
.site-header .nav {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 1500px; margin-inline: auto; padding: 0.55rem 0.55rem 0.55rem 1.1rem;
  border-radius: var(--r-pill); border: 1px solid transparent; background: transparent;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.site-header.is-scrolled .nav { background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border-color: var(--line); box-shadow: var(--shadow-sm); }
.brand { display: inline-flex; align-items: center; gap: 0.46em; text-decoration: none; font-size: clamp(1.05rem, calc(-1.03rem + 3.31vw), 1.95rem); }
.brand__mark { width: 2.667em; height: 2.667em; flex: none; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.02; }
.brand__name { font-family: var(--font-brand); font-weight: 700; font-size: 1em; letter-spacing: -0.01em; }
.brand__sub { font-size: 0.538em; color: var(--ink-soft); letter-spacing: 0.02em; }
.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__links a { position: relative; text-decoration: none; font-family: var(--font-display); font-size: 1.14rem; font-weight: 500; color: var(--ink); padding-block: 0.3rem; white-space: nowrap; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--crimson); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.nav__links a:hover { color: var(--crimson); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: border-color 0.3s var(--ease), transform 0.4s var(--ease); }
.theme-toggle:hover { border-color: var(--crimson); transform: rotate(-14deg); }
.theme-toggle .ic { width: 1.1rem; height: 1.1rem; }
[data-theme="light"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
.menu-toggle { display: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; place-items: center; }
.menu-toggle__bars { display: grid; gap: 5px; width: 18px; }
.menu-toggle__bars i { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.25s var(--ease); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 7. Mobile menu ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; justify-content: center; gap: 2rem; padding: 6rem var(--gutter) 3rem; background: var(--paper); animation: menuIn 0.4s var(--ease) both; }
.mobile-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; } to { opacity: 1; } }
.mobile-menu__links { display: grid; gap: 0.2rem; }
.mobile-menu__links a { font-family: var(--font-display); font-size: clamp(1.8rem, 8vw, 2.6rem); line-height: 1.12; text-decoration: none; color: var(--ink); opacity: 0; animation: linkIn 0.5s var(--ease) forwards; }
.mobile-menu__links a:nth-child(1) { animation-delay: 0.04s; }
.mobile-menu__links a:nth-child(2) { animation-delay: 0.09s; }
.mobile-menu__links a:nth-child(3) { animation-delay: 0.14s; }
.mobile-menu__links a:nth-child(4) { animation-delay: 0.19s; }
.mobile-menu__links a:nth-child(5) { animation-delay: 0.24s; }
.mobile-menu__links a:nth-child(6) { animation-delay: 0.29s; }
@keyframes linkIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.mobile-menu__foot { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }
body.menu-open { overflow: hidden; }

/* ---------- 8. Hero ---------- */
.hero { position: relative; padding-top: clamp(7.5rem, 10.5vw, 10rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); overflow: clip; }
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.08fr 0.92fr; min-height: min(62vh, 580px); } }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(1.1rem, 2.2vw, 1.6rem); }
.hero__title { font-size: var(--t-hero); line-height: 0.98; letter-spacing: -0.03em; max-width: 15ch; text-wrap: balance; }
.hero__title em { font-style: normal; color: var(--crimson); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.3rem; margin-top: 0.3rem; }
.hero__media { position: relative; }
.hero__frame { position: relative; margin: 0; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 3.6; border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 900px) { .hero__frame { aspect-ratio: 4 / 4.3; } }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__frame figcaption { position: absolute; left: 0.9rem; bottom: 0.9rem; z-index: 2; font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: rgba(20, 12, 22, 0.62); border: 1px solid rgba(255, 255, 255, 0.24); border-radius: var(--r-pill); padding: 0.32rem 0.75rem; }

.factbar { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: clamp(2.5rem, 5vw, 4rem); padding: 0; }
@media (min-width: 700px) { .factbar { grid-template-columns: repeat(4, 1fr); } }
.factbar li { padding: 1.15rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.15rem; }
@media (min-width: 700px) { .factbar li { border-bottom: 0; padding-right: 1.5rem; } .factbar li + li { border-left: 1px solid var(--line); padding-left: 1.5rem; } }
.factbar b { display: inline-flex; align-items: center; gap: 0.45em; font-family: var(--font-display); font-size: 1.5rem; }
.factbar li > span { font-size: 0.984rem; color: var(--ink-soft); }

/* fact-bar icons + motion */
.factbar__ises { height: 1.2em; width: auto; display: inline-block; }
.factbar__ises--dark { display: none; }
[data-theme="dark"] .factbar__ises--light { display: none; }
[data-theme="dark"] .factbar__ises--dark { display: inline-block; }
.factbar__gate { width: 1.35em; height: auto; color: var(--gold); flex: none; }

.js .factbar li { opacity: 0; transform: translateY(14px); transition: opacity 0.99s var(--ease), transform 0.99s var(--ease); transition-delay: calc(var(--i, 0) * 162ms); }
.js .factbar.is-revealed li { opacity: 1; transform: none; }

.factbar.is-revealed .factbar__ises { animation: isesIn 1.62s var(--ease) 0.72s both, isesGlow 9.9s ease-in-out 2.88s infinite; }
@keyframes isesIn { from { opacity: 0; transform: scale(0.5) rotate(-18deg); } to { opacity: 1; transform: none; } }
@keyframes isesGlow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(242, 194, 0, 0)); } 50% { filter: drop-shadow(0 0 7px rgba(242, 194, 0, 0.55)); } }

.factbar__gate path { stroke-dasharray: 100; stroke-dashoffset: 100; }
.factbar.is-revealed .factbar__gate { animation: gateFloat 8.1s ease-in-out 4.68s infinite; }
.factbar.is-revealed .factbar__gate path { animation: gateDraw 1.98s var(--ease) forwards; }
.factbar.is-revealed .factbar__gate path:nth-child(1) { animation-delay: 1.26s; }
.factbar.is-revealed .factbar__gate path:nth-child(2) { animation-delay: 1.53s; }
.factbar.is-revealed .factbar__gate path:nth-child(3) { animation-delay: 1.8s; }
.factbar.is-revealed .factbar__gate path:nth-child(4) { animation-delay: 2.07s; }
@keyframes gateDraw { to { stroke-dashoffset: 0; } }
@keyframes gateFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

/* ---------- 9. About ---------- */
.about__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 860px) { .about__grid { grid-template-columns: 0.9fr 1.1fr; } }
.about__media { margin: 0; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__body { display: grid; gap: 1.1rem; }
.about__body p { color: var(--ink-soft); max-width: 60ch; }
.about__body strong { color: var(--ink); font-weight: 600; }

/* ---------- 10. Focus (pillars) ---------- */
.focus__grid { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .focus__grid { grid-template-columns: 1fr 1fr; } }
.pillar { padding: clamp(1.6rem, 3vw, 2.4rem) 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.6rem; }
@media (min-width: 760px) { .pillar { padding-right: clamp(1.5rem, 4vw, 3rem); } .pillar:nth-child(odd) { padding-right: clamp(1.5rem, 4vw, 3rem); } .pillar:nth-child(even) { border-left: 1px solid var(--line); padding-left: clamp(1.5rem, 4vw, 3rem); } }
.pillar__idx { font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; color: var(--accent-text); letter-spacing: 0.1em; }
.pillar h3 { font-size: var(--t-h3); }
.pillar p { color: var(--ink-soft); font-size: 1rem; max-width: 44ch; }

/* ---------- 11. Activities ---------- */
.activities { background: var(--surface-2); }
.activities__grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 860px) { .activities__grid { grid-template-columns: repeat(12, 1fr); } }
.act { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.4rem, 2.5vw, 2rem); display: flex; flex-direction: column; gap: 0.7rem; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.act:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.act h3 { font-size: 1.2rem; }
.act p { color: var(--ink-soft); font-size: 0.96rem; }
.act--wide { grid-column: span 12; }
@media (min-width: 860px) { .act--a { grid-column: span 7; } .act--b { grid-column: span 5; } .act--c { grid-column: span 5; } .act--d { grid-column: span 7; } .act--e { grid-column: span 6; } .act--f { grid-column: span 6; } }
.act__tag { align-self: flex-start; font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-ink); background: color-mix(in srgb, var(--gold) 22%, transparent); border-radius: var(--r-pill); padding: 0.25rem 0.65rem; }

/* ---------- 12. Membership ---------- */
.member__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 900px) { .member__grid { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.member__list { list-style: none; display: grid; gap: 0.5rem; padding: 0; }
.member__list li { display: flex; align-items: baseline; gap: 0.7rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.member__list li::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 2px; background: var(--crimson); }
.member__list b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.member__list span { color: var(--ink-soft); font-size: 0.95rem; }
.member__benefits { background: var(--deep); color: var(--on-deep); border-radius: var(--r-xl); padding: clamp(1.6rem, 3vw, 2.4rem); display: grid; gap: 1rem; }
.member__benefits h3 { color: var(--on-deep); font-size: 1.4rem; }
.member__benefits ul { list-style: none; display: grid; gap: 0.7rem; padding: 0; }
.member__benefits li { display: flex; gap: 0.7rem; color: var(--deep-soft); font-size: 0.98rem; }
.member__benefits li::before { content: ""; width: 7px; height: 7px; margin-top: 0.5rem; flex: none; border-radius: 50%; background: var(--gold); }
.member__benefits .btn { margin-top: 0.4rem; justify-self: start; }

/* ---------- 13. Publications + Events ---------- */
.split__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 860px) { .split__grid { grid-template-columns: 1fr 1fr; } }
.card { border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.6rem, 3vw, 2.4rem); display: grid; gap: 0.8rem; align-content: start; }
.card--gold { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); }
.card h3 { font-size: 1.5rem; }
.card p { color: var(--ink-soft); max-width: 46ch; }
.card .meta { font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.event { display: flex; gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.event__date { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--accent-text); min-width: 7.5rem; }
.event__title { font-weight: 600; }
.event__note { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- 14. Closing band + contact ---------- */
.band { background: var(--deep); color: var(--on-deep); padding-block: clamp(4rem, 8vw, 6.5rem); }
.band__grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .band__grid { grid-template-columns: 1fr auto; gap: 3rem; } }
.band__title { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.02; max-width: 18ch; color: var(--on-deep); text-wrap: balance; }
.band__title em { font-style: normal; color: var(--gold); }
.band__sub { color: var(--deep-soft); max-width: 46ch; margin-top: 1rem; }

.contact { background: var(--deep); color: var(--on-deep); padding-block: clamp(3.5rem, 7vw, 5.5rem); border-top: 1px solid var(--deep-line); }
.contact__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 820px) { .contact__grid { grid-template-columns: 1fr 1fr; } }
.contact h3 { color: var(--on-deep); font-size: 1.6rem; margin-bottom: 1.2rem; }
.contact dl { display: grid; gap: 1.3rem; }
.contact dt { font-family: var(--font-display); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--deep-soft); margin-bottom: 0.35rem; }
.contact dd { font-size: 1.02rem; line-height: 1.55; }
.contact a { color: var(--on-deep); text-decoration: none; border-bottom: 1px solid var(--deep-line); transition: border-color 0.3s var(--ease), color 0.3s var(--ease); }
.contact a:hover { color: var(--gold); border-color: var(--gold); }
.socials { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.socials a { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--deep-line); border-radius: var(--r-pill); padding: 0.55rem 1rem; font-size: 0.92rem; text-decoration: none; color: var(--on-deep); border-bottom: 1px solid var(--deep-line); transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease); }
.socials a:hover { color: var(--gold); border-color: var(--gold); background: rgba(244, 241, 234, 0.06); }

.site-footer { background: var(--deep); color: var(--deep-soft); padding-block: 2.5rem; border-top: 1px solid var(--deep-line); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--deep-soft); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* ---------- 15. Motion ---------- */
.js [data-reveal] { opacity: 0; }
.js [data-reveal="rise"] { transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- 16. Responsive ---------- */
@media (max-width: 1439px) { .nav__links { gap: 1rem; } }
@media (max-width: 1099px) {
  .nav__links { display: none; }
  .menu-toggle { display: grid; }
  .nav__actions .btn { font-size: 0.85rem; padding: 0.6rem 0.6rem 0.6rem 1rem; gap: 0.4rem; }
  .nav__actions .btn__icon { width: 1.5rem; height: 1.5rem; }
  .nav__actions .btn__icon .ic { width: 0.8rem; height: 0.8rem; }
}
@media (max-width: 560px) {
  .brand__sub { display: none; }
  .brand { font-size: 1.2rem; }
  .site-header .nav { padding-left: 0.7rem; gap: 0.4rem; }
  .nav__actions { gap: 0.3rem; }
  .hero { padding-top: 6rem; }
}
@media (max-width: 400px) {
  .nav__actions .btn span:first-child { display: none; }
  .nav__actions .btn { padding: 0.6rem; }
}
@media (max-width: 640px) {
  .container { padding-inline: 1.15rem; }
  .section { padding-block: clamp(3rem, 9vw, 4rem); }
  .hero { padding-top: 7.5rem; }
}

/* ---------- 17. Motion ---------- */
.hero__grid { position: relative; z-index: 1; }
.hero__rays { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero__rays svg { position: absolute; top: -26%; right: -18%; width: min(62vw, 760px); height: auto; opacity: 0.08; transform-origin: 6% 92%; animation: rayspin 120s linear infinite; }
[data-theme="dark"] .hero__rays svg { opacity: 0.16; }
@keyframes rayspin { to { transform: rotate(360deg); } }

.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.95rem 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee__track { display: flex; gap: 3rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { display: inline-flex; align-items: center; gap: 3rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 1.9vw, 1.55rem); letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); }
.marquee span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.marquee__track span:nth-child(even) { color: var(--accent-text); }
.marquee__track span:nth-child(even)::after { background: var(--crimson); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 18. Sub-pages: page hero ---------- */
.nav__links a.is-active, .nav__links a[aria-current="page"] { color: var(--accent-text); }
.nav__links a.is-active::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }

.page-hero { padding-top: clamp(7.5rem, 10.5vw, 10.5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.page-hero__inner { display: grid; gap: 1.15rem; max-width: 64ch; }
.page-hero h1 { font-size: clamp(2.35rem, 5.4vw, 4.6rem); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.page-hero h1 em { font-style: normal; color: var(--accent-text); }
.page-hero p { color: var(--ink-soft); font-size: clamp(1.05rem, 1.6vw, 1.28rem); max-width: 56ch; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.3rem; }
.pill { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 0.42rem 0.95rem; font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* ---------- 19. Timeline ---------- */
.timeline { list-style: none; padding: 0; display: grid; border-top: 1px solid var(--line); }
.timeline li { display: grid; gap: 0.35rem 1.6rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .timeline li { grid-template-columns: 10rem 1fr; } }
.timeline b { font-family: var(--font-display); font-weight: 600; color: var(--accent-text); font-size: 1.05rem; }
.timeline h3 { font-size: 1.12rem; margin-bottom: 0.25rem; }
.timeline p { color: var(--ink-soft); font-size: 0.98rem; max-width: 62ch; }

/* ---------- 20. Journal ---------- */
.journal { display: grid; gap: 1.6rem; align-items: center; }
@media (min-width: 760px) { .journal { grid-template-columns: 230px 1fr; gap: clamp(1.6rem, 4vw, 3rem); } }
.journal__cover { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-lg); background: var(--deep); color: var(--on-deep); padding: 1.4rem; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); overflow: hidden; }
.journal__cover::after { content: ""; position: absolute; right: -28%; bottom: -22%; width: 78%; aspect-ratio: 1; background: radial-gradient(circle at 32% 32%, var(--gold), transparent 68%); opacity: 0.55; }
.journal__cover img { width: 2.8rem; height: 2.8rem; position: relative; z-index: 1; }
.journal__cover b { position: relative; z-index: 1; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; letter-spacing: -0.01em; }
.journal__cover em { position: relative; z-index: 1; display: block; font-style: normal; font-size: 0.78rem; color: var(--deep-soft); margin-top: 0.4rem; }
.journal__body { display: grid; gap: 0.9rem; }
.journal__body p { color: var(--ink-soft); max-width: 56ch; }

/* ---------- 21. Category cards ---------- */
.cats-grid { display: grid; gap: 1rem; }
@media (min-width: 620px) { .cats-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .cats-grid { grid-template-columns: repeat(3, 1fr); } }
.cat { display: grid; gap: 0.45rem; align-content: start; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; background: var(--surface); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease); }
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.cat__k { font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-text); }
.cat h3 { font-size: 1.12rem; }
.cat p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- 22. Steps ---------- */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1.35rem; }
.steps li { position: relative; padding-left: 3.4rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -0.2rem; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; background: var(--deep); color: var(--gold); font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }
.steps h3 { font-size: 1.12rem; margin-bottom: 0.25rem; }
.steps p { color: var(--ink-soft); font-size: 0.98rem; max-width: 60ch; }

/* ---------- 23. Event cards ---------- */
.eventcards { display: grid; gap: 1.2rem; }
@media (min-width: 780px) { .eventcards { grid-template-columns: 1fr 1fr; } }
.eventcard { display: grid; gap: 0.65rem; align-content: start; border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.4rem, 3vw, 2.1rem); background: var(--surface); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.eventcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.eventcard h3 { font-size: 1.35rem; }
.eventcard p { color: var(--ink-soft); font-size: 0.98rem; }
.eventcard__when { font-family: var(--font-display); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.eventcard--feature { grid-column: 1 / -1; background: var(--deep); color: var(--on-deep); border-color: transparent; }
.eventcard--feature h3 { color: var(--on-deep); font-size: clamp(1.5rem, 3vw, 2.1rem); }
.eventcard--feature p { color: var(--deep-soft); max-width: 62ch; }
.eventcard--feature .eventcard__when { color: var(--gold); }
.kripa { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--deep-line); border-radius: var(--r-lg); overflow: hidden; margin-top: 1.3rem; }
.kripa div { padding: 1.05rem 1.15rem; border-right: 1px solid var(--deep-line); }
.kripa div:last-child { border-right: 0; }
.kripa b { display: block; font-family: var(--font-display); color: var(--gold); font-size: 1.02rem; }
.kripa span { font-size: 0.84rem; color: var(--deep-soft); }

/* ---------- 24. Notice + form ---------- */
.notice { position: relative; display: flex; gap: 0.95rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.25rem 1.1rem 1.35rem; background: var(--surface); color: var(--ink-soft); font-size: 0.95rem; }
.notice::before { content: ""; position: absolute; left: 0.5rem; top: 1.1rem; bottom: 1.1rem; width: 3px; border-radius: 3px; background: var(--gold); }
.notice strong { color: var(--ink); font-weight: 600; }

.form { display: grid; gap: 1.15rem; }
.form__row { display: grid; gap: 1.15rem; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field > label { font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink); font-size: 1rem; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.field textarea { min-height: 7rem; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2.6rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--crimson); box-shadow: 0 0 0 3px color-mix(in srgb, var(--crimson) 18%, transparent); }
.field [aria-invalid="true"] { border-color: var(--crimson); }
.field__hint { font-size: 0.82rem; color: var(--ink-soft); }
.field__err { font-size: 0.82rem; color: var(--accent-text); }
.field--check { grid-template-columns: auto 1fr; align-items: flex-start; gap: 0.7rem; }
.field--check input { width: auto; margin-top: 0.3rem; }
.field--check label { font-family: var(--font-sans); font-weight: 400; letter-spacing: 0; font-size: 0.9rem; color: var(--ink-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { border-radius: var(--r); padding: 0.9rem 1.1rem; font-size: 0.95rem; display: none; }
.form__status.is-error { display: block; background: color-mix(in srgb, var(--crimson) 12%, transparent); color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--crimson) 38%, transparent); }
.form__status.is-ok { display: block; background: color-mix(in srgb, #2e7d32 15%, transparent); color: #1c5e21; border: 1px solid color-mix(in srgb, #2e7d32 38%, transparent); }
[data-theme="dark"] .form__status.is-ok { color: #8fe39a; }
.form button[type="submit"] { justify-self: start; }
.form__foot { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- 25. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__rays svg { animation: none; }
  .marquee__track { animation: none; }
  .js .factbar li { opacity: 1 !important; transform: none !important; }
  .factbar li, .factbar__ises, .factbar__gate { animation: none !important; }
  .factbar__gate path { stroke-dashoffset: 0 !important; }
}
