/* =============================================================
   Matteo Menardi Ménego — Official Personal Website
   Version 1.0 — May 2026
   Ladin palette · Inter · Apple-like minimalism
   ============================================================= */

:root {
  /* Ladin flag palette */
  --ladin-blue:  #87CEEB;
  --ladin-white: #FFFFFF;
  --ladin-green: #006A4E;

  /* Quote accent */
  --platinum:    #E5E4E2;

  /* Motion */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --dur: 320ms;

  /* Surfaces (set per-theme below) */
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-border: rgba(0, 106, 78, 0.22);
  --text: var(--ladin-green);
  --text-muted: rgba(0, 75, 56, 0.78);
  --bar-bg: rgba(255, 255, 255, 0.78);
  --shadow: 0 10px 36px rgba(0, 60, 44, 0.16);
  --shadow-hover: 0 22px 56px rgba(0, 60, 44, 0.28);
  --ring: rgba(0, 106, 78, 0.25);
}

/* Dark theme */
html[data-theme="dark"] {
  --surface: rgba(0, 22, 16, 0.55);
  --surface-strong: rgba(0, 22, 16, 0.78);
  --surface-border: rgba(255, 255, 255, 0.14);
  --text: var(--ladin-white);
  --text-muted: rgba(255, 255, 255, 0.78);
  --bar-bg: rgba(0, 18, 14, 0.55);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.55);
  --ring: rgba(135, 206, 235, 0.35);
}

/* =============================================================
   Reset & base
   ============================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  color: var(--text);
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ladin-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Fixed wallpaper layer — no cropping, glides like apple.com */
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('IMG_0864H.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  will-change: transform;
}

/* Vertical-mobile wallpaper rotation */
@media (orientation: portrait) and (max-width: 900px) {
  .wallpaper {
    background-image: url('IMG_0864.jpeg');
    background-attachment: scroll; /* iOS Safari fix */
  }
}

/* Subtle wash so text remains readable on wallpaper */
.wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.48) 100%
  );
}
html[data-theme="dark"] .wallpaper::after {
  background: linear-gradient(
    180deg,
    rgba(0, 12, 8, 0.5) 0%,
    rgba(0, 12, 8, 0.74) 100%
  );
}

/* =============================================================
   Typography
   ============================================================= */

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.022em;
  margin: 0;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 600; }
p  { margin: 0 0 1em; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
a:hover { opacity: 0.78; }
a:focus-visible {
  outline: 2px solid var(--ladin-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

em, .italic { font-style: italic; }

.menego {
  font-style: italic;
  font-weight: inherit;
}

.quote {
  color: var(--platinum);
  background: linear-gradient(180deg, #FFFFFF 0%, #E5E4E2 45%, #B8B7B5 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(0, 0, 0, 0.25);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
}
html[data-theme="dark"] .quote {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7))
          drop-shadow(0 0 16px rgba(229, 228, 226, 0.18));
}
.quote-attr {
  background: none;
  -webkit-text-fill-color: initial;
  color: var(--platinum);
  opacity: 0.92;
  font-style: normal;
  font-size: 0.92em;
  margin-top: 0.4em;
  display: block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
html[data-theme="dark"] .quote-attr {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* =============================================================
   Top bar
   ============================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bar-bg);
  backdrop-filter: saturate(1.4) blur(22px);
  -webkit-backdrop-filter: saturate(1.4) blur(22px);
  border-bottom: 1px solid var(--surface-border);
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  transition: background var(--dur) var(--ease);
}
.brand:hover { background: var(--surface); }

.brand-pic {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  border: 2px solid var(--ladin-white);
  flex-shrink: 0;
}

.brand-name {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.018em;
  white-space: nowrap;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background var(--dur) var(--ease);
  color: var(--text);
  white-space: nowrap;
}
.nav-link:hover { background: var(--surface); opacity: 1; }
.nav-link[aria-current="page"] {
  background: var(--surface-strong);
  font-weight: 600;
}

.lookup-btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  background: var(--ladin-green);
  color: var(--ladin-white);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
html[data-theme="dark"] .lookup-btn {
  background: var(--ladin-blue);
  color: #00261B;
}
.lookup-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

/* Hamburger for mobile */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  margin-left: auto;
}
.menu-toggle svg { display: block; }
.menu-toggle:hover { background: var(--surface); }

@media (max-width: 880px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 6px;
    padding: 14px 18px 18px;
    background: var(--bar-bg);
    backdrop-filter: saturate(1.4) blur(22px);
    -webkit-backdrop-filter: saturate(1.4) blur(22px);
    border-bottom: 1px solid var(--surface-border);
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur) var(--ease), padding var(--dur) var(--ease);
    padding-top: 0;
    padding-bottom: 0;
  }
  .nav-links.open {
    max-height: 520px;
    padding-top: 14px;
    padding-bottom: 18px;
  }
  .nav-link, .lookup-btn {
    text-align: center;
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================
   Main / Content
   ============================================================= */

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) max(20px, env(safe-area-inset-left))
           clamp(40px, 6vw, 72px) max(20px, env(safe-area-inset-right));
}

