/* =====================================================================
   Orbit marketing site — shared styles
   Mirrors the iOS app's design system: solid colors only, no gradients,
   SF Pro typography, generous whitespace, Apple-Journal aesthetic.
   ===================================================================== */

/* --- Tokens ----------------------------------------------------------- */

:root {
  color-scheme: light dark;

  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --surface-muted: #F2EFE9;
  --text: #111111;
  --text-2: #5C5C5C;
  --text-3: #9A9A9A;
  --separator: rgba(0, 0, 0, 0.08);
  --separator-strong: rgba(0, 0, 0, 0.16);
  --accent: #2D5BFF;
  --accent-fg: #FFFFFF;
  --accent-soft: rgba(45, 91, 255, 0.10);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --max: 1180px;
  --pad: 32px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E0E;
    --surface: #181818;
    --surface-muted: #232323;
    --text: #F4F1EB;
    --text-2: #A8A8A8;
    --text-3: #6F6F6F;
    --separator: rgba(255, 255, 255, 0.08);
    --separator-strong: rgba(255, 255, 255, 0.18);
    --accent: #5A82FF;
    --accent-fg: #0E0E0E;
    --accent-soft: rgba(90, 130, 255, 0.16);
  }
}

@media (max-width: 720px) {
  :root { --pad: 22px; }
}

/* --- Reset ------------------------------------------------------------ */

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt", "ss01", "ss02";
  font-variant-numeric: lining-nums proportional-nums;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

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

a { color: var(--text); }

::selection { background: var(--accent); color: var(--accent-fg); }

/* --- Layout primitives ------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.container--reading {
  max-width: 720px;
}

.hr {
  height: 1px;
  background: var(--separator);
  border: 0;
}

/* --- Header ----------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--separator);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.logo-link .logo-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
  transition: transform 0.6s var(--ease-spring);
}

.logo-link:hover .logo-mark {
  transform: rotate(18deg) scale(1.06);
}

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

.site-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 1px;
  width: 100%;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 540px) {
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 14px; }
}

/* --- Typography helpers ---------------------------------------------- */

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.serif {
  font-family: "New York", ui-serif, Charter, "Iowan Old Style",
               Cambria, Georgia, serif;
  font-feature-settings: "kern", "liga", "calt", "onum";
  font-variant-numeric: oldstyle-nums;
}

/* --- Hero ------------------------------------------------------------- */

.hero {
  padding: 128px 0 96px;
  position: relative;
}

@media (max-width: 720px) {
  .hero { padding: 64px 0 64px; }
}

.hero .eyebrow {
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(52px, 9.5vw, 128px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.94;
  max-width: 14ch;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-tagline {
  margin-top: 30px;
  max-width: 580px;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.45;
  color: var(--text-2);
}

.hero-cta-row {
  margin-top: 44px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 0;
  cursor: pointer;
  transition: transform 0.16s var(--ease-spring), opacity 0.16s ease;
}

.cta-primary:hover { transform: translateY(-1px) scale(1.02); }
.cta-primary:active { transform: scale(0.98); }
.cta-primary svg { width: 18px; height: 18px; }

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--separator-strong);
  padding-bottom: 2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.cta-secondary:hover {
  color: var(--text);
  border-color: var(--text);
}

/* --- Decorative wordmark below hero ---------------------------------- */

.hero-mark-wrap {
  margin-top: 96px;
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (max-width: 720px) {
  .hero-mark-wrap { margin-top: 64px; }
}

.hero-mark-wrap .mark-rule {
  flex: 1;
  height: 1px;
  background: var(--separator);
}

.hero-mark-wrap .mark-orb {
  width: 56px;
  height: 56px;
  color: var(--accent);
}

/* --- Section base ----------------------------------------------------- */

.section {
  padding: 112px 0;
  position: relative;
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }
}

.section-head {
  margin-bottom: 56px;
  max-width: 720px;
}

.section-head .eyebrow { margin-bottom: 20px; }

.section-head h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--text);
}

.section-head p {
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-2);
  max-width: 580px;
}

/* --- Feature grid ----------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--separator);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 940px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.32s var(--ease);
}

.feature-card:hover {
  background: var(--surface-muted);
}

.feature-card svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text);
}

.feature-card p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-2);
}

/* --- Pull-quote block (privacy emphasis) ----------------------------- */

.pullquote {
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}

