:root {
  --ink: #0b1220;
  --muted: #5b6b7a;
  --brand: #0f766e;
  --brand-2: #7c3aed;
  --surface: #ffffff;
  --soft: #f1f5f9;
  --accent: #f97316;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 900px at 10% 10%, #ecfeff 0%, #f8fafc 55%, #fff7ed 100%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.18), rgba(249, 115, 22, 0.18));
  color: #0f766e;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

.logo-mark svg {
  width: 26px;
  height: 26px;
}

.logo-wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  margin-top: 0.2rem;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-brand .brand-title {
  font-size: 0.95rem;
}

.footer-brand .brand-subtitle {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
}

.hero-grid {
  background-image: radial-gradient(circle at 10% 20%, rgba(15, 118, 110, 0.15), transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(124, 58, 237, 0.12), transparent 50%);
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.14);
  transform: translateY(-2px);
}

.ad-slot {
  border: 2px dashed rgba(15, 23, 42, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.9));
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  min-height: 90px;
  width: 100%;
  max-width: 100%;
  max-height: 240px;
  height: auto;
  padding: 1.25rem;
  text-align: center;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.ad-slot.tall {
  min-height: 500px;
  max-height: 640px;
}

.page-shell main aside {
  justify-self: end;
}

.page-shell main aside .ad-slot {
  width: 100%;
  max-width: 300px;
  min-height: 250px;
  margin-left: auto;
  margin-right: 0;
}

.page-shell main aside .ad-slot.tall {
  max-width: 300px;
  min-height: 600px;
  max-height: 600px;
}

@media (max-width: 767px) {
  .page-shell main aside .ad-slot.tall {
    min-height: 250px;
    max-height: 250px;
  }
}

.ad-slot iframe,
.ad-slot img {
  max-width: 100%;
  height: auto;
}

.feature-grid {
  display: grid;
  gap: 2rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.feature-grid > .ad-slot {
  grid-column: 1 / -1;
  margin: 0.5rem 0;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

[data-dropdown-menu] {
  transform: translateY(6px);
}

[data-dropdown][data-open="true"] [data-dropdown-menu] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Feature pages grid layout */
.feature-page-grid {
  display: grid;
  gap: 2.5rem;
}

/* Sticky ads - default for homepage at desktop size */
@media (min-width: 1024px) {
  .sticky-ad {
    position: sticky;
    top: 2rem;
    align-self: start;
  }
}

/* Feature pages specific rules - must come AFTER general sticky-ad */
@media (min-width: 1024px) {
  .feature-page-grid {
    grid-template-columns: 1.4fr 0.6fr;
    align-items: start;
    gap: 3rem;
  }

  /* On feature pages, make the aside sticky directly */
  .feature-page-grid aside {
    position: sticky;
    top: 2rem;
    align-self: start;
  }

  /* Remove sticky from inner div on feature pages to avoid conflicts */
  .feature-page-grid .sticky-ad {
    position: static !important;
  }
}


.badge {
  background: #ecfeff;
  color: #0f766e;
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.text-muted {
  color: var(--muted);
}

.section-title {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
}

.page-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.focus-ring:focus {
  outline: none;
}

.focus-ring:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.5);
  outline-offset: 2px;
}

/* Feature page improvements */
.page-shell header + div {
  margin-top: 2rem;
}

.page-shell main {
  margin-top: 3rem;
}

.page-shell main section h1 {
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.page-shell main section > .space-y-6 > p {
  line-height: 1.7;
  font-size: 1.05rem;
}

.glass-card + .space-y-6,
.glass-card + .feature-grid {
  margin-top: 3rem;
}

.page-shell footer {
  margin-top: 4rem;
}

/* Better responsive spacing */
@media (min-width: 768px) {
  .page-shell header + div {
    margin-top: 2.5rem;
  }

  .page-shell main {
    margin-top: 3.5rem;
  }

  .page-shell main section h1 {
    font-size: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .page-shell main {
    margin-top: 4rem;
  }
}

/* Enhanced button and interactive elements */
button[class*="bg-emerald"],
a[class*="bg-emerald"] {
  transition: all 0.2s ease;
}

button[class*="bg-emerald"]:hover:not(:disabled),
a[class*="bg-emerald"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.25);
}

button[class*="bg-emerald"]:active:not(:disabled),
a[class*="bg-emerald"]:active {
  transform: translateY(0);
}

button[class*="border-slate"],
input[type="file"],
select {
  transition: all 0.2s ease;
}

button[class*="border-slate"]:hover:not(:disabled) {
  border-color: rgba(15, 118, 110, 0.4);
  background-color: rgba(15, 118, 110, 0.05);
}

/* Improved headings */
.glass-card h2,
.glass-card h3 {
  color: #0f766e;
  letter-spacing: -0.02em;
}

/* Better paragraph spacing */
.glass-card p + p {
  margin-top: 1rem;
}

/* Enhanced input fields */
input[type="number"],
input[type="file"],
select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="number"]:focus,
select:focus {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

/* Better audio player styling */
audio {
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
