:root {
  /* Brand colors pulled from the app and logo */
  --accent: #007AFF;
  --accent-dark: #0051D5;
  --accent-press: #005FCC;
  --accent-glow: rgba(0, 122, 255, 0.12);
  --lunar: #E0412E;
  --hebrew: #5856D6;
  --islamic: #2FA44F;

  /* Surfaces — quiet Apple-like */
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --surface-elevated: #FFFFFF;
  --surface-secondary: #FAFAFA;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  --text: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.14);
  --window-shadow: 0 30px 90px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.12);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --max-width: 1140px;
  --header-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #0A84FF;
    --accent-dark: #0071EB;
    --accent-press: #409CFF;
    --accent-glow: rgba(10, 132, 255, 0.18);
    --bg: #010101;
    --surface: #121214;
    --surface-elevated: #1C1C1E;
    --surface-secondary: #0E0E10;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #F5F5F7;
    --text-secondary: #A1A1A6;
    --text-tertiary: #8E8E93;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.35);
    --window-shadow: 0 30px 90px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro SC", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
  font-weight: 500;
}

.container {
  width: min(100% - 48px, var(--max-width));
  margin-inline: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn svg {
  flex-shrink: 0;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 122, 255, 0.22);
}

.btn-primary:hover {
  background: var(--accent-press);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-secondary);
}

.btn-large {
  padding: 13px 24px;
  font-size: 15px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(18, 18, 20, 0.82);
  }
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.18);
}

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

.nav a {
  padding: 8px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 980px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-secondary);
}

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

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 980px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-toggle:hover {
  color: var(--text);
  background: var(--surface-secondary);
}

/* Hero */
.hero {
  padding: 96px 0 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.18);
}

.hero-title {
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 22px;
}

.hero-lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

/* Hero visual — macOS window mockup */
.hero-visual {
  position: relative;
}

.mac-window {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--window-shadow);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.35s ease;
}

.mac-window:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.window-titlebar {
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--border);
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
}

.tl-close { background: #FF5F57; }
.tl-min { background: #FEBC2E; }
.tl-max { background: #28C840; }

.window-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-right: 50px;
}

.window-body {
  display: flex;
  min-height: 380px;
}

.demo-sidebar {
  width: 170px;
  flex-shrink: 0;
  background: rgba(120, 120, 128, 0.06);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
}

.demo-nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 10px 8px 4px;
}

.demo-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.demo-nav-item.active {
  background: rgba(0, 122, 255, 0.12);
  color: var(--accent);
  font-weight: 500;
}

.demo-nav-item svg {
  flex-shrink: 0;
}

.demo-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.demo-toolbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.demo-month {
  font-size: 14px;
  font-weight: 600;
}

.demo-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(120, 120, 128, 0.10);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.demo-calendar {
  flex: 1;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: center;
}

.demo-weekdays span:first-child {
  color: var(--lunar);
}

.demo-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  font-size: 12px;
}

.demo-days span {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
}

.demo-days .dim {
  color: var(--text-tertiary);
  opacity: 0.6;
}

.demo-days .today {
  background: var(--lunar);
  color: #fff;
  font-weight: 600;
}

.demo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill-gregorian {
  color: var(--accent);
  background: rgba(0, 122, 255, 0.10);
}

.pill-lunar {
  color: var(--lunar);
  background: rgba(224, 65, 46, 0.10);
}

.pill-islamic {
  color: var(--islamic);
  background: rgba(47, 164, 79, 0.10);
}

/* Sections */
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}

.section-title {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.section-lead {
  font-size: 17px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Features */
.features {
  padding: 110px 0;
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  margin-bottom: 18px;
  border: 1px solid var(--border);
}

.feature-calendar {
  position: relative;
}

.calendar-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lunar);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface-secondary);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Privacy */
.privacy {
  padding: 110px 0;
}

.privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.privacy-copy .section-title {
  text-align: left;
}

.privacy-copy .section-lead {
  text-align: left;
}

.privacy-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.privacy-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.privacy-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7-8'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7-8'/%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  -webkit-mask-size: contain;
  border-radius: 50%;
}

.privacy-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shield-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.shield-card svg {
  color: var(--accent);
  flex-shrink: 0;
}

.shield-card strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 3px;
}

.shield-card span {
  font-size: 14px;
  color: var(--text-secondary);
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

.lock-icon {
  color: var(--accent);
  flex-shrink: 0;
}

/* Download */
.download {
  padding: 110px 0;
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.download-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: 56px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--surface-elevated) 0%, var(--surface-secondary) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.download-copy .section-title {
  text-align: left;
}

.download-copy .section-lead {
  text-align: left;
}

.download-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.download-meta {
  display: grid;
  gap: 1px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface-secondary);
}

.meta-row span {
  font-size: 14px;
  color: var(--text-secondary);
}

.meta-row strong {
  font-size: 14px;
  font-weight: 600;
}

/* FAQ */
.faq {
  padding: 110px 0 130px;
}

.faq-wrap {
  max-width: 780px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(-135deg);
}

.faq-item p {
  padding: 0 24px 22px;
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Footer */
.site-footer {
  padding: 40px 0 48px;
  background: var(--surface-secondary);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  width: 100%;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    max-width: 720px;
    margin-inline: auto;
  }

  .mac-window {
    transform: none;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .privacy-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .download-card {
    grid-template-columns: 1fr;
    padding: 40px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 32px, var(--max-width));
  }

  .nav {
    display: none;
  }

  .brand-name {
    display: none;
  }

  .hero {
    padding: 56px 0 80px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .window-body {
    min-height: 320px;
  }

  .demo-sidebar {
    display: none;
  }

  .demo-calendar {
    padding: 10px 14px 14px;
  }

  .demo-pills {
    display: none;
  }

  .features,
  .privacy,
  .download,
  .faq {
    padding: 72px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    padding: 28px;
  }

  .download-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}
