/* Meel — Fuel infrastructure corporate theme | Mobile-first | RTL/LTR */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --font-sans: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-en: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --header-h: 72px;
  --container: min(1180px, 100% - 2rem);
  --transition: 0.2s ease;
  --color-warning: #f59e0b;
}

html:not([data-theme]),
html[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0c1118;
  --color-surface: #141c28;
  --color-surface-elevated: #1a2435;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #e8edf4;
  --color-text-muted: #94a3b8;
  --color-primary: #0ea5e9;
  --color-primary-deep: #0284c7;
  --color-accent: #a855f7;
  --color-accent-deep: #7c3aed;
  --color-accent-soft: rgba(168, 85, 247, 0.18);
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(12, 17, 24, 0.92);
  --mobile-nav-bg: rgba(12, 17, 24, 0.98);
  --hero-bg-solid: #0a1628;
  --hero-overlay: linear-gradient(
    135deg,
    rgba(12, 17, 24, 0.92) 0%,
    rgba(12, 24, 40, 0.88) 45%,
    rgba(8, 47, 73, 0.75) 100%
  );
  --hero-radial: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(14, 165, 233, 0.12), transparent 55%);
  --footer-bg: #070a0f;
  --sa-map-canvas-bg: linear-gradient(165deg, #161d2e 0%, #0c1118 55%, #121a28 100%);
  --card-hover-border: rgba(14, 165, 233, 0.25);
  --link-hover: #38bdf8;
  --theme-toggle-bg: rgba(255, 255, 255, 0.06);
  --theme-toggle-border: rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] {
  color-scheme: light;
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-surface-elevated: #f8fafc;
  --color-border: rgba(15, 23, 42, 0.12);
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-primary: #0284c7;
  --color-primary-deep: #0369a1;
  --color-accent: #9333ea;
  --color-accent-deep: #7e22ce;
  --color-accent-soft: rgba(147, 51, 234, 0.12);
  --shadow-soft: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 8px 28px rgba(15, 23, 42, 0.08);
  --header-bg: rgba(255, 255, 255, 0.92);
  --mobile-nav-bg: rgba(248, 250, 252, 0.98);
  --hero-bg-solid: #e0f2fe;
  --hero-overlay: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(241, 245, 249, 0.88) 45%,
    rgba(224, 242, 254, 0.78) 100%
  );
  --hero-radial: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(2, 132, 199, 0.14), transparent 55%);
  --footer-bg: #e2e8f0;
  --sa-map-canvas-bg: linear-gradient(165deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%);
  --card-hover-border: rgba(2, 132, 199, 0.35);
  --link-hover: #0369a1;
  --theme-toggle-bg: rgba(15, 23, 42, 0.05);
  --theme-toggle-border: rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

html[lang="en"] body {
  font-family: var(--font-en);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ——— Typography ——— */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-block: 0 0.75rem;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 52ch;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-block-end: 0.75rem;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-deep), var(--color-primary));
  color: #fff;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.45);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-hotline {
  margin-block-start: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
}

