:root,
[data-theme="light"] {
  /* High-Contrast Premium Light Theme Colors */
  --color-accent-champagne: rgba(212, 175, 55, 1);
  --color-blueprint-background: rgba(230, 235, 245, 1);
  --color-blueprint-subtitle: rgba(48, 68, 96, 1);
  /* Dark slate for high visibility against light backings */
  --color-border-strong: rgba(0, 0, 0, 0.15);
  --color-border-subtle: rgba(0, 0, 0, 0.08);
  --color-error-crimson: rgba(231, 76, 60, 1);
  --color-primary-obsidian: rgba(26, 26, 27, 1);
  --color-secondary-slate: rgba(255, 255, 255, 1);
  --color-success-emerald: rgba(52, 120, 196, 1); /* Metallic Blue */
  --color-surface-slate: rgba(250, 250, 252, 1);
  --color-typography-off-black: rgba(80, 80, 85, 1);
  /* Dark grey for stark subtitle contrast */
  --color-typography-off-white: rgba(14, 15, 19, 1);
  /* Core dark text against white bg */
  --color-typography-off-white2: rgba(40, 40, 45, 1);
  --color-accent-metallic: rgba(200, 200, 210, 1);
  --color-background-primary: rgba(246, 246, 248, 1);
  --color-surface-secondary: rgba(255, 255, 255, 1);
  /* Pure white cards */
  --color-typography-white: rgba(255, 255, 255, 1);
  /* Pure white text used inside dark badges */

  /* Typography Variables */
  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  /* Spacing Variables */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;

  /* Border Radius for iOS Feel */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-accent-champagne: rgba(212, 175, 55, 1);
    --color-blueprint-background: rgba(21, 42, 74, 1);
    --color-blueprint-subtitle: rgba(203, 213, 225, 1);
    --color-border-strong: rgba(255, 255, 255, 0.15);
    --color-border-subtle: rgba(255, 255, 255, 0.08);
    --color-error-crimson: rgba(231, 76, 60, 1);
    --color-primary-obsidian: rgba(26, 26, 27, 1);
    --color-secondary-slate: rgba(44, 44, 46, 1);
    --color-success-emerald: rgba(70, 130, 200, 1); /* Lighter Metallic Blue */
    --color-surface-slate: rgba(58, 58, 60, 1);
    --color-typography-off-black: rgba(26, 26, 27, 1);
    --color-typography-off-white: rgba(242, 242, 247, 1);
    --color-accent-metallic: rgba(245, 240, 237, 1);
    --color-background-primary: rgba(14, 15, 19, 1);
    --color-surface-secondary: rgba(21, 24, 33, 1);
    --color-typography-white: rgba(255, 255, 255, 1);
  }
}

[data-theme="dark"] {
  --color-accent-champagne: rgba(212, 175, 55, 1);
  --color-blueprint-background: rgba(21, 42, 74, 1);
  --color-blueprint-subtitle: rgba(203, 213, 225, 1);
  --color-border-strong: rgba(255, 255, 255, 0.15);
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-error-crimson: rgba(231, 76, 60, 1);
  --color-primary-obsidian: rgba(26, 26, 27, 1);
  --color-secondary-slate: rgba(44, 44, 46, 1);
  --color-success-emerald: rgba(70, 130, 200, 1); /* Lighter Metallic Blue */
  --color-surface-slate: rgba(58, 58, 60, 1);
  --color-typography-off-black: rgba(26, 26, 27, 1);
  --color-typography-off-white: rgba(242, 242, 247, 1);
  --color-accent-metallic: rgba(245, 240, 237, 1);
  --color-background-primary: rgba(14, 15, 19, 1);
  --color-surface-secondary: rgba(21, 24, 33, 1);
  --color-typography-white: rgba(255, 255, 255, 1);
}


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

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  font-family: var(--font-family-sans);
  background-color: var(--color-background-primary);
  color: var(--color-typography-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img,
picture {
  max-width: 100%;
  display: block;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}


/* OOCSS Mobile-First Layout Structure (Bootstrap Breakpoints) */

.l-container {
  width: 100%;
  padding-right: var(--spacing-4);
  padding-left: var(--spacing-4);
  margin-right: auto;
  margin-left: auto;
}

/* Breakpoints */
@media (min-width: 576px) {

  /* sm */
  .l-container {
    max-width: 540px;
    padding-right: var(--spacing-6);
    padding-left: var(--spacing-6);
  }
}

@media (min-width: 768px) {

  /* md */
  .l-container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {

  /* lg */
  .l-container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {

  /* xl */
  .l-container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {

  /* xxl */
  .l-container {
    max-width: 1320px;
  }
}

/* Flexbox Utilities */
.l-flex {
  display: flex;
}

.l-flex--center {
  align-items: center;
  justify-content: center;
}

.l-flex--between {
  justify-content: space-between;
  align-items: center;
}

.l-flex--column {
  flex-direction: column;
}

/* Grid Utilities */
.l-grid {
  display: grid;
  gap: var(--spacing-6);
}

.l-grid--hero {
  grid-template-columns: 1fr;
  align-items: center;
}

.l-grid--bento {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .l-grid--hero {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-6);
  }

  .l-grid--bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .l-grid--bento {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 575px) {
  .hide-mobile {
    display: none;
  }
}

/* Section Spacing */
.l-section {
  padding-top: var(--spacing-12);
  padding-bottom: var(--spacing-12);
}

@media (min-width: 768px) {
  .l-section {
    padding-top: var(--spacing-16);
    padding-bottom: var(--spacing-16);
  }
}

.l-screen-height {
  min-height: 100vh;
}


/* BEM Components Mobile-First (Premium Apple Standard) */

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-3) 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgba(246, 246, 248, 0.7);
  border-bottom: 1px solid var(--color-border-subtle);
  z-index: 100;
  transition: background-color var(--transition-normal);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .header {
    background-color: rgba(14, 15, 19, 0.7);
  }
}

html[data-theme="dark"] .header {
  background-color: rgba(14, 15, 19, 0.7);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  font-size: var(--font-size-base);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-typography-off-white);
}

.header__logo svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: url(#brandGradient);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 768px) {
  .header__logo {
    font-size: var(--font-size-xl);
  }
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-3) var(--spacing-6);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  text-align: center;
}

