/* ==============================
   Imagely Landing Page Styles
   ============================== */

:root {
  --bg: #f7fbff;
  --bg-grad-1: rgba(45, 233, 130, 0.16);
  --bg-grad-2: rgba(31, 153, 238, 0.12);
  --surface: #ffffff;
  --surface-2: #f1f8ff;
  --text: #0f1724;
  --muted: #4f5f78;
  --line: #d8e8f8;
  --brand: #1f99ee;
  --brand-2: #2de982;
  --dark: #0a101a;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 8px 24px rgba(14, 37, 64, 0.08);
  --shadow-lg: 0 24px 60px rgba(14, 37, 64, 0.12);
  --header-bg: rgba(255, 255, 255, 0.9);
  --header-shadow: 0 8px 30px rgba(14, 37, 64, 0.09);
  --muted-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(244, 250, 255, 0.9) 100%);
  --muted-line: rgba(216, 232, 248, 0.75);
  --theme-toggle-bg: #ffffff;
  --theme-toggle-text: #1f2a3d;
  --theme-toggle-border: #d8e8f8;
  --max: 1140px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1119;
  --bg-grad-1: rgba(45, 233, 130, 0.08);
  --bg-grad-2: rgba(31, 153, 238, 0.12);
  --surface: #131d2a;
  --surface-2: #172232;
  --text: #ebf3ff;
  --muted: #b4c2d6;
  --line: #27384d;
  --dark: #ebf3ff;
  --shadow-sm: 0 12px 28px rgba(1, 7, 15, 0.45);
  --shadow-lg: 0 26px 64px rgba(1, 7, 15, 0.52);
  --header-bg: rgba(11, 17, 25, 0.86);
  --header-shadow: 0 10px 32px rgba(1, 7, 15, 0.55);
  --muted-bg: linear-gradient(180deg, rgba(19, 29, 42, 0.72) 0%, rgba(17, 26, 37, 0.88) 100%);
  --muted-line: rgba(39, 56, 77, 0.8);
  --theme-toggle-bg: #152233;
  --theme-toggle-text: #d8e6f8;
  --theme-toggle-border: #2c4159;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(500px 280px at 90% -20%, var(--bg-grad-1), transparent 65%),
    radial-gradient(420px 250px at -5% 12%, var(--bg-grad-2), transparent 70%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}

.container-wide {
  width: min(1320px, calc(100% - 2rem));
}

.narrow {
  width: min(860px, calc(100% - 2.5rem));
}

.section {
  padding: 5.5rem 0;
}

.muted {
  background: var(--muted-bg);
  border-top: 1px solid var(--muted-line);
  border-bottom: 1px solid var(--muted-line);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  max-width: 15ch;
}

h2 {
  font-size: clamp(1.65rem, 3.3vw, 2.4rem);
  max-width: 22ch;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1578bf;
  margin-bottom: 0.8rem;
}

.section-heading {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 2.2rem;
}

.section-subtext {
  max-width: 60ch;
}

.btn {
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 12px;
  padding: 0.86rem 1.2rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 10px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #0f8ddf 0%, #0fa2ee 55%, #22ca86 100%);
  box-shadow: 0 14px 30px rgba(20, 131, 212, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 16px 34px rgba(20, 131, 212, 0.42);
}

.btn-ghost {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: #f8fcff;
}

.btn-lg {
  padding: 1rem 1.4rem;
  font-size: 1.02rem;
}

.btn-sm {
  padding: 0.66rem 0.95rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

/* =========================================================
   Header and Nav
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: saturate(120%) blur(6px);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.scrolled {
  background: var(--header-bg);
  box-shadow: var(--header-shadow);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--dark);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--brand);
}

.theme-toggle {
  border: 0;
  background: transparent;
  color: var(--theme-toggle-text);
  border-radius: 999px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toggle-track {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  display: block;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.theme-toggle:hover .toggle-track {
  border-color: var(--brand);
}

.theme-toggle:focus-visible .toggle-track {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease;
}

.toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.64rem;
  line-height: 1;
  opacity: 0.72;
}

.toggle-icon-sun {
  left: 7px;
}

.toggle-icon-moon {
  right: 7px;
}

html[data-theme="dark"] .toggle-thumb {
  transform: translateX(22px);
  background: #d9e8f9;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  padding-top: 3.2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.25rem;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 1rem;
}

.subhead {
  font-size: 1.08rem;
  max-width: 54ch;
}

.cta-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.microcopy {
  font-size: 0.93rem;
  color: var(--muted);
}

.chrome-badge {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.58rem 0.76rem;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.chrome-badge p {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
}

.chrome-badge strong {
  font-size: 0.86rem;
}

.hero-visual {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  box-shadow: var(--shadow-lg);
}

.hero-shot {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #dbeaf8;
}

.hero-shot figcaption {
  padding: 0.7rem 0.9rem;
  font-size: 0.86rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.window-shell {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d9e8f7;
  background: var(--surface);
}

.window-top {
  height: 42px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #dce8f5;
}

.window-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7ea6c9;
}

.window-body {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr;
  min-height: 350px;
}

.listing-column {
  padding: 1rem;
  border-right: 1px solid #e2edf8;
}

.listing-column h2 {
  font-size: 0.98rem;
  margin-bottom: 0.8rem;
}

.extension-panel {
  padding: 1rem;
  display: grid;
  align-content: start;
  gap: 0.9rem;
  background: var(--surface-2);
}

.extension-panel h3 {
  font-size: 1rem;
}

.extension-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.extension-panel li {
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid #dbeaf8;
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
}

/* =========================================================
   Cards / Grids
   ========================================================= */

.pain-grid,
.feature-grid,
.usecase-grid {
  display: grid;
  gap: 1rem;
}

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

.card,
.feature-card,
.usecase-card,
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card,
.feature-card,
.usecase-card,
.step {
  padding: 1.25rem;
}

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

.feature-card {
  display: grid;
  gap: 0.65rem;
}

.feature-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 1rem;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.step {
  display: grid;
  gap: 0.65rem;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(130deg, var(--brand), var(--brand-2));
}

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

.usecase-card {
  display: grid;
  gap: 0.55rem;
}

/* Demo carousel */
.demo-carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
}

.carousel-track-wrap {
  overflow: hidden;
  border-radius: 20px;
}

.carousel-track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}

