/*
  Vibetrans styles
  ------------------------------------------------------------
  Structure:
  01. Design tokens
  02. Base
  03. Background
  04. Navigation
  05. Buttons and controls
  06. Page layout
  07. Intro
  08. Calculator preview
  09. Auth panel
  10. Footer
  11. Responsive
*/

/* 01. Design tokens */
:root {
  --bg: #05060a;
  --fg: #eef1f7;
  --muted: rgba(238, 241, 247, 0.62);
  --muted-2: rgba(238, 241, 247, 0.42);
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --ok: #34d399;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --card: rgba(12, 14, 22, 0.72);
  --bar-bg: rgba(8, 10, 16, 0.55);
  --input-bg: rgba(0, 0, 0, 0.32);
  --input-bg-focus: rgba(0, 0, 0, 0.5);
  --base-grad: radial-gradient(80% 60% at 50% 0%, #141a2e 0%, #07080f 60%, #04050a 100%);
  --h1-grad: linear-gradient(180deg, #ffffff 0%, #b9c0d4 100%);
  --text-shadow-lead: 0 1px 12px rgba(0,0,0,0.85), 0 1px 2px rgba(0,0,0,0.6);
  --lead-fg: #e6eaf3;
  --overlay-vignette: rgba(5,6,10,0.78);
  --overlay-vignette-2: rgba(5,6,10,0.55);
  --overlay-horiz-1: rgba(5,6,10,0.55);
  --overlay-horiz-2: rgba(5,6,10,0.15);
  --overlay-vert-1: rgba(5,6,10,0.10);
  --overlay-vert-2: rgba(5,6,10,0.30);
  --overlay-bottom: rgba(5,6,10,0.35);
  --btn-primary-fg: #0a0a0f;
}

html[data-theme="light"] {
  --bg: #eef1f7;
  --fg: #0d1220;
  --muted: rgba(13, 18, 32, 0.72);
  --muted-2: rgba(13, 18, 32, 0.52);
  --glass: rgba(13, 18, 32, 0.05);
  --glass-strong: rgba(13, 18, 32, 0.10);
  --border: rgba(13, 18, 32, 0.14);
  --border-strong: rgba(13, 18, 32, 0.26);
  --card: rgba(255, 255, 255, 0.82);
  --bar-bg: rgba(246, 248, 253, 0.72);
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-bg-focus: #ffffff;
  --base-grad: radial-gradient(80% 60% at 50% 0%, #e6ecfb 0%, #d8def0 60%, #c8cee2 100%);
  --h1-grad: linear-gradient(180deg, #0d1220 0%, #2a3354 100%);
  --text-shadow-lead: 0 1px 8px rgba(255,255,255,0.7);
  --lead-fg: #1b2238;
  --overlay-vignette: rgba(238, 241, 247, 0.70);
  --overlay-vignette-2: rgba(238, 241, 247, 0.45);
  --overlay-horiz-1: rgba(238, 241, 247, 0.55);
  --overlay-horiz-2: rgba(238, 241, 247, 0.15);
  --overlay-vert-1: rgba(238, 241, 247, 0.15);
  --overlay-vert-2: rgba(238, 241, 247, 0.30);
  --overlay-bottom: rgba(238, 241, 247, 0.45);
  --btn-primary-fg: #ffffff;
}

/* 02. Base */
* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: transparent;
  color: var(--fg);
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* 03. Background */
.bg-base {
  position: fixed; inset: 0;
  z-index: -3;
  background: var(--base-grad);
  transition: background .4s ease;
}
.bg-video {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(1.25) contrast(1.08) brightness(1.05);
  animation: bg-pan 18s ease-in-out infinite alternate;
  transform-origin: center center;
  will-change: transform;
  /* Smoothly fade top/bottom edges into .bg-base to avoid a visible seam */
  -webkit-mask-image: linear-gradient(180deg,
    transparent 0%,
    rgba(0,0,0,0.35) 4%,
    #000 14%,
    #000 82%,
    rgba(0,0,0,0.35) 96%,
    transparent 100%);
          mask-image: linear-gradient(180deg,
    transparent 0%,
    rgba(0,0,0,0.35) 4%,
    #000 14%,
    #000 82%,
    rgba(0,0,0,0.35) 96%,
    transparent 100%);
}
@keyframes bg-pan {
  0%   { transform: scale(1.10) translate(-3%, -2%); }
  50%  { transform: scale(1.22) translate(3%,  2.5%); }
  100% { transform: scale(1.10) translate(-2%, 3%); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-video { animation: none; }
}
html[data-theme="light"] .bg-video {
  filter: saturate(1.05) contrast(0.95) brightness(1.35);
  opacity: 0.55;
}
.bg-overlay {
  position: fixed; inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(50% 50% at 15% 85%, rgba(124, 92, 255, 0.16), transparent 60%),
    /* left-side readability vignette under intro text */
    radial-gradient(55% 75% at 22% 50%, var(--overlay-vignette) 0%, var(--overlay-vignette-2) 35%, transparent 70%),
    linear-gradient(90deg, var(--overlay-horiz-1) 0%, var(--overlay-horiz-2) 45%, transparent 70%),
    linear-gradient(180deg, var(--overlay-vert-1) 0%, var(--overlay-vert-2) 100%);
  pointer-events: none;
}
.bg-overlay::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 100%, var(--overlay-bottom), transparent 60%);
}

/* 04. Navigation */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px;
  background: var(--bar-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease, border-color .3s ease;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--fg); text-decoration: none;
  font-weight: 700; letter-spacing: 0.2px;
}
.brand__mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: none;
}
.brand__name { font-size: 16px; }
.brand__name span { color: var(--accent-2); }
.brand__sub {
  margin-left: 4px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted-2);
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

.top-links {
  display: flex; gap: 4px;
  list-style: none; margin: 0 0 0 12px; padding: 0;
}
.top-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.top-links a:hover { color: var(--fg); background: var(--glass); }

.top-status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.top-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 10px var(--ok);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: .6; } 50% { opacity: 1; }
}

