/* ennobleapp.com. Colors mirror src/theme/tokens.ts (dark is the default, light via
   prefers-color-scheme). Fonts are self-hosted: no third-party requests. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/BricolageGrotesque_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/PlusJakartaSans_500Medium.ttf') format('truetype');
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/PlusJakartaSans_700Bold.ttf') format('truetype');
  font-weight: 600 800;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  /* tokens.ts → dark */
  --bg: #100d20;
  --surface: #1a1631;
  --card: #241e43;
  --border: #393253;
  --hairline: rgba(188, 194, 208, 0.16); /* silver300 @ 16% */
  --text: #f4f2ff;
  --text-2: #b8b1cc;
  --text-3: #958eae;
  --primary: #8b5cf6;
  --primary-edge: #5b21b6;
  --primary-soft: rgba(139, 92, 246, 0.16);
  --accent: #c4b5fd;
  --on-primary: #ffffff;
  --glow: rgba(139, 92, 246, 0.28);

  /* tokens.ts → space / radius / type */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 24px;
  --s-2xl: 32px;
  --s-3xl: 48px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', var(--font-body);
}

@media (prefers-color-scheme: light) {
  :root {
    /* tokens.ts → light */
    --bg: #f4f1fc;
    --surface: #ffffff;
    --card: #ffffff;
    --border: #ddd6f0;
    --hairline: #ddd6f0;
    --text: #16131f;
    --text-2: #4a4560;
    --text-3: #686280;
    --primary: #7c3aed;
    --primary-edge: #5b21b6;
    --primary-soft: rgba(124, 58, 237, 0.1);
    --accent: #6d28d9;
    --glow: rgba(124, 58, 237, 0.16);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

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

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

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--s-lg);
}

@media (min-width: 600px) {
  .wrap {
    padding: 0 var(--s-xl);
  }
}

/* ---- Header / footer */

.site-header {
  padding: var(--s-lg) 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.4px;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: var(--s-lg);
  font-size: 15px;
  font-weight: 700;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
}

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

.site-footer {
  margin-top: var(--s-3xl);
  padding: var(--s-2xl) 0;
  border-top: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: 13px;
  line-height: 20px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-md) var(--s-xl);
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-lg);
}

.site-footer a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 700;
}

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

/* ---- Landing */

.hero {
  text-align: center;
  padding: var(--s-2xl) 0 var(--s-3xl);
  position: relative;
}

.hero-lance {
  width: 168px;
  height: 168px;
  margin: 0 auto var(--s-lg);
  position: relative;
}

/* The one decorative glow, like the app's splash: behind Lance only. */
.hero-lance::before {
  content: '';
  position: absolute;
  inset: 12%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  filter: blur(8px);
  z-index: -1;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-lance img {
    animation: float 4.5s ease-in-out infinite;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.eyebrow {
  margin: 0 0 var(--s-sm);
  color: var(--accent);
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -1.2px;
  text-wrap: balance;
}

@media (min-width: 600px) {
  .display {
    font-size: 60px;
    line-height: 64px;
    letter-spacing: -1.8px;
  }
}

.lede {
  max-width: 34ch;
  margin: var(--s-lg) auto 0;
  color: var(--text-2);
  font-size: 19px;
  line-height: 28px;
  text-wrap: balance;
}

.cta {
  margin-top: var(--s-2xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-sm);
}

/* App Store badge placeholder. Replace with Apple's official badge artwork + link at launch. */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  height: 56px;
  padding: 0 var(--s-xl);
  border-radius: var(--r-md);
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--border);
}

.store-badge[aria-disabled='true'] {
  cursor: default;
}

.cta-note {
  color: var(--text-3);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
}

.section {
  padding: var(--s-2xl) 0;
}

.section-title {
  margin: 0 0 var(--s-xl);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  text-align: center;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-md);
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-lg);
  }
}

.feature {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  color: var(--accent);
  margin-bottom: var(--s-md);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin: 0 0 var(--s-xs);
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 22px;
}

/* Screenshot placeholders: three phone-shaped slots, scroll sideways on small screens. */
.shots {
  display: flex;
  gap: var(--s-lg);
  justify-content: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--s-sm);
}

.shot {
  flex: 0 0 auto;
  width: 200px;
  aspect-ratio: 9 / 19.5;
  border-radius: var(--r-xl);
  border: 2px dashed var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  scroll-snap-align: center;
}

@media (max-width: 699px) {
  .shots {
    justify-content: flex-start;
  }
}

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

.doc {
  max-width: 680px;
  margin: 0 auto;
  padding-top: var(--s-xl);
}

.doc h1 {
  margin: 0 0 var(--s-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 40px;
  letter-spacing: -1px;
}

.doc .meta {
  margin: 0 0 var(--s-2xl);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}

.doc h2 {
  margin: var(--s-2xl) 0 var(--s-sm);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.doc h3 {
  margin: var(--s-xl) 0 var(--s-xs);
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
}

.doc p,
.doc li {
  color: var(--text-2);
}

.doc strong {
  color: var(--text);
  font-weight: 700;
}

.doc ul {
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: var(--s-xs);
}

.summary {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-lg) var(--s-xl);
}

.summary p {
  margin: 0;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
  text-align: center;
}

.contact-card p {
  margin: 0 0 var(--s-md);
}

/* Chunky primary button (the app's PressableButton): solid fill over a darker 3px edge. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 var(--s-xl);
  border-radius: var(--r-lg);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--primary-edge);
  transition: transform 80ms ease, box-shadow 80ms ease;
  overflow-wrap: anywhere;
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--primary-edge);
}

.faq details {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: var(--s-lg) var(--s-xl);
}

.faq details + details {
  margin-top: var(--s-md);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s-md);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--text-3);
  font-weight: 700;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details p,
.faq details ol {
  margin: var(--s-md) 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 22px;
}

.faq details ol {
  padding-left: 1.2em;
}

/* ---- 404 */

.not-found {
  text-align: center;
  padding: var(--s-3xl) 0;
}

.not-found img {
  width: 120px;
  margin: 0 auto var(--s-lg);
}
