/* ==========================================================================
   RIMAS - Research Institute of Meteorology and Atmospheric Science
   Shared stylesheet (RTL, responsive). Fonts and icons are served locally
   from this folder, so the template works fully offline.
   ========================================================================== */

/* ---- Local font --------------------------------------------------------- */
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("vazirmatn.woff2") format("woff2");
}

/* ---- Design tokens ------------------------------------------------------ */
:root {
  --ink: oklch(23% .035 235);
  --muted: oklch(47% .025 235);
  --paper: oklch(98% .012 220);
  --surface: oklch(100% .008 220);
  --line: oklch(88% .025 220);
  --navy: oklch(31% .105 235);
  --blue: oklch(52% .15 225);
  --cyan: oklch(72% .12 190);
  --sand: oklch(84% .09 78);
  --accent: oklch(64% .16 180);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 18px 45px oklch(20% .04 235 / .09);
}

/* ---- Base --------------------------------------------------------------- */
* {
  box-sizing: border-box;
  font-family: Vazirmatn, system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Vazirmatn, system-ui, sans-serif;
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* ---- Layout ------------------------------------------------------------- */
.container {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
}

/* ---- Topbar ------------------------------------------------------------- */
.topbar {
  background: var(--navy);
  color: oklch(95% .02 220);
  font-size: .78rem;
}

.topbar-inner {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-links {
  display: flex;
  gap: 20px;
  opacity: .9;
}

/* ---- Header ------------------------------------------------------------- */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.head-main {
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 25px;
}

/* ---- Brand -------------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 290px;
}

.brand-logo {
  width: 62px;
  height: 56px;
  object-fit: contain;
  flex: none;
}

.brand-copy {
  line-height: 1.25;
}

.brand-copy strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
}

.brand-copy small {
  display: block;
  color: var(--muted);
  font-size: .64rem;
  margin-top: 4px;
  line-height: 1.4;
}

/* ---- Main navigation ---------------------------------------------------- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  border: 0;
  background: none;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--ink);
  font-size: .86rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: .2s;
  text-align: center;
}

.nav-link:hover,
.nav-item:focus-within .nav-link,
.nav-link.current {
  background: oklch(94% .025 220);
  color: var(--blue);
}

.nav-link .chev {
  width: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--navy);
  transition: .2s;
}

.icon-btn:hover {
  background: var(--navy);
  color: var(--cyan);
  transform: translateY(-2px);
}

.lang {
  position: relative;
}

.lang-menu {
  position: absolute;
  top: 48px;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 7px;
  min-width: 124px;
  display: none;
}

.lang:hover .lang-menu,
.lang:focus-within .lang-menu {
  display: block;
}

.lang-menu a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: .8rem;
}

.lang-menu a:hover {
  background: oklch(94% .025 220);
}

/* ---- Mega menu ---------------------------------------------------------- */
.mega {
  position: absolute;
  right: 50%;
  transform: translate(50%, 10px);
  top: 48px;
  width: min(750px, calc(100vw - 30px));
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .22s var(--ease);
}

.nav-item:hover .mega,
.nav-item:focus-within .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(50%, 0);
}

.mega-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
}

.mega-list {
  display: grid;
  gap: 4px;
  border-left: 1px solid var(--line);
  padding-left: 12px;
  align-content: start;
}

.mega-list a {
  padding: 9px 11px;
  border-radius: 8px;
  font-size: .82rem;
  color: var(--muted);
  transition: .2s;
}

.mega-list a:hover {
  background: oklch(94% .03 220);
  color: var(--blue);
  padding-right: 16px;
}

.mega-content {
  background: oklch(96% .018 220);
  border-radius: 12px;
  padding: 23px;
  min-height: 180px;
}

.mega-content h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--navy);
}

.mega-content p {
  color: var(--muted);
  font-size: .85rem;
  margin: 0;
  max-width: 44ch;
}

.mega-stat {
  margin-top: 18px;
  display: flex;
  gap: 22px;
  font-size: .72rem;
  color: var(--muted);
}

.mega-stat b {
  display: block;
  color: var(--blue);
  font-size: 1.15rem;
}