.top-actions { display: flex; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn--ghost {
  color: var(--fg);
  background: var(--glass);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--glass-strong); border-color: var(--border-strong); }
.btn--primary {
  color: var(--btn-primary-fg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px -12px var(--accent);
}

/* 05. Buttons and controls */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .2s ease;
}
.theme-toggle:hover { background: var(--glass-strong); border-color: var(--border-strong); }
.theme-toggle svg { width: 18px; height: 18px; transition: transform .4s ease, opacity .2s ease; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun  { display: inline; }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -12px var(--accent); }
.btn--block { width: 100%; padding: 13px 16px; font-size: 14.5px; }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* 06. Page layout */
.portal {
  position: relative;
  min-height: 100vh;
  padding: 96px 28px 72px;
  display: grid;
  grid-template-columns: 1.05fr 460px;
  gap: 48px;
  align-content: center;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}

/* 07. Intro */
.intro__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.intro__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2);
}
.intro h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: 580px;
  padding-bottom: 0.08em;
  background: var(--h1-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(0,0,0,0.75));
}
html[data-theme="light"] .intro h1 { filter: drop-shadow(0 2px 10px rgba(255,255,255,0.6)); }
.intro h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro__lead {
  color: var(--lead-fg);
  font-size: 16px; line-height: 1.6;
  max-width: 630px; margin: 0 0 22px;
  text-shadow: var(--text-shadow-lead);
}

.intro__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 630px;
  margin: 0 0 28px;
}

