/* ============================================================
   OpenTask — Landing page styles (v.0.0.0.0)
   Design tokens follow the product brief exactly.
   ============================================================ */

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

:root {
  --bg:               #FBFBFB;
  --surface:          #FFFFFF;
  --surface-alt:      #F0F1F7;
  --text:             #171923;
  --text-muted:       #667085;
  --border:           #E7E9F0;
  --btn-primary-bg:   #2A2A2A;
  --btn-primary-text: #FFFFFF;
  --success:          #22C55E;
  --danger:           #EF4444;
  --shadow-card:      0 4px 12px rgba(23, 25, 35, 0.04);
}

[data-theme="dark"] {
  --bg:               #0F1115;
  --surface:          #16181F;
  --surface-alt:      #1E2028;
  --text:             #F0F1F7;
  --text-muted:       #9AA0AE;
  --border:           #2A2D38;
  --btn-primary-bg:   #F0F1F7;
  --btn-primary-text: #171923;
  --shadow-card:      0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: 'IBM Plex Sans Arabic', 'Inter', system-ui, -apple-system,
               BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

section[id] { scroll-margin-top: 80px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--bg);
  padding: 8px 16px; z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Material Symbols ---------- */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  text-align: center;
}
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}
.btn-primary:hover { opacity: 0.88; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 251, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .nav { background: rgba(15, 17, 21, 0.85); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { position: relative; width: 32px; height: 32px; flex-shrink: 0; }
.brand-svg { width: 100%; height: 100%; display: block; }
.brand-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 8px;
  opacity: 0; transition: opacity 0.2s;
}
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s, background-color 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-alt); }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text);
  transition: background-color 0.15s;
}
.theme-toggle:hover { background: var(--surface-alt); }

.menu-btn {
  display: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  place-items: center;
  color: var(--text);
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  display: none;
  padding: 8px 24px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mobile-menu[data-open] { display: block; }
.mobile-menu > a {
  display: block;
  padding: 14px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.mobile-ctas { display: flex; gap: 8px; margin-top: 16px; }
.mobile-ctas .btn { flex: 1; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 112px;
  text-align: center;
  position: relative;
  background: radial-gradient(
    ellipse at center top,
    rgba(42, 42, 42, 0.035) 0%,
    transparent 60%
  );
}
[data-theme="dark"] .hero {
  background: radial-gradient(
    ellipse at center top,
    rgba(240, 241, 247, 0.04) 0%,
    transparent 60%
  );
}
.hero-inner { max-width: 720px; margin: 0 auto; padding: 0 24px; }

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 20px;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero-meta { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ---------- Sections ---------- */
.section-head { text-align: center; margin-bottom: 48px; padding: 0 24px; }
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Features ---------- */
.features { padding: 80px 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface-alt);
  color: var(--text);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ---------- Pricing ---------- */
.pricing { padding: 80px 0; background: var(--surface-alt); }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 840px;
  margin: 0 auto;
  padding: 0 24px;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.pricing-card.pro {
  border-color: var(--text);
  border-width: 2px;
  padding: 31px;
}
.plan-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
  margin-bottom: 16px;
}
.pricing-card.pro .plan-badge {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}
.plan-price {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.plan-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}
.plan-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.plan-cta {
  width: 100%;
  margin-bottom: 24px;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.plan-features .check {
  flex-shrink: 0;
  color: var(--success);
  font-size: 20px;
  margin-top: -1px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-link:hover { color: var(--text); }
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .nav-links,
  .nav-actions > .btn,
  .nav-actions > .theme-toggle {
    display: none;
  }
  .menu-btn { display: grid; }

  .hero { padding: 64px 0 80px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }

  .features, .pricing { padding: 56px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}