:root {
  color-scheme: dark;
  --bg-top: #14181f;
  --bg-mid: #0a0c10;
  --bg-bottom: #05070a;
  --panel: #111111;
  --panel-soft: #15181c;
  --surface: #0f1417;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(60, 182, 128, 0.45);
  --text: #f6fbf8;
  --text-soft: rgba(235, 247, 241, 0.72);
  --text-muted: rgba(198, 214, 205, 0.65);
  --brand: #3cb680;
  --brand-dark: #2e8b57;
  --brand-glow: rgba(60, 182, 128, 0.34);
  --success: #73d9ad;
  --danger: #ff8f8f;
  --radius-lg: 24px;
  --radius-md: 14px;
  --shadow-soft: 0 22px 52px rgba(0, 0, 0, 0.45);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at top, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
  overflow-x: hidden;
  position: relative;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.36;
}

.shape-a {
  width: 280px;
  height: 280px;
  background: #3cb680;
  top: -80px;
  right: -40px;
}

.shape-b {
  width: 340px;
  height: 340px;
  background: #2e8b57;
  left: -120px;
  bottom: 8%;
}

.shape-c {
  width: 210px;
  height: 210px;
  background: #4cd29b;
  right: 16%;
  bottom: -80px;
}

.layout {
  width: min(1080px, 92%);
  margin: 0 auto;
  padding: 34px 0 64px;
}

.brandbar,
.hero,
.card,
.integration {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-name {
  margin: 0;
  font-family: "Comfortaa", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-tag {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--brand);
  border-color: rgba(60, 182, 128, 0.55);
  transform: translateY(-1px);
}

.brand-link {
  color: #ffffff;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.brand-link:hover {
  color: var(--brand);
  border-color: rgba(60, 182, 128, 0.55);
  transform: translateY(-1px);
}

.hero {
  margin-bottom: 20px;
  padding: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(126, 231, 180, 0.95);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-family: "Comfortaa", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.85rem);
  line-height: 1.14;
}

.subtitle {
  margin: 14px 0 0;
  max-width: 72ch;
  color: var(--text-soft);
  line-height: 1.7;
}