.intro__metrics div {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.intro__metrics strong {
  display: block;
  margin-bottom: 6px;
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.intro__metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

/* 08. Calculator preview */
.calc {
  position: relative;
  max-width: 580px;
  padding: 22px;
  border-radius: 18px;
  border: 1px dashed var(--border-strong);
  background:
    linear-gradient(135deg, rgba(124,92,255,0.08), rgba(34,211,238,0.06)),
    var(--card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  overflow: hidden;
}
.calc__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.calc__title {
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 10px;
}
.calc__title svg { color: var(--accent-2); }
.calc__badge {
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-2);
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(34,211,238,0.35);
  background: rgba(34,211,238,0.08);
}
.calc__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.calc__field {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
.calc__field svg { color: var(--muted-2); flex: none; }
.calc__field label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.calc__field input,
.calc__field select {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.calc__field select {
  appearance: none;
  cursor: pointer;
}
.calc__field input::placeholder { color: var(--muted-2); }
.calc__field:focus-within {
  border-color: rgba(34,211,238,0.55);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.10);
}
.calc__oversize {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.calc__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.calc__check input { accent-color: var(--accent-2); }
.calc__help-btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(34,211,238,0.35);
  background: rgba(34,211,238,0.08);
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 700;
}
.calc__help-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 3;
  display: none;
  max-width: 420px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 18px 50px rgba(0,0,0,0.28);
}
.calc__help-pop.open { display: block; }
.calc__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}
.calc__hint {
  min-height: 18px;
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.45;
}
.calc__result {
  margin-top: 12px;
}
.calc-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.calc-tariff {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 12px 10px 14px;
  border: 1px solid rgba(81, 205, 255, 0.16);
  border-radius: 10px;
  background: #ffffff;
  color: #0f4f7b;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15, 79, 123, 0.08);
}
.calc-tariff__title {
  font-size: clamp(20px, 3.2vw, 24px);
  line-height: 1.08;
  font-weight: 900;
  color: #0f4f7b;
  white-space: nowrap;
}
.calc-tariff__cost {
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.1;
  font-weight: 900;
  color: #0784c3;
  margin-bottom: 6px;
}
.calc-tariff__details {
  display: grid;
  gap: 3px;
}
.calc-tariff__line {
  display: flex;
  justify-content: center;
  gap: 4px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.25;
  color: #0f4f7b;
}
.calc-tariff__line b {
  color: #0f4f7b;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.calc-tariff__meta {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}
.calc-tariff__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.calc-tariff__row + .calc-tariff__row {
  flex-direction: column;
  gap: 4px;
}
.calc-tariff__label {
  font-size: 14px;
  line-height: 1.1;
  color: #0f4f7b;
  white-space: nowrap;
}
.calc-tariff__pill {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 10px;
  border: 0;
  border-radius: 999px;
  background: #e3f6fb;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 900;
  color: #0784c3;
  text-overflow: ellipsis;
}
.calc-tariff__order {
  margin-top: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #19b6e8, #1679c7);
  box-shadow: none;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(13px, 2.2vw, 15px);
  font-weight: 900;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.calc-tariff__order:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(22, 121, 199, 0.2);
}
.calc-order { display: none !important; }

/* Ordering mode: blur everything except the selected tariff card and auth panel */
.calc-tariff,
.calc__head,
.calc__grid,
.calc__oversize,
.calc__cta,
.intro,
.auth {
  transition: filter 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.portal.is-ordering .calc__head,
.portal.is-ordering .calc__grid,
.portal.is-ordering .calc__oversize,
.portal.is-ordering .calc__cta,
.portal.is-ordering .intro__eyebrow,
.portal.is-ordering .intro > h1,
.portal.is-ordering .intro__lead,
.portal.is-ordering .intro__metrics {
  filter: blur(3px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}
.portal.is-ordering .calc-tariff:not(.is-selected) {
  filter: blur(3px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
.portal.is-ordering .calc-tariff.is-selected {
  position: relative;
  z-index: 3;
  isolation: isolate;
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto;
  border-color: var(--accent-2);
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: scale(1.03);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.6),
    0 18px 44px rgba(34, 211, 238, 0.3);
}
html[data-theme="light"] .portal.is-ordering .calc-tariff.is-selected {
  background: #ffffff;
}
.portal.is-ordering .auth {
  position: relative;
  z-index: 5;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55),
    0 18px 50px rgba(34, 211, 238, 0.22);
}
.calc__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--fg);
  background: var(--glass);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.calc__btn:hover { background: var(--glass-strong); border-color: var(--border-strong); transform: translateY(-1px); }
.calc::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,0.015) 14px 28px);
  pointer-events: none;
}

