/* ============================================================
   Autonag Landing Page — style.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #6366f1;
  --accent-hover: #4f51e5;
  --teal: #3b8fa8;
  --bg: #f8f8fc;
  --bg-card: #ffffff;
  --bg-code: #f0f0f8;
  --text: #0f0f1a;
  --text-muted: #666680;
  --border: #e2e2f0;
  --shadow: 0 2px 24px rgba(99,102,241,.08);
  --shadow-lg: 0 8px 48px rgba(99,102,241,.14);
  --radius: 18px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;

  /* timer colors mirroring app */
  --red:    #b71c1c;
  --yellow: #e65100;
  --green:  #1b5e20;
  --blue:   #0d47a1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --teal: #5eb8d4;
    --bg: #0d0d14;
    --bg-card: #15151f;
    --bg-code: #1a1a28;
    --text: #f0f0fa;
    --text-muted: #9090b0;
    --border: #2a2a3e;
    --shadow: 0 2px 24px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 48px rgba(0,0,0,.55);
    --red:    #ef9a9a;
    --yellow: #ffcc80;
    --green:  #a5d6a7;
    --blue:   #90caf9;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Utility ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---- Nav ---- */
nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .9rem 0;
}
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
}
.nav-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-spacer { flex: 1; }
.nav-cta {
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff;
  padding: .45rem 1.1rem; border-radius: 100px;
  text-decoration: none; font-weight: 600; font-size: .9rem;
  transition: background .15s, transform .1s;
}
.nav-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: .3rem .85rem; border-radius: 100px;
  font-size: .82rem; font-weight: 600; letter-spacing: .03em;
  margin-bottom: 1.5rem;
}
.hero-icon {
  display: block; width: 96px; height: 96px;
  border-radius: 22px; margin: 0 auto 1.25rem;
  box-shadow: 0 4px 32px rgba(99,102,241,.2);
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800; letter-spacing: -.03em;
  line-height: 1.1; margin-bottom: .75rem;
}
.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted); max-width: 560px; margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--accent); color: #fff;
  padding: .75rem 1.75rem; border-radius: 100px;
  text-decoration: none; font-weight: 700; font-size: 1rem;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: background .15s, transform .12s, box-shadow .15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 28px color-mix(in srgb, var(--accent) 50%, transparent); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: .4rem;
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
  padding: .72rem 1.5rem; border-radius: 100px;
  text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: border-color .15s, background .15s;
}
.btn-secondary:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* ---- Phone mockup ---- */
.phone-pair {
  display: flex; justify-content: center; gap: 2rem;
  flex-wrap: wrap;
  padding: 3rem 1.5rem;
}
.phone-wrap { position: relative; }
.phone-label {
  text-align: center; font-size: .78rem; font-weight: 500;
  color: var(--text-muted); margin-bottom: .6rem; letter-spacing: .04em; text-transform: uppercase;
}
.phone-frame {
  width: 220px;
  aspect-ratio: 390 / 780;
  border-radius: 32px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border);
  overflow: hidden;
  border: 3px solid var(--border);
}
.phone-frame img, .phone-frame picture {
  display: block; width: 100%; height: 100%;
}
.phone-frame img { object-fit: cover; height: 100%; }

/* Show light image in light mode, dark in dark mode */
.for-light { display: block; }
.for-dark  { display: none; }
@media (prefers-color-scheme: dark) {
  .for-light { display: none; }
  .for-dark  { display: block; }
}

/* ---- Section layout ---- */
section { padding: 4.5rem 0; }
section:nth-child(even) { background: color-mix(in srgb, var(--accent) 3%, var(--bg)); }

.section-label {
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6rem;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800; letter-spacing: -.025em; line-height: 1.2;
  margin-bottom: .75rem;
}
.section-body {
  font-size: 1.05rem; color: var(--text-muted); max-width: 600px; margin-bottom: 2rem;
}

