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

:root {
  --bg: #07090f;
  --bg-raise: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1f6;
  --text-dim: #9aa3b2;
  --accent: #6ec3ff;
  --accent-soft: rgba(110, 195, 255, 0.13);
  --radius: 20px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(110, 195, 255, 0.35); }

/* ============ Topbar ============ */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 56px);
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand span { color: #6ec3ff; }
.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a { font-size: 0.92rem; color: var(--text-dim); transition: color 0.2s; }
.topnav a:hover { color: var(--text); }
.topnav .pill {
  color: var(--text);
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raise);
  transition: border-color 0.2s, background 0.2s;
}
.topnav .pill:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px clamp(20px, 5vw, 56px) 80px;
  isolation: isolate;
  overflow: clip;
}
.aurora { position: absolute; inset: 0; z-index: -1; filter: blur(70px); }
.aurora i {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora .a1 { width: 46vw; height: 46vw; left: -10vw; top: -8vw;  background: radial-gradient(circle, rgba(110,195,255,.22), transparent 65%); }
.aurora .a2 { width: 42vw; height: 42vw; right: -12vw; top: 14vh; background: radial-gradient(circle, rgba(255,122,77,.16), transparent 65%); animation-delay: -7s; }
.aurora .a3 { width: 50vw; height: 50vw; left: 22vw; bottom: -22vw; background: radial-gradient(circle, rgba(46,204,113,.13), transparent 65%); animation-delay: -14s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 3vh, 0) scale(1.15); }
}

.hero-inner { max-width: 860px; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent, #6ec3ff);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 5.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #6ec3ff, #a8e6a1 55%, #ff7a4d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 26px auto 0;
  max-width: 560px;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--text-dim);
}

.hero-cta { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  color: #07090f;
  background: linear-gradient(120deg, #8ed0ff, #6ec3ff);
  box-shadow: 0 8px 30px rgba(110, 195, 255, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(110,195,255,.45); }

.btn-ghost {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--bg-raise);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }

/* ---- App icon tiles ---- */
.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 24%;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 34px var(--accent-soft);
  overflow: hidden;
}
.icon-tile img { width: 100%; height: 100%; object-fit: cover; }
.icon-tile.brand-tripmate {
  /* Tripmate's launcher tile: white glyph on brand orange */
  background: #e85d3c;
  border-color: rgba(255, 255, 255, 0.18);
}
.icon-tile.glyph img { width: 68%; height: 68%; object-fit: contain; }

.app-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
}

/* ---- Hero dock ---- */
.dock {
  margin-top: 46px;
  display: flex;
  justify-content: center;
  gap: 14px;
}
.dock a { transition: transform 0.25s cubic-bezier(.2,.7,.2,1); }
.dock a:hover { transform: translateY(-6px) scale(1.06); }
.dock .icon-tile {
  width: 54px;
  height: 54px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.dock a:nth-child(1) .icon-tile { --accent-soft: rgba(255,122,77,.16); }
.dock a:nth-child(2) .icon-tile { --accent-soft: rgba(110,195,255,.15); }
.dock a:nth-child(3) .icon-tile { --accent-soft: rgba(168,230,161,.14); }
.dock a:nth-child(4) .icon-tile { --accent-soft: rgba(46,204,113,.14); }
.dock a:nth-child(5) .icon-tile { --accent-soft: rgba(34,211,238,.14); }
.dock a:nth-child(6) .icon-tile { --accent-soft: rgba(0,191,165,.15); }

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  translate: -50% 0;
  color: var(--text-dim);
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ============ App sections ============ */
.app {
  position: relative;
  padding: clamp(70px, 10vh, 130px) clamp(20px, 5vw, 56px);
  isolation: isolate;
}
.app::before {
  /* per-app ambient glow */
  content: "";
  position: absolute;
  z-index: -1;
  width: min(60vw, 700px);
  height: min(60vw, 700px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  filter: blur(50px);
  right: -8vw;
  top: 50%;
  translate: 0 -50%;
}
.app.alt::before { right: auto; left: -8vw; }

.app-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 90px);
}
.app.alt .app-copy  { order: 2; }
.app.alt .app-shots { order: 1; }

.app h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.tagline {
  margin-top: 10px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  color: var(--accent);
}
.desc { margin-top: 18px; color: var(--text-dim); max-width: 46ch; }

.features { margin-top: 24px; list-style: none; display: grid; gap: 12px; }
.features li {
  position: relative;
  padding-left: 28px;
  color: var(--text-dim);
  font-size: 0.97rem;
}
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
}

.chips { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips span {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

/* ---- Phone mockups ---- */
.app-shots {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 480px;
}
.phone {
  border-radius: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0c0f17;
  padding: 10px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 90px var(--accent-soft);
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
}
.phone img { border-radius: 28px; }
.phone.main {
  width: min(64%, 290px);
  transform: rotate(2.5deg);
  z-index: 2;
}
.phone.back {
  position: absolute;
  width: min(52%, 235px);
  right: 4%;
  top: 12%;
  transform: rotate(-6deg) scale(0.97);
  opacity: 0.9;
  z-index: 1;
}
.app.alt .phone.main { transform: rotate(-2.5deg); }
.app.alt .phone.back { right: auto; left: 4%; transform: rotate(6deg) scale(0.97); }
.phone.main.solo { transform: rotate(0deg); width: min(70%, 300px); }

.app-shots:hover .phone.main { transform: rotate(0deg) translateY(-8px); }
.app-shots:hover .phone.back { transform: rotate(-3deg) scale(0.99); }
.app.alt .app-shots:hover .phone.back { transform: rotate(3deg) scale(0.99); }

/* ============ Outro / footer ============ */
.outro {
  text-align: center;
  padding: clamp(90px, 14vh, 160px) clamp(20px, 5vw, 56px);
  position: relative;
  isolation: isolate;
}
.outro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0 0;
  height: 70%;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(110,195,255,.1), transparent 70%);
}
.outro h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.outro .lede { margin-bottom: 38px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 26px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-dim);
}
.site-footer .dim { opacity: 0.65; }

/* ============ Reveal animation ============ */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.visible { opacity: 1; transform: none; }

/* no-JS and reduced motion: content always visible */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .aurora i, .scroll-cue { animation: none; }
  .phone, .app-shots:hover .phone.main, .app-shots:hover .phone.back { transition: none; }
}

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .app-inner { grid-template-columns: 1fr; gap: 48px; }
  .app.alt .app-copy { order: 1; }
  .app.alt .app-shots { order: 2; }
  .app-shots { min-height: 0; padding: 10px 0; }
  .phone.main { width: min(70%, 270px); }
  .phone.back { width: min(56%, 220px); }
  .topnav a:not(.pill) { display: none; }
  .icon-tile { width: 60px; height: 60px; }
  .app-head { gap: 14px; }
  .dock { flex-wrap: wrap; }
}
