/* =========================================================================
   coplan — landing page styles
   Plain vanilla CSS. System fonts only. Theming via CSS custom properties.
   ========================================================================= */

/* ---------- Design tokens: LIGHT (default) ---------- */
:root {
  /* Brand */
  --accent: #2F6FED;
  --accent-hover: #245ccb;
  --accent-soft: #7AA5F5;          /* lighter circle in the logo */
  --accent-contrast: #ffffff;       /* text/icons on accent */

  /* Surfaces & text */
  --bg: #f7f8fa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --text: #1c1f26;
  --text-muted: #5b616e;
  --border: #e6e8ee;
  --divider: #ececf0;

  /* App mockup */
  --phone-bg: #ffffff;
  --phone-frame: #1c1f26;
  --task-done: #9aa0ab;

  /* Effects */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, 0.06), 0 1px 3px rgba(20, 24, 40, 0.05);
  --shadow-md: 0 6px 20px rgba(20, 24, 40, 0.08), 0 2px 6px rgba(20, 24, 40, 0.05);
  --shadow-lg: 0 24px 60px rgba(20, 24, 40, 0.16), 0 8px 24px rgba(20, 24, 40, 0.10);

  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Design tokens: DARK via system preference ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #5B91FF;            /* brightened for dark backgrounds */
    --accent-hover: #759fff;
    --accent-soft: #2c4a86;
    --accent-contrast: #0b0e14;

    --bg: #0d1016;
    --bg-elevated: #151922;
    --surface: #171c26;
    --surface-2: #1e2430;
    --text: #eef1f6;
    --text-muted: #a3acba;
    --border: #262d3a;
    --divider: #232a36;

    --phone-bg: #11151d;
    --phone-frame: #2a313e;
    --task-done: #6b7383;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Manual theme override (set on <html data-theme>) ---------- */
:root[data-theme="light"] {
  --accent: #2F6FED;
  --accent-hover: #245ccb;
  --accent-soft: #7AA5F5;
  --accent-contrast: #ffffff;
  --bg: #f7f8fa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --text: #1c1f26;
  --text-muted: #5b616e;
  --border: #e6e8ee;
  --divider: #ececf0;
  --phone-bg: #ffffff;
  --phone-frame: #1c1f26;
  --task-done: #9aa0ab;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, 0.06), 0 1px 3px rgba(20, 24, 40, 0.05);
  --shadow-md: 0 6px 20px rgba(20, 24, 40, 0.08), 0 2px 6px rgba(20, 24, 40, 0.05);
  --shadow-lg: 0 24px 60px rgba(20, 24, 40, 0.16), 0 8px 24px rgba(20, 24, 40, 0.10);
}

:root[data-theme="dark"] {
  --accent: #5B91FF;
  --accent-hover: #759fff;
  --accent-soft: #2c4a86;
  --accent-contrast: #0b0e14;
  --bg: #0d1016;
  --bg-elevated: #151922;
  --surface: #171c26;
  --surface-2: #1e2430;
  --text: #eef1f6;
  --text-muted: #a3acba;
  --border: #262d3a;
  --divider: #232a36;
  --phone-bg: #11151d;
  --phone-frame: #2a313e;
  --task-done: #6b7383;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.6);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

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

a { color: inherit; text-decoration: none; }

p { margin: 0; }

img, svg { display: block; }

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

/* ---------- Focus & skip link (accessibility) ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 100;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 2px 10px rgba(47, 111, 237, 0.35);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-lg { padding: 14px 26px; font-size: 1.05rem; border-radius: 14px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--divider);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}

.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { flex: none; }
.brand-name {
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 14px;
  margin-right: auto;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.97rem;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.theme-toggle:hover { background: var(--surface-2); }

/* Show the right icon for the active theme. Default (light): show moon
   (tap to go dark). We toggle visibility based on the resolved theme. */
.icon-sun { display: none; }
.icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  .icon-sun { display: block; }
  .icon-moon { display: none; }
}
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

/* Hide nav text links on small screens to keep the bar clean */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-cta { padding: 10px 14px; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 72px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-tagline {
  margin-top: 18px;
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 30em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Store badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  transition: transform 0.15s var(--ease), opacity 0.2s var(--ease);
}
.store-badge:hover { transform: translateY(-1px); opacity: 0.92; }
.store-badge svg { flex: none; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge-text small { font-size: 0.62rem; opacity: 0.85; }
.store-badge-text strong { font-size: 0.95rem; font-weight: 700; }

.store-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================================================
   Faux phone mockup
   ========================================================================= */
.hero-mock { display: flex; justify-content: center; }

.phone {
  position: relative;
  width: 300px;
  max-width: 86vw;
  padding: 12px;
  border-radius: 44px;
  background: var(--phone-frame);
  box-shadow: var(--shadow-lg);
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 22px;
  background: var(--phone-frame);
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  position: relative;
  border-radius: 33px;
  background: var(--phone-bg);
  overflow: hidden;
  padding: 14px 14px 22px;
  min-height: 540px;
}

.app-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  padding: 4px 6px 12px;
}
.app-statusbar-icons { display: flex; gap: 4px; }
.app-statusbar-icons .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted); opacity: 0.6;
}

