/* ─── Tokens ─── */
:root {
  --parchment: #F5F0E8;
  --parchment-deep: #EDE6DA;
  --terracotta: #C4714A;
  --gold: #C9A36A;
  --teal: #5E8B8C;
  --umber: #3D2B1F;
  --stone: #8A7B6B;
  --stone-light: #B5A99A;

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  --max-width: 1120px;
  --section-pad: clamp(4rem, 10vw, 8rem);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--umber);
  background: var(--parchment);
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Typography utilities ─── */
.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  margin-bottom: 0.75rem;
}

em {
  font-style: italic;
}

/* ─── Header ─── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.5rem, 5vw, 3rem);
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(61, 43, 31, 0.06);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mark {
  width: 36px;
  height: 36px;
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.orbit-dot {
  transform-origin: 40px 40px;
  animation: orbit 60s linear infinite;
}

@keyframes orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.header-nav a {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  transition: color 0.3s var(--ease);
}

.header-nav a:hover {
  color: var(--umber);
}

.nav-cta {
  color: var(--umber) !important;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(61, 43, 31, 0.2);
  border-radius: 100px;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease) !important;
}

.nav-cta:hover {
  background: rgba(61, 43, 31, 0.05);
  border-color: rgba(61, 43, 31, 0.35) !important;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 8rem clamp(1.5rem, 5vw, 3rem) 5rem;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 75% 45%, rgba(201, 163, 106, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(94, 139, 140, 0.06) 0%, transparent 60%),
    var(--parchment);
}

.hero-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.hero-orbit-scene {
  position: absolute;
  top: 50%;
  right: clamp(-2rem, 8vw, 6rem);
  transform: translateY(-50%);
  width: clamp(280px, 42vw, 520px);
  height: clamp(280px, 42vw, 520px);
}

.hero-orbit-svg {
  width: 100%;
  height: 100%;
}

.orbit-planet {
  transform-origin: 200px 200px;
}

.orbit-planet-1 {
  animation: hero-orbit 90s linear infinite;
}

.orbit-planet-2 {
  animation: hero-orbit 140s linear infinite reverse;
}

.orbit-planet-3 {
  animation: hero-orbit 200s linear infinite;
}

@keyframes hero-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero .label {
  margin-bottom: 1.5rem;
}

.hero-lead {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--stone);
  max-width: 36rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.75rem;
  background: var(--umber);
  color: var(--parchment);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease);
}

.btn-primary:hover {
  background: #2a1e15;
  transform: translateY(-1px);
}

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  padding: 0.875rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn-ghost:hover {
  color: var(--umber);
  border-color: var(--stone-light);
}

/* ─── Manifesto strip ─── */
.manifesto-strip {
  background: var(--umber);
  color: var(--parchment);
  padding: var(--section-pad) clamp(1.5rem, 5vw, 3rem);
}

.manifesto-strip blockquote {
  max-width: 48rem;
  margin: 0 auto;
}