.hero-hotline__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.hero-hotline__num {
  font-size: clamp(1.45rem, 3.5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

.hero-hotline__num:hover {
  color: var(--link-hover);
}

.contact-phone-link {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.footer-phone-link {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.footer-phone-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ——— Site header ——— */
.site-header {
  position: sticky;
  top: 0;
  /* Above mobile drawer + page layers; below gallery lightbox (10050) */
  z-index: 10049;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--color-border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-text);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

/* Ribbon M mark — meel-letter.png (transparent) */
.logo-img {
  height: 46px;
  width: auto;
  max-width: min(260px, 52vw);
  object-fit: contain;
  object-position: inline-start center;
  display: block;
  border-radius: var(--radius-sm);
}

html:not([data-theme]) .logo-img,
html[data-theme="dark"] .logo-img {
  background: transparent;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

html[data-theme="light"] .logo-img {
  background: transparent;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 1px 4px rgba(15, 23, 42, 0.12));
}

.nav-main {
  display: none;
}

.nav-main ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.nav-main a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-main a:hover,
.nav-main a[aria-current="page"] {
  color: var(--color-text);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--theme-toggle-border);
  border-radius: var(--radius-sm);
  background: var(--theme-toggle-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.theme-toggle:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-switch a {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.lang-switch a.is-active {
  background: var(--color-surface-elevated);
  color: var(--color-primary);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--mobile-nav-bg);
  padding: 1.5rem;
  /* Sibling of header (not inside backdrop-filter) — full-viewport overlay above main/cookie */
  z-index: 10048;
  overflow-y: auto;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav li {
  border-block-end: 1px solid var(--color-border);
}

.mobile-nav a {
  display: block;
  padding: 1rem 0;
  color: var(--color-text);
  font-weight: 600;
}

@media (min-width: 960px) {
  .nav-main {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(46vh, 440px);
  display: flex;
  align-items: center;
  padding-block: 2.25rem 2.75rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    min-height: min(42vh, 400px);
    padding-block: 2.5rem 3rem;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--hero-bg-solid);
  background-image:
    var(--hero-overlay),
    url("https://images.unsplash.com/photo-1549923746-c502d488b3db?auto=format&fit=crop&w=1920&q=75");
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-radial);
  pointer-events: none;
}

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

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-layout .hero-copy h1 {
  max-width: none;
  margin-block-end: 1rem;
}

.hero-layout .hero-copy .lead {
  max-width: none;
  margin-block-end: 1.75rem;
}

@media (min-width: 880px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: clamp(1.75rem, 4vw, 3.25rem);
    align-items: center;
  }

  .hero-layout .hero-copy .lead {
    max-width: 52ch;
  }

  .hero-layout .hero-copy h1 {
    max-width: min(34ch, 100%);
  }
}

/* Decorative brand panel — fills opposite side so the hero is balanced */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.hero-visual-glow {
  position: absolute;
  width: min(100%, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 35%,
    rgba(168, 85, 247, 0.22) 0%,
    rgba(14, 165, 233, 0.1) 42%,
    transparent 68%
  );
  pointer-events: none;
  filter: blur(2px);
}

.hero-visual-card {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  max-height: min(42vw, 280px);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(168, 85, 247, 0.08) 45%,
    rgba(14, 165, 233, 0.06) 100%
  );
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
}

html[data-theme="light"] .hero-visual-card {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(241, 245, 249, 0.92) 50%,
    rgba(224, 242, 254, 0.55) 100%
  );
}

.hero-visual-img {
  width: 72%;
  height: auto;
  max-height: 78%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 36px rgba(14, 165, 233, 0.2));
}

@media (max-width: 879px) {
  .hero-visual {
    min-height: 160px;
  }

  .hero-visual-card {
    max-height: 220px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-visual-glow {
    animation: meel-hero-aura 5.5s ease-in-out infinite;
  }

  .hero-visual-card {
    animation: meel-hero-card-float 6s ease-in-out infinite;
  }

  .hero-visual-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
      125deg,
      transparent 30%,
      rgba(255, 255, 255, 0.07) 48%,
      rgba(14, 165, 233, 0.12) 52%,
      transparent 70%
    );
    background-size: 200% 200%;
    animation: meel-hero-shine 8s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: soft-light;
  }

  .hero-visual-img {
    animation: meel-hero-m-pulse 4.5s ease-in-out infinite;
    transform-origin: center center;
  }
}

@keyframes meel-hero-aura {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.07);
    opacity: 0.88;
  }
}

@keyframes meel-hero-card-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes meel-hero-shine {
  0%,
  100% {
    background-position: 100% 50%;
    opacity: 0.35;
  }
  50% {
    background-position: 0% 50%;
    opacity: 0.9;
  }
}

@keyframes meel-hero-m-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

/* ——— Sections ——— */
section {
  padding-block: 4rem;
}

.section-alt {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.section-head {
  margin-block-end: 2.5rem;
  max-width: 640px;
}

.section-head .lead {
  margin-block-start: 0.5rem;
}

/* ——— Grid cards ——— */
.grid-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid-cards.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.22), rgba(168, 85, 247, 0.16));
  display: grid;
  place-items: center;
  margin-block-end: 1rem;
}

.card-icon svg {
  width: 26px;
  height: 26px;
  color: var(--color-accent);
}

.card h3 {
  margin-block-end: 0.5rem;
}

.card .bilingual small {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-block-start: 0.25rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ——— Stats ——— */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .stats-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  text-align: center;
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.stat-value {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-block-start: 0.35rem;
}

.stats-bar--qualitative .stat-value {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.25;
}

.stats-bar--qualitative .stat-label {
  max-width: 22ch;
  margin-inline: auto;
}

/* ——— Map placeholder ——— */
.map-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface-elevated);
  min-height: 280px;
  position: relative;
}

.map-block svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-block--vector {
  min-height: auto;
}

