/* ==========================================================================
   Kurr — official website styles
   Plain CSS, no build step. Tokens mirror the app's "Aurora" theme 1:1
   (app/src/theme/variables.scss): vibrant indigo → violet → magenta brand,
   mesh-gradient surfaces, and the same dark-mode palette.
   ========================================================================== */

:root {
  /* Brand — same hexes as --ion-color-primary/secondary/tertiary in the app */
  --brand: #6366f1;
  --brand-dark: #4f52d6;
  --brand-light: #eef0fe;
  --accent: #ec4899;
  --accent-2: #06b6d4;
  --accent-3: #a855f7;

  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(236, 72, 153, 0.10) 100%);
  --mesh-bg:
    radial-gradient(900px circle at -10% -10%, rgba(99, 102, 241, 0.18), transparent 50%),
    radial-gradient(700px circle at 110% 10%, rgba(236, 72, 153, 0.18), transparent 55%),
    radial-gradient(800px circle at 50% 110%, rgba(6, 182, 212, 0.14), transparent 50%);
  --glow: 0 12px 28px rgba(99, 102, 241, 0.35), 0 4px 12px rgba(236, 72, 153, 0.25);

  --ink: #0b0d1c;
  --ink-soft: #52546b;
  --ink-faint: #6b7280;

  --bg: #ffffff;
  --bg-alt: #f7f7fb;
  --border: #e6e7f0;

  --brand-soft: rgba(99, 102, 241, 0.1);
  --brand-softer: rgba(99, 102, 241, 0.06);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 6px rgba(11, 13, 28, 0.04), 0 1px 2px rgba(11, 13, 28, 0.06);
  --shadow-md: 0 10px 24px rgba(11, 13, 28, 0.08), 0 2px 6px rgba(11, 13, 28, 0.04);
  --shadow-lg: 0 20px 50px rgba(11, 13, 28, 0.12);

  --max-width: 1120px;
  --header-h: 72px;

  --header-bg: rgba(255, 255, 255, 0.86);
  --footer-bg: #0b0d1c;
  --device-frame: #14152b;
  --card-bg: #ffffff;

  color-scheme: light;
}

/* Dark mode — mirrors the app's @media (prefers-color-scheme: dark) block */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f4ff;
    --ink-soft: #b7b9de;
    --ink-faint: #9ca3c9;

    --bg: #07081a;
    --bg-alt: #0e1030;
    --border: rgba(255, 255, 255, 0.1);

    --brand-light: rgba(99, 102, 241, 0.16);
    --brand-soft: rgba(99, 102, 241, 0.2);
    --brand-softer: rgba(99, 102, 241, 0.12);

    --mesh-bg:
      radial-gradient(900px circle at -10% -10%, rgba(99, 102, 241, 0.35), transparent 55%),
      radial-gradient(700px circle at 110% 10%, rgba(236, 72, 153, 0.3), transparent 55%),
      radial-gradient(800px circle at 50% 110%, rgba(6, 182, 212, 0.22), transparent 55%);

    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

    --header-bg: rgba(7, 8, 26, 0.75);
    --card-bg: rgba(22, 24, 56, 0.7);

    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  font-weight: 800;
}

h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
h3 { font-size: 19px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }

p { margin: 0 0 16px; color: var(--ink-soft); }

ul, ol { padding-left: 22px; color: var(--ink-soft); }
li { margin: 6px 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(99, 102, 241, 0.4), 0 6px 16px rgba(236, 72, 153, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

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

.btn-small {
  padding: 9px 16px;
  font-size: 14px;
}

.btn svg { flex-shrink: 0; }

/* -------------------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}

.logo:hover { text-decoration: none; }

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 15px;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle[aria-expanded='true'] span { background: transparent; }
.nav-toggle[aria-expanded='true'] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span::after { transform: translateY(-6px) rotate(-45deg); }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */

.hero {
  padding: 64px 0 56px;
  background-image: var(--mesh-bg);
  background-repeat: no-repeat;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-light);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 8px;
}

.hero-note {
  font-size: 13px;
  color: var(--ink-faint);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: 240px;
  border-radius: var(--radius-xl);
  border: 8px solid var(--device-frame);
  background: var(--device-frame);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.phone-frame img {
  width: 100%;
  border-radius: 26px;
}

.phone-frame.phone-back {
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 190px;
  opacity: 0.9;
  transform: rotate(6deg);
  z-index: 0;
}

.phone-frame.phone-front {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------
   Screenshot gallery
   ------------------------------------------------------------------------- */

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  justify-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.screenshot-item {
  margin: 0;
  text-align: center;
  max-width: 240px;
}

.screenshot-item .phone-frame {
  width: 100%;
  margin: 0 auto 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.screenshot-item:hover .phone-frame {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.screenshot-item figcaption {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head .eyebrow { margin-left: auto; margin-right: auto; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-light);
  color: var(--brand);
  margin-bottom: 16px;
}

.card-icon svg { width: 22px; height: 22px; }

/* Cycle through the brand/secondary/tertiary trio, same as the app's accent rotation. */
.grid-3 .card:nth-of-type(2) .card-icon {
  background: rgba(236, 72, 153, 0.12);
  color: var(--accent);
}

.grid-3 .card:nth-of-type(3) .card-icon {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-2);
}

.step-list {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
}

.step-list li {
  counter-increment: step;
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  margin: 0;
}

.step-list li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: var(--glow);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 16px;
}

.trust-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.trust-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-soft);
  font-weight: 500;
}

.trust-list svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--brand);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--brand-gradient);
  box-shadow: var(--glow);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.badge:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(99, 102, 241, 0.4), 0 6px 16px rgba(236, 72, 153, 0.3);
}

.badge svg { flex-shrink: 0; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.site-footer {
  background: var(--footer-bg);
  color: #c7c8e0;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo { color: #fff; }

.footer-brand p {
  color: #9698c0;
  font-size: 14px;
  margin-top: 12px;
  max-width: 280px;
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: #b4b6da;
  font-size: 14px;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 13px;
  color: #7d7fa8;
}

/* -------------------------------------------------------------------------
   Legal / content pages
   ------------------------------------------------------------------------- */

.page-hero {
  padding: 48px 0 8px;
}

.page-hero p.updated {
  color: var(--ink-faint);
  font-size: 14px;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 72px;
}

.prose h2 {
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  margin-top: 24px;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 14px;
}

.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.prose th { background: var(--bg-alt); }

.prose code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 90%;
}

.notice {
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: #fff6de;
  color: #8a6100;
  font-weight: 600;
}

.notice.danger {
  background: #ffe3e3;
  color: #9c1f1f;
}

.placeholder-box {
  margin: 8px 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong, #c7c9de);
  background: var(--bg-alt);
  color: var(--ink-faint);
  font-size: 14px;
  font-style: italic;
}

/* -------------------------------------------------------------------------
   Contact page
   ------------------------------------------------------------------------- */

.contact-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin: 12px 0 24px;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 16px; }
  .grid-3, .step-list { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .trust-panel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .screenshot-gallery { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    display: none;
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    width: 100%;
    padding: 10px 0;
  }

  .nav-toggle { display: flex; }
  .nav-cta .btn-small.hide-mobile { display: none; }
}

@media (max-width: 560px) {
  .grid-3, .step-list, .footer-grid { grid-template-columns: 1fr; }
  .screenshot-gallery { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 40px; }
  .section { padding: 48px 0; }
}
