:root {
  --bs-primary: #0f766e;
  --bs-primary-rgb: 15, 118, 110;
  --app-navy: #0b3d4a;
  --ink: #072830;
  --mist: #d7ebe7;
  --sand: #e8f1ef;
  --accent: #1aa6a0;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, #f0f7f6 0%, #e8eef1 100%);
  min-height: 100vh;
  color: var(--ink);
}

h1, h2, h3, .navbar-brand, .land-brand {
  font-family: var(--font-display);
}

.app-navbar {
  background: var(--app-navy) !important;
}

.app-main {
  max-width: 1100px;
}

.app-main--wide {
  max-width: 1280px;
}

.template-vars-panel {
  max-height: calc(100vh - 12rem);
  overflow: auto;
  position: sticky;
  top: 1rem;
}

.template-preview-frame {
  width: 100%;
  min-height: 70vh;
  border: 0;
  background: #fff;
}

.btn-insert-var code {
  color: var(--app-navy);
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.table > :not(caption) > * > * {
  background-color: transparent;
}

.line-item-row .form-control,
.line-item-row .form-select {
  min-width: 0;
}

.package-card {
  height: 100%;
}

.btn-primary {
  --bs-btn-bg: #0f766e;
  --bs-btn-border-color: #0f766e;
  --bs-btn-hover-bg: #0d9488;
  --bs-btn-hover-border-color: #0d9488;
  --bs-btn-active-bg: #0f766e;
  --bs-btn-active-border-color: #0f766e;
}

.nav-link.active {
  font-weight: 600;
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch--light {
  border-color: rgba(7, 40, 48, 0.18);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.65rem;
  line-height: 1;
  cursor: pointer;
}

.lang-switch--light .lang-btn {
  color: var(--ink);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lang-switch--light .lang-btn.active {
  background: var(--app-navy);
  color: #fff;
}

.lang-switch--compact {
  border-color: rgba(255, 255, 255, 0.35);
}

/* Landing */
.land-page {
  background: #061c22;
  color: #e8f4f2;
  overflow-x: hidden;
}

.land-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding: 1.25rem 0;
}

.land-brand {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}

.land-hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ef0ea;
  border: 1px solid rgba(158, 240, 234, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  animation: land-rise 0.9s ease both;
}

.land-hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(158, 240, 234, 0.85);
  animation: land-rise 0.9s ease both;
}

.land-nav-links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 1.25rem;
}

.land-nav-links a:hover {
  color: #fff;
}

.land-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 7rem 0 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(26, 166, 160, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(15, 118, 110, 0.28), transparent 50%),
    linear-gradient(165deg, #04161b 0%, #0b3d4a 48%, #0f5c56 100%);
}

.land-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.land-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.land-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0.35rem 0 1rem;
  animation: land-rise 0.9s ease both;
}

.land-hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(232, 244, 242, 0.82);
  max-width: 36rem;
  margin-bottom: 1.75rem;
  animation: land-rise 0.9s ease 0.12s both;
}

.land-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: land-rise 0.9s ease 0.22s both;
}

.land-visual {
  position: absolute;
  right: -4%;
  top: 18%;
  width: min(48vw, 560px);
  height: min(62vh, 520px);
  z-index: 1;
  pointer-events: none;
  animation: land-float 7s ease-in-out infinite;
}

.land-doc {
  position: absolute;
  inset: 8% 8% auto auto;
  width: 72%;
  aspect-ratio: 1 / 1.28;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 246, 0.92));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  padding: 1.4rem 1.5rem;
  transform: rotate(6deg);
}

.land-doc--back {
  inset: 18% 18% auto auto;
  transform: rotate(14deg) scale(0.96);
  opacity: 0.55;
  filter: blur(0.2px);
}

.land-doc-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--app-navy);
}

.land-doc-line {
  height: 8px;
  border-radius: 999px;
  background: rgba(11, 61, 74, 0.12);
  margin: 0.55rem 0;
}

.land-doc-line.w-60 { width: 60%; }
.land-doc-line.w-40 { width: 40%; }
.land-doc-line.w-80 { width: 80%; }
.land-doc-line.w-50 { width: 50%; }

.land-doc-badge {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f766e;
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

.land-section {
  padding: 5rem 0;
  background: #f3f8f7;
  color: var(--ink);
}

.land-section--dark {
  background: #0a2e36;
  color: #e8f4f2;
}

.land-host {
  padding: 3.5rem 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(26, 166, 160, 0.12), transparent 55%),
    #e7f2f0;
  color: var(--ink);
  border-block: 1px solid rgba(7, 40, 48, 0.06);
}

.land-host h2 {
  letter-spacing: -0.03em;
}

.land-flag-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.land-flag {
  width: 4.5rem;
  height: auto;
  transform-origin: 50% 100%;
  animation: land-flag-wave 4.5s ease-in-out infinite;
}