.manifesto-strip p {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  line-height: 1.55;
  font-weight: 400;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.manifesto-strip cite {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ─── Sections ─── */
.section {
  padding: var(--section-pad) clamp(1.5rem, 5vw, 3rem);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 4rem;
}

.section-intro.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-intro .label {
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.25rem;
  color: var(--stone);
  line-height: 1.6;
}

/* ─── Philosophy cards ─── */
.belief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.belief-card {
  padding: 2rem;
  background: var(--parchment-deep);
  border-radius: 1.25rem;
  border: 1px solid rgba(61, 43, 31, 0.06);
}

.belief-card .label {
  margin-bottom: 1rem;
  color: var(--terracotta);
}

.belief-card p:last-child {
  color: var(--stone);
  font-size: 1.0625rem;
}

/* ─── Lenses ─── */
.lenses {
  max-width: none;
  background: var(--parchment-deep);
  padding-left: clamp(1.5rem, 5vw, 3rem);
  padding-right: clamp(1.5rem, 5vw, 3rem);
}

.lenses .section-intro {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.lens-timeline {
  position: relative;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem 0;
}

.lens-timeline-axis {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent,
    var(--gold) 8%,
    var(--gold) 92%,
    transparent
  );
  opacity: 0.45;
}

.lens-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lens-item {
  --lens-accent: var(--terracotta);
  display: grid;
  grid-template-columns: 1fr 3rem 1fr;
  align-items: center;
  gap: 0 1.5rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid rgba(61, 43, 31, 0.06);
}

.lens-item:first-child {
  padding-top: 0;
}

.lens-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lens-item:nth-child(odd) .lens-body {
  grid-column: 1;
  text-align: right;
}

.lens-item:nth-child(odd) .lens-marker {
  grid-column: 2;
}

.lens-item:nth-child(even) .lens-body {
  grid-column: 3;
  text-align: left;
}

.lens-item:nth-child(even) .lens-marker {
  grid-column: 2;
  grid-row: 1;
}

.lens-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.lens-marker span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lens-accent);
  box-shadow:
    0 0 0 4px var(--parchment-deep),
    0 0 0 5px var(--gold);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.lens-item:hover .lens-marker span {
  transform: scale(1.2);
  box-shadow:
    0 0 0 4px var(--parchment-deep),
    0 0 0 5px var(--lens-accent),
    0 0 20px rgba(61, 43, 31, 0.08);
}

.lens-body {
  transition: opacity 0.3s var(--ease);
}

.lens-item:hover .lens-body {
  opacity: 1;
}

.lens-item:not(:hover) .lens-body {
  opacity: 0.82;
}

.lens-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  color: var(--lens-accent);
  margin-bottom: 0.35rem;
}