/* ---- Header search panel ------------------------------------------------ */
.search-panel {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--surface);
  align-items: center;
  z-index: 3;
}

.search-panel.open {
  display: flex;
}

.search-inner {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-inner input {
  flex: 1;
  border: 0;
  border-bottom: 2px solid var(--navy);
  background: none;
  padding: 12px 3px;
  outline: 0;
  font-size: 1.15rem;
}

.close-search {
  border: 0;
  background: none;
  color: var(--muted);
}

/* ---- Mobile drawer ------------------------------------------------------ */
.mobile-toggle {
  display: none;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
}

.drawer.open {
  visibility: visible;
}

.drawer-veil {
  position: absolute;
  inset: 0;
  background: oklch(20% .05 235 / .5);
  opacity: 0;
  transition: .3s;
}

.drawer.open .drawer-veil {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: var(--surface);
  padding: 20px;
  overflow: auto;
  transform: translateX(100%);
  transition: .4s var(--ease);
}

.drawer.open .drawer-panel {
  transform: none;
}

.drawer-panel h4 {
  margin: 22px 0 6px;
  font-size: .72rem;
  color: var(--blue);
  letter-spacing: .06em;
}

.drawer-panel a {
  display: block;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: .87rem;
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  min-height: 585px;
  background: var(--navy);
  color: oklch(97% .02 220);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, oklch(52% .15 225 / .38), transparent 35%),
    radial-gradient(circle at 20% 80%, oklch(72% .12 190 / .14), transparent 30%);
}

.slides {
  position: relative;
  min-height: 585px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .85s var(--ease);
}

.slide.active {
  opacity: 1;
  visibility: visible;
}

.slide-tint {
  position: absolute;
  inset: 0;
}

.slide[data-tone="dust"] .slide-tint {
  background: radial-gradient(circle at 72% 32%, oklch(70% .11 72 / .32), transparent 42%);
}

.slide[data-tone="ocean"] .slide-tint {
  background: radial-gradient(circle at 25% 70%, oklch(62% .13 200 / .3), transparent 40%);
}

.slide[data-tone="air"] .slide-tint {
  background: radial-gradient(circle at 60% 25%, oklch(66% .1 260 / .28), transparent 44%);
}

.slide[data-tone="crop"] .slide-tint {
  background: radial-gradient(circle at 30% 30%, oklch(72% .12 150 / .24), transparent 42%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
  min-height: 585px;
}

.eyebrow {
  color: var(--cyan);
  font-size: .8rem;
  letter-spacing: .08em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--cyan);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.7vw, 4.1rem);
  line-height: 1.22;
  letter-spacing: -.04em;
  margin: 18px 0 20px;
  max-width: 13ch;
}

.hero p {
  color: oklch(82% .035 225);
  max-width: 49ch;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 17px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .85rem;
  transition: .25s var(--ease);
}

.btn-primary {
  background: var(--cyan);
  color: var(--navy);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px oklch(72% .12 190 / .2);
}

.btn-ghost {
  border-color: oklch(100% .02 220 / .25);
  color: oklch(95% .02 220);
}

.btn-ghost:hover {
  background: oklch(100% .02 220 / .1);
}

.btn-line {
  border-color: var(--line);
  color: var(--blue);
}

.btn-line:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

/* ---- Hero artwork ------------------------------------------------------- */
.hero-art {
  height: 395px;
  position: relative;
}

.orbit {
  position: absolute;
  border: 1px solid oklch(90% .03 220 / .3);
  border-radius: 50%;
  inset: 35px 15px 20px 15px;
  transform: rotate(-18deg);
}

.orbit.two {
  inset: 78px -5px 65px 5px;
  transform: rotate(28deg);
}

.globe {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  right: 18%;
  top: 16%;
  background: radial-gradient(circle at 35% 28%, oklch(85% .04 190), oklch(56% .16 225) 52%, oklch(30% .11 235));
  box-shadow: inset -24px -20px 45px oklch(15% .08 235 / .35), 0 0 90px oklch(60% .16 215 / .25);
  animation: spin 26s linear infinite;
}