@keyframes land-flag-wave {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(2.5deg) translateY(-3px); }
}

.land-obl .land-obl-link {
  color: var(--app-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.land-obl .land-obl-link:hover {
  color: #0f766e;
}

.land-section--dark .land-obl-link {
  color: #9ef0ea;
}

.land-section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.land-section .lead {
  color: inherit;
  opacity: 0.75;
  max-width: 36rem;
}

.land-feature {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(7, 40, 48, 0.12);
}

.land-section--dark .land-feature {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.land-feature h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.land-feature p {
  margin: 0;
  opacity: 0.78;
}

.land-step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.land-band {
  padding: 4.5rem 0;
  background:
    radial-gradient(ellipse 70% 80% at 20% 50%, rgba(26, 166, 160, 0.25), transparent 55%),
    #072830;
  color: #fff;
  text-align: center;
}

.land-band h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.03em;
}

.land-footer {
  padding: 1.5rem 0 2rem;
  background: #04161b;
  color: rgba(232, 244, 242, 0.55);
  font-size: 0.9rem;
}

.btn-land {
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-weight: 650;
}

.btn-land-primary {
  background: #1aa6a0;
  border-color: #1aa6a0;
  color: #042226;
}

.btn-land-primary:hover {
  background: #22c2ba;
  border-color: #22c2ba;
  color: #042226;
}

.btn-land-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-land-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: #fff;
}

@keyframes land-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes land-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 991.98px) {
  .land-visual {
    position: relative;
    width: 100%;
    height: 280px;
    right: auto;
    top: auto;
    margin: 2rem auto 0;
    animation: none;
  }

  .land-hero {
    align-items: start;
    padding-top: 6rem;
  }

  .land-nav-links a.land-hide-sm {
    display: none;
  }
}

/* Public site pages (pricing, legal) */
.site-page {
  background: linear-gradient(180deg, #f3f8f7 0%, #e8eef1 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-page .site-main {
  flex: 1;
}

.site-brand-dark {
  color: var(--app-navy) !important;
}

.site-nav-links-dark a {
  color: rgba(7, 40, 48, 0.72) !important;
  margin-left: 1.25rem;
}

.site-nav-links-dark a:hover {
  color: var(--app-navy) !important;
}

.site-footer-links a {
  color: rgba(232, 244, 242, 0.75);
  text-decoration: none;
}

.site-footer-links a:hover {
  color: #fff;
}

.site-legal {
  max-width: 720px;
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(7, 40, 48, 0.06);
}

.site-legal h1 {
  letter-spacing: -0.03em;
}

.site-price-card {
  border: 0;
  border-radius: 1rem;
}

.site-price-card--free {
  outline: 2px solid rgba(15, 118, 110, 0.35);
}

.site-page-intro h1 {
  letter-spacing: -0.03em;
}

/* Brand logos */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  border-radius: 0.35rem;
}

.brand-logo--lg {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.45rem;
}

.brand-logo--sm {
  width: 1.35rem;
  height: 1.35rem;
}

.navbar-brand.brand-mark {
  gap: 0.5rem;
}

.navbar-brand .brand-logo {
  width: 1.45rem;
  height: 1.45rem;
}

/* SmartPostfach main landing */
.sp-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.sp-hero {
  background:
    radial-gradient(ellipse 70% 55% at 75% 15%, rgba(26, 166, 160, 0.4), transparent 55%),
    radial-gradient(ellipse 45% 40% at 5% 90%, rgba(255, 206, 0, 0.08), transparent 50%),
    linear-gradient(165deg, #031217 0%, #0b3d4a 46%, #0a524c 100%);
}

.sp-visual {
  width: min(42vw, 420px);
  height: auto;
  top: 22%;
  right: 2%;
}

.sp-inbox {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-radius: 1.1rem;
  padding: 1rem;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  transform: rotate(-3deg);
  animation: land-float 7s ease-in-out infinite;
}

.sp-inbox-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.sp-inbox-bar span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(7, 40, 48, 0.2);
}

.sp-inbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 0.75rem;
  background: #f3f8f7;
  margin-bottom: 0.5rem;
}

.sp-inbox-row:last-child {
  margin-bottom: 0;
}

.sp-inbox-row--accent {
  background: rgba(15, 118, 110, 0.12);
  outline: 1px solid rgba(15, 118, 110, 0.25);
}

.sp-inbox-row i {
  font-size: 1.15rem;
  color: #0f766e;
}

.sp-inbox-row strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}

.sp-inbox-row small {
  color: rgba(7, 40, 48, 0.55);
  font-size: 0.75rem;
}

.sp-live-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ef0ea;
}

.sp-live-list li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.sp-live-list .bi {
  color: #9ef0ea;
}
