/* Home Compass — static site (GitHub Pages) */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #6e6e73;
  --border: #d2d2d7;
  --cyan: #32ade6;
  --cyan-hover: #2899cc;
  --orange: #ff9500;
  --section: #ebebed;
  --max: 72rem;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --radius: 1rem;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* —— Layout —— */
.wrap {
  width: min(100% - var(--pad) * 2, var(--max));
  margin-inline: auto;
}

/* —— Type —— */
.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}

.label--muted {
  color: var(--muted);
}

.label--cyan {
  color: var(--cyan);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 36ch;
  margin-inline: auto;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn--cyan {
  background: var(--cyan);
  color: #fff;
}

.btn--cyan:hover {
  background: var(--cyan-hover);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

@media (prefers-reduced-motion: no-preference) {
  .btn--cyan:active {
    transform: scale(0.98);
  }
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(210, 210, 215, 0.85);
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  max-width: min(100%, 14rem);
}

.logo-tagline {
  font-weight: 500;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .logo {
    max-width: none;
    font-size: 1.125rem;
  }

  .logo-tagline {
    color: inherit;
    font-weight: 600;
  }
}

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

.nav-links {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.nav-links a {
  font-size: 0.8125rem;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav .btn--sm {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .nav-links a {
    font-size: 0.75rem;
  }
  .nav .btn--sm {
    padding: 0.45rem 0.65rem;
    font-size: 0.6875rem;
  }
}

/* —— Hero —— */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3rem);
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(210, 210, 215, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 210, 215, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 20%, transparent 75%);
  pointer-events: none;
  opacity: 0.6;
}

.hero-inner {
  position: relative;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
}

.hero .lead {
  margin-top: 1.25rem;
}

.hero-cta {
  margin-top: 2rem;
}

.hero-frame {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 24px 80px -24px rgba(17, 17, 17, 0.12);
}

.hero-frame img {
  width: 100%;
  aspect-ratio: 21 / 10;
  object-fit: cover;
  object-position: top center;
}

/* —— Features —— */
.features {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.features-header {
  text-align: center;
  margin-bottom: clamp(3rem, 8vw, 5rem);
}

.features-header h2 {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.features-intro {
  margin: 1rem auto 0;
  max-width: 36rem;
  font-size: 1.0625rem;
  color: var(--muted);
}

.features-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 10vw, 8rem);
}

.feature {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 64rem) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .feature--reverse .feature-media {
    order: 2;
  }

  .feature--reverse .feature-copy {
    order: 1;
  }
}

.feature-media {
  display: flex;
  justify-content: center;
}

.phone-panel {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

/* Match export size 1170×2470; size frame so height cap never squashes width */
.phone-panel-inner {
  --phone-max-h: min(38rem, 75vh);
  --phone-max-w: min(17.5rem, 100%);
  aspect-ratio: 1170 / 2470;
  width: min(var(--phone-max-w), calc(var(--phone-max-h) * 1170 / 2470));
  max-height: var(--phone-max-h);
  margin-inline: auto;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  background: var(--section);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.phone-panel-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

.feature-copy .label {
  display: block;
}

.feature-copy h2,
.feature-copy h3 {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.feature-copy p {
  margin: 1rem 0 0;
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 28rem;
}

/* —— Cinematic —— */
.cinematic {
  background: var(--section);
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.cinematic-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--surface);
}

.cinematic-card img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.cinematic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(17, 17, 17, 0.75) 0%,
    rgba(17, 17, 17, 0.25) 45%,
    transparent 100%
  );
}

.cinematic-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  color: #fff;
}

.cinematic-text h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  max-width: 16ch;
}

.cinematic-text p {
  margin: 1rem 0 0;
  max-width: 32rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: rgba(255, 255, 255, 0.88);
}

@media (max-width: 40rem) {
  .cinematic-card img {
    aspect-ratio: 4 / 3;
  }
}

/* —— Pricing —— */
.pricing {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.pricing-header {
  text-align: center;
}

.pricing-header h2 {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.pricing-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (min-width: 48rem) {
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.plan {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.plan h3 {
  margin-top: 0.75rem;
  font-size: 1.5rem;
}

.plan-price {
  margin: 0.75rem 0 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.plan-price span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  vertical-align: middle;
  margin-left: 0.25rem;
}

.plan-list {
  margin-top: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plan-list li {
  display: flex;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--muted);
}

.plan-list li span:first-child {
  flex-shrink: 0;
  color: var(--border);
}

.plan--pro {
  border-width: 2px;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(50, 173, 230, 0.12);
}

.plan-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #fff;
}

.plan--pro .plan-list li {
  color: var(--ink);
}

.plan--pro .plan-list li span:first-child {
  color: var(--cyan);
}

.plan-callout {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

@media (min-width: 40rem) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-credit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
  line-height: 0;
}

.footer-logo {
  height: 2rem;
  width: auto;
  display: block;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:visited {
  color: var(--muted);
}

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

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

/* —— Legal pages —— */
.legal {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.legal-back {
  font-size: 0.875rem;
  color: var(--cyan);
}

.legal-back:hover {
  text-decoration: underline;
}

.legal h1 {
  margin-top: 2rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.legal p {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 40rem;
}

.legal-doc {
  max-width: 42rem;
  margin-top: 2rem;
}

.legal-doc p,
.legal-doc li {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.legal-doc p {
  max-width: none;
}

.legal-doc p + p {
  margin-top: 1rem;
}

.legal-doc h2 {
  margin-top: 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.legal-doc h2:first-child {
  margin-top: 0;
}

.legal-doc h3 {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.legal-doc ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.legal-doc li + li {
  margin-top: 0.35rem;
}

.legal-doc strong {
  color: var(--ink);
  font-weight: 600;
}

.legal-doc table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.legal-doc th,
.legal-doc td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border);
}

.legal-doc th {
  background: var(--section);
  color: var(--ink);
  font-weight: 600;
}

.legal-doc em {
  font-size: 0.875rem;
  color: var(--muted);
}

.legal-doc a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-doc a:hover {
  color: var(--cyan-hover);
}

.legal .legal-meta {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: none;
}

.legal-doc .legal-upper {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* —— Scroll reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
