/* ==========================================================================
   Island AI — Product site
   Design tokens follow ui-ux-pro-max: semantic tokens, 8px spacing rhythm,
   4.5:1 contrast, 44px touch targets, reduced-motion safe.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #07090f;
  --bg-elev: #0e1320;
  --surface: #121a2b;
  --surface-2: #18233a;
  --border: #233047;
  --border-strong: #31425f;

  /* Text */
  --text: #f4f7fb;
  --text-muted: #9fadc4;
  --text-faint: #6f7e98;

  /* Brand / accents */
  --brand-1: #4f8cff; /* blue */
  --brand-2: #9b5cff; /* purple */
  --brand-3: #22d3ee; /* teal */
  --gradient: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 55%, #c062ff 100%);
  --gradient-soft: linear-gradient(135deg, rgba(79,140,255,.18), rgba(155,92,255,.18));

  /* Feedback */
  --success: #34d399;

  /* Geometry */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1160px;

  /* Shadows */
  --shadow: 0 18px 50px -20px rgba(0,0,0,.7);
  --glow: 0 0 0 1px rgba(155,92,255,.35), 0 22px 60px -22px rgba(79,140,255,.55);

  --space: 8px;
}

/* ------------------------------- Reset --------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient gradient backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 80% -5%, rgba(155,92,255,.20), transparent 60%),
    radial-gradient(50% 45% at 5% 5%, rgba(79,140,255,.18), transparent 60%),
    radial-gradient(45% 40% at 50% 110%, rgba(34,211,238,.12), transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------- Header -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7,9,15,.72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand .logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--gradient);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(155,92,255,.7);
  flex: 0 0 auto;
}
.brand .logo-mark svg { width: 18px; height: 18px; }
.brand .wordmark { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }
.brand .wordmark span { color: var(--text-muted); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }

/* ------------------------------- Buttons ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 10px 30px -12px rgba(79,140,255,.8); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -14px rgba(155,92,255,.9); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn:focus-visible { outline: 3px solid var(--brand-3); outline-offset: 2px; }
a:focus-visible { outline: 3px solid var(--brand-3); outline-offset: 3px; border-radius: 8px; }

/* ------------------------------- Hero ---------------------------------- */
.hero { padding: 96px 0 56px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 24px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-3); box-shadow: 0 0 10px var(--brand-3); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 20px; }
.hero p.lede {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta {
  margin-top: 40px;
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  color: var(--text-faint); font-size: 14px;
}
.hero-meta b { color: var(--text); font-weight: 700; }

/* ------------------------------- Sections ------------------------------ */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ------------------------- Product / pricing grid ---------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.product-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.product-card.featured { border-color: transparent; box-shadow: var(--glow); }
.product-card.featured::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.product-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.product-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.product-icon svg { width: 26px; height: 26px; }
.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  background: var(--gradient); color: #fff;
}
.tag.muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.product-card h3 { font-size: 1.35rem; margin-bottom: 6px; }
.product-card .subtitle { color: var(--text-faint); font-size: .9rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 14px; }
.product-card .desc { color: var(--text-muted); font-size: .96rem; margin-bottom: 22px; flex: 1 0 auto; }

.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.price-period { color: var(--text-muted); font-size: .95rem; font-weight: 500; }
.price-note { color: var(--text-faint); font-size: .82rem; margin-bottom: 22px; }

.feature-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-muted); font-size: .92rem; }
.feature-list svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: var(--success); }

/* ------------------------------- Features ------------------------------ */
.feature-band { background: var(--bg-elev); border-block: 1px solid var(--border); }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.value-card { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.value-card .vi {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px;
  background: var(--gradient-soft); border: 1px solid var(--border-strong);
  display: grid; place-items: center;
}
.value-card .vi svg { width: 24px; height: 24px; color: var(--brand-3); }
.value-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.value-card p { color: var(--text-muted); font-size: .94rem; }

/* ------------------------------- FAQ ----------------------------------- */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px 20px;
  transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px 0; font-weight: 600; font-size: 1.02rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform .2s ease; color: var(--text-muted); flex: 0 0 auto; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq details p { color: var(--text-muted); padding: 0 0 18px; font-size: .96rem; }

/* ------------------------------- CTA band ------------------------------ */
.cta-band { text-align: center; }
.cta-inner {
  background: var(--gradient);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  position: relative;
  overflow: hidden;
}
.cta-inner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 120% at 50% -20%, rgba(255,255,255,.25), transparent 60%);
  pointer-events: none;
}
.cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: #fff; margin-bottom: 12px; }
.cta-inner p { color: rgba(255,255,255,.9); max-width: 520px; margin: 0 auto 26px; }
.cta-inner .btn-ghost { background: #fff; color: #1a1030; border: none; }
.cta-inner .btn-ghost:hover { background: #f0eefc; }

/* ------------------------------- Footer -------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elev); padding: 56px 0 32px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-grid .about p { color: var(--text-muted); font-size: .92rem; margin-top: 14px; max-width: 320px; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-muted); padding: 7px 0; font-size: .93rem; transition: color .16s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 24px;
  color: var(--text-faint); font-size: .86rem;
}

/* --------------------------- Legal / content pages --------------------- */
.legal { padding: 64px 0 40px; }
.legal-wrap { max-width: 820px; margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 10px; }
.legal .updated { color: var(--text-faint); font-size: .9rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.3rem; margin: 38px 0 12px; }
.legal h3 { font-size: 1.05rem; margin: 24px 0 8px; color: var(--text); }
.legal p, .legal li { color: var(--text-muted); font-size: 1rem; line-height: 1.75; }
.legal ul { padding-left: 22px; margin: 12px 0; display: grid; gap: 8px; }
.legal a.inline { color: var(--brand-1); font-weight: 600; }
.legal a.inline:hover { text-decoration: underline; }
.legal .toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 36px;
}
.legal .toc h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 12px; }
.legal .toc a { color: var(--text-muted); display: block; padding: 5px 0; font-size: .94rem; }
.legal .toc a:hover { color: var(--brand-1); }

.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-weight: 600; font-size: .92rem; margin-bottom: 24px; }
.back-link:hover { color: var(--text); }

/* ------------------------------- Responsive ---------------------------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .about { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 64px 0 40px; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 20px; }
}

/* ---------------------------- Reduced motion --------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------ Reveal anim ---------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