.btn--primary {
  background-color: var(--color-typography-off-white);
  color: var(--color-background-primary);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  box-shadow: var(--shadow-sm);
  opacity: 0.9;
}

.btn--primary:active {
  transform: translateY(0);
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--spacing-16) + 60px);
  background-color: var(--color-background-primary);
}

/* The Interactive Canvas Background */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
}

.hero .l-container {
  position: relative;
  z-index: 1;
  /* Keep content above canvas */
}

.hero__title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: var(--spacing-5);
  background: linear-gradient(135deg, var(--color-typography-off-white), var(--color-blueprint-subtitle));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 576px) {
  .hero__title {
    font-size: var(--font-size-5xl);
  }
}

@media (min-width: 992px) {
  .hero__title {
    font-size: 4rem;
    /* Custom pop for large screens */
  }
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-typography-off-white);
  /* Fixed visibility by not using secondary black */
  opacity: 0.75;
  margin-bottom: var(--spacing-8);
  max-width: 480px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .hero__subtitle {
    font-size: var(--font-size-xl);
  }
}

/* Form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
  max-width: 100%;
  position: relative;
}

@media (min-width: 576px) {
  .form-group {
    flex-direction: row;
    max-width: 440px;
    background-color: var(--color-surface-secondary);
    padding: var(--spacing-1);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-subtle);
  }
}

@media (min-width: 576px) {
  .form-group--invalid {
    border-color: var(--color-error-crimson) !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
  }
}

@media (max-width: 575px) {
  .form-group--invalid .form__input {
    border-color: var(--color-error-crimson) !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
  }
}

.form__input {
  flex: 1;
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface-secondary);
  color: var(--color-typography-off-white);
  outline: none;
  transition: all var(--transition-fast);
}

@media (min-width: 576px) {
  .form__input {
    border: none;
    background: transparent;
    padding-left: var(--spacing-5);
  }
}

/* Fix CSS Autocomplete White Background Bug */
.form__input:-webkit-autofill,
.form__input:-webkit-autofill:hover,
.form__input:-webkit-autofill:focus,
.form__input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--color-surface-secondary) inset !important;
  -webkit-text-fill-color: var(--color-typography-off-white) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Support Form standalone inputs */
.support__input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: var(--color-background-primary);
  color: var(--color-typography-off-white);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.support__input:-webkit-autofill,
.support__input:-webkit-autofill:hover,
.support__input:-webkit-autofill:focus,
.support__input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--color-background-primary) inset !important;
  -webkit-text-fill-color: var(--color-typography-off-white) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.form__input:focus {
  border-color: var(--color-blueprint-subtitle);
}

.form__error {
  font-size: var(--font-size-xs);
  color: var(--color-error-crimson);
  margin-top: var(--spacing-2);
  margin-left: var(--spacing-4);
  display: none;
  position: absolute;
  top: 100%;
}

.form-group--invalid+.form__error,
.form-group.form-group--invalid .form__error {
  display: block;
}