.globe::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid oklch(100% .02 220 / .3);
  border-radius: 50%;
  transform: skewY(-20deg);
}

.globe::after {
  content: "";
  position: absolute;
  inset: 47px 0;
  border-top: 1px solid oklch(100% .02 220 / .27);
  border-bottom: 1px solid oklch(100% .02 220 / .27);
  border-radius: 50%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.cloud {
  position: absolute;
  left: 5%;
  bottom: 50px;
  color: var(--cyan);
  opacity: .85;
  animation: drift 9s ease-in-out infinite alternate;
}

.cloud svg {
  width: 180px;
  height: 110px;
}

@keyframes drift {
  to {
    transform: translateX(26px);
  }
}

.data-chip {
  position: absolute;
  right: 3%;
  bottom: 22px;
  background: oklch(22% .08 235 / .72);
  border: 1px solid oklch(100% .02 220 / .18);
  border-radius: 12px;
  padding: 12px 15px;
  font-size: .73rem;
  color: oklch(88% .04 220);
  backdrop-filter: blur(8px);
}

.data-chip strong {
  display: block;
  color: var(--cyan);
  font-size: 1rem;
}

/* ---- Hero scenes -------------------------------------------------------- */
.dust-scene,
.ocean-scene,
.air-scene,
.crop-scene {
  position: absolute;
  inset: 0;
}

.dust-band {
  position: absolute;
  left: -10%;
  right: -10%;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, oklch(74% .1 74 / .5), transparent);
  filter: blur(9px);
  animation: sweep 7s ease-in-out infinite alternate;
}

.dust-band:nth-child(1) {
  top: 26%;
  animation-duration: 6s;
}

.dust-band:nth-child(2) {
  top: 44%;
  animation-duration: 8s;
  animation-direction: alternate-reverse;
}

.dust-band:nth-child(3) {
  top: 60%;
  animation-duration: 9.5s;
}

@keyframes sweep {
  from {
    transform: translateX(-6%) scaleY(.85);
  }
  to {
    transform: translateX(6%) scaleY(1.1);
  }
}

.scene-icon {
  position: absolute;
  right: 16%;
  top: 22%;
  color: oklch(90% .05 80);
  width: 150px;
  height: 150px;
  opacity: .92;
}

.ocean-wave {
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  border-top: 2px solid oklch(78% .1 195 / .55);
  border-radius: 50%;
  animation: rollw 6s ease-in-out infinite alternate;
}

.ocean-wave:nth-child(1) {
  top: 34%;
}

.ocean-wave:nth-child(2) {
  top: 48%;
  animation-delay: .6s;
  opacity: .7;
}

.ocean-wave:nth-child(3) {
  top: 62%;
  animation-delay: 1.2s;
  opacity: .45;
}

@keyframes rollw {
  to {
    transform: translateY(-14px) scaleX(1.05);
  }
}

.air-path {
  position: absolute;
  inset: 12% 8%;
  border: 1px dashed oklch(85% .05 240 / .35);
  border-radius: 44% 56% 48% 52%;
  animation: spin 40s linear infinite;
}

.air-dot {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sand);
  box-shadow: 0 0 18px oklch(84% .09 78 / .8);
  top: 16%;
  right: 30%;
}

.crop-bar {
  position: absolute;
  bottom: 60px;
  width: 26px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, oklch(78% .13 155), oklch(48% .12 175));
  animation: grow 3.4s var(--ease) infinite alternate;
}

.crop-bar:nth-child(1) {
  right: 26%;
  height: 70px;
}

.crop-bar:nth-child(2) {
  right: 35%;
  height: 120px;
  animation-delay: .3s;
}

.crop-bar:nth-child(3) {
  right: 44%;
  height: 92px;
  animation-delay: .6s;
}

.crop-bar:nth-child(4) {
  right: 53%;
  height: 145px;
  animation-delay: .9s;
}

@keyframes grow {
  from {
    transform: scaleY(.72);
  }
  to {
    transform: scaleY(1);
  }
}