.sa-map-canvas {
  background: var(--sa-map-canvas-bg);
  padding: clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Use <img> for the SVG map — <object> embeds a separate document that often paints a white backdrop behind transparent areas, hiding --sa-map-canvas-bg in dark mode. */
.sa-map-img {
  width: min(100%, 920px);
  max-width: min(100%, 920px);
  height: auto;
  display: block;
  margin-inline: auto;
  background: transparent;
}

.map-block--compact .sa-map-canvas {
  padding: 0.75rem 0.5rem;
  max-height: 240px;
}

.map-block--compact .sa-map-img {
  max-height: 220px;
  width: 100%;
  object-fit: contain;
}

/* Homepage map — subtle motion (see .map-block--home on index) */
.map-block--home .sa-map-canvas {
  position: relative;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  /* Glow layer behind the SVG (canvas stacking) */
  .map-block--home .sa-map-canvas::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: radial-gradient(
      ellipse 90% 80% at 50% 42%,
      rgba(14, 165, 233, 0.14) 0%,
      transparent 58%,
      rgba(168, 85, 247, 0.1) 100%
    );
    animation: meel-map-vignette 6s ease-in-out infinite;
    pointer-events: none;
  }

  .map-block--home .sa-map-img {
    position: relative;
    z-index: 1;
    animation: meel-map-breathe 8s ease-in-out infinite;
  }
}

@keyframes meel-map-vignette {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes meel-map-breathe {
  0%,
  100% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.12));
  }
  50% {
    transform: scale(1.015) translateY(-3px);
    filter: drop-shadow(0 10px 28px rgba(14, 165, 233, 0.18));
  }
}

/* ——— Footer ——— */
.site-footer {
  background: var(--footer-bg);
  border-block-start: 1px solid var(--color-border);
  padding-block: 3rem 2rem;
  margin-block-start: auto;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: stretch;
}

.footer-col--brand,
.footer-col--links,
.footer-col--contact {
  min-width: 0;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(1.5rem, 3.5vw, 2.75rem);
    align-items: start;
  }
}

.site-footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-block-end: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-block-end: 0.5rem;
}

.site-footer a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

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

.footer-brand p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-block-start: 0.75rem;
  max-width: 36ch;
}

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-block-start: 1rem;
}

.social-row a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
}

.social-row a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.social-row svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  margin-block-start: 2.5rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ——— Page hero (inner pages) ——— */
.page-hero {
  padding-block: 3rem 2rem;
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-block-end: 1px solid var(--color-border);
}

.page-hero h1 {
  margin-block-end: 0.5rem;
}

.page-hero--tight h1 {
  font-size: clamp(1.72rem, 3.35vw, 2.42rem);
  line-height: 1.2;
}

/* ——— App download landing ——— */
.app-landing {
  padding: clamp(2.25rem, 5vw, 3.75rem) 0;
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-block-end: 1px solid var(--color-border);
  text-align: center;
}

.app-landing__inner {
  max-width: min(820px, 100%);
  margin-inline: auto;
}

.app-landing__logo-wrap {
  margin-block-end: 1.65rem;
  padding-inline: 0.5rem;
}

/* App landing — ribbon M (meel-letter.png) */
.app-landing__logo {
  height: clamp(88px, 18vw, 132px);
  width: auto;
  max-width: min(520px, 94vw);
  margin-inline: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  filter:
    drop-shadow(0 18px 44px rgba(14, 165, 233, 0.2))
    drop-shadow(0 8px 22px rgba(192, 38, 211, 0.14));
}

.app-landing h1 {
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  font-weight: 800;
  margin-block: 0 0.65rem;
  line-height: 1.35;
  text-wrap: balance;
}

.app-landing__sub {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  color: var(--color-text-muted);
}

.app-download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  justify-content: center;
  align-items: center;
}

.store-badge-link {
  display: inline-flex;
  line-height: 0;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition), transform var(--transition);
}

.store-badge-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.store-badge-link img {
  height: 44px;
  width: auto;
  max-width: min(100%, 190px);
  object-fit: contain;
  display: block;
}

.store-badge-link img[alt*="Google"],
.store-badge-link img[src*="play.google"] {
  height: 60px;
  max-height: 60px;
}

.btn-web-access {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-elevated);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: border-color var(--transition), transform var(--transition);
}

.btn-web-access:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.btn-web-access__soft {
  font-weight: 500;
  opacity: 0.75;
  margin-inline-end: 0.2em;
}

.btn-web-access__strong {
  font-weight: 800;
  letter-spacing: 0.06em;
}

.app-landing__portal {
  margin: 2rem 0 0;
  font-size: 0.9rem;
}

.app-landing__portal a {
  color: var(--color-primary);
  font-weight: 600;
}

