/* Ember website — shared styles
   Calm, dark, restrained. No borders, gradients, or glows:
   separation comes from surface contrast (bg → card → raised) and spacing. */

:root {
  --bg: #070708;
  --card: #131315;
  --raised: #1d1d20;
  --text: #ffffff;
  --text-2: #a8a8ae;
  --accent: #ff8c42;
  --on-accent: #070708;

  --radius: 18px;
  --radius-sm: 10px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 40px);

  color-scheme: dark;
}

/* Accent themes, matching the app. Picked in "Make it yours" (assets/theme.js). */
html[data-accent="volt"] { --accent: #2ea043; }
html[data-accent="electric"] { --accent: #528cff; }
html[data-accent="violet"] { --accent: #b777ff; }
html[data-accent="hotpink"] { --accent: #ff4da6; }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 8vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 5.5vw, 2.9rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; font-weight: 600; }

p { margin: 0; text-wrap: pretty; }

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

/* Visible focus for keyboard users only */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header & footer ---------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.header-cta {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
}
.header-cta:hover { background: var(--raised); text-decoration: none; }

.site-footer {
  margin-top: clamp(64px, 12vw, 120px);
  background: var(--card);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  color: var(--text-2);
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0; padding: 0;
  list-style: none;
}
.footer-links li + li::before {
  content: "·";
  margin: 0 10px;
  color: var(--text-2);
}
.footer-links a { color: var(--text); }

/* ---------- Buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  font-size: 1.05rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Apple's official badge: shown unmodified, at least 40px tall per Apple's guidelines */
.store-badge {
  display: inline-block;
  border-radius: 10px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.store-badge img { width: 182px; height: auto; }
.store-badge:hover { opacity: 0.85; }
.store-badge:active { transform: scale(0.98); }
.panel .store-badge,
.final .store-badge { margin-top: 28px; }

.btn-quiet {
  background: var(--raised);
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0; padding: 0;
  list-style: none;
}
.chips li {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- Landing ---------- */

.section { padding-top: clamp(56px, 11vw, 112px); }

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.lede {
  color: var(--text-2);
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  margin-top: 16px;
  max-width: 34ch;
}

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding-top: clamp(24px, 6vw, 64px);
}
.hero-logo {
  width: 72px; height: 72px;
  border-radius: 17px;
  margin-bottom: 28px;
}
.hero .lede { max-width: 30ch; }
.hero-actions { margin-top: 32px; }
.hero-note {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 0.92rem;
}

/* Phone frame: a raised surface around the screenshot */
.phone {
  margin: 0 auto;
  width: min(280px, 74vw);
  padding: 9px;
  border-radius: 46px;
  background: var(--raised);
}
.phone img {
  width: 100%;
  border-radius: 37px;
  background: #000;
  aspect-ratio: 900 / 1957;
}

.stage { padding: 8px 0; }

.feature {
  display: grid;
  gap: 36px;
  align-items: center;
}

.points {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.points li {
  position: relative;
  padding-left: 20px;
  color: var(--text-2);
}
.points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.points strong { color: var(--text); font-weight: 600; }

.feature .chips { margin-top: 24px; }

/* Gallery of several phones; scrolls sideways on small screens */
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(240px, 66vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 12px;
  margin: 32px calc(var(--gutter) * -1) 0;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure {
  margin: 0;
  scroll-snap-align: center;
}
.gallery .phone { width: 100%; padding: 7px; border-radius: 38px; }
.gallery .phone img { border-radius: 31px; }
.gallery figcaption {
  margin-top: 16px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.95rem;
}

.cards {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { color: var(--text-2); margin-top: 6px; }

.note {
  margin: 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.note blockquote {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.note p { color: var(--text-2); font-size: 0.9rem; margin-top: 10px; }

/* Rank tier chips: fixed colors from the app, regardless of accent */
.tiers li {
  --tier: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  color: var(--tier);
  font-weight: 600;
  background: var(--raised);
  background: color-mix(in srgb, var(--tier) 16%, var(--bg));
}
.tiers li::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--tier);
}
.tiers .tier-beginner { --tier: #f2c94c; }
.tiers .tier-novice { --tier: #4cc38a; }
.tiers .tier-intermediate { --tier: #f08a3c; }
.tiers .tier-advanced { --tier: #4c9aff; }
.tiers .tier-elite { --tier: #e5484d; }
.tiers .tier-world-class { --tier: #ec4fa0; }

/* Accent picker */
.theme-hint {
  display: none;
  margin-top: 8px;
  color: var(--text-2);
  font-size: 0.95rem;
}
.js .theme-hint { display: block; }

.themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px -10px 0;
  padding: 0;
  list-style: none;
}
.theme {
  display: block;
  width: 96px;
  padding: 10px 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.theme img {
  width: 76px; height: 76px;
  margin: 0 auto;
  border-radius: 17px;
  transition: transform 0.2s ease;
}
.theme span {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
}
.theme:hover { background: var(--card); }
.theme:active img { transform: scale(0.95); }
.theme[aria-pressed="true"] {
  background: var(--card);
  color: var(--accent);
  font-weight: 600;
}
/* Without JavaScript the icons are just a display, not controls. */
html:not(.js) .theme { cursor: default; pointer-events: none; }
html:not(.js) .theme[aria-pressed="true"] { background: transparent; color: var(--text-2); font-weight: inherit; }

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(28px, 6vw, 56px);
}
.panel .points { margin-top: 20px; }
.panel .btn { margin-top: 28px; }
.panel-link { display: inline-block; margin-top: 24px; font-weight: 600; }

.pricing { text-align: center; }
.pricing .lede { margin-left: auto; margin-right: auto; }

.final {
  text-align: center;
  padding-top: clamp(72px, 14vw, 140px);
}
.final > img { margin: 0 auto 24px; width: 64px; height: 64px; border-radius: 15px; }
.final .btn { margin-top: 28px; }

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .notes { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; }
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature.flip .feature-media { order: -1; }
  .gallery {
    grid-auto-flow: initial;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    padding: 0;
    margin: 40px 0 0;
  }
}

/* ---------- Motion ----------
   A gentle rise as sections enter the viewport. CSS only, no JavaScript;
   skipped entirely when the user prefers reduced motion or the browser
   doesn't support scroll-driven animations. */

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 0.7s ease-out both; }
  .hero > :nth-child(2) { animation-delay: 0.12s; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

/* ---------- Legal & support pages ---------- */

.page-head { padding-top: clamp(24px, 6vw, 56px); }
.page-head p { color: var(--text-2); margin-top: 12px; }

.prose {
  max-width: 700px;
  padding-top: 8px;
}
.prose h2 {
  font-size: clamp(1.35rem, 3.6vw, 1.6rem);
  letter-spacing: -0.015em;
  margin-top: 48px;
  scroll-margin-top: 24px;
}
.prose h3 { margin-top: 28px; }
.prose p,
.prose ul,
.prose ol { margin-top: 14px; color: var(--text-2); }
.prose ul,
.prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--text); font-weight: 600; }

.glance {
  margin-top: 32px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 24px 26px;
}
.glance h2 { margin-top: 0; font-size: 1.2rem; }
.glance ul { color: var(--text); }

.callout {
  margin-top: 20px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.callout p:first-child { margin-top: 0; }

.steps li::marker { color: var(--accent); font-weight: 600; }

/* Support FAQ: native <details>, no JavaScript */
.faq { display: grid; gap: 10px; margin-top: 24px; }
.faq details {
  background: var(--card);
  border-radius: var(--radius);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 22px 20px; }
.faq details p { margin-top: 0; color: var(--text-2); }
.faq summary:focus-visible { border-radius: var(--radius); outline-offset: -2px; }

.contact {
  margin-top: 32px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
}
.contact h2 { margin-top: 0; font-size: 1.25rem; }
.contact p { color: var(--text-2); margin-top: 8px; }
.contact .btn { margin-top: 20px; }

.not-found {
  text-align: center;
  padding-top: clamp(64px, 16vw, 160px);
}
.not-found p { color: var(--text-2); margin: 16px auto 0; max-width: 32ch; }
.not-found .btn { margin-top: 32px; }