.hero {
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 48px);
  animation: rise 800ms var(--ease) both;
}
.hero h1, .gem .big-name {
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.45);
}
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .gem .big-name {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}
.hero .profile {
  width: clamp(110px, 16vw, 150px);
  height: clamp(110px, 16vw, 150px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin: 0 auto 22px;
  border: 3px solid var(--ladin-white);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  display: block;
}
.hero h1 { margin-bottom: 14px; }
.hero .subtitle {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--text);
  font-weight: 500;
  max-width: 640px;
  margin: 0 auto;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.6);
}
html[data-theme="dark"] .hero .subtitle {
  color: var(--text-muted);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   Cards
   ============================================================= */

.cards {
  display: grid;
  gap: clamp(16px, 2.2vw, 22px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  backdrop-filter: saturate(1.4) blur(20px);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: clamp(20px, 2.4vw, 28px);
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  animation: rise 700ms var(--ease) both;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.card-wide { grid-column: 1 / -1; }
.card-center { text-align: center; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ladin-blue), var(--ladin-green));
  color: var(--ladin-white);
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.cv-section { margin-bottom: 22px; }
.cv-section:last-child { margin-bottom: 0; }
.cv-section h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.cv-section .item { margin-bottom: 14px; }
.cv-section .item:last-child { margin-bottom: 0; }
.cv-section .item strong { display: block; }
.cv-section .item .meta {
  display: block;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  font-size: 0.86rem;
  font-weight: 500;
}

/* Ascents table */
.ascents {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}
.ascents th, .ascents td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--surface-border);
}
.ascents th {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.ascents tr:last-child td { border-bottom: 0; }
.ascents .route { font-weight: 600; }
.ascents .grade {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ladin-green);
  color: var(--ladin-white);
  font-weight: 600;
  font-size: 0.86rem;
}
html[data-theme="dark"] .ascents .grade {
  background: var(--ladin-blue);
  color: #00261B;
}
@media (max-width: 620px) {
  .ascents thead { display: none; }
  .ascents, .ascents tbody, .ascents tr, .ascents td { display: block; width: 100%; }
  .ascents tr {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--surface-strong);
    border: 1px solid var(--surface-border);
  }
  .ascents td {
    border: 0;
    padding: 3px 0;
  }
  .ascents td.date { font-size: 0.84rem; color: var(--text-muted); }
}

/* Highlights */
.highlights { display: grid; gap: 18px; }
.highlight {
  display: grid;
  grid-template-columns: minmax(110px, 130px) 1fr;
  gap: 18px;
  align-items: baseline;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-border);
}
.highlight:last-child { border-bottom: 0; padding-bottom: 0; }
.highlight .year {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  font-size: 1.06rem;
}
.highlight h4 { margin: 0 0 4px; font-size: 1.04rem; font-weight: 600; }
.highlight p { margin: 0; color: var(--text-muted); font-size: 0.96rem; }

@media (max-width: 520px) {
  .highlight { grid-template-columns: 1fr; gap: 4px; }
}

/* Onsight/flash lists */
.onsight-group { margin-bottom: 18px; }
.onsight-group:last-child { margin-bottom: 0; }
.onsight-group h4 {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.onsight-list { list-style: none; padding: 0; margin: 0; }
.onsight-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-border);
  font-size: 0.96rem;
}
.onsight-list li:last-child { border-bottom: 0; }
.onsight-list .meta { color: var(--text-muted); font-size: 0.88rem; }

/* =============================================================
   Socials page
   ============================================================= */

.social-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.social-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  backdrop-filter: saturate(1.4) blur(20px);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.social-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  opacity: 1;
}
.social-card .icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  flex-shrink: 0;
}
.social-card .icon svg { width: 22px; height: 22px; }
.social-card .label {
  font-weight: 600;
  font-size: 1.02rem;
}
.social-card .handle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.official-card {
  display: block;
  margin-top: 22px;
  text-align: center;
  padding: 30px 24px;
  background: linear-gradient(135deg, var(--ladin-blue), var(--ladin-green));
  color: var(--ladin-white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  text-decoration: none;
}
.official-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  opacity: 1;
}
.official-card h3 {
  color: var(--ladin-white);
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  margin: 0 0 6px;
}
.official-card .url {
  font-weight: 500;
  opacity: 0.94;
  margin: 0 0 14px;
}
.official-card .here {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.86rem;
  font-weight: 500;
}

