/* ============================================================
   Solitaire Elite — Apple-inspired stylesheet
   Uses CSS custom properties for full dark/light mode support.
   Toggle body.dark to switch themes sitewide.
   ============================================================ */

/* ----- Color tokens ----- */
:root {
  --bg:           #ffffff;
  --bg-surface:   #f5f5f7;   /* card backgrounds, sections */
  --bg-card:      #ffffff;
  --bg-nav:       rgba(255,255,255,0.85);
  --text:         #1d1d1f;
  --text-body:    #3a3a3c;
  --text-muted:   #6e6e73;
  --border:       #d2d2d7;
  --border-input: #d2d2d7;
  --shadow:       rgba(0,0,0,0.06);
  --shadow-icon:  rgba(0,0,0,0.18);
  --accent:       #0071e3;
  --accent-hover: #0077ed;
  /* hero gradient — subtle blue-purple tint */
  --hero-bg-start: #eef4ff;
  --hero-bg-mid:   #f5f0ff;
  /* privacy callout */
  --callout-start: #f0f7ff;
  --callout-end:   #faf5ff;
}

body.dark {
  --bg:           #0a0a0f;
  --bg-surface:   #13131e;
  --bg-card:      #1c1c2e;
  --bg-nav:       rgba(10,10,15,0.88);
  --text:         #f5f5f7;
  --text-body:    #c0c0cc;
  --text-muted:   #8e8ea8;
  --border:       #2e2e48;
  --border-input: #2e2e48;
  --shadow:       rgba(0,0,0,0.4);
  --shadow-icon:  rgba(0,0,0,0.6);
  /* Hero: vivid deep blue → deep purple wash */
  --hero-bg-start: #0d1840;
  --hero-bg-mid:   #1a0838;
  /* Privacy callout: noticeable blue-purple tint */
  --callout-start: #0d1f3a;
  --callout-end:   #180d30;
}

/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ----- Nav ----- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* 3-column grid: company left | app name center | links+toggle right */
.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 52px;
}

/* Left: company name → links back to root */
.nav-company {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.nav-company:hover { color: var(--accent); text-decoration: none; }

/* Center: app name */
.nav-logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: center;
}
.nav-logo:hover { text-decoration: none; color: var(--accent); }

/* Right: page links + dark mode toggle */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-size: 0.76rem;
  color: var(--text);
  opacity: 0.7;
  transition: opacity 0.15s;
}
.nav-links a:hover { opacity: 1; text-decoration: none; }

/* Dark mode toggle button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ----- Hero ----- */
.hero {
  text-align: center;
  padding: 100px 22px 80px;
  background: linear-gradient(160deg, var(--hero-bg-start) 0%, var(--hero-bg-mid) 40%, var(--bg) 100%);
  transition: background 0.3s ease;
}

/* App icon in the hero */
.hero-app-icon {
  width: 120px;
  height: 120px;
  border-radius: 26%;
  margin: 0 auto 28px;
  display: block;
  box-shadow: 0 8px 32px var(--shadow-icon);
}

.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* gradient text: Apple blue → Apple purple */
  background: linear-gradient(90deg, #0071e3 0%, #bf5af2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  display: inline-block;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 20px;
}

/* Slogan subheading — .hero p.hero-slogan beats the generic .hero p rule */
.hero p.hero-slogan {
  font-size: 1.38rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-body);
  margin-bottom: 14px;
}

.hero p {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 980px;
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }

.btn-secondary {
  background: var(--bg-surface);
  color: var(--accent);
}
.btn-secondary:hover { opacity: 0.85; text-decoration: none; }

/* ----- Content sections ----- */
.section {
  max-width: 740px;
  margin: 0 auto;
  padding: 72px 22px;
}

.section + .section { border-top: 1px solid var(--border); }

.section h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
}

.section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text);
}

.section p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 16px;
}

.section p:last-child { margin-bottom: 0; }

/* ----- Feature grid ----- */
.features {
  background: var(--bg-surface);
  padding: 72px 22px;
  transition: background 0.3s ease;
}

