.hidden {
  display: none !important;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--color-dark) 35%, transparent);
  backdrop-filter: blur(2px);
  animation: backdropIn 0.25s ease both;
}

.sidebar-backdrop:not([hidden]) {
  display: block;
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sidebar {
  width: 15.5rem;
  flex-shrink: 0;
  z-index: 90;
  background: var(--color-background);
  border-right: 1px solid var(--color-neutral);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 1.5rem 1.25rem 2rem;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  display: block;
  text-decoration: none;
  transform: translateX(-4px);
  opacity: 0;
  animation: sidebarItemIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.sidebar-brand img {
  display: block;
  width: 100%;
  max-width: 9.5rem;
  height: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.85rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--color-dark);
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-buttons);
  cursor: pointer;
  position: relative;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.18s ease;
  opacity: 0;
  animation: sidebarItemIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sidebar-link:nth-child(1) {
  animation-delay: 0.12s;
}

.sidebar-link:nth-child(2) {
  animation-delay: 0.18s;
}

.sidebar-link:hover {
  background: color-mix(in srgb, var(--color-neutral) 45%, var(--color-background) 55%);
  transform: translateX(2px);
}

.sidebar-link.is-active {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-background) 88%);
  color: var(--color-primary);
  font-weight: var(--font-weight-buttons);
}

.sidebar-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 2px;
  background: var(--color-secondary);
  animation: activeBar 0.35s ease both;
}

@keyframes activeBar {
  from {
    transform: translateY(-50%) scaleY(0);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
  }
}

@keyframes sidebarItemIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sidebar-lang {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
  opacity: 0;
  animation: sidebarItemIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

.sidebar-lang-label {
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-buttons);
  color: var(--color-cool-gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lang-switcher {
  display: flex;
  gap: 0.35rem;
}

.lang-btn {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-neutral);
  background: var(--color-background);
  color: var(--color-dark);
  font-family: inherit;
  font-size: var(--font-size-micro);
  font-weight: var(--font-weight-buttons);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.lang-btn:hover {
  border-color: var(--color-cool-gray);
  transform: translateY(-1px);
}

.lang-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-background);
}

.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-topbar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-neutral);
  position: sticky;
  top: 0;
  z-index: 70;
}

.menu-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-neutral) 35%, var(--color-background) 65%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.menu-toggle:hover {
  background: color-mix(in srgb, var(--color-neutral) 50%, var(--color-background) 50%);
  transform: scale(1.02);
}

.menu-toggle-bars {
  width: 1.1rem;
  height: 2px;
  background: var(--color-dark);
  border-radius: 1px;
  position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-dark);
  border-radius: 1px;
}

.menu-toggle-bars::before {
  top: -5px;
}

.menu-toggle-bars::after {
  top: 5px;
}

.mobile-brand-mark {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.main-area {
  flex: 1;
  padding: 2rem 2rem 3rem;
  position: relative;
}

.page-panel:not(.is-active) {
  display: none !important;
}

.page-panel.is-active {
  animation: pageEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.panel-inner {
  max-width: 36rem;
}

.panel-inner--form {
  max-width: 32rem;
}

.panel-inner--about {
  max-width: 36rem;
}

.page-hero {
  margin-bottom: 1.5rem;
}

.page-hero--minimal {
  margin-bottom: 1.25rem;
}

.page-hero h1 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-headlines);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-primary);
  margin-bottom: 0;
}

.page-hero--minimal .page-tagline {
  margin-top: 0.5rem;
}

.page-tagline {
  font-size: var(--font-size-body);
  line-height: 1.5;
  font-weight: var(--font-weight-body);
  color: color-mix(in srgb, var(--color-dark) 78%, var(--color-cool-gray) 22%);
  max-width: 28rem;
}

.card {
  background: var(--color-background);
  border: 1px solid var(--color-neutral);
  border-radius: 14px;
  padding: 1.5rem 1.35rem;
  box-shadow: 0 2px 16px color-mix(in srgb, var(--color-dark) 6%, transparent);
}

.form-row {
  display: grid;
  gap: 0.25rem 1rem;
}

@media (min-width: 560px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.consent-row.form-group > .checkbox-label {
  margin-bottom: 0;
}

.consent-row .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: var(--font-size-small);
  line-height: 1.45;
  color: color-mix(in srgb, var(--color-dark) 92%, var(--color-cool-gray) 8%);
  cursor: pointer;
}

.consent-row input[type='checkbox'] {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.card--success {
  text-align: center;
  padding: 2rem 1.35rem;
}

.card--success h2 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-headlines);
  color: var(--color-primary);
  margin-bottom: 0.65rem;
}

.card--success p {
  font-size: var(--font-size-body);
  line-height: 1.55;
  color: color-mix(in srgb, var(--color-dark) 88%, var(--color-cool-gray) 12%);
  margin-bottom: 1.25rem;
}

.card--success .btn-secondary {
  margin: 0 auto;
}

.success-mark {
  margin-bottom: 1rem;
}

.success-mark img {
  display: block;
  margin: 0 auto;
  max-width: 5rem;
  height: auto;
}

.about-visual {
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: pageEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.about-visual img {
  display: block;
  width: 6rem;
  height: auto;
}

.about-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-headlines);
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.about-lead {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-subtitles);
  color: var(--color-dark);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: var(--font-size-body);
  line-height: 1.65;
  color: color-mix(in srgb, var(--color-dark) 88%, var(--color-cool-gray) 12%);
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 8px 0 32px color-mix(in srgb, var(--color-dark) 18%, transparent);
  }

  .mobile-topbar {
    display: flex;
  }

  .main-area {
    padding: 1.25rem 1.1rem 2rem;
  }

  .sidebar-inner {
    min-height: 100dvh;
    padding-top: 1.15rem;
  }
}