.app-landing__portal a:hover {
  color: var(--link-hover);
}

/* ——— Content blocks ——— */
.content-block {
  margin-block-end: 2.5rem;
}

.content-block:last-child {
  margin-block-end: 0;
}

.two-col {
  display: grid;
  gap: 2rem;
}

@media (min-width: 880px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.values-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.values-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-weight: 500;
}

.values-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-block-start: 0.45rem;
  flex-shrink: 0;
}

.structure-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .structure-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.structure-item {
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.structure-item h4 {
  color: var(--color-primary);
  margin-block-end: 0.35rem;
}

/* ——— Service detail ——— */
.service-detail {
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-elevated);
  margin-block-end: 1.25rem;
}

.service-detail h3 {
  margin-block-end: 0.75rem;
  padding-block-end: 0.75rem;
  border-block-end: 1px solid var(--color-border);
}

.service-detail ul {
  margin: 0;
  padding-inline-start: 1.25rem;
  color: var(--color-text-muted);
}

.service-detail li {
  margin-block-end: 0.35rem;
}

/* ——— Stations ——— */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-block-end: 1.5rem;
}

.filter-bar label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.filter-bar select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-elevated);
  color: var(--color-text);
  min-width: 200px;
}

.station-list {
  display: grid;
  gap: 1rem;
}

.station-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-elevated);
  display: grid;
  gap: 0.5rem;
}

.station-card[data-hidden="true"] {
  display: none;
}

.station-card h3 {
  margin: 0;
  color: var(--color-text);
}

.station-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.station-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-start: 0.35rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* ——— Projects ——— */
.timeline {
  border-inline-start: 2px solid var(--color-border);
  padding-inline-start: 1.5rem;
  margin-inline-start: 0.5rem;
}

.timeline-item {
  position: relative;
  padding-block-end: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(-1.5rem - 6px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-bg);
}

/* ——— Forms ——— */
.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.form-field input,
.form-field textarea,
.form-field select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--color-primary);
  outline: none;
}

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

.form-status {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  margin-block-end: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid var(--color-border);
}

.form-status[hidden] {
  display: none !important;
}

.form-status--ok {
  background: var(--color-accent-soft);
  border-color: rgba(168, 85, 247, 0.35);
  color: var(--color-text);
}

.form-status--err {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--color-text);
}

html[data-theme="light"] .form-status--err {
  background: rgba(239, 68, 68, 0.08);
}

.contact-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
}

.contact-card dl {
  margin: 0;
}

.contact-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-block-start: 1rem;
}

.contact-card dt:first-child {
  margin-block-start: 0;
}

.contact-card dd {
  margin: 0.25rem 0 0;
  font-weight: 600;
}

.contact-card dd:empty {
  display: none;
}

/* ——— Jobs ——— */
.job-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-block-end: 1rem;
}

.job-card h3 {
  margin-block-end: 0.5rem;
}

.job-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-block-end: 0.75rem;
}

/* ——— Utilities ——— */
.mt-0 {
  margin-block-start: 0;
}

.mb-2 {
  margin-block-end: 2rem;
}

.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Body flex for sticky footer */
body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ——— Station photo gallery (album + lightbox) ——— */
:root {
  --gallery-magenta: #c71585;
  --gallery-magenta-soft: rgba(199, 21, 133, 0.22);
  --gallery-magenta-border: rgba(199, 21, 133, 0.55);
  --gallery-blue-glow: rgba(14, 165, 233, 0.35);
}

.station-gallery-wrap {
  padding-block: 0 3rem;
}

.station-gallery-intro {
  max-width: 42rem;
  margin-block-end: 2rem;
}

.station-gallery-intro .lead {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.station-gallery {
  column-count: 1;
  column-gap: 1.125rem;
}

@media (min-width: 560px) {
  .station-gallery {
    column-count: 2;
  }
}

@media (min-width: 960px) {
  .station-gallery {
    column-count: 3;
  }
}

.station-gallery__thumb {
  position: relative;
  display: block;
  width: 100%;
  margin-block-end: 1.125rem;
  break-inside: avoid;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--color-surface-elevated);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
  border: 1px solid var(--color-border);
}

.station-gallery__thumb:focus {
  outline: 2px solid var(--gallery-magenta);
  outline-offset: 3px;
}

.station-gallery__thumb:focus:not(:focus-visible) {
  outline: none;
}

.station-gallery__thumb:focus-visible {
  outline: 2px solid var(--gallery-magenta);
  outline-offset: 3px;
}

.station-gallery__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.35s ease;
  pointer-events: none;
}

