/* SematIn landing page — tokens follow the extension's own design system:
   indigo #4f46e5, Plus Jakarta Sans, 14px radii, light surfaces. */

:root {
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #eef0ff;
  --primary-light: #e0e7ff;
  --text-main: #202033;
  --text-secondary: #515168;
  --text-muted: #7d7d94;
  --bg: #fafaff;
  --bg-card: #ffffff;
  --bg-subtle: #f2f2fa;
  --border-color: #d9d9e8;
  --border-soft: #e8e8f3;
  --shadow: 0 10px 30px rgba(32, 32, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(32, 32, 51, 0.14);
  --radius: 14px;
  --radius-lg: 20px;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
}

[data-theme="dark"] {
  --primary: #818cf8;
  --primary-strong: #a5b4fc;
  --primary-soft: #23233d;
  --primary-light: #2e2e4d;
  --text-main: #f3f3fb;
  --text-secondary: #c9c9dc;
  --text-muted: #9999b2;
  --bg: #1d1d2c;
  --bg-card: #262638;
  --bg-subtle: #232335;
  --border-color: #3c3c58;
  --border-soft: #343450;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary); }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 1px 6px;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font: 600 0.95rem var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-sm { padding: 9px 14px; font-size: 0.875rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79, 70, 229, 0.45); }
.btn-ghost {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* Shimmer sweep on the primary CTA */
.btn-shimmer { position: relative; overflow: hidden; }
.btn-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  animation: shimmer 3.2s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 55% { transform: translateX(-120%); }
  90%, 100% { transform: translateX(120%); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-main);
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
}
.brand-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-version {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-light);
  padding: 2px 7px;
  border-radius: 999px;
}
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 8px;
}
.site-nav a:hover { color: var(--text-main); background: var(--bg-subtle); }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* Animated theme toggle (uiverse-style switch) */
.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  cursor: pointer;
  padding: 0;
  flex: none;
}
.theme-toggle .icon-sun, .theme-toggle .icon-moon {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  color: var(--text-muted);
  transition: opacity 0.25s ease;
}
.theme-toggle .icon-sun { left: 6px; }
.theme-toggle .icon-moon { right: 6px; }
.theme-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] .theme-knob { transform: translateX(24px); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0.25; }
[data-theme="light"] .theme-toggle .icon-moon, :root:not([data-theme]) .theme-toggle .icon-moon { opacity: 0.25; }

