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

:root {
  --cream: #F2EDE4;
  --cream-deep: #E8E0D2;
  --teal: #2B5249;
  --teal-soft: rgba(43, 82, 73, 0.12);
  --maroon: #7D1A47;
  --text-primary: #1C1C1C;
  --text-secondary: #5A5A5A;
  --text-muted: #8A8A8A;
  --divider: rgba(44, 82, 73, 0.18);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-height: 72px;
  --page-inset: 32px;
  --max-content: 960px;
  --shadow-phone: 0 20px 56px rgba(28, 28, 28, 0.16);
  --shadow-shot: 0 12px 40px rgba(0, 0, 0, 0.12);
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  background-color: var(--cream);
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -10%, rgba(43, 82, 73, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 8%, rgba(125, 26, 71, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(43, 82, 73, 0.06), transparent 55%);
  background-attachment: fixed;
  padding: var(--nav-height) 24px 40px;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

/* ── Site nav ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: linear-gradient(to bottom, rgba(242, 237, 228, 0.94), rgba(242, 237, 228, 0.72), transparent);
  backdrop-filter: blur(8px);
}

.site-nav .brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-nav .brand:hover {
  opacity: 0.7;
}

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

.site-nav .nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a[aria-current="page"] {
  opacity: 1;
}

/* ── Abyssos sub-nav ── */
.sub-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 8px 0 32px;
  flex-wrap: wrap;
}

.sub-nav a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.sub-nav a:hover,
.sub-nav a[aria-current="page"] {
  opacity: 1;
  border-bottom-color: var(--teal);
}

/* ── Page heading ── */
.page-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.page-heading h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1;
}

.page-heading .sub {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-heading .last-updated {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.8;
}

/* ── Divider ── */
.divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--maroon));
  border-radius: 2px;
  margin: 40px auto;
  opacity: 0.55;
  transform-origin: center;
}

.divider.reveal-ready {
  transform: scaleX(0);
  opacity: 0;
}

.divider.is-visible {
  animation: divider-draw 0.7s ease forwards;
}

@keyframes divider-draw {
  to {
    transform: scaleX(1);
    opacity: 0.55;
  }
}

/* ── Typography helpers ── */
.tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.prose {
  max-width: 600px;
  width: 100%;
}

.prose p {
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-weight: 500;
  color: var(--text-primary);
}

.prose a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.prose a:hover {
  border-bottom-color: var(--teal);
}

.prose.center {
  text-align: center;
  max-width: 560px;
}

/* Legal document styles */
.legal-text {
  max-width: 600px;
  width: 100%;
  text-align: left;
}

.legal-text p {
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.legal-text p:last-child {
  margin-bottom: 0;
}

.legal-text strong {
  font-weight: 500;
  color: var(--text-primary);
}

.legal-text h2 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  opacity: 0.85;
  margin-top: 40px;
  margin-bottom: 10px;
}

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

.legal-text h3 {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 10px;
}

.legal-text.terms h3 {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
  opacity: 0.8;
  margin-bottom: 8px;
}

.legal-text ul {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}

.legal-text ul li {
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-secondary);
  padding-left: 1.2em;
  position: relative;
}

.legal-text ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.legal-text ul ul {
  margin-top: 4px;
  margin-bottom: 4px;
}

.legal-text a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.legal-text a:hover {
  border-bottom-color: var(--teal);
}

.legal-text .disclaimer {
  font-style: italic;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 48px;
  border-top: 1px solid rgba(43, 82, 73, 0.15);
  padding-top: 24px;
}

.legal-text .legal-caps {
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  font-weight: 400;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ── Buttons / CTAs ── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  background: var(--teal);
  padding: 14px 28px;
  border: 1.5px solid var(--teal);
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.btn:hover {
  background: transparent;
  color: var(--teal);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--teal);
}

.btn-ghost:hover {
  background: var(--teal);
  color: var(--cream);
}

/* ── Apps list ── */
.apps-list {
  max-width: 560px;
  width: 100%;
  list-style: none;
}

.apps-list li {
  border-top: 1px solid var(--divider);
}

.apps-list li:last-child {
  border-bottom: 1px solid var(--divider);
}

.apps-list a {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 4px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.apps-list a:hover {
  opacity: 0.75;
}

.apps-list .app-icon {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.apps-list .app-copy {
  flex: 1;
  min-width: 0;
}

.apps-list .app-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.apps-list .app-blurb {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ── Homepage hero ── */
.page-home {
  padding: 0;
  align-items: stretch;
  background-color: var(--cream-deep);
  background-image:
    linear-gradient(155deg, rgba(43, 82, 73, 0.26), rgba(43, 82, 73, 0.07) 42%, transparent 72%),
    linear-gradient(215deg, rgba(125, 26, 71, 0.16), rgba(125, 26, 71, 0.04) 48%, transparent 78%),
    linear-gradient(180deg, var(--cream-deep), #E4DCCE);
  background-attachment: fixed;
}

.page-home .site-nav {
  padding-left: var(--page-inset);
  padding-right: var(--page-inset);
  background: var(--cream);
  backdrop-filter: none;
}

.home-stage {
  margin-top: var(--nav-height);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-height));
}

.page-home .site-footer {
  padding: 28px clamp(24px, 4vw, 48px) 36px;
  margin-top: auto;
}

.home-hero {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(240px, 380px) auto;
  align-items: center;
  justify-content: center;
  column-gap: clamp(20px, 3vw, 36px);
  padding: clamp(32px, 5vh, 64px) clamp(24px, 4vw, 48px);
}

.home-hero-copy {
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.home-app-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.home-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 34ch;
}

.home-pitch {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 38ch;
}

.home-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  opacity: 0;
  transform: translateY(24px);
  animation: rise-in 1s ease 0.25s forwards;
}

.home-hero-visual img,
.home-hero-video {
  position: relative;
  z-index: 1;
  width: clamp(286px, 36vw, 442px);
  border-radius: 28px;
  box-shadow: var(--shadow-phone);
  display: block;
}

.home-hero-video {
  height: auto;
  background: var(--cream-deep);
  object-fit: cover;
}

/* Hero motion */
.home-hero .reveal-item {
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 0.8s ease forwards;
}

.home-hero .reveal-item:nth-child(1) { animation-delay: 0.05s; }
.home-hero .reveal-item:nth-child(2) { animation-delay: 0.18s; }
.home-hero .reveal-item:nth-child(3) { animation-delay: 0.3s; }
.home-hero .reveal-item:nth-child(4) { animation-delay: 0.42s; }

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 800px) {
  :root {
    --page-inset: 20px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 28px 20px 20px;
    column-gap: 0;
    row-gap: 24px;
  }

  .home-hero-copy {
    max-width: none;
    align-items: center;
    order: 1;
  }

  .home-tagline,
  .home-pitch {
    max-width: 36ch;
  }

  .home-hero-visual {
    order: 0;
    min-height: min(50vh, 420px);
  }

  .home-hero-visual img,
  .home-hero-video {
    width: clamp(234px, 62vw, 338px);
  }
}

@media (max-width: 640px) {
  .site-nav {
    padding: 18px 20px;
  }

  body {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── Spacer / footer ── */
.spacer {
  flex: 1;
}

.site-footer {
  text-align: center;
  padding-top: 48px;
  width: 100%;
}

.site-footer .company {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer .meta {
  font-size: 0.73rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.75;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.site-footer .footer-links a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.site-footer .footer-links a:hover {
  opacity: 1;
}

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

  .home-hero .reveal-item,
  .home-hero-visual,
  .reveal,
  .divider.reveal-ready {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