.hero-metrics {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.hero-metrics article {
  background: rgba(6, 8, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.metric-label {
  margin: 0 0 6px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.metric-value {
  margin: 0;
  font-weight: 700;
  color: #ffffff;
}

.card {
  padding: 24px;
}

.type-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.type-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 16px;
  transition: all 0.2s ease;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.type-button:hover {
  border-color: rgba(60, 182, 128, 0.55);
  transform: translateY(-1px);
}

.type-button.active {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, #3cb680 0%, #2e8b57 100%);
  box-shadow: 0 10px 24px rgba(60, 182, 128, 0.32);
}

.type-description {
  margin: 14px 4px 0;
  color: var(--text-soft);
}

form {
  margin-top: 18px;
}

.group {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  padding: 18px;
}

.group + .group {
  margin-top: 14px;
}

legend {
  padding: 0 8px;
  font-family: "Comfortaa", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.one {
  grid-template-columns: 1fr;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 10px;
  padding: 11px 12px;
  color: #ffffff;
  background: rgba(8, 12, 14, 0.86);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(207, 220, 211, 0.52);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--brand-glow);
  background: rgba(10, 15, 18, 0.95);
}

input[type="date"] {
  color-scheme: dark;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

code {
  color: #93ebc0;
}

.actions {
  margin-top: 16px;
}

#submitButton {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 28px rgba(60, 182, 128, 0.36);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#submitButton:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(60, 182, 128, 0.45);
  filter: saturate(1.05);
}

#submitButton:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.helper {
  margin: 9px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.status {
  min-height: 1.4em;
  margin: 12px 2px 0;
  font-weight: 600;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.integration {
  margin-top: 16px;
  padding: 18px 20px;
}

.integration h2 {
  margin: 0;
  font-family: "Comfortaa", sans-serif;
  font-size: 1.06rem;
}

.integration p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.popup {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.popup-card {
  width: min(460px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(170deg, rgba(21, 24, 28, 0.98), rgba(12, 15, 18, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  padding: 22px;
}

.popup-card h2 {
  margin: 0;
  font-family: "Comfortaa", sans-serif;
  font-size: 1.2rem;
}

.popup-card p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.65;
}

#popupClose {
  margin-top: 16px;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

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

:root[data-theme="light"] {
  color-scheme: light;
  --text: #162628;
  --text-soft: rgba(25, 44, 47, 0.78);
  --text-muted: rgba(40, 62, 66, 0.62);
  --line: rgba(16, 27, 29, 0.14);
  --line-strong: rgba(60, 182, 128, 0.5);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 10% -10%, #e6f7f0 0%, transparent 36%),
    radial-gradient(circle at 92% 16%, #dff3ec 0%, transparent 30%),
    linear-gradient(150deg, #f3f7f6 0%, #edf3f1 52%, #e7f0ed 100%);
}

html[data-theme="light"] .brandbar,
html[data-theme="light"] .hero,
html[data-theme="light"] .card,
html[data-theme="light"] .integration {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(246, 251, 248, 0.88));
  border-color: rgba(18, 33, 35, 0.14);
  box-shadow: 0 20px 50px rgba(11, 24, 28, 0.14);
}

html[data-theme="light"] .brand-link,
html[data-theme="light"] .theme-toggle {
  color: #284145;
  border-color: rgba(19, 39, 43, 0.2);
}

html[data-theme="light"] .theme-toggle {
  background: rgba(245, 250, 247, 0.9);
}

html[data-theme="light"] .type-button {
  background: rgba(237, 244, 241, 0.9);
  color: #20373a;
  border-color: rgba(20, 38, 41, 0.2);
}

html[data-theme="light"] .group {
  background: linear-gradient(180deg, rgba(245, 251, 248, 0.96), rgba(240, 247, 244, 0.92));
  border-color: rgba(20, 38, 41, 0.16);
}

html[data-theme="light"] label,
html[data-theme="light"] legend {
  color: #1f3235;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff;
  color: #172628;
  border-color: rgba(28, 46, 49, 0.28);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: rgba(33, 51, 54, 0.52);
}

html[data-theme="light"] select option {
  background: #ffffff;
  color: #172628;
}

html[data-theme="light"] .helper {
  color: rgba(38, 59, 63, 0.72);
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  background: #ffffff;
  color: #172628;
  border-color: rgba(60, 182, 128, 0.6);
}

html[data-theme="light"] input[type="date"] {
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --text: #162628;
    --text-soft: rgba(25, 44, 47, 0.78);
    --text-muted: rgba(40, 62, 66, 0.62);
    --line: rgba(16, 27, 29, 0.14);
    --line-strong: rgba(60, 182, 128, 0.5);
  }

  html:not([data-theme]) body {
    background:
      radial-gradient(circle at 10% -10%, #e6f7f0 0%, transparent 36%),
      radial-gradient(circle at 92% 16%, #dff3ec 0%, transparent 30%),
      linear-gradient(150deg, #f3f7f6 0%, #edf3f1 52%, #e7f0ed 100%);
  }

  html:not([data-theme]) .brandbar,
  html:not([data-theme]) .hero,
  html:not([data-theme]) .card,
  html:not([data-theme]) .integration {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(246, 251, 248, 0.88));
    border-color: rgba(18, 33, 35, 0.14);
    box-shadow: 0 20px 50px rgba(11, 24, 28, 0.14);
  }

  html:not([data-theme]) .brand-link,
  html:not([data-theme]) .theme-toggle {
    color: #284145;
    border-color: rgba(19, 39, 43, 0.2);
  }

  html:not([data-theme]) .theme-toggle {
    background: rgba(245, 250, 247, 0.9);
  }

  html:not([data-theme]) .type-button {
    background: rgba(237, 244, 241, 0.9);
    color: #20373a;
    border-color: rgba(20, 38, 41, 0.2);
  }

  html:not([data-theme]) .group {
    background: linear-gradient(180deg, rgba(245, 251, 248, 0.96), rgba(240, 247, 244, 0.92));
    border-color: rgba(20, 38, 41, 0.16);
  }

  html:not([data-theme]) label,
  html:not([data-theme]) legend {
    color: #1f3235;
  }

  html:not([data-theme]) input,
  html:not([data-theme]) select,
  html:not([data-theme]) textarea {
    background: #ffffff;
    color: #172628;
    border-color: rgba(28, 46, 49, 0.28);
  }

  html:not([data-theme]) input::placeholder,
  html:not([data-theme]) textarea::placeholder {
    color: rgba(33, 51, 54, 0.52);
  }

  html:not([data-theme]) select option {
    background: #ffffff;
    color: #172628;
  }

  html:not([data-theme]) .helper {
    color: rgba(38, 59, 63, 0.72);
  }

  html:not([data-theme]) input:focus,
  html:not([data-theme]) select:focus,
  html:not([data-theme]) textarea:focus {
    background: #ffffff;
    color: #172628;
    border-color: rgba(60, 182, 128, 0.6);
  }

  html:not([data-theme]) input[type="date"] {
    color-scheme: light;
  }
}

@media (max-width: 860px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .layout {
    width: min(1100px, 94%);
    padding-top: 24px;
  }

  .hero,
  .card {
    padding: 16px;
  }

  .group {
    padding: 14px;
  }
}

@media (max-width: 620px) {
  .brandbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .theme-toggle,
  .brand-link {
    width: 100%;
    text-align: center;
  }

  .type-switcher {
    grid-template-columns: 1fr;
  }
}
