/* Cubed Crosswords — shared styles.
   Palette matches the app icon exactly (sampled, not eyeballed). */

:root {
  --ink:        #1E1B4B;
  --edge:       #3730A3;
  --accent:     #6366F1;
  --accent-soft:#A5B4FC;
  --bg:         #1A1740;
  --bg-2:       #12102C;
  --surface:    #23205A;
  --surface-2:  #2B2769;
  --text:       #EEF0FB;
  --text-dim:   #A9AED4;
  --text-faint: #7C82AE;
  --white:      #FFFFFF;
  --radius:     16px;
  --maxw:       1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-2);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

/* ---------- header ---------- */

header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 16, 44, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav { display: flex; align-items: center; gap: 14px; height: 66px; }
.nav img { width: 34px; height: 34px; }
.nav .name { font-weight: 700; letter-spacing: -0.01em; font-size: 17px;
  color: var(--white); white-space: nowrap; }
.nav .spacer { flex: 1; }
.nav a.link { color: var(--text-dim); font-size: 15px; font-weight: 500; }
.nav a.link:hover { color: var(--white); text-decoration: none; }
.nav .link + .link { margin-left: 22px; }

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(1100px 620px at 76% -8%, rgba(99,102,241,0.30), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 96px;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  color: var(--white);
  font-weight: 800;
}

.lede { font-size: 1.2rem; color: var(--text-dim); margin: 0 0 34px; max-width: 34em; }

.hero-cube { justify-self: center; width: 100%; max-width: 400px; }
.hero-cube img { width: 100%; height: auto; display: block;
  filter: drop-shadow(0 26px 52px rgba(0,0,0,0.5)); }

.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--white); color: #111;
  padding: 13px 22px; border-radius: 13px;
  font-weight: 650; font-size: 16px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.badge:hover { transform: translateY(-1px); text-decoration: none; color: #111;
  box-shadow: 0 10px 26px rgba(0,0,0,0.34); }
.badge.pending { background: rgba(255,255,255,0.09); color: var(--text);
  border: 1px solid rgba(255,255,255,0.19); cursor: default; }
.badge.pending:hover { transform: none; box-shadow: none; color: var(--text); }

.note { font-size: 14px; color: var(--text-faint); margin-top: 16px; }

/* ---------- sections ---------- */

section { padding: 84px 0; }
section + section { border-top: 1px solid rgba(255,255,255,0.06); }

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  letter-spacing: -0.025em; line-height: 1.15;
  margin: 0 0 16px; color: var(--white); font-weight: 750;
}

h3 { font-size: 1.06rem; margin: 0 0 8px; color: var(--white); font-weight: 650; }

.sub { color: var(--text-dim); max-width: 46em; margin: 0 0 44px; font-size: 1.07rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split img { width: 100%; max-width: 340px; height: auto; justify-self: center; }

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

.card {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(35,32,90,0.55) 100%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card p { margin: 0; color: var(--text-dim); font-size: 15.5px; }

.kicker {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-soft); margin-bottom: 14px;
}

.privacy-strip { background: linear-gradient(180deg, rgba(99,102,241,0.13), transparent); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.fact { text-align: center; padding: 22px 12px;
  border: 1px solid rgba(255,255,255,0.09); border-radius: var(--radius);
  background: rgba(255,255,255,0.03); }
.fact .n { display: block; font-size: 1.6rem; font-weight: 750; color: var(--white);
  letter-spacing: -0.02em; }
.fact .l { font-size: 13.5px; color: var(--text-faint); }

/* ---------- documents (privacy / support) ---------- */

.doc { max-width: 760px; padding-top: 62px; padding-bottom: 96px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: 10px; }
.doc .updated { color: var(--text-faint); font-size: 14.5px; margin-bottom: 46px; }
.doc h2 { font-size: 1.32rem; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--text-dim); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 9px; }
.doc strong { color: var(--text); font-weight: 650; }

.callout {
  background: rgba(99,102,241,0.11);
  border: 1px solid rgba(99,102,241,0.32);
  border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 20px 24px; margin: 30px 0;
}
.callout p { margin: 0; color: var(--text); }

.faq { border-top: 1px solid rgba(255,255,255,0.09); padding: 24px 0; }
.faq:last-of-type { border-bottom: 1px solid rgba(255,255,255,0.09); }
.faq h3 { margin-bottom: 6px; }
.faq p { margin: 0; }

.mail {
  display: inline-block; background: var(--accent); color: var(--white);
  padding: 13px 26px; border-radius: 12px; font-weight: 650;
  text-decoration: none; margin-top: 8px;
}
.mail:hover { background: #4F46E5; color: var(--white); text-decoration: none; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 40px 0 56px; color: var(--text-faint); font-size: 14.5px;
}
.foot { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.foot .spacer { flex: 1; }
.foot a { color: var(--text-faint); }
.foot a:hover { color: var(--white); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; padding-bottom: 64px; }
  .hero-cube { max-width: 290px; order: -1; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .cards { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  section { padding: 62px 0; }
  .nav .link + .link { margin-left: 18px; }
}

@media (max-width: 560px) {
  /* Drop the in-page anchor first; Privacy and Support are the two links
     Apple requires people to be able to reach. */
  .nav a.link[href^="#"] { display: none; }
  .nav { gap: 10px; }
  .nav img { width: 30px; height: 30px; }
  .nav .name { font-size: 16px; }
}

@media (max-width: 420px) {
  .nav .link { font-size: 14px; }
  .nav .name { font-size: 15px; }
  .facts { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