/* ---- Slider dots -------------------------------------------------------- */
.slide-dots {
  position: absolute;
  bottom: 26px;
  left: 50%;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
  z-index: 4;
}

.slide-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  background: oklch(100% .02 220 / .35);
  border-radius: 50%;
  padding: 0;
  transition: .3s var(--ease);
}

.slide-dots button.active {
  width: 28px;
  border-radius: 4px;
  background: var(--cyan);
}

/* ---- Page header -------------------------------------------------------- */
.pagehead {
  background: var(--navy);
  color: oklch(97% .02 220);
  padding: 52px 0 58px;
  position: relative;
  overflow: hidden;
}

.pagehead::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid oklch(80% .05 200 / .18);
  border-radius: 50%;
  left: -160px;
  top: -260px;
}

.pagehead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 10%, oklch(52% .15 225 / .35), transparent 38%);
}

.pagehead .container {
  position: relative;
  z-index: 1;
}

.crumbs {
  font-size: .74rem;
  color: oklch(78% .04 210);
  display: flex;
  gap: 8px;
  align-items: center;
}

.crumbs a:hover {
  color: var(--cyan);
}

.pagehead h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  margin: 14px 0 10px;
  letter-spacing: -.03em;
}

.pagehead p {
  color: oklch(81% .035 220);
  max-width: 56ch;
  margin: 0;
  font-weight: 300;
}

/* ---- Sections ----------------------------------------------------------- */
.section {
  padding: 80px 0;
}

.section.tight {
  padding: 56px 0;
}

.section.alt {
  background: oklch(94% .026 220);
}

.kicker {
  font-size: .75rem;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: .06em;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 35px;
}

.section-head h2 {
  margin: 7px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.32;
}

.section-head p {
  color: var(--muted);
  max-width: 42ch;
  margin: 0;
  font-size: .88rem;
}

.text-link {
  color: var(--blue);
  font-weight: 700;
  font-size: .83rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.text-link:hover {
  gap: 11px;
  transition: .25s var(--ease);
}

/* ---- Mission grid ------------------------------------------------------- */
.mission-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  border-top: 1px solid var(--line);
}

.mission-item {
  padding: 27px 24px 12px 0;
  border-left: 1px solid var(--line);
  margin-top: 20px;
}

.mission-item:first-child {
  padding-right: 0;
}

.mission-item:last-child {
  border-left: 0;
}

.mission-icon {
  width: 42px;
  height: 42px;
  color: var(--blue);
  margin-bottom: 18px;
}

.mission-item h3 {
  font-size: 1.05rem;
  margin: 0 0 9px;
}

.mission-item p {
  color: var(--muted);
  font-size: .83rem;
  margin: 0;
  max-width: 34ch;
}

/* ---- Institutes --------------------------------------------------------- */
.research-layout {
  display: grid;
  grid-template-columns: .8fr 1.6fr;
  gap: 55px;
  align-items: start;
}

.research-intro h2 {
  font-size: 2.2rem;
  line-height: 1.34;
  margin: 9px 0 15px;
}

.research-intro p {
  color: var(--muted);
  font-size: .9rem;
}

.institute-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.institute {
  min-height: 173px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: .25s var(--ease);
}

.institute:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: oklch(72% .1 220);
}

.inst-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.inst-number {
  font-size: .72rem;
  color: var(--blue);
  font-weight: 800;
}

.inst-icon {
  width: 31px;
  height: 31px;
  color: var(--accent);
}

.institute h3 {
  font-size: .98rem;
  margin: 12px 0 0;
}

.institute span {
  font-size: .74rem;
  color: var(--muted);
}