.app-header { padding: 4px 6px 10px; }
.app-list-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.app-list-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.app-list-meta { margin-left: 4px; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--phone-bg);
}
.avatar-a { background: #E0699B; }            /* Yasmin */
.avatar-b { background: var(--accent); margin-left: -10px; }

.app-progress {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-2);
  margin: 6px 6px 14px;
  overflow: hidden;
}
.app-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}

.app-list { list-style: none; margin: 0; padding: 0; }

.app-task, .app-subtask {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 6px;
  border-bottom: 1px solid var(--divider);
  font-size: 0.92rem;
}
.app-subtask { padding-left: 30px; font-size: 0.86rem; }

.check {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  position: relative;
}
.check.checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check.checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 2px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.task-text { color: var(--text); }
.app-task.done .task-text,
.app-subtask.done .task-text {
  color: var(--task-done);
  text-decoration: line-through;
}

/* Locked / live-editing row */
.app-task.locked {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 12px;
  border-bottom-color: transparent;
  margin: 4px 0;
  padding: 11px 10px;
  flex-wrap: wrap;
}
.typing-text { position: relative; }
.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}

.lock-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
  margin-left: 31px;
}
.lock-indicator .avatar { width: 18px; height: 18px; font-size: 0.58rem; }
.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 600;
}
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.2s var(--ease) infinite;
}
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* ---------- Sections ---------- */
.section { padding-block: 64px; }

.section-head { max-width: 40rem; margin-bottom: 40px; }
.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section-lead {
  margin-top: 12px;
  font-size: 1.08rem;
  color: var(--text-muted);
}

/* ---------- Feature cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  margin-bottom: 16px;
}
.card-title { font-size: 1.18rem; font-weight: 700; margin-bottom: 8px; }
.card-text { color: var(--text-muted); font-size: 0.98rem; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.step-title { font-size: 1.14rem; font-weight: 700; margin-bottom: 8px; }
.step-text { color: var(--text-muted); font-size: 0.98rem; }

/* ---------- CTA band ---------- */
.cta-band {
  margin-top: 56px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 28px;
  box-shadow: var(--shadow-sm);
}
.cta-band-title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }
.cta-band-text { margin: 12px 0 24px; color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--divider);
  margin-top: 32px;
  padding-block: 40px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; margin-right: auto; }
.footer-note { color: var(--text-muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 22px; }
.footer-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--text); }
.store-badges-footer { margin-top: 0; }
.footer-copy {
  width: 100%;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--divider);
  padding-top: 20px;
}

/* =========================================================================
   Reveal-on-scroll (enhancement; content is fully visible without JS)
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* If JS is disabled the .reveal elements would stay hidden — guard against
   that: when the <html> has the no-js fallback we show everything. script.js
   removes 'no-js'; this rule keeps content visible if it never runs. */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 40px;
    text-align: center;
  }
  .hero-tagline { margin-inline: auto; }
  .hero-cta, .store-badges { justify-content: center; }
  .hero-mock { order: -1; }
  .section-head { margin-inline: auto; text-align: center; }
}

@media (max-width: 520px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-brand { margin-right: 0; }
}

/* =========================================================================
   Content pages (legal + SEO landing pages)
   Reuses all tokens above. Added for privacy/terms and the SEO cluster.
   ========================================================================= */

/* Compact page header for sub-pages (sits under the sticky nav) */
.page-hero {
  padding-top: 56px;
  padding-bottom: 8px;
}
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 18em;
}
.page-hero .page-lead {
  margin-top: 16px;
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 38em;
}
.page-hero .hero-cta { margin-top: 24px; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 18px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { margin: 0 6px; opacity: 0.6; }

/* Long-form prose (legal text, article body) */
.prose {
  max-width: 44rem;
  margin-inline: auto;
  padding-block: 8px 56px;
  color: var(--text);
  font-size: 1.02rem;
}
.prose h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 40px;
  margin-bottom: 12px;
}
.prose h3 {
  font-size: 1.16rem;
  font-weight: 700;
  margin-top: 26px;
  margin-bottom: 8px;
}
.prose p { margin-top: 12px; color: var(--text-muted); }
.prose ul, .prose ol { margin-top: 12px; padding-left: 1.3em; color: var(--text-muted); }
.prose li { margin-top: 6px; }
.prose a { color: var(--accent); font-weight: 600; }
.prose a:hover { color: var(--accent-hover); }
.prose strong { color: var(--text); }
.prose .meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.prose .lead { font-size: 1.1rem; color: var(--text); }

/* Comparison table (SEO pages). Wrap in .table-scroll for small screens. */
.table-scroll { overflow-x: auto; margin-top: 20px; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--divider);
}
.compare-table thead th {
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
}
.compare-table tbody th {
  font-weight: 600;
  color: var(--text);
}
.compare-table .col-us { color: var(--accent); font-weight: 700; }
.compare-table .yes { color: #1f9d57; font-weight: 700; }
.compare-table tr:last-child td, .compare-table tr:last-child th { border-bottom: 0; }
@media (prefers-color-scheme: dark) { .compare-table .yes { color: #46d088; } }
:root[data-theme="dark"] .compare-table .yes { color: #46d088; }
:root[data-theme="light"] .compare-table .yes { color: #1f9d57; }

/* FAQ block */
.faq { margin-top: 8px; }
.faq h3 { margin-top: 24px; }

/* Inline list of related pages */
.related-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.related-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.related-links a:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

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