/* ---- Feature grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .85rem;
  font-size: 1.3rem; font-weight: 700; color: var(--accent);
  font-family: var(--font);
}
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.feature-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.55; }

/* ---- App section: side-by-side ---- */
.app-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 700px) {
  .app-split { grid-template-columns: 1fr; gap: 2.5rem; }
  .app-split .phone-pair { padding: 0; }
}

/* ---- Terminal / CLI ---- */
.terminal {
  background: #0d0d14;
  border: 1px solid #2a2a3e;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 640px;
}
.terminal-bar {
  position: relative;
  display: flex; align-items: center; gap: .45rem;
  background: #1a1a28; padding: .65rem 1rem;
  border-bottom: 1px solid #2a2a3e;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.terminal-title {
  position: absolute; left: 0; right: 0;
  text-align: center; pointer-events: none;
  font-size: .78rem; color: #606080; letter-spacing: .03em;
}
.terminal-body {
  padding: 1.1rem 1.4rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.75;
  color: #c8c8e8;
  overflow-x: auto;
  white-space: pre;
}
.t-prompt  { color: #818cf8; }
.t-cmd     { color: #e8e8ff; font-weight: 600; }
.t-arg     { color: #86efac; }
.t-str     { color: #fdba74; }
.t-flag    { color: #7dd3fc; }
.t-output  { color: #9090b0; }
.t-ok      { color: #4ade80; }
.t-warn    { color: #fbbf24; }
.t-red     { color: #f87171; }
.t-dim     { color: #50507a; }
.t-blank   { display: block; height: .5rem; }
.t-line    { display: block; }

/* ---- Alarm colors demo ---- */
.alarm-demo {
  display: flex; flex-direction: column; gap: .5rem;
  margin-top: 1.5rem; max-width: 400px;
}
.alarm-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .9rem;
}
.color-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.cd-blue   { background: #42a5f5; }
.cd-green  { background: #66bb6a; }
.cd-yellow { background: #ffa726; }
.cd-red    { background: #ef5350; }
.cd-flash  {
  background: #ef5350;
  animation: flash 0.6s step-end infinite alternate;
}
@keyframes flash { to { opacity: 0; } }
.alarm-row .name  { flex: 1; font-weight: 500; }
.alarm-row .time  { font-size: .82rem; color: var(--text-muted); }

/* ---- Live update section ---- */
.ws-visual {
  display: flex; flex-direction: column; gap: 1.5rem;
  margin-top: 2rem; max-width: 500px;
}
.ws-device {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.ws-device-head {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .6rem;
}
.ws-pill {
  font-size: .72rem; font-weight: 600;
  padding: .2rem .55rem; border-radius: 100px;
  background: color-mix(in srgb, var(--teal) 15%, transparent);
  color: var(--teal);
  border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
}
.ws-pill.agent { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.ws-event { font-size: .82rem; color: var(--text-muted); font-family: var(--font-mono); }
.ws-event strong { color: var(--text); }
.ws-arrow {
  text-align: center; font-size: .8rem; color: var(--text-muted);
  display: flex; align-items: center; gap: .5rem; padding: 0 1rem;
}
.ws-arrow::before, .ws-arrow::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---- Testimonials / quotes ---- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; margin-top: 2rem;
}
.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.quote-text { font-size: .95rem; line-height: 1.65; margin-bottom: 1rem; }
.quote-author { font-size: .82rem; font-weight: 600; color: var(--accent); }

/* ---- CTA section ---- */
.cta-section {
  text-align: center;
  padding: 6rem 1.5rem;
  background: radial-gradient(ellipse 70% 70% at 50% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.cta-section h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800; letter-spacing: -.03em;
  margin-bottom: .75rem;
}
.cta-section p { color: var(--text-muted); max-width: 500px; margin: 0 auto 2rem; font-size: 1.05rem; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---- Responsive tweaks ---- */
@media (max-width: 600px) {
  .phone-frame { width: 170px; border-radius: 22px; }
  .terminal-body { font-size: .75rem; }
  section { padding: 3rem 0; }
}