/* 09. Auth panel */
.auth {
  position: relative;
  background: var(--card);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 28px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 80px -30px rgba(0,0,0,0.7);
}
.auth::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124,92,255,.55), rgba(34,211,238,.35) 50%, transparent 80%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

.auth__tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
}
.auth__tab {
  appearance: none; border: 0; background: transparent;
  padding: 10px 12px; border-radius: 9px;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.auth__tab.is-active {
  color: var(--fg);
  background: var(--glass-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}

.auth__title {
  font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.auth__sub { font-size: 13px; color: var(--muted); margin: 0 0 20px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px; color: var(--muted);
  margin-bottom: 6px; font-weight: 500;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus {
  border-color: rgba(124,92,255,0.6);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.12);
}

.row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 18px;
  font-size: 12.5px;
}
.row label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); cursor: pointer;
}
.row label input { accent-color: var(--accent); }
.row a { color: var(--fg); text-decoration: none; opacity: .85; }
.row a:hover { opacity: 1; }

.auth__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.4;
}

.auth__divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 14px;
  color: var(--muted-2);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
}
.auth__divider::before, .auth__divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

.sso { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sso .btn { padding: 10px 12px; font-size: 13px; }

.auth__foot {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px; color: var(--muted);
}
.auth__foot a { color: var(--fg); text-decoration: none; }
.auth__foot a:hover { text-decoration: underline; }

.panel { display: none; }
.panel.is-active { display: block; }

/* Registration form (panel "register") */
.reg-fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px 4px;
  margin: 0 0 14px;
  background: rgba(255, 255, 255, 0.02);
}
.reg-fieldset legend {
  padding: 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
.reg-hint {
  font-weight: 400;
  font-size: 11.5px;
  margin-left: 6px;
  color: var(--muted-2);
}
.reg-hint[data-kind="ok"]   { color: #34d399; }
.reg-hint[data-kind="err"]  { color: #fca5a5; }
.reg-hint[data-kind="warn"] { color: #fbbf24; }
.reg-hint[data-kind="wait"] { color: var(--muted-2); }
.reg-pdn {
  display: inline-flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: var(--muted);
}
.reg-pdn input { margin-top: 3px; accent-color: var(--accent); }
.reg-pdn a { color: var(--fg); text-decoration: underline; }

/* Выбор роли кабинета (Клиент / Перевозчик) */
.reg-role__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-bottom: 8px;
}
@media (max-width: 540px) {
  .reg-role__options { grid-template-columns: 1fr; }
}
.reg-role__opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.reg-role__opt span { font-weight: 600; font-size: 14px; }
.reg-role__opt small { color: var(--muted-2); font-size: 11.5px; }
.reg-role__opt input { accent-color: var(--accent); margin-right: 6px; }
.reg-role__opt:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

/* 10. Services */
.services {
  position: relative;
  scroll-margin-top: 86px;
  width: min(1220px, calc(100% - 56px));
  margin: 0 auto;
  padding: 54px 0 92px;
}

.services__head {
  max-width: 760px;
  margin-bottom: 28px;
}

.services__head h2 {
  margin: 18px 0 14px;
  color: var(--fg);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.services__head > p {
  max-width: 650px;
  margin: 0;
  color: var(--lead-fg);
  font-size: 15.5px;
  line-height: 1.6;
  text-shadow: var(--text-shadow-lead);
}

.service-stack {
  display: grid;
  gap: 18px;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: clamp(34px, 4.5vw, 70px);
  align-items: start;
  min-height: 650px;
  padding: 46px 0;
  border-top: 1px solid var(--border);
}

.service-row:last-child { border-bottom: 1px solid var(--border); }

.service-row__copy h3 {
  margin: 38px 0 10px;
  color: var(--fg);
  font-size: 23px;
  line-height: 1.25;
}

.service-row__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.service-points {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.service-points li {
  position: relative;
  padding: 12px 14px 12px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--lead-fg);
  font-size: 13.5px;
  line-height: 1.45;
  text-shadow: var(--text-shadow-lead);
}

.service-points li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-2);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.75);
  transform: rotate(12deg);
}

.puzzle-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(330px, 390px));
  grid-template-rows: repeat(2, minmax(330px, 390px));
  column-gap: clamp(2px, .45vw, 8px);
  row-gap: clamp(2px, .5vw, 10px);
  align-items: center;
  justify-content: center;
  min-height: 790px;
  padding: 10px 0;
}