/* ---- News cards --------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr .85fr;
  gap: 18px;
}

.news-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  transition: .25s var(--ease);
  display: block;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.news-card.featured {
  grid-row: span 2;
}

.news-visual {
  height: 170px;
  background: linear-gradient(135deg, oklch(38% .13 235), oklch(57% .14 190));
  position: relative;
  overflow: hidden;
}

.featured .news-visual {
  height: 265px;
}

.news-visual.warm {
  background: linear-gradient(135deg, oklch(40% .1 60), oklch(66% .13 82));
}

.news-visual.sea {
  background: linear-gradient(135deg, oklch(33% .1 245), oklch(60% .13 200));
}

.news-visual.green {
  background: linear-gradient(135deg, oklch(36% .1 180), oklch(63% .13 155));
}

.news-visual::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid oklch(100% .02 220 / .3);
  left: -55px;
  bottom: -115px;
}

.visual-label {
  position: absolute;
  top: 15px;
  right: 15px;
  background: oklch(100% .02 220 / .9);
  color: var(--navy);
  font-size: .7rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  z-index: 2;
}

.weather-line {
  position: absolute;
  left: 14%;
  right: 12%;
  top: 45%;
  height: 50px;
  border-top: 2px solid var(--cyan);
  border-radius: 50%;
  transform: rotate(-9deg);
}

.weather-line::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sand);
  right: 30%;
  top: -6px;
  box-shadow: 55px 18px 0 var(--cyan), 100px -17px 0 var(--sand);
}

.news-body {
  padding: 19px;
}

.news-meta {
  font-size: .68rem;
  color: var(--blue);
  font-weight: 700;
}

.news-card h3 {
  font-size: 1rem;
  line-height: 1.5;
  margin: 8px 0;
}

.news-card p {
  color: var(--muted);
  font-size: .77rem;
  margin: 0 0 12px;
}

.news-card.small h3 {
  font-size: .88rem;
}

/* ---- News rows ---------------------------------------------------------- */
.news-rows {
  border-top: 1px solid var(--line);
}

.news-row {
  display: grid;
  grid-template-columns: 150px 1fr 130px;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: .2s;
}

.news-row:hover {
  background: oklch(96% .02 220);
}

.news-row .date {
  font-size: .75rem;
  color: var(--blue);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.news-row h3 {
  font-size: 1rem;
  margin: 0 0 4px;
}

.news-row p {
  font-size: .79rem;
  color: var(--muted);
  margin: 0;
}

.news-row .tag {
  font-size: .7rem;
  color: var(--muted);
  justify-self: end;
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 20px;
}

/* ---- Stats -------------------------------------------------------------- */
.stats {
  background: var(--navy);
  color: oklch(96% .02 220);
  padding: 78px 0;
}

.stats .section-head p {
  color: oklch(77% .035 220);
}

.stats .kicker {
  color: var(--cyan);
}

.stats .section-head h2 {
  color: oklch(98% .02 220);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 35px;
}

.stat {
  padding: 16px 24px;
  border-right: 1px solid oklch(100% .02 220 / .16);
}

.stat:first-child {
  padding-right: 0;
}

.stat:last-child {
  border-right: 0;
}

.stat-icon {
  color: var(--cyan);
  width: 30px;
  height: 30px;
  margin-bottom: 19px;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: oklch(98% .02 220);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: .82rem;
  color: oklch(78% .03 220);
  margin-top: 9px;
}

/* ---- Publications ------------------------------------------------------- */
.pub-list {
  border-top: 1px solid var(--line);
}

.pub {
  display: grid;
  grid-template-columns: 125px 1fr 135px;
  gap: 24px;
  align-items: center;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}

.pub-type {
  font-size: .72rem;
  color: var(--blue);
  font-weight: 800;
}

.pub h3 {
  font-size: 1rem;
  margin: 0 0 4px;
}

.pub p {
  font-size: .78rem;
  color: var(--muted);
  margin: 0;
}

.pub .btn {
  justify-self: end;
  min-height: 38px;
  padding: 7px 12px;
  font-size: .75rem;
}

/* ---- Partners ----------------------------------------------------------- */
.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.partner {
  flex: 1 1 170px;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 75px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
  padding: 10px;
}

/* ---- Prose -------------------------------------------------------------- */
.prose {
  max-width: 72ch;
}

.prose h2 {
  font-size: 1.55rem;
  margin: 44px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: .92rem;
}

.prose ul,
.prose ol {
  padding-right: 20px;
  display: grid;
  gap: 8px;
}

.prose strong {
  color: var(--ink);
}

/* ---- Split layout and aside --------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 55px;
  align-items: start;
}

.aside-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}

.aside-box h3 {
  margin: 0 0 14px;
  font-size: .95rem;
}

.aside-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.aside-box li {
  font-size: .82rem;
  color: var(--muted);
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.aside-box svg {
  width: 16px;
  color: var(--blue);
  flex: none;
  margin-top: 4px;
}

/* ---- People ------------------------------------------------------------- */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
}

