/* ════════════════════════════════════════
   RESET & VARIABLES
   ════════════════════════════════════════ */

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

:root {
  --blue: #007AFF;
  --purple: #BB3ED8;
  --green: #34C759;
  --orange: #FF9500;
  --bg: #000000;
  --surface: #111113;
  --surface2: #1c1c1e;
  --border: rgba(255,255,255,0.08);
  --text: #f2f2f5;
  --secondary: #8e8e93;
  --grad: linear-gradient(145deg, var(--blue) 0%, var(--purple) 100%);
}

/* ════════════════════════════════════════
   BASE
   ════════════════════════════════════════ */

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,122,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,122,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ── Ambient glow ── */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.glow-blue   { width: 500px; height: 400px; top: -100px; left: -100px; background: rgba(0,122,255,0.08); }
.glow-purple { width: 400px; height: 400px; bottom: 0; right: -80px;   background: rgba(187,62,216,0.08); }

/* ── Gradient h1 technique ── */
h1 {
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 40px;
}
.back-link:hover { text-decoration: underline; }
.back-link::before { content: "←"; font-size: 17px; }

/* ── Header badge ── */
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,122,255,0.12);
  border: 1px solid rgba(0,122,255,0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 20px;
}

/* ── Inner page header ── */
.header {
  position: relative;
  z-index: 1;
  padding: 64px 24px 48px;
  margin: 0 auto;
}

.header h1 {
  font-size: clamp(32px, 6vw, 48px);
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 15px;
  color: var(--secondary);
  line-height: 1.5;
}

/* ── Divider ── */
.divider {
  position: relative;
  z-index: 1;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── Content wrapper ── */
.content {
  position: relative;
  z-index: 1;
  padding: 0 24px 80px;
  margin: 0 auto;
}

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px 48px;
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.7;
}
footer a { color: var(--blue); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ════════════════════════════════════════
   PAGE-SPECIFIC LAYOUT OVERRIDES
   ════════════════════════════════════════ */

.page-home    .divider { max-width: 720px; margin-bottom: 64px; }
.page-privacy .divider { max-width: 720px; margin-bottom: 40px; }
.page-siri    .divider { max-width: 900px; margin-bottom: 48px; }

.page-privacy .header, .page-privacy .content { max-width: 720px; }
.page-siri    .header, .page-siri    .content { max-width: 900px; }

/* ════════════════════════════════════════
   HOME PAGE
   ════════════════════════════════════════ */

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 96px 24px 80px;
  text-align: center;
}

.beats {
  display: flex;
  gap: 10px;
  margin-bottom: 48px;
}
.beat {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  animation: pulse 2s ease-in-out infinite;
}
.beat:nth-child(1) { animation-delay: 0s;   background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.beat:nth-child(2) { animation-delay: 0.5s; }
.beat:nth-child(3) { animation-delay: 1.0s; }
.beat:nth-child(4) { animation-delay: 1.5s; }

@keyframes pulse {
  0%, 100% { transform: scale(1);    opacity: 0.4; }
  25%       { transform: scale(1.45); opacity: 1;   }
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: linear-gradient(to bottom, var(--blue) 0%, var(--purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  box-shadow: 0 8px 40px rgba(0,122,255,0.35), 0 2px 8px rgba(0,0,0,0.6);
}
.hero-icon img {
  width: 72px;
  height: 72px;
}

.hero h1 {
  font-size: clamp(40px, 8vw, 64px);
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 16px;
}

.tagline {
  font-size: clamp(16px, 3vw, 20px);
  color: var(--secondary);
  font-weight: 400;
  max-width: 480px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--grad);
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 50px;
  letter-spacing: -0.2px;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 24px rgba(0,122,255,0.4);
  margin-bottom: 56px;
}
.app-store-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,122,255,0.55);
}
.apple-logo {
  width: 14px;
  height: 18px;
  flex-shrink: 0;
}

.cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

.card {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.card-siri::before    { background: radial-gradient(ellipse at top left, rgba(0,122,255,0.12) 0%, transparent 70%); }
.card-privacy::before { background: radial-gradient(ellipse at top left, rgba(187,62,216,0.12) 0%, transparent 70%); }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.14); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 26px;
}
.card-siri .card-icon    { background: rgba(0,122,255,0.15); }
.card-privacy .card-icon { background: rgba(187,62,216,0.15); }

.card h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background: none;
}
.card p {
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.55;
}
.card-arrow {
  position: absolute;
  top: 28px;
  right: 24px;
  font-size: 20px;
  color: var(--secondary);
  transition: transform 0.18s ease, color 0.18s ease;
}
.card:hover .card-arrow { transform: translate(3px, -3px); color: var(--text); }

/* ════════════════════════════════════════
   PRIVACY PAGE
   ════════════════════════════════════════ */

.page-privacy .content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-card {
  background: linear-gradient(135deg, rgba(0,122,255,0.1) 0%, rgba(187,62,216,0.1) 100%);
  border: 1px solid rgba(0,122,255,0.2);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.18s ease;
}
.section:hover { border-color: rgba(255,255,255,0.14); }

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0,122,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.section h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background: none;
}

.page-privacy .content p {
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.65;
}
.page-privacy .content p a { color: var(--blue); text-decoration: none; }
.page-privacy .content p a:hover { text-decoration: underline; }

/* ════════════════════════════════════════
   SIRI COMMANDS PAGE
   ════════════════════════════════════════ */

.page-siri .subtitle {
  max-width: 520px;
  margin-bottom: 24px;
}

.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--secondary);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 16px;
}
.section-heading:first-child { margin-top: 0; }
.section-heading h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--secondary);
  -webkit-text-fill-color: var(--secondary);
  background: none;
}
.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 10px;
}

.cmd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.cmd-card:hover {
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.cmd-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.cmd-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.badges {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-free  { background: rgba(52,199,89,0.15);  color: var(--green); }
.badge-pro   { background: rgba(255,149,0,0.15);   color: var(--orange); }
.badge-opens { background: rgba(0,122,255,0.15);   color: var(--blue); }

.cmd-card-desc {
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.55;
  margin-bottom: 4px;
}

.params { margin-top: 10px; }
.params-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(142,142,147,0.6);
  margin-bottom: 5px;
}
.param {
  font-size: 12px;
  color: var(--secondary);
  padding: 2px 0;
  display: flex;
  gap: 7px;
  align-items: baseline;
}
.param::before { content: "·"; color: var(--blue); font-size: 14px; }

.phrases {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.phrase {
  background: rgba(0,122,255,0.1);
  border: 1px solid rgba(0,122,255,0.2);
  border-radius: 6px;
  font-size: 12px;
  padding: 3px 9px;
  font-style: italic;
  color: var(--blue);
}
