:root {
  --night: #080b10;
  --night-soft: #0e131a;
  --surface: #1e252d;
  --surface-2: #28323d;
  --ink: #eef2f8;
  --ink-soft: #aeb8c6;
  --blue: #a9c8f4;
  --blue-deep: #3e5f80;
  --lilac: #cfc3ff;
  --purple: #777a92;
  --green: #285d3e;
  --green-bright: #87d5a1;
  --amber: #79661d;
  --rose: #705d61;
  --rose-bright: #ffb7bb;
  --line: rgba(208, 220, 239, 0.16);
  --line-strong: rgba(208, 220, 239, 0.28);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
  --display: ui-rounded, "SF Pro Rounded", "Avenir Next", Avenir, sans-serif;
  --body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 9%, rgba(119, 122, 146, 0.24), transparent 30rem),
    radial-gradient(circle at 8% 28%, rgba(62, 95, 128, 0.15), transparent 28rem),
    var(--night);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.2;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

img { max-width: 100%; }
a { color: inherit; text-underline-offset: 0.22em; }
a:hover { color: var(--blue); }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.shell { width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 40;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--night);
  background: var(--blue);
  border-radius: 999px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.aceves-app-bar {
  border-bottom: 1px solid var(--line);
  color: #cad2de;
  background: #05070a;
}