.puzzle-piece {
  width: min(100%, 390px);
  aspect-ratio: 1;
  justify-self: center;
  align-self: center;
  color: #245478;
  overflow: visible;
  opacity: 0.42;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.16));
  --piece-x: 0px;
  --piece-y: 0px;
  transform: translate(var(--piece-x), var(--piece-y));
  transition: opacity .2s ease, filter .2s ease;
}

.puzzle-piece path {
  fill: rgba(255, 255, 255, 0.18);
  stroke: currentColor;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="light"] .puzzle-piece path {
  fill: rgba(255, 255, 255, 0.84);
}

.puzzle-piece.is-active {
  width: min(132%, 500px);
  opacity: 1;
  animation: puzzle-float 5.8s ease-in-out infinite;
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.30));
}

.puzzle-piece--truck { grid-column: 1; grid-row: 1; }
.puzzle-piece--rail { grid-column: 2; grid-row: 1; --piece-x: -22px; --piece-y: 3px; }
.puzzle-piece--container { grid-column: 1; grid-row: 2; --piece-x: 1px; --piece-y: -23px; }
.puzzle-piece--air { grid-column: 2; grid-row: 2; --piece-x: -22px; --piece-y: -22px; }

.puzzle-piece--truck { color: #22d3ee; }
.puzzle-piece--rail { color: #7c5cff; }
.puzzle-piece--container { color: #34d399; }
.puzzle-piece--air { color: #60a5fa; }

.puzzle-line::before {
  content: "";
  position: absolute;
  inset: 4% 0;
  z-index: -1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(124, 92, 255, 0.05)),
    rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}

@keyframes puzzle-float {
  0%, 100% { transform: translate(var(--piece-x), var(--piece-y)); }
  50% { transform: translate(var(--piece-x), calc(var(--piece-y) - 10px)); }
}

@media (prefers-reduced-motion: reduce) {
  .puzzle-piece.is-active { animation: none; }
}

/* 11. Content sections */
.ops,
.workflow,
.support-band {
  position: relative;
  scroll-margin-top: 86px;
  width: min(1220px, calc(100% - 56px));
  margin: 0 auto;
}

.ops {
  padding: 0 0 86px;
}

.ops__intro,
.workflow__copy {
  max-width: 760px;
}

.ops__intro h2,
.workflow__copy h2,
.support-band h2 {
  margin: 18px 0 14px;
  color: var(--fg);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.ops__intro p,
.workflow__copy p,
.support-band p {
  margin: 0;
  color: var(--lead-fg);
  font-size: 15.5px;
  line-height: 1.6;
  text-shadow: var(--text-shadow-lead);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.ops-grid article {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025)),
    var(--card);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.ops-grid span {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.32);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.ops-grid h3 {
  margin: 0;
  color: var(--fg);
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.ops-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.workflow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.workflow-list {
  display: grid;
  gap: 10px;
}

.workflow-list div {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.workflow-list strong {
  color: var(--fg);
  font-size: 15px;
}

.workflow-list span {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.support-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 76px 0 118px;
}

.support-band > div {
  max-width: 760px;
}

/* 12. Footer */
footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  background: var(--bar-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

footer .container {
  width: min(1220px, calc(100% - 56px));
  margin: 0 auto;
  padding: 42px 0 24px;
}

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

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

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

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-content-between { justify-content: space-between; }
.align-items-end { align-items: flex-end; }
.gap-3 { gap: 28px; }

.footer_top {
  align-items: stretch;
  padding-bottom: 34px;
}

.footer_links {
  gap: clamp(34px, 6vw, 82px);
  flex-wrap: wrap;
}

.footer_links ul {
  gap: 10px;
  min-width: 126px;
}

.footer_links li:first-child {
  margin-bottom: 4px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 800;
}

.footer_links a {
  font-size: 13px;
  line-height: 1.35;
}

.social {
  min-width: 184px;
  gap: 22px;
}

.media {
  gap: 8px;
  justify-content: flex-end;
}

.media a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--fg);
  background: var(--glass);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 800;
}

.media a:hover {
  background: var(--glass-strong);
  border-color: var(--border-strong);
}

.download_on {
  gap: 10px;
}

.download_on a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  background: var(--glass);
  font-size: 12px;
  font-weight: 800;
}

.download_on a:hover {
  border-color: var(--border-strong);
  background: var(--glass-strong);
}

.footer_bottom {
  align-items: flex-end;
  gap: 22px;
  padding-top: 24px;
}

.brand_logo {
  display: inline-flex;
  align-items: center;
  flex-direction: column-reverse;
  gap: 6px;
}

.brand_logo img {
  display: block;
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
  transform-origin: center;
}

.brand_logo__vertical {
  display: inline-flex;
  align-items: baseline;
  color: var(--fg);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.brand_logo__vertical span:last-child {
  color: var(--accent-2);
}

.main_links {
  gap: clamp(16px, 3vw, 38px);
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.main_links a {
  font-size: 12px;
  color: var(--muted-2);
}

.desc_none { display: none; }

/* 13. Responsive */
@media (max-width: 980px) {
  .portal {
    grid-template-columns: 1fr;
    padding: 96px 20px 80px;
    gap: 28px;
  }
  .brand__sub { display: none; }
  .calc__grid { grid-template-columns: 1fr; }
  .calc__cta { flex-direction: column; align-items: stretch; }
  .calc-results { grid-template-columns: 1fr; }
  .services {
    width: min(100% - 40px, 720px);
    padding-bottom: 106px;
  }
  .service-row {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
  }
  .service-row__copy h3 { margin-top: 0; }
  .puzzle-line { justify-content: center; }
  .ops-grid {
    grid-template-columns: 1fr;
  }
  .workflow {
    grid-template-columns: 1fr;
  }
  .support-band {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer_top { flex-direction: column; }
  .social {
    min-width: 0;
    align-items: flex-start;
  }
  .media { justify-content: flex-start; }
  .download_on { align-items: flex-start; }
}
@media (max-width: 520px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .top-actions .btn--ghost { display: none; }
  .auth { padding: 22px; }
  .intro__metrics {
    grid-template-columns: 1fr;
  }
  .services {
    width: calc(100% - 32px);
    gap: 30px;
  }
  .service-row { padding: 20px 0 24px; }
  .service-row__copy h3 { font-size: 18px; }
  .puzzle-line {
    grid-template-columns: repeat(2, minmax(154px, 1fr));
    grid-template-rows: repeat(2, 176px);
    gap: 2px;
    min-height: 374px;
    justify-content: flex-start;
    overflow: visible;
    padding-bottom: 4px;
  }
  .puzzle-piece {
    width: 152px;
  }
  .puzzle-piece.is-active {
    width: 196px;
  }
  .ops,
  .workflow,
  .support-band {
    width: calc(100% - 32px);
  }
  .ops {
    padding-bottom: 58px;
  }
  .ops-grid article {
    padding: 22px 20px;
  }
  .workflow {
    padding: 44px 0;
  }
  .support-band {
    padding: 54px 0 86px;
  }
  footer .container {
    width: calc(100% - 32px);
    padding-top: 34px;
  }
  .footer_links {
    flex-direction: column;
    gap: 24px;
  }
  .mobile_none {
    display: none;
  }
  .desc_none {
    display: flex;
  }
  .footer_bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .main_links {
    flex-direction: column;
    gap: 10px;
  }
}