.pullquote::before {
  content: "\201C";
  position: absolute;
  top: -20px;
  left: 28px;
  font-family: "New York", ui-serif, Georgia, serif;
  font-size: 240px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  pointer-events: none;
}

.pullquote .eyebrow {
  color: var(--accent);
  position: relative;
}

.pullquote blockquote {
  position: relative;
  margin-top: 28px;
  font-family: "New York", ui-serif, Georgia, serif;
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--bg);
  max-width: 24ch;
}

.pullquote .signature {
  margin-top: 28px;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .pullquote { background: var(--surface-muted); color: var(--text); }
  .pullquote blockquote { color: var(--text); }
  .pullquote .signature { color: var(--text-3); }
}

/* --- Two-up alternating editorial ------------------------------------ */

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

@media (max-width: 860px) {
  .editorial { grid-template-columns: 1fr; gap: 32px; }
}

.editorial h3 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}

.editorial p {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
}

.editorial .image {
  aspect-ratio: 4 / 5;
  background: var(--surface-muted);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Compatibility list (Apple surfaces) ----------------------------- */

.surfaces {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.surface-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.surface-chip:hover {
  border-color: var(--text);
  color: var(--text);
  transform: translateY(-1px);
}

.surface-chip svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* --- Privacy table --------------------------------------------------- */

.privacy-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 720px) {
  .privacy-table { grid-template-columns: 1fr; gap: 18px; }
}

.privacy-row {
  border-top: 1px solid var(--separator);
  padding-top: 18px;
}

.privacy-row dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.privacy-row dd {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}

/* --- End-of-page CTA ------------------------------------------------- */

.end-cta {
  padding: clamp(64px, 10vw, 144px) 0;
  text-align: center;
  border-top: 1px solid var(--separator);
}

.end-cta .logo-mark {
  width: 72px;
  height: 72px;
  color: var(--accent);
  margin: 0 auto 32px;
}

.end-cta h2 {
  font-family: "New York", ui-serif, Georgia, serif;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
  max-width: 16ch;
  margin: 0 auto;
}

.end-cta .hero-cta-row {
  justify-content: center;
  margin-top: 40px;
}

/* --- Footer ---------------------------------------------------------- */

.site-footer {
  padding: 56px 0 80px;
  border-top: 1px solid var(--separator);
  color: var(--text-2);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-attribution {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-attribution .logo-mark {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* --- Reading-page layout (privacy / terms / support) ----------------- */

.reading {
  padding: 80px 0 144px;
}

@media (max-width: 720px) {
  .reading { padding: 56px 0 96px; }
}

.reading .eyebrow { margin-bottom: 20px; }

.reading h1 {
  font-size: clamp(40px, 5.6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--text);
}

.reading > .container--reading > .updated {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.reading .lede {
  margin-top: 28px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
}

.reading hr {
  margin: 56px 0;
  height: 1px;
  background: var(--separator);
  border: 0;
}

.reading h2 {
  margin-top: 56px;
  margin-bottom: 16px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text);
}

.reading h3 {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.reading p,
.reading li {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
}

.reading p { margin-top: 16px; }

.reading ul,
.reading ol { margin: 16px 0 16px 1.25em; }

.reading li { margin-top: 8px; }

.reading a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.18s ease;
}

.reading a:hover { opacity: 0.7; }

.reading strong { font-weight: 600; }

.reading blockquote {
  margin: 28px 0;
  padding: 8px 0 8px 18px;
  border-left: 2px solid var(--accent);
  color: var(--text-2);
  font-style: italic;
}

.reading table {
  margin: 24px 0;
  width: 100%;
  border-collapse: collapse;
}

.reading th,
.reading td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--separator);
  font-size: 16px;
  text-align: left;
  vertical-align: top;
}

.reading th {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.placeholder {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 1px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* --- Reveal-on-scroll ------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero entrance (no JS dependency) -------------------------------- */

.hero .eyebrow,
.hero h1,
.hero-tagline,
.hero-cta-row,
.hero-mark-wrap {
  opacity: 0;
  animation: fade-up 0.9s var(--ease) forwards;
}

.hero .eyebrow      { animation-delay: 0.05s; }
.hero h1            { animation-delay: 0.15s; }
.hero-tagline       { animation-delay: 0.30s; }
.hero-cta-row       { animation-delay: 0.45s; }
.hero-mark-wrap     { animation-delay: 0.60s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- App-store-style download badge (inline SVG sizing) -------------- */

.app-store-badge {
  height: 48px;
  width: auto;
}
