:root {
  --ink: #101816;
  --muted: #596b64;
  --paper: #f8f7f1;
  --mist: #e8f0e8;
  --line: #d3ded5;
  --forest: #10372d;
  --leaf: #2b7a4f;
  --sun: #f0b13f;
  --rust: #c8562b;
  --water: #3196aa;
  --white: #fff;
  --surface: #fff;
  --surface-soft: #eff7f0;
  --input-bg: #fff;
  --input-ink: var(--ink);
  --shadow: 0 18px 45px rgba(16, 24, 22, .16);
}

html[data-theme="glow"],
body[data-theme="glow"] {
  --ink: #10201f;
  --muted: #58706d;
  --paper: #f7f8f5;
  --mist: #e7f3f0;
  --line: #d1e1dd;
  --forest: #073f46;
  --leaf: #0f6d73;
  --sun: #ffbd8a;
  --rust: #e4664d;
  --water: #13a6b2;
  --surface: #fff;
  --surface-soft: #f0f7f4;
  --input-bg: #fff;
  --input-ink: var(--ink);
  --shadow: 0 18px 45px rgba(7, 63, 70, .16);
}

html[data-theme="racing"],
body[data-theme="racing"] {
  --ink: #eef6ed;
  --muted: #aab9ad;
  --paper: #20272a;
  --mist: #26302c;
  --line: #3a4640;
  --forest: #0f241b;
  --leaf: #244a30;
  --sun: #a3ef20;
  --rust: #a3ef20;
  --water: #a3ef20;
  --surface: #18211e;
  --surface-soft: #22302a;
  --input-bg: #111816;
  --input-ink: #eef6ed;
  --shadow: 0 18px 45px rgba(0, 0, 0, .32);
}