.person {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 13px;
  padding: 20px;
}

.person .avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: oklch(92% .05 210);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 14px;
}

.person h3 {
  font-size: .94rem;
  margin: 0 0 3px;
}

.person span {
  font-size: .75rem;
  color: var(--muted);
}

/* ---- Timeline ----------------------------------------------------------- */
.timeline {
  border-right: 2px solid var(--line);
  padding-right: 24px;
  display: grid;
  gap: 30px;
}

.tl-item {
  position: relative;
}

.tl-item::before {
  content: "";
  position: absolute;
  right: -31px;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid var(--surface);
}

.tl-item time {
  font-size: .74rem;
  color: var(--blue);
  font-weight: 700;
}

.tl-item h3 {
  font-size: 1.02rem;
  margin: 5px 0;
}

.tl-item p {
  color: var(--muted);
  font-size: .82rem;
  margin: 0;
}

/* ---- Forms -------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: span 2;
}

.field label {
  font-size: .78rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  background: var(--surface);
  font-size: .85rem;
  outline: 0;
  transition: .2s;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px oklch(52% .15 225 / .16);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---- Map ---------------------------------------------------------------- */
.map {
  height: 230px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, oklch(93% .03 215), oklch(88% .05 195));
  position: relative;
  overflow: hidden;
  margin-top: 16px;
}

.map::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, oklch(80% .03 215 / .5) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, oklch(80% .03 215 / .5) 0 1px, transparent 1px 42px);
}

.map-pin {
  position: absolute;
  top: 44%;
  right: 42%;
  color: var(--navy);
  background: var(--surface);
  border-radius: 50% 50% 50% 4px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

/* ---- FAQ ---------------------------------------------------------------- */
.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--blue);
  font-weight: 800;
}

.faq details[open] summary::after {
  content: "−";
}

.faq p {
  color: var(--muted);
  font-size: .85rem;
  margin: 11px 0 0;
  max-width: 70ch;
}

/* ---- Products ----------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: 14px;
}

.product {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  transition: .25s var(--ease);
}

.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product .strip {
  height: 6px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.product .inner {
  padding: 22px;
}

.product svg {
  width: 30px;
  color: var(--blue);
  margin-bottom: 14px;
}

.product h3 {
  font-size: 1rem;
  margin: 0 0 7px;
}

.product p {
  font-size: .8rem;
  color: var(--muted);
  margin: 0 0 14px;
}

/* ---- Search page -------------------------------------------------------- */
.searchbar {
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 8px 8px 8px 16px;
  align-items: center;
  max-width: 640px;
}

.searchbar input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font-size: .95rem;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: .78rem;
  color: var(--muted);
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 44px;
  text-align: center;
  color: var(--muted);
  margin-top: 26px;
}

.empty svg {
  width: 34px;
  color: var(--blue);
  margin: 0 auto 14px;
}

/* ---- Article ------------------------------------------------------------ */
.article-meta {
  display: flex;
  gap: 18px;
  font-size: .77rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 26px;
}

.article-hero {
  height: 320px;
  border-radius: 16px;
  background: linear-gradient(135deg, oklch(36% .12 235), oklch(60% .13 190));
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}

.article-hero .weather-line {
  top: 52%;
}

/* ---- Footer ------------------------------------------------------------- */
.footer {
  background: oklch(21% .055 235);
  color: oklch(88% .03 220);
  padding: 65px 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .75fr 1fr 1fr;
  gap: 45px;
}

.footer h3 {
  color: var(--cyan);
  font-size: .9rem;
  margin: 0 0 17px;
}