.lens-name {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.lens-desc {
  font-size: 1.0625rem;
  color: var(--stone);
  line-height: 1.5;
  font-style: italic;
  max-width: 18rem;
}

.lens-item:nth-child(odd) .lens-desc {
  margin-left: auto;
}

/* Per-lens accent colors */
.lens-rest { --lens-accent: #5E8B8C; }
.lens-focus { --lens-accent: #3D2B1F; }
.lens-social { --lens-accent: #C9A36A; }
.lens-creativity { --lens-accent: #A67B6E; }
.lens-decisions { --lens-accent: #6B8F9E; }
.lens-love { --lens-accent: #C4714A; }
.lens-physical { --lens-accent: #B85C38; }
.lens-money { --lens-accent: #7A9E7E; }

/* ─── Screenshots ─── */
.app-showcase {
  max-width: none;
  padding-bottom: calc(var(--section-pad) * 0.5);
}

.app-showcase .section-intro {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.screenshots {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2rem clamp(1.5rem, 5vw, 3rem) 3rem;
  scrollbar-width: none;
}

.screenshots::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-align: center;
}

.screenshot-item img {
  width: clamp(220px, 28vw, 320px);
  height: auto;
  margin: 0 auto;
}

.screenshot-item figcaption {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--stone);
}

.screenshot-item figcaption .label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--terracotta);
}

/* ─── Manifesto beliefs ─── */
.manifesto-beliefs {
  max-width: none;
  background: var(--umber);
  color: var(--parchment);
  padding: var(--section-pad) clamp(1.5rem, 5vw, 3rem);
}

.beliefs-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.beliefs-inner .label {
  color: var(--gold);
  margin-bottom: 2rem;
}

.beliefs-list {
  list-style: none;
}

.beliefs-list li {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.6;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(245, 240, 232, 0.12);
  opacity: 0.92;
}

.beliefs-list li:first-child {
  padding-top: 0;
}

.beliefs-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ─── Download ─── */
.download {
  text-align: center;
  padding-top: calc(var(--section-pad) * 1.2);
  padding-bottom: calc(var(--section-pad) * 1.2);
}

.download-inner {
  max-width: 32rem;
  margin: 0 auto;
}

.download-logo {
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.download-lead {
  font-size: 1.25rem;
  color: var(--stone);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.store-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.store-badge-slot {
  display: block;
  width: 120px;
  height: 40px;
  flex-shrink: 0;
  line-height: 0;
  overflow: hidden;
  border-radius: 6px;
  transition: opacity 0.3s var(--ease), transform 0.2s var(--ease);
}

.store-badge-slot img {
  display: block;
  width: 100%;
  height: 100%;
}

.store-badge-slot:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.store-badge-soon {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.store-badge-soon:hover {
  opacity: 0.4;
  transform: none;
}

.store-soon-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  line-height: 1;
  width: 120px;
  text-align: center;
}

.download-note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--stone-light);
}

/* ─── Vision ─── */
.vision {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  margin-top: 1rem;
  padding-top: 3rem;
  padding-bottom: var(--section-pad);
  border-top: 1px solid rgba(61, 43, 31, 0.1);
  position: relative;
}

.vision::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5rem;
  height: 5px;
  border-radius: 100px;
  background: var(--gold);
  opacity: 0.6;
}

.vision .label {
  margin-bottom: 1rem;
}

.vision-text {
  font-size: 1.25rem;
  color: var(--stone);
  max-width: 32rem;
  margin: 0 auto;
  font-style: italic;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid rgba(61, 43, 31, 0.08);
  padding: 3rem clamp(1.5rem, 5vw, 3rem);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 500;
}

.footer-icon {
  border-radius: 6px;
}

.footer-tagline {
  font-size: 1rem;
  color: var(--stone);
  margin-bottom: 1rem;
}

.footer-tagline a {
  border-bottom: 1px solid var(--stone-light);
  transition: color 0.3s var(--ease);
}

.footer-tagline a:hover {
  color: var(--umber);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-legal a {
  transition: color 0.3s var(--ease);
}

.footer-legal a:hover {
  color: var(--umber);
}

/* ─── Legal pages ─── */
.legal-page {
  padding: 7rem clamp(1.5rem, 5vw, 3rem) 4rem;
}

.legal-content {
  max-width: 40rem;
  margin: 0 auto;
}

.legal-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(61, 43, 31, 0.1);
}

.legal-header .label {
  margin-bottom: 0.75rem;
}

.legal-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.legal-content h2 {
  font-size: 1.375rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--stone);
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--umber);
}

.legal-content ul {
  margin: 0 0 1rem 1.25rem;
  color: var(--umber);
}

.legal-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.legal-content li strong {
  font-weight: 600;
}

.legal-content a {
  border-bottom: 1px solid var(--stone-light);
  transition: color 0.3s var(--ease);
}

.legal-content a:hover {
  color: var(--terracotta);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .hero-orbit-scene {
    right: -15%;
    opacity: 0.45;
    width: clamp(240px, 70vw, 360px);
    height: clamp(240px, 70vw, 360px);
  }

  .hero-inner {
    max-width: 28rem;
  }
}

@media (max-width: 640px) {
  .header-nav a:not(.nav-cta) {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  .hero-orbit-scene {
    top: 12%;
    right: -25%;
    transform: none;
    opacity: 0.35;
    width: 75vw;
    height: 75vw;
  }

  .belief-grid {
    grid-template-columns: 1fr;
  }

  .lens-timeline-axis {
    left: 0.65rem;
    transform: none;
  }

  .lens-item {
    grid-template-columns: 1.75rem 1fr;
    gap: 0 1.25rem;
    padding: 1.75rem 0;
  }

  .lens-item:nth-child(odd) .lens-body,
  .lens-item:nth-child(even) .lens-body {
    grid-column: 2;
    text-align: left;
  }

  .lens-item:nth-child(odd) .lens-marker,
  .lens-item:nth-child(even) .lens-marker {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    padding-top: 0.4rem;
  }

  .lens-item:nth-child(odd) .lens-desc {
    margin-left: 0;
  }

  .lens-desc {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-dot,
  .orbit-planet-1,
  .orbit-planet-2,
  .orbit-planet-3 {
    animation: none;
  }

  .lens-item:hover .lens-marker span {
    transform: none;
  }

  .lens-item:not(:hover) .lens-body,
  .lens-item:hover .lens-body {
    opacity: 1;
  }

  html {
    scroll-behavior: auto;
  }
}