html[data-theme="alpine"],
body[data-theme="alpine"] {
  --ink: #1f2529;
  --muted: #687076;
  --paper: #ffffff;
  --mist: #f3f4f4;
  --line: #dde1e3;
  --forest: #2c3338;
  --leaf: #40494f;
  --sun: #ff6b35;
  --rust: #e4232f;
  --water: #67737b;
  --surface: #fff;
  --surface-soft: #f3f4f4;
  --input-bg: #fff;
  --input-ink: var(--ink);
  --shadow: 0 18px 45px rgba(31, 37, 41, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(49, 150, 170, .11), transparent 28%),
    linear-gradient(135deg, rgba(16, 55, 45, .04) 0 25%, transparent 25% 50%, rgba(16, 55, 45, .04) 50% 75%, transparent 75%),
    var(--paper);
  background-size: auto, 18px 18px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  z-index: 20;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: linear-gradient(rgba(13, 28, 24, .9), rgba(13, 28, 24, .46));
  border-bottom: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px);
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  display: block;
  width: clamp(82px, 8vw, 124px);
  height: auto;
}
.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  font-weight: 700;
  font-size: 14px;
}
.main-nav a { text-decoration: none; }
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: var(--input-bg);
  color: var(--input-ink);
}
.lang-switch {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(10, 22, 19, .32);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.lang-switch a.active {
  background: var(--sun);
  color: #241509;
}

.hero {
  min-height: 92vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 6vw, 86px) 56px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(10, 22, 19, .9) 0%, rgba(10, 22, 19, .6) 42%, rgba(10, 22, 19, .14) 78%),
    url("../img/hero-bike-guide.png") center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -12vw 7vh auto;
  width: min(58vw, 720px);
  height: 34vh;
  border: 2px solid rgba(240, 177, 63, .38);
  border-left: 0;
  transform: rotate(-12deg) skewX(-18deg);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(118deg, transparent 0 18px, rgba(255,255,255,.055) 19px 21px, transparent 22px 42px);
  mix-blend-mode: overlay;
  opacity: .5;
  pointer-events: none;
}
.hero-copy { max-width: 720px; }
.hero-copy { position: relative; z-index: 1; }
.kicker {
  margin: 0 0 12px;
  color: var(--sun);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
}
h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 {
  font-size: clamp(42px, 7vw, 82px);
  max-width: 800px;
  text-transform: uppercase;
}
h2 { font-size: clamp(30px, 4vw, 54px); }
h3 { font-size: 22px; }
.hero p:not(.kicker) {
  max-width: 620px;
  font-size: clamp(18px, 2vw, 22px);
  color: rgba(255,255,255,.88);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 13px;
  transform: skewX(-8deg);
}
.button > *,
.button { line-height: 1; }
.button.primary,
.button.ghost {
  box-shadow: 0 12px 0 rgba(0,0,0,.12);
}
.button.primary { background: linear-gradient(135deg, var(--sun), var(--rust)); color: #211208; }
.button.ghost {
  border: 1px solid rgba(255,255,255,.58);
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.button.ghost.dark { border-color: var(--line); color: var(--ink); background: var(--surface); }

.section {
  padding: clamp(64px, 8vw, 112px) clamp(20px, 6vw, 86px);
}
.section h2 {
  position: relative;
}
.section h2::after {
  content: "";
  display: block;
  width: 76px;
  height: 5px;
  margin-top: 18px;
  background: linear-gradient(90deg, var(--leaf), var(--water), var(--sun));
  transform: skewX(-28deg);
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 80px);
}
.lead { font-size: 20px; color: var(--muted); margin-top: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.badges span,
.status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--surface);
  font-weight: 800;
  font-size: 13px;
}
.badges span {
  border-color: rgba(43, 122, 79, .32);
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
}
.language-card {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid rgba(43, 122, 79, .24);
  border-left: 5px solid var(--water);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
}
.language-card h3 {
  font-size: 20px;
}
.language-card p {
  margin: 10px 0 16px;
  color: var(--muted);
}
.language-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.language-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--white);
  font-weight: 900;
  font-size: 12px;
}
.region-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .8fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: clamp(54px, 7vw, 86px) clamp(20px, 6vw, 86px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(9, 25, 22, .9), rgba(16, 55, 45, .78)),
    linear-gradient(135deg, transparent 0 58%, rgba(240, 177, 63, .24) 58% 60%, transparent 60%),
    url("../img/hero-bike-guide.png") center 42% / cover no-repeat;
}
.region-band::before {
  content: "CH";
  position: absolute;
  right: clamp(18px, 5vw, 70px);
  top: 22px;
  color: rgba(255,255,255,.08);
  font-weight: 1000;
  font-size: clamp(96px, 18vw, 220px);
  line-height: 1;
}
.region-copy,
.region-points {
  position: relative;
  z-index: 1;
}
.region-copy p:not(.kicker) {
  max-width: 790px;
  color: rgba(255,255,255,.82);
  font-size: 19px;
}
.region-points {
  display: grid;
  gap: 12px;
}
.region-points span {
  display: block;
  padding: 15px 18px;
  border-left: 5px solid var(--sun);
  background: rgba(255,255,255,.1);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  backdrop-filter: blur(8px);
}
.muted { background: var(--mist); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 18px; }
.offer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 16px;
}
.offer-card,
.tour-card,
.contact-form,
.admin-panel,
.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.offer-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  border-top: 5px solid var(--leaf);
}
.offer-card::before {
  content: "";
  position: absolute;
  inset: -40px -60px auto auto;
  width: 130px;
  height: 130px;
  border: 16px solid rgba(16, 55, 45, .06);
  border-radius: 50%;
}
.offer-card:nth-child(2n) { border-top-color: var(--water); }
.offer-card:nth-child(3n) { border-top-color: var(--rust); }
.offer-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--mist);
}
.offer-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}
.offer-card p { color: var(--muted); }
.offer-card a,
.text-button,
.instagram {
  margin-top: auto;
  color: var(--leaf);
  font-weight: 900;
  text-decoration: none;
}
.tour-list { display: grid; gap: 16px; }
.tour-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 24px;
  padding: 24px;
}
.tour-card.is-sold-out {
  filter: saturate(.75);
}
.tour-card.is-sold-out > :not(.sold-out-ribbon) {
  opacity: .62;
}
.tour-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(var(--sun), var(--rust));
}
.sold-out-ribbon {
  position: absolute;
  z-index: 3;
  top: 34px;
  right: -64px;
  width: 240px;
  padding: 10px 12px;
  transform: rotate(34deg);
  background: linear-gradient(135deg, var(--rust), #8e2d18);
  color: var(--white);
  text-align: center;
  text-transform: uppercase;
  font-weight: 1000;
  letter-spacing: .08em;
  box-shadow: 0 14px 24px rgba(0,0,0,.22);
}
.sold-out-note {
  margin: 16px 0 0;
  color: var(--rust);
  font-weight: 900;
}
.date-box {
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(240, 177, 63, .25), transparent),
    var(--forest);
  color: var(--white);
  min-height: 100px;
  display: grid;
  place-items: center;
  align-content: center;
}
.date-box strong { font-size: 28px; }
.tour-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 18px 0;
}
.tour-meta div { min-width: 100px; }
dt { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; }
dd { margin: 0; font-weight: 900; }
.empty { padding: 24px; background: var(--mist); border-radius: 8px; }
.contact-band {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  background:
    repeating-linear-gradient(132deg, rgba(255,255,255,.035) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, #0d231e, var(--forest) 55%, #174c3e);
  color: var(--white);
}
.contact-band p { color: rgba(255,255,255,.78); }
.contact-form { padding: 24px; color: var(--ink); }
label { display: grid; gap: 7px; margin-bottom: 14px; font-weight: 800; }
.notice { padding: 12px; border-radius: 6px; background: #e6f5e8; color: #174222 !important; }
.error { padding: 12px; border-radius: 6px; background: #ffe8e1; color: #8d260f; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px clamp(20px, 6vw, 86px);
  background: #0f211d;
  color: rgba(255,255,255,.72);
}
.legal-page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}
.legal-page h1 {
  margin: 28px 0 34px;
  font-size: clamp(36px, 6vw, 64px);
}
.legal-page h2 {
  margin: 34px 0 10px;
  font-size: 24px;
}
.legal-page p {
  color: var(--muted);
}
.legal-page a {
  color: var(--sun);
}
.theme-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.theme-switcher span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.56);
}
.theme-switcher button {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255,255,255,.08);
  color: var(--white);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.theme-switcher button.active {
  border-color: var(--sun);
  background: var(--sun);
  color: #221407;
}