.demo-slide {
  min-width: 100%;
}

.demo-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #dbeaf8;
}

.demo-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.demo-card figcaption {
  padding: 1rem 1.2rem 1.15rem;
}

.demo-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.25rem;
}

.demo-card p {
  font-size: 0.94rem;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-btn:hover {
  border-color: var(--brand);
}

.carousel-dots {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 0.42rem;
  margin-top: 0.5rem;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: #9db4cc;
  cursor: pointer;
}

.carousel-dot.active {
  width: 22px;
  border-radius: 999px;
  background: var(--brand);
}

.proof-top {
  margin-bottom: 1rem;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.proof-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 800;
  color: var(--brand);
}

.proof-copy {
  margin-top: 0.4rem;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.proof-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: grid;
  gap: 0.8rem;
}

/* =========================================================
   FAQ + CTA + Footer
   ========================================================= */

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.faq-item p {
  margin-top: 0.55rem;
}

.final-cta {
  position: relative;
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: 10% 0 auto;
  height: 300px;
  background: radial-gradient(300px 180px at center, rgba(31, 153, 238, 0.13), transparent 70%);
  pointer-events: none;
}

.final-cta-wrap {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.2rem;
  display: grid;
  gap: 0.9rem;
  text-align: center;
  justify-items: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.footer-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.footer-links a:hover {
  color: var(--brand);
}

html[data-theme="dark"] .btn-ghost {
  background: #142031;
  border-color: #2c425b;
  color: #e8f2ff;
}

html[data-theme="dark"] .btn-ghost:hover {
  background: #1a2b40;
}

html[data-theme="dark"] .window-top span {
  opacity: 0.75;
}

html[data-theme="dark"] .hero-shot img {
  background: #172232;
}

html[data-theme="dark"] .demo-media {
  background: #172232;
}

.copyright {
  margin-top: 0.45rem;
  font-size: 0.88rem;
}

/* =========================================================
   Reveal Animation
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

.delay-3 {
  transition-delay: 0.24s;
}

/* =========================================================
   Responsive Layout
   ========================================================= */

@media (max-width: 1060px) {
  .hero-grid,
  .window-body,
  .feature-grid,
  .steps,
  .usecase-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .container-wide {
    width: min(1240px, calc(100% - 1.6rem));
  }

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

  .footer-grid {
    align-items: start;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 4.4rem 0;
  }

  .hero {
    padding-top: 1.4rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.2rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .nav.open {
    display: flex;
  }

  .hero-grid,
  .pain-grid,
  .feature-grid,
  .steps,
  .usecase-grid,
  .footer-grid,
  .window-body {
    grid-template-columns: 1fr;
  }

  .demo-carousel {
    grid-template-columns: 1fr;
  }

  .carousel-btn {
    display: none;
  }

  .demo-media {
    aspect-ratio: 4 / 3;
  }

  .final-cta-wrap {
    text-align: left;
    justify-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .delay-1,
  .delay-2,
  .delay-3,
  .btn,
  .toggle-thumb,
  .site-header {
    transition: none;
  }
}