.aceves-app-bar__inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.aceves-app-bar__label,
.aceves-app-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.aceves-app-bar__label { gap: 0.55rem; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.aceves-app-bar__mark { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #5c6674; border-radius: 6px; font-size: 0.66rem; }
.aceves-app-bar__nav { display: flex; align-items: stretch; align-self: stretch; overflow-x: auto; }
.aceves-app-link { gap: 0.42rem; padding: 0 0.72rem; color: #8e99a8; font-size: 0.73rem; font-weight: 650; }
.aceves-app-link > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.aceves-app-link b { font-size: 0.65rem; font-weight: 500; }
.aceves-app-link.is-current { color: var(--ink); background: rgba(255,255,255,.07); }
.app-latest > span { color: #baff25; }
.app-visa > span { color: #ff8a1f; }
.app-pano > span { color: #ef4c7c; }
.app-lazy > span { color: var(--lilac); }

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 16, 0.82);
  backdrop-filter: blur(18px);
}

.nav { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.8rem; font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 10px 28px rgba(88, 74, 139, 0.28); }
.nav-links { display: flex; align-items: center; gap: 1.25rem; font-size: 0.88rem; font-weight: 650; }
.nav-links a { text-decoration: none; }
.nav-primary { padding: 0.48rem 0.9rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }

h1, h2, h3 { margin-top: 0; font-family: var(--display); line-height: 1.03; letter-spacing: -0.045em; }
h1 { margin-bottom: 0; font-size: clamp(3.45rem, 7.4vw, 7.1rem); font-weight: 790; }
h1 em { color: var(--blue); font-style: normal; }
h2 { margin-bottom: 1.2rem; font-size: clamp(2.5rem, 5.2vw, 5rem); font-weight: 760; }
h3 { margin-bottom: 0.65rem; font-size: 1.55rem; font-weight: 720; }
p { margin-top: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.2rem;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 1.8rem; height: 2px; background: currentColor; }

.hero {
  min-height: 790px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.96fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
  padding-block: clamp(4rem, 8vw, 7rem);
}
.hero-copy { position: relative; z-index: 2; }
.hero-app-id { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.hero-app-id img { width: 76px; height: 76px; border-radius: 21px; box-shadow: 0 15px 36px rgba(88, 74, 139, 0.3); }
.hero-app-id p { margin: 0; color: #808b99; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.hero-app-id p span { color: var(--green-bright); }
.lede { max-width: 670px; margin: 1.7rem 0 0; color: var(--ink-soft); font-size: clamp(1.08rem, 1.7vw, 1.3rem); }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-weight: 780;
  text-decoration: none;
}
.button.primary { color: #111820; background: var(--blue); border-color: var(--blue); }
.button.primary:hover { color: #111820; background: #c1d8f8; }
.button.secondary { background: var(--surface); }
.button.secondary:hover { color: var(--ink); background: var(--surface-2); }

.signal-strip { max-width: 640px; display: grid; grid-template-columns: repeat(3, 1fr); margin: 2.8rem 0 0; padding: 1.15rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.signal-strip div { padding-inline: 1rem; border-left: 1px solid var(--line); }
.signal-strip div:first-child { padding-left: 0; border-left: 0; }
.signal-strip dt { color: #737f8e; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.signal-strip dd { margin: 0.2rem 0 0; font-size: 0.88rem; font-weight: 700; }

.hero-visual { position: relative; min-height: 650px; display: grid; place-items: center; isolation: isolate; }
.hero-orbit { position: absolute; z-index: -1; border: 1px solid rgba(207,195,255,.18); border-radius: 50%; }
.orbit-one { width: 550px; height: 550px; }
.orbit-two { width: 420px; height: 420px; border-style: dashed; animation: spin 36s linear infinite; }
.phone { margin: 0; overflow: hidden; background: #05070a; border: 9px solid #202630; box-shadow: var(--shadow); }
.phone-main { position: relative; width: min(348px, 80vw); height: 650px; border-radius: 46px; transform: rotate(2.5deg); }
.phone-main img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-camera { position: absolute; z-index: 2; top: 13px; left: 50%; width: 72px; height: 18px; border-radius: 99px; background: #080b10; transform: translateX(-50%); }
.macro-chip, .calorie-card { position: absolute; z-index: 3; border: 1px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0,0,0,.38); backdrop-filter: blur(14px); }
.macro-chip { width: 116px; padding: 0.7rem 0.85rem; border-radius: 16px; background: rgba(35, 44, 54, 0.9); }
.macro-chip span { display: block; color: var(--ink-soft); font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.1em; }
.macro-chip strong { display: block; margin-top: 0.15rem; font-size: 1.2rem; }
.chip-protein { top: 92px; left: 0; color: var(--blue); transform: rotate(-6deg); }
.chip-carbs { right: -4px; bottom: 125px; color: var(--lilac); transform: rotate(5deg); }
.calorie-card { right: -34px; top: 205px; width: 195px; padding: 0.85rem 1rem; border-radius: 17px; background: rgba(30, 37, 45, 0.94); transform: rotate(-2deg); }
.calorie-card span { display: block; color: var(--ink-soft); font-size: 0.72rem; }
.calorie-card strong { display: block; font-size: 1.25rem; }
.calorie-card small { color: var(--blue); font-size: 0.72rem; }
.calorie-card i { display: block; width: 64%; height: 6px; margin-top: 0.55rem; border-radius: 99px; background: var(--green-bright); }

.screens-section { padding-block: clamp(5rem, 10vw, 9rem); border-block: 1px solid var(--line); background: #0d1218; overflow: hidden; }
.section-heading { max-width: 770px; }
.section-heading > p:last-child { max-width: 670px; color: var(--ink-soft); font-size: 1.08rem; }
.screen-stage { display: grid; gap: 2rem; margin-top: 4rem; }
.screen-story { display: grid; grid-template-columns: 0.72fr 1.28fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); min-height: 600px; }
.story-context { grid-template-columns: 1.25fr 0.75fr; }
.story-copy { max-width: 390px; }
.story-copy > span { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 1.4rem; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--blue); font-weight: 800; }
.story-copy p { color: var(--ink-soft); }
.screen-shot { margin: 0; overflow: hidden; border: 1px solid var(--line-strong); background: var(--night); box-shadow: var(--shadow); }
.timeline-shot { height: 560px; border-radius: 32px; transform: perspective(1100px) rotateY(-6deg); }
.timeline-shot img { width: 100%; height: 100%; object-fit: contain; }
.context-shot { height: 560px; border-radius: 32px; transform: perspective(1100px) rotateY(6deg); }
.context-shot img { width: 100%; height: 100%; object-fit: contain; }

.workflow { padding-block: clamp(5rem, 10vw, 9rem); background: var(--purple); color: white; }
.workflow .eyebrow { color: #e8e4ff; }
.workflow-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(3rem, 8vw, 8rem); align-items: start; }
.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.24); }
.steps li { display: grid; grid-template-columns: 74px 1fr; gap: 1.4rem; padding: 1.7rem 0; border-bottom: 1px solid rgba(255,255,255,.24); }
.steps li > span { color: #e1ddff; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.13em; }
.steps h3 { margin-bottom: 0.4rem; }
.steps p { margin-bottom: 0; color: #e2e2ed; }

.feature-section { padding-block: clamp(5rem, 10vw, 9rem); }
.feature-lead { max-width: 770px; margin-bottom: 3.5rem; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.feature { min-height: 260px; padding: clamp(1.6rem, 4vw, 2.6rem); border: 1px solid var(--line); border-radius: 28px; background: var(--night-soft); }
.feature-wide { grid-column: span 2; display: grid; grid-template-columns: 64px minmax(220px, .85fr) minmax(240px, 1.15fr); align-items: center; gap: 2rem; min-height: 210px; }
.feature-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--night); background: var(--blue); font-weight: 900; }
.feature h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.feature p { margin-bottom: 0; color: var(--ink-soft); }
.feature-accent { background: var(--green); border-color: transparent; }
.feature-accent .feature-mark { background: var(--green-bright); }
.feature-accent p { color: #d1e5d6; }

.privacy-section { padding-block: 0 clamp(5rem, 10vw, 9rem); }
.privacy-card { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 7vw, 7rem); padding: clamp(2rem, 7vw, 5rem); color: var(--night); background: var(--blue); border-radius: 36px; box-shadow: var(--shadow); }
.privacy-card .eyebrow { color: #294d70; }
.privacy-card h2 { max-width: 720px; }
.privacy-card p { max-width: 650px; color: #263c52; }
.privacy-card .button.primary { color: white; background: var(--night); border-color: var(--night); }
.privacy-card .button.secondary { color: var(--night); background: rgba(255,255,255,.18); border-color: rgba(8,11,16,.32); }
.privacy-points { margin: 0; padding: 0; list-style: none; }
.privacy-points li { display: grid; grid-template-columns: 38px 1fr; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid rgba(8,11,16,.22); font-weight: 750; }
.privacy-points span { font-size: 0.7rem; letter-spacing: 0.12em; }

.site-footer { padding-block: 2.6rem; border-top: 1px solid var(--line); background: #05070a; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.footer-brand img { border-radius: 10px; }
.footer-brand strong, .footer-brand small { display: block; }
.footer-brand small, .fine { color: #7e8997; font-size: 0.78rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--ink-soft); }

/* Legal and support pages */
.legal-hero { max-width: 900px; padding-block: clamp(4rem, 9vw, 8rem) clamp(3rem, 6vw, 5rem); }
.legal-hero h1 { font-size: clamp(3.2rem, 7vw, 6.6rem); }
.legal-meta { margin-top: 1.4rem; color: #818d9d; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 780px); gap: clamp(2rem, 7vw, 7rem); align-items: start; padding-bottom: 8rem; }
.legal-toc { position: sticky; top: 1.5rem; padding: 1.3rem; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 0 18px 18px 0; background: var(--night-soft); }
.legal-toc strong { display: block; margin-bottom: 0.65rem; }
.legal-toc a { display: block; padding: 0.27rem 0; color: var(--ink-soft); font-size: 0.86rem; }
.legal-content h2 { margin-top: 3.7rem; font-size: clamp(2rem, 4vw, 3rem); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { margin-top: 2rem; font-family: var(--body); font-size: 1.06rem; letter-spacing: 0; }
.legal-content p, .legal-content li { color: #b1bbc9; }
.legal-content li + li { margin-top: 0.58rem; }
.callout { margin-block: 2rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); }
.support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.support-card { padding: 1.7rem; border: 1px solid var(--line); border-radius: 22px; background: var(--night-soft); }
.support-card p { color: var(--ink-soft); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .aceves-app-bar__inner { width: 100%; padding-left: 1rem; }
  .aceves-app-bar__label > span:last-child { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 4rem; }
  .hero-copy { max-width: 760px; }
  .hero-visual { min-height: 690px; }
  .workflow-grid, .privacy-card, .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 1.3rem, 1180px); }
  .aceves-app-bar__nav { width: calc(100vw - 52px); }
  .aceves-app-link { padding-inline: 0.58rem; }
  .nav { min-height: 70px; }
  .nav-links a:not(.nav-primary) { display: none; }
  .brand span { font-size: 0.92rem; }
  h1 { font-size: clamp(3.35rem, 16vw, 5rem); }
  .signal-strip { grid-template-columns: 1fr; }
  .signal-strip div { padding: 0.65rem 0; border-left: 0; border-top: 1px solid var(--line); }
  .signal-strip div:first-child { border-top: 0; }
  .hero-visual { min-height: 620px; }
  .phone-main { height: 585px; }
  .chip-protein { left: 1px; }
  .chip-carbs { right: 2px; }
  .calorie-card { right: -2px; }
  .orbit-one { width: 100%; height: auto; aspect-ratio: 1; }
  .orbit-two { width: 82%; height: auto; aspect-ratio: 1; }
  .screen-story, .story-context { grid-template-columns: 1fr; min-height: 0; gap: 2rem; }
  .story-context .screen-shot { order: 2; }
  .story-context .story-copy { order: 1; }
  .timeline-shot, .context-shot { height: 520px; transform: none; }
  .feature-grid, .support-grid { grid-template-columns: 1fr; }
  .feature-wide { grid-column: auto; display: block; min-height: 260px; }
  .feature-wide .feature-mark { margin-bottom: 2rem; }
  .privacy-card { border-radius: 24px; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}

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