/* App Mockup Area (Premium CSS Device) */
.mockup {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 600px;
  margin: var(--spacing-12) auto;
  background-color: var(--color-background-primary);
  border-radius: 44px;
  /* iPhone 14/15 Pro radius */
  box-shadow: inset 0 0 0 4px var(--color-typography-off-black),
    inset 0 0 0 10px var(--color-surface-slate),
    /* Metal Bezel */
    var(--shadow-lg), 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.05s ease-out;
}

@media (min-width: 768px) {
  .mockup {
    margin-top: 0;
  }
}

/* Dynamic Island / Notch */
.mockup::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 30px;
  background-color: var(--color-typography-off-white);
  /* Black on Light, White on Dark (screen bezel color usually pure black, but we adapt) */
  border-radius: 20px;
  z-index: 10;
}

/* Internal Mockup Screen Space */
.mockup__screen {
  position: absolute;
  inset: 14px;
  border-radius: 34px;
  background: var(--color-surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blueprint-subtitle);
  font-weight: 500;
  overflow: hidden;
}

.mockup__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bento Grid Features */
.features {
  background-color: var(--color-surface-slate);
  /* Slight contrast from hero */
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto var(--spacing-12);
}

.section-pretitle {
  color: var(--color-success-emerald);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-2);
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  letter-spacing: -1px;
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--font-size-4xl);
  }
}

.bento-card {
  background: var(--color-background-primary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-8);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Glowing pseudo-element for borders on hover */
.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-2xl);
  padding: 1px;
  background: linear-gradient(135deg, var(--color-blueprint-subtitle), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.bento-card:hover::before {
  opacity: 0.3;
}

.bento-card:hover {
  box-shadow: var(--shadow-sm);
}

.bento-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-subtle);
  margin-bottom: var(--spacing-5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-card__icon svg {
  width: 24px;
  height: 24px;
  fill: var(--color-typography-off-white);
}

.bento-card__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-3);
  letter-spacing: -0.5px;
}

.bento-card__desc {
  font-size: var(--font-size-base);
  color: var(--color-typography-off-white);
  opacity: 0.7;
  line-height: 1.5;
}

/* Workflow Steps */
.workflow {
  background-color: var(--color-background-primary);
}

.workflow .l-grid {
  position: relative;
}

/* Connecting line for timeline */
@media (min-width: 768px) {
  .workflow .l-grid::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--color-border-subtle);
    z-index: 0;
  }
}

.step {
  text-align: center;
  padding: var(--spacing-4);
  position: relative;
  z-index: 1;
}

.step__num {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-6);
  border-radius: var(--radius-full);
  background: var(--color-surface-secondary);
  color: var(--color-typography-off-white);
  border: 4px solid var(--color-background-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--font-size-2xl);
  box-shadow: 0 0 0 2px var(--color-border-subtle);
}

.step__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-2);
}

.step__desc {
  font-size: var(--font-size-base);
  color: var(--color-typography-off-white);
  opacity: 0.7;
}

/* Footer */
.footer {
  background-color: var(--color-surface-secondary);
  padding: var(--spacing-8) 0;
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
}

.footer__text {
  font-size: var(--font-size-sm);
  color: var(--color-typography-off-white);
  opacity: 0.6;
}

/* React Markdown Wrapper */
.markdown-body {
  color: var(--color-typography-off-white);
  line-height: 1.7;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  font-weight: 800;
  margin-top: var(--spacing-8);
  margin-bottom: var(--spacing-4);
  letter-spacing: -0.5px;
  color: var(--color-success-emerald);
}

.markdown-body h1 {
  color: var(--color-typography-off-white);
  font-size: var(--font-size-4xl);
}

.markdown-body h2 {
  font-size: var(--font-size-2xl);
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: var(--spacing-2);
}

.markdown-body p {
  margin-bottom: var(--spacing-4);
  opacity: 0.9;
}

.markdown-body ul {
  list-style-type: disc;
  padding-left: var(--spacing-6);
  margin-bottom: var(--spacing-5);
  opacity: 0.9;
}

.markdown-body li {
  margin-bottom: var(--spacing-2);
}

/* Hide bullets specifically for Table of Contents */
.markdown-body h2#table-of-contents + ul {
  list-style: none;
  padding-left: 0;
}

.markdown-body a {
  color: var(--color-success-emerald);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.markdown-body a:hover {
  opacity: 0.8;
}

.markdown-body blockquote {
  background: var(--color-surface-secondary);
  border-left: 4px solid var(--color-blueprint-subtitle);
  padding: var(--spacing-5);
  margin: var(--spacing-6) 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}