
:root {
  --bg: #000000;
  --bg-soft: #111111;
  --text: #f3f5f7;
  --text-soft: #b5bdc9;
  --primary: #FF2C23;
  --card: #1a1a1a;
  --border: #2a303d;
  --brand: #FF2C23;
  --nav: #FF2C23;
}

:root[data-theme="light"] {
  --bg: #F2F2F7;
  --bg-soft: #F2F2F7;
  --text: #141922;
  --text-soft: #546173;
  --primary: #FF2C23;
  --card: #ffffff;
  --nav: #FF2C23;
  --border: #d5dce7;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Section titles / subtitles — spacing parity with Website/src/App.jsx (h2: m-0 + pt-2/pb-0 or pt-0 for feature; p: text-text-soft text-center mt-0.5; subtitle mb-7 except #feature mb-4). */
.marketing-public .marketing-section-title {
  margin: 0;
  padding-bottom: 0;
  text-align: center;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  line-height: 1.25;
  color: var(--nav);
}
.marketing-public .marketing-section-title--feature {
  padding-top: 0;
}

/* Space between hero (#mainstage) and feature headline — explicit here so it works even when
   Tailwind build/watch is stale or utilities are missing from the compiled :app bundle. */
.marketing-public #feature {
  padding-top: clamp(2rem, 3.5vw, 3.25rem) !important;
}
.marketing-public .marketing-section-title--padded {
  padding-top: 0.5rem; /* Tailwind pt-2 */
}
.marketing-public .marketing-section-subtitle {
  margin: 0;
  margin-top: 0.125rem; /* Tailwind mt-0.5 */
  margin-bottom: 1.75rem; /* extra space above section body (not feature — see below) */
  padding: 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.5;
}

.marketing-public #feature .marketing-section-subtitle {
  margin-bottom: 1rem; /* keep tighter gap before carousel (mt-6 on card) */
}

/* App stylesheet defines generic `footer { text-align: center; padding: …; border-radius: … }`.
   Marketing pages load the same bundle — reset so the marketing footer matches the Firebase site (left-aligned columns, no extra chrome). */
.marketing-public footer {
  text-align: left;
  padding: 0;
  border-radius: 0;
}

a {
  text-decoration: none;
}

button {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
}

.adminArea input,
.adminArea textarea,
.adminArea select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
}

.mainstageShade {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(64%, 760px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.74) 70%, rgba(255, 255, 255, 0) 100%);
}

.marketing-public #mainstage .mainstageP {
  font-size: clamp(0.98rem, 2.05vw, 1.4rem);
  line-height: 1.4;
}

.integrationTrack {
  margin-top: 1.5rem;
  display: flex;
  width: max-content;
  animation: slideTrack 25s linear infinite;
}

.clientTrack {
  display: flex;
  width: max-content;
  animation: slideTrack 22s linear infinite;
}

@keyframes slideTrack {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.adminTypeTabs button,
.adminLangSwitch button {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
  transition: all 0.18s ease;
}

.adminTypeTabs button.isActive,
.adminLangSwitch button.isActive {
  background: #FF2C23;
  border-color: #FF2C23;
  color: #ffffff;
}

.adminTypeTabs button.isActive {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px color-mix(in srgb, #FF2C23 25%, transparent), 0 6px 16px color-mix(in srgb, #FF2C23 35%, transparent);
}

.adminTypeTabs button:not(.isActive):hover {
  border-color: color-mix(in srgb, #FF2C23 50%, var(--border));
  color: color-mix(in srgb, #FF2C23 80%, var(--text));
}

:root[data-theme="light"] .adminPage {
  background: linear-gradient(135deg, #f6f8fc 0%, #eef2f9 52%, #f8fbff 100%);
}

:root[data-theme="light"] .adminTypeTabs button,
:root[data-theme="light"] .adminLangSwitch button {
  background: #ffffff;
  border-color: #d5dce7;
  color: #263246;
}

:root[data-theme="light"] .adminTypeTabs button.isActive {
  box-shadow: 0 0 0 2px rgba(4, 51, 255, 0.25), 0 8px 18px rgba(4, 51, 255, 0.2);
}

:root[data-theme="light"] .adminListItem,
:root[data-theme="light"] .adminEditor {
  box-shadow: 0 3px 14px rgba(17, 30, 61, 0.06);
}

:root[data-theme="light"] .adminItemPlaceholder {
  background: #e8edf6;
}

@media (max-width: 900px) {
  .mainstageShade {
    width: 100%;
  }

  .mainstageOverlay {
    min-height: 68vh;
    padding: 1.4rem 1rem;
  }

  .mainstageContent {
    max-width: 100%;
    padding-right: 0.4rem;
  }

  .mainstageBrand {
    height: 38px;
  }

  .mainstageH1 {
    max-width: 100%;
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

  .marketing-public #mainstage .mainstageP {
    max-width: 88%;
    font-size: clamp(0.94rem, 2.9vw, 1.28rem);
  }
}

@media (max-width: 560px) {
  .featureCard {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem;
  }

  .featureImageWrap {
    width: min(240px, 70vw) !important;
    order: 1;
  }

  .featureCard .featureText {
    width: 100%;
    text-align: left !important;
    order: 2;
    align-items: start !important;
  }

  .featureCard .featureText h3,
  .featureCard .featureText p {
    text-align: left !important;
  }
}

/* Override browser autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
select:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--card) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 5000s ease-in-out 0s;
}