/* Language toggle — compact EN/ID segmented control */
.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  border-radius: 999px;
  padding: 2px;
  flex: none;
}
.lang-option {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: 600 11px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  padding: 6px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-option[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
}

/* Store links row under the install buttons */
.hero-stores, .final-cta-stores {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-stores a, .final-cta-stores a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.hero-stores a:hover, .final-cta-stores a:hover { text-decoration: underline; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; }
.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 560px;
  background:
    radial-gradient(600px 300px at 70% 20%, rgba(79, 70, 229, 0.16), transparent 70%),
    radial-gradient(500px 260px at 20% 10%, rgba(129, 140, 248, 0.14), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: var(--shadow);
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.hero-title {
  margin-top: 22px;
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  font-weight: 800;
}
.reveal-line { display: block; }
.hero-title .accent-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
}
.gradient-text {
  background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 6s ease infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}
.hero-sub {
  margin-top: 18px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 52ch;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-trust { margin-top: 18px; font-size: 0.875rem; color: var(--text-muted); }

/* Hero preview — the real SematIn popup (popup.html/popup.css, verbatim) in an
   iframe, so the preview is pixel-identical to the extension. The iframe is
   470px wide (the popup's real width); on narrow screens it is scaled down
   via --preview-scale, set by script.js. */
.hero-visual { position: relative; min-width: 0; }
.preview-frame-wrap {
  width: 470px;
  max-width: 100%;
  margin-left: auto;
  overflow: hidden;
  transform: rotate(1.2deg);
  transform-origin: top right;
}
.preview-frame {
  display: block;
  width: 470px;
  height: 445px;
  border: none;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  background: #e8e8f4;
  transform: scale(var(--preview-scale, 1));
  transform-origin: top left;
}

.mockup-fill {
  position: absolute;
  left: -8px;
  bottom: -44px;
  width: min(340px, 90%);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  transform: rotate(-1deg);
}
.mockup-fill-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mockup-fill-text { margin-top: 6px; font-size: 0.9rem; min-height: 2.6em; color: var(--text-main); }
.typing-caret { color: var(--primary); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Marquee */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border-soft);
  background: var(--bg-card);
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: marquee 30s linear infinite;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.marquee-track i { color: var(--primary); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
section { padding: 84px 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { margin-top: 10px; }
.section-kicker {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0;
}
.section-sub { margin-top: 14px; color: var(--text-secondary); font-size: 1.05rem; }

/* Scroll reveal — hidden only when JS is running (html.js), so content stays
   visible if JS is disabled or the observer is unavailable.
   The visible rule must beat the hidden rule: html.js .reveal is (0,2,1),
   so .reveal.visible (0,2,0) loses — scope the visible rule the same way. */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.visible { opacity: 1; transform: none; }

/* Demo */
.demo { background: var(--bg-subtle); }
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: stretch;
}
.demo-form, .demo-output {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}
.demo-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.demo-form label:first-child { margin-top: 0; }
.demo-form input {
  width: 100%;
  font: 500 0.95rem var(--font-sans);
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 16px;
}
.demo-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.demo-form .btn { width: 100%; margin-top: 4px; }
.demo-note { margin-top: 14px; font-size: 0.85rem; color: var(--text-muted); }
.demo-output { display: flex; flex-direction: column; }
.demo-output-label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.demo-composer {
  flex: 1;
  margin: 14px 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 180px;
  font-size: 0.98rem;
  white-space: pre-wrap;
}
.demo-placeholder { color: var(--text-muted); }
.demo-output .btn { align-self: flex-start; }
.demo-copied { color: var(--primary); font-weight: 700; font-size: 0.85rem; margin-left: 10px; }

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.bento-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  overflow: hidden;
}
.bento-wide { grid-column: span 2; }
.bento-card h3 { margin-top: 16px; }
.bento-card p { margin-top: 8px; color: var(--text-secondary); font-size: 0.95rem; }
.bento-visual {
  height: 96px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.bento-visual-image { display: flex; flex-direction: column; gap: 12px; padding: 18px; align-items: stretch; height: auto; min-height: 96px; }
.bento-visual-image .bento-icon { align-self: center; }
.bento-icon { width: 34px; height: 34px; color: var(--primary); flex-shrink: 0; }
.bento-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.bento-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
  position: relative;
}
.bento-progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 65%;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 999px;
  animation: progress 2.4s ease-in-out infinite alternate;
}
@keyframes progress { from { width: 25%; } to { width: 85%; } }
.bento-tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 10px;
}
/* Many more strip */
.more-features {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.more-features h3 { font-size: 1.05rem; }
.more-features-list {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.more-features-list li {
  font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-subtle); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 6px 12px;
}
.more-features-list .more-features-more {
  color: var(--primary); background: var(--primary-soft); border-color: var(--primary-border);
}
/* Cursor spotlight on bento cards (MagicBento-style, vanilla) */
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--spot-x, 50%) var(--spot-y, 0%), rgba(79, 70, 229, 0.12), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.spotlight-card:hover::before { opacity: 1; }

/* Steps */
.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 0.95rem; }

/* Platforms */
.platforms { background: var(--bg-subtle); }
.platform-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.platform-list li {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.platform-note { margin-top: 22px; color: var(--text-muted); font-size: 0.9rem; max-width: 72ch; }

/* FAQ */
.faq-inner { max-width: 780px; }
.faq-list details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.25s ease;
}
.faq-list details[open ] summary::after { transform: rotate(45deg); }
.faq-list details p {
  padding: 0 20px 20px;
  color: var(--text-secondary);
}

/* Final CTA */
.final-cta { padding-top: 40px; }
.final-cta-card {
  text-align: center;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  border-radius: 28px;
  padding: 64px 32px;
  color: #fff;
  box-shadow: 0 24px 60px rgba(79, 70, 229, 0.4);
}
.final-cta-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.final-cta-card p { margin: 14px auto 0; color: rgba(255, 255, 255, 0.85); max-width: 52ch; }
.final-cta-card .btn {
  margin-top: 30px;
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.final-cta-card .btn:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); }
.final-cta-note { margin-top: 16px !important; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7) !important; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
  background: var(--bg-card);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }
.footer-nav { display: flex; gap: 22px; margin-left: auto; }
.footer-nav a { color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.footer-nav a:hover { color: var(--primary); }
.footer-copy { flex-basis: 100%; color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .preview-frame-wrap { margin-inline: auto; }
  .mockup-fill { left: 0; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-wide { grid-column: span 2; }
  .steps-grid { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  section { padding: 60px 0; }
  .hero { padding: 48px 0 56px; }
  .site-nav { display: none; }
  .header-actions .btn { display: none; }
  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .mockup-fill { position: static; width: 100%; margin-top: 16px; transform: none; }
  .footer-nav { margin-left: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