.features-inner {
  max-width: 980px;
  margin: 0 auto;
}

.features h2 {
  text-align: center;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  color: var(--text);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 36px 28px;
  box-shadow: 0 2px 12px var(--shadow);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease,
              box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(32px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Icon wrapper — tinted backgrounds for accent cards */
.feature-card .icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-surface);
  margin-bottom: 18px;
}

.feature-card.accent-purple .icon-wrap {
  background: linear-gradient(135deg, #f0e6ff 0%, #e5d5ff 100%);
}
.feature-card.accent-blue .icon-wrap {
  background: linear-gradient(135deg, #dff0ff 0%, #c8e5ff 100%);
}

/* Dark mode: keep accent tints but slightly muted */
body.dark .feature-card.accent-purple .icon-wrap {
  background: linear-gradient(135deg, #3d2560 0%, #522880 100%);
}
body.dark .feature-card.accent-blue .icon-wrap {
  background: linear-gradient(135deg, #0d3060 0%, #0a2a58 100%);
}

.feature-card .icon {
  font-size: 1.6rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ----- Contact form ----- */
.form-wrap {
  background: var(--bg-surface);
  border-radius: 18px;
  padding: 44px 40px;
  margin-top: 12px;
  transition: background 0.3s ease;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-input);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.bot-field { display: none; }
.form-submit { margin-top: 8px; }

/* ----- Footer ----- */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 32px 22px;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-inner { max-width: 980px; margin: 0 auto; }

footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
}

footer a {
  color: var(--text-muted);
  margin: 0 10px;
}
footer a:hover { color: var(--accent); text-decoration: none; }

.footer-links { margin-bottom: 10px; }

/* ----- Policy page header ----- */
.policy-header {
  text-align: center;
  padding: 72px 22px 48px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg) 100%);
  transition: background 0.3s ease;
}

.policy-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 12px;
}

.policy-header .updated {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ----- Privacy callout section ----- */
.privacy-callout {
  background: linear-gradient(135deg, var(--callout-start) 0%, var(--callout-end) 100%);
  transition: background 0.3s ease;
}

/* ----- Animations ----- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-load-1 { opacity: 0; animation: fadeInUp 1s cubic-bezier(0.4,0,0.2,1) 0s    forwards; }
.hero-load-2 { opacity: 0; animation: fadeInUp 1s cubic-bezier(0.4,0,0.2,1) 0.2s  forwards; }
.hero-load-3 { opacity: 0; animation: fadeInUp 1s cubic-bezier(0.4,0,0.2,1) 0.4s  forwards; }
.hero-load-4 { opacity: 0; animation: fadeInUp 1s cubic-bezier(0.4,0,0.2,1) 0.6s  forwards; }
.hero-load-5 { opacity: 0; animation: fadeInUp 1s cubic-bezier(0.4,0,0.2,1) 0.75s forwards; }
.hero-load-6 { opacity: 0; animation: fadeInUp 1s cubic-bezier(0.4,0,0.2,1) 0.9s  forwards; }

/* Scroll-reveal for sections below the fold */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1),
              transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ----- Hamburger button (hidden on desktop) ----- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  justify-self: end;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
/* Animate to X when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Mobile dropdown menu (hidden until hamburger clicked) ----- */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--bg-nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}
.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu a {
  font-size: 1rem;
  color: var(--text);
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  opacity: 0.85;
}
.nav-mobile-menu a:hover { opacity: 1; text-decoration: none; }

.nav-mobile-toggle {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
}
.nav-mobile-toggle:hover { color: var(--accent); }

/* ----- Responsive ----- */
@media (max-width: 700px) {
  /* Switch nav from 3-col grid to left/center/hamburger */
  .nav-right { display: none; }
  .nav-hamburger { display: flex; }
  .nav-company { font-size: 0.75rem; }
  .form-wrap { padding: 28px 20px; }
  .hero { padding: 72px 22px 56px; }
}