.footer p,
.footer a,
.footer li {
  font-size: .76rem;
  color: oklch(72% .03 220);
}

.footer p {
  max-width: 32ch;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer a:hover {
  color: var(--cyan);
}

.footer .brand-copy strong {
  color: oklch(96% .02 220);
}

.footer .brand-copy small {
  color: oklch(70% .03 220);
}

.socials {
  display: flex;
  gap: 8px;
  margin-top: 17px;
}

.socials a {
  width: 34px;
  height: 34px;
  border: 1px solid oklch(100% .02 220 / .18);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  transition: .2s;
}

.socials a:hover {
  background: oklch(100% .02 220 / .1);
  transform: translateY(-2px);
}

.contact-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 9px;
}

.contact-line svg {
  width: 16px;
  color: var(--cyan);
  flex: none;
  margin-top: 3px;
}

.copyright {
  border-top: 1px solid oklch(100% .02 220 / .12);
  margin-top: 45px;
  padding-top: 15px;
  text-align: center;
  font-size: .68rem;
  color: oklch(62% .03 220);
}

/* ---- Reveal on scroll --------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: .7s var(--ease);
}

.reveal.show {
  opacity: 1;
  transform: none;
}

/* ---- Utilities (extracted from inline styles) --------------------------- */
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-head strong {
  font-size: .9rem;
}

.drawer-home {
  margin-top: 18px;
}

.lang-code {
  font-size: .72rem;
  font-weight: 700;
}

.crumbs svg {
  width: 13px;
}

.btn-block {
  margin-top: 20px;
  width: 100%;
}

.section-head.compact {
  margin-bottom: 22px;
}

.form-msg {
  font-size: .8rem;
  margin: 12px 0 0;
}

.institute-list.wide {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.article-meta svg {
  width: 14px;
  display: inline-block;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
}

.footer .text-link {
  color: var(--cyan);
}

/* ---- Responsive --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none!important;
    transition: none!important;
  }
}

@media (max-width: 1120px) {
  .nav-link {
    font-size: .8rem;
    padding: 11px 7px;
  }
  .brand {
    min-width: 250px;
  }
  .brand-copy small {
    display: none;
  }
}

@media (max-width: 1020px) {
  .main-nav {
    display: none;
  }
  .mobile-toggle {
    display: grid;
  }
  .brand {
    flex: 1;
  }
  .head-main {
    min-height: 76px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-art {
    display: none;
  }
  .hero,
  .slides {
    min-height: 540px;
  }
  .hero-grid {
    min-height: 540px;
  }
  .news-grid {
    grid-template-columns: 1fr 1fr;
  }
  .news-card.featured {
    grid-row: auto;
    grid-column: span 2;
  }
  .featured .news-visual {
    height: 220px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .research-layout {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }
  .topbar-links {
    display: none;
  }
  .topbar-inner {
    justify-content: center;
  }
  .brand {
    min-width: 0;
  }
  .brand-copy strong {
    font-size: .82rem;
  }
  .brand-logo {
    width: 48px;
    height: 44px;
  }
  .header-actions .lang {
    display: none;
  }
  .hero h1 {
    font-size: 2.35rem;
  }
  .hero,
  .slides {
    min-height: 520px;
  }
  .hero-grid {
    min-height: 520px;
  }
  .section {
    padding: 60px 0;
  }
  .section-head {
    display: block;
  }
  .section-head p {
    margin-top: 14px;
  }
  .mission-grid {
    grid-template-columns: 1fr;
  }
  .mission-item {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
    margin-top: 0;
  }
  .mission-item:last-child {
    border-bottom: 0;
  }
  .institute-list {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-card.featured {
    grid-column: auto;
  }
  .news-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .news-row .tag {
    justify-self: start;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px 0;
  }
  .stat {
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid oklch(100% .02 220 / .14);
  }
  .stat:first-child {
    padding-right: 16px;
  }
  .stat-number {
    font-size: 2.15rem;
  }
  .pub {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pub .btn {
    justify-self: start;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .timeline {
    padding-right: 18px;
  }
  .article-hero {
    height: 200px;
  }
}