/* =============================================================
   Stories
   ============================================================= */

.story-card {
  background: var(--surface);
  backdrop-filter: saturate(1.4) blur(20px);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 28px;
  padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow);
  max-width: 820px;
  margin: 0 auto;
}
.story-quote {
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  line-height: 1.7;
}
.story-attr {
  text-align: right;
  margin: 18px 0 22px;
  font-weight: 500;
  color: var(--text-muted);
}
.story-img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin: 6px 0 22px;
  display: block;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ladin-green);
  color: var(--ladin-white);
  font-weight: 600;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
html[data-theme="dark"] .read-more {
  background: var(--ladin-blue);
  color: #00261B;
}
.read-more:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

/* =============================================================
   Hidden gem page
   ============================================================= */

.gem {
  min-height: calc(100dvh - 200px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  animation: rise 900ms var(--ease) both;
}
.gem .big-name {
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--text);
  margin-bottom: 36px;
}
@media (orientation: portrait), (max-width: 720px) {
  .gem .big-name .desktop-only { display: none; }
  .gem .big-name .mobile-only { display: block; }
}
@media (orientation: landscape) and (min-width: 721px) {
  .gem .big-name .mobile-only { display: none; }
}
.gem .quote-block {
  margin-bottom: 28px;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
}
.gem .thanks {
  font-size: clamp(1.02rem, 1.6vw, 1.12rem);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 6px;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.55);
}
html[data-theme="dark"] .gem .thanks {
  color: var(--text-muted);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
.gem .madeby {
  font-size: 0.92rem;
  color: var(--text);
  opacity: 0.78;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.55);
}
html[data-theme="dark"] .gem .madeby {
  color: var(--text-muted);
  opacity: 0.86;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

/* =============================================================
   Bottom bar (footer)
   ============================================================= */

.bottombar {
  flex-shrink: 0;
  background: var(--bar-bg);
  backdrop-filter: saturate(1.4) blur(22px);
  -webkit-backdrop-filter: saturate(1.4) blur(22px);
  border-top: 1px solid var(--surface-border);
  padding: 18px max(16px, env(safe-area-inset-left))
           calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  margin-top: auto;
}

.bottombar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bottom-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
}

.copyright {
  font-size: 0.86rem;
  color: var(--text-muted);
  white-space: nowrap;
  justify-self: start;
}

.socials-mini {
  display: flex;
  gap: 6px;
  justify-self: center;
  flex-wrap: wrap;
  justify-content: center;
}
.socials-mini a {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.socials-mini a:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  opacity: 1;
}
.socials-mini svg { width: 18px; height: 18px; }

.partners {
  display: flex;
  gap: 10px;
  justify-self: end;
}
.partners a {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--dur) var(--ease);
}
.partners a:hover { background: var(--surface-strong); opacity: 1; }

.bottom-row-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--surface-border);
  gap: 14px;
}

/* Theme toggle */
.theme-toggle {
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: background var(--dur) var(--ease);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--ladin-blue); border-color: var(--ladin-blue); }
.theme-toggle .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ladin-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
html[data-theme="dark"] .theme-toggle .knob {
  transform: translateX(26px);
  background: #00261B;
}

/* Ladin flag button */
.ladin-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ladin-flag:hover { background: var(--surface-strong); transform: translateY(-1px); opacity: 1; }
.flag-icon {
  width: 24px; height: 16px;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.flag-icon span {
  flex: 1;
  display: block;
}
.flag-icon .blue  { background: var(--ladin-blue); }
.flag-icon .white { background: var(--ladin-white); }
.flag-icon .green { background: var(--ladin-green); }

@media (max-width: 720px) {
  .bottom-row {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .copyright, .socials-mini, .partners { justify-self: center; }
  .partners { flex-wrap: wrap; justify-content: center; }
  .bottom-row-2 { justify-content: center; gap: 18px; flex-wrap: wrap; }
}

/* =============================================================
   Misc
   ============================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}

::selection {
  background: var(--ladin-blue);
  color: #00261B;
}

/* Stagger card entry */
.cards .card:nth-child(1) { animation-delay: 60ms; }
.cards .card:nth-child(2) { animation-delay: 130ms; }
.cards .card:nth-child(3) { animation-delay: 200ms; }
.cards .card:nth-child(4) { animation-delay: 270ms; }
.cards .card:nth-child(5) { animation-delay: 340ms; }
.cards .card:nth-child(6) { animation-delay: 410ms; }