.admin-page { background: var(--mist); }
.admin-shell { width: min(1120px, calc(100% - 32px)); margin: 40px auto; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.admin-panel { max-width: 460px; padding: 24px; margin: 80px auto; }
.admin-panel.wide { max-width: none; margin: 0; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.counter-control {
  display: grid;
  grid-template-columns: 44px minmax(70px, 1fr) 44px;
  gap: 8px;
  align-items: stretch;
}
.counter-control button {
  border: 0;
  border-radius: 6px;
  background: var(--forest);
  color: var(--white);
  font: inherit;
  font-size: 24px;
  font-weight: 1000;
  cursor: pointer;
}
.counter-control button:last-child {
  background: linear-gradient(135deg, var(--leaf), var(--water));
}
.counter-control input {
  text-align: center;
  font-weight: 900;
}
.compact-counter {
  max-width: 150px;
  grid-template-columns: 36px 58px 36px;
  gap: 6px;
}
.compact-counter button {
  min-height: 36px;
  font-size: 20px;
}
.compact-counter input {
  padding: 8px 6px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 22px 0;
  padding: 16px;
}
legend { font-weight: 900; color: var(--leaf); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th,
.admin-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.row-actions { display: flex; gap: 12px; align-items: center; }
.row-actions button {
  border: 0;
  background: transparent;
  color: #a33a21;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; }
  .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col,
  .contact-band,
  .region-band { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .site-header {
    position: absolute;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 12px 16px 10px;
    background: linear-gradient(rgba(10, 22, 19, .86), rgba(10, 22, 19, .18));
    backdrop-filter: none;
  }
  .brand {
    align-self: start;
  }
  .brand img { width: 78px; }
  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 18px;
    font-size: 14px;
    line-height: 1;
    padding-top: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar {
    display: none;
  }
  .lang-switch {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding: 3px;
  }
  .lang-switch a {
    min-width: 30px;
    min-height: 28px;
    padding: 5px 7px;
    font-size: 11px;
  }
  .hero {
    min-height: 700px;
    align-items: flex-end;
    padding: 128px 22px 36px;
    background:
      linear-gradient(180deg, rgba(10, 22, 19, .58) 0%, rgba(10, 22, 19, .22) 30%, rgba(10, 22, 19, .78) 100%),
      url("../img/hero-bike-guide.png") 58% top / cover no-repeat;
  }
  .hero::after {
    opacity: .28;
  }
  h1 {
    font-size: clamp(34px, 10vw, 46px);
  }
  .hero p:not(.kicker) {
    font-size: 18px;
    line-height: 1.45;
  }
  .actions {
    margin-top: 22px;
  }
  .button {
    min-height: 44px;
    padding: 11px 16px;
  }
  .offer-grid,
  .tour-card,
  .form-grid { grid-template-columns: 1fr; }
  .admin-top { align-items: flex-start; flex-direction: column; }
  .site-footer { flex-direction: column; }
}