.station-gallery__thumb:hover {
  transform: translateY(-3px);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px var(--gallery-magenta-border);
}

html[data-theme="light"] .station-gallery__thumb:hover {
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.12),
    0 0 0 1px var(--gallery-magenta-border);
}

.station-gallery__thumb img {
  width: 100%;
  height: auto;
  vertical-align: middle;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.station-gallery__thumb:hover img {
  transform: scale(1.03);
}

.station-gallery__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 48%,
    transparent 56%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.station-gallery__thumb:hover .station-gallery__shine {
  opacity: 1;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 120% 80% at 50% 40%, rgba(12, 17, 24, 0.65), #030508);
  backdrop-filter: blur(10px);
}

.gallery-lightbox__stage {
  position: relative;
  z-index: 2;
  width: min(96vw, 1400px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  /* Let clicks pass through empty stage area to .gallery-lightbox__backdrop */
  pointer-events: none;
}

.gallery-lightbox__stage .gallery-lightbox__frame,
.gallery-lightbox__stage .gallery-lightbox__counter {
  pointer-events: auto;
}

.gallery-lightbox__frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}

.gallery-lightbox__frame .gallery-lightbox__img {
  position: relative;
  z-index: 0;
  max-width: 100%;
  max-height: min(82vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(199, 21, 133, 0.25);
}

.gallery-lightbox__counter {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.85);
}

.gallery-lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(20, 28, 40, 0.85);
  color: #f1f5f9;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.gallery-lightbox__btn:hover {
  background: var(--gallery-magenta-soft);
  border-color: var(--gallery-magenta-border);
  color: #fff;
}

.gallery-lightbox__btn:focus-visible {
  outline: 2px solid var(--gallery-magenta);
  outline-offset: 2px;
}

.gallery-lightbox__btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.gallery-lightbox__close {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  z-index: 3;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 24, 0.75);
  color: #e8edf4;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gallery-lightbox__close:hover {
  background: rgba(199, 21, 133, 0.35);
  border-color: var(--gallery-magenta-border);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

.gallery-lightbox__nav--prev {
  inset-inline-start: 0.35rem;
}

.gallery-lightbox__nav--next {
  inset-inline-end: 0.35rem;
}

@media (max-width: 640px) {
  .gallery-lightbox__btn.gallery-lightbox__nav {
    width: 2.45rem;
    height: 2.45rem;
  }

  .gallery-lightbox__nav--prev {
    inset-inline-start: 0.2rem;
  }

  .gallery-lightbox__nav--next {
    inset-inline-end: 0.2rem;
  }
}

/* ——— Cookie consent banner ——— */
body.has-cookie-banner {
  padding-bottom: max(9rem, env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
  body.has-cookie-banner {
    padding-bottom: max(7.5rem, env(safe-area-inset-bottom, 0px));
  }
}

.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 10040;
  padding: 0 0.75rem 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-banner.cookie-banner--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: opacity 0.2s ease;
    transform: none;
  }

  .cookie-banner.cookie-banner--visible {
    transform: none;
  }
}

.cookie-banner__surface {
  position: relative;
  max-width: min(1180px, 100%);
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--color-surface-elevated) 94%, var(--color-primary) 6%) 0%,
    var(--color-surface) 48%,
    color-mix(in srgb, var(--color-surface) 88%, var(--color-accent) 12%) 100%
  );
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, var(--color-primary) 15%);
  box-shadow:
    0 -8px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="light"] .cookie-banner__surface {
  box-shadow:
    0 -12px 40px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.cookie-banner__accent {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    color-mix(in srgb, var(--color-primary) 55%, var(--color-accent) 45%) 50%,
    var(--color-accent) 100%
  );
  opacity: 0.95;
}

.cookie-banner__inner {
  position: relative;
  padding: 1.15rem 1.25rem 1.2rem;
}

.cookie-banner__row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.cookie-banner__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-primary) 16%, transparent);
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.cookie-banner__copy {
  flex: 1;
  min-width: 0;
}

.cookie-banner__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.35;
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
}

.cookie-banner__btn {
  min-height: 2.65rem;
  padding-inline: 1.15rem;
  font-weight: 600;
  font-size: 0.875rem;
}

@media (max-width: 639px) {
  .cookie-banner__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .cookie-banner__btn {
    width: 100%;
    justify-content: center;
  }

  .cookie-banner__row {
    gap: 0.85rem;
  }

  .cookie-banner__icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .cookie-banner__icon svg {
    width: 1.65rem;
    height: 1.65rem;
  }
}
