/* ===== Root & Base ===== */
:root {
  --bg: #000000;
  --ink: #e6e8f0;
  --muted: #a7b0c3;
  --line: #151515;
  --brand: #5cb0ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Container with responsive gutters + safe-area */
.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
}

@media (orientation: portrait) {
  .container {
    padding-inline: clamp(22px, 6vw, 40px);
  }
}

/* ===== Global Elements ===== */
/* Remove blue tap highlight on touch devices */
@media (pointer: coarse) {
  a,
  button,
  [role="button"],
  .store-pill {
    -webkit-tap-highlight-color: transparent; /* Android/Chrome */
  }
}

/* Keep keyboard focus visible (accessibility) */
a:focus-visible,
button:focus-visible,
.store-pill:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* But don't show the outline for touch taps */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.store-pill:focus:not(:focus-visible) {
  outline: none;
}

/* ===== Header ===== */
.site-header {
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(120%) blur(10px);
  background: #111111;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 112px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.brand-text {
  display: none;
}

.disabled-text {
  color: var(--muted);
  opacity: 0.3;
}

.nav {
  display: flex;
  gap: 18px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  gap: 8px;

  --bar-w: 28px;
  --bar-h: 3.5px;
  --bar-gap: 8px;
  position: relative;
}

.burger span {
  display: block;
  width: var(--bar-w);
  height: var(--bar-h);
  background: var(--ink);
  border-radius: 3px;
  transition: transform .18s ease, opacity .18s ease;
  transform-origin: center;
}

/* Morph to an X when aria-expanded=true */
.burger[aria-expanded="true"] span:nth-child(1){
  transform: translateY(calc(var(--bar-gap) + var(--bar-h))) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2){
  opacity: 0;
  transform: scaleX(0.5);
}

.burger[aria-expanded="true"] span:nth-child(3){
  transform: translateY(calc(-1 * (var(--bar-gap) + var(--bar-h)))) rotate(-45deg);
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce){
  .burger span{ transition: none; }
}

/* underline current page */
.nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* keep underline when hovered/focused too */
.nav a[aria-current="page"]:hover,
.nav a[aria-current="page"]:focus,
.mobile-nav a[aria-current="page"]:hover,
.mobile-nav a[aria-current="page"]:focus {
  text-decoration: underline;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #111111;
  padding:5px 20px 18px;
}
.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
}
.mobile-nav[hidden] { display: none; }

/* Make header more compact on small screens */
@media (max-width: 680px) {
  .header-inner {
    min-height: 72px;
    padding-block: 8px;
    gap: 12px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .burger {
    width: 36px;
    height: 30px;

    --bar-w: 24px;
    --bar-h: 3px;
    --bar-gap: 8px;
  }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: flex; }
  .mobile-nav { display: block; }
}

/* ===== Top CTA ===== */
.top-cta {
  position: relative;
  background: #0c1a40;
  border-bottom: none;
  padding: 84px 0 200px;
  text-align: center;
}

.top-cta--midnight {
  --cta-top: #000;
  --cta-mid: #0a1630;
  --cta-glow: #5cb0ff;

  background:
    radial-gradient(1000px 500px at 50% 85%, color-mix(in oklab, var(--cta-glow) 18%, transparent), transparent 70%),
    radial-gradient(800px 400px at 50% 100%, color-mix(in oklab, var(--cta-glow) 12%, transparent), transparent 80%),
    linear-gradient(180deg, var(--cta-top), var(--cta-mid) 70%);
}

.top-cta-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

.appname {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 60px);
  line-height: 1.05;
  color: #3478f6;
}

.app-tagline {
  margin: 30px auto 0px;
  max-width: 68ch;
  color: var(--ink);
  font-size: clamp(16px, 2.2vw, 18px);
}
.coming-soon-text {
  margin: 0px auto 50px;
  max-width: 68ch;
  color: var(--ink);
  font-size: clamp(16px, 2.2vw, 18px);
}

/* ===== Store pills ===== */
.badges {
  display: flex;
  gap: 14px;
  margin: 18px 0 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.store-pill {
  position: relative; /* for ribbon */
  overflow: hidden;   /* clip ribbon */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 5px;
  min-width: 180px;
  min-height: 60px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid #1f1f1f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  -webkit-font-smoothing: antialiased;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.store-pill:hover {
  background: #0a0a0a;
  border-color: #262626;
  transform: translateY(-1px);
}

.store-pill[aria-disabled="true"] {
  opacity: .75;
  pointer-events: none;
}

.store-pill__icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
  flex-shrink: 0;
}

.store-pill__text {
  display: grid;
  line-height: 1.2;
  text-align: left;
  margin-right: 10px;
}

.store-pill__eyebrow {
  font-size: 10px;
  letter-spacing: .04em;
  margin-bottom: 3px;
  opacity: .9;
}

.store-pill__brand {
  font-size: 18px;
  font-weight: 700;
}

.store-pill--apple { 
  justify-content: left;
  padding-left: 12px;
  gap: 2px
} 

.store-pill--apple .store-pill__icon {
  width: 45px;
  height: 45px;
  transform: translateY(-1px);
}

.store-pill--google {
  justify-content: center;
}

.store-pill--google .store-pill__icon {
  width: 35px;
  height: 35px;
}

/* Coming soon ribbon */
.store-pill[aria-disabled="true"] {
  position: relative;
  overflow: hidden;
}

.store-pill[aria-disabled="true"]::after {
  content: "COMING SOON";
  position: absolute;
  top: 11px;
  right: -45px;
  width: 140px;
  text-align: center;

  transform: rotate(40deg);

  background: linear-gradient(90deg, #ff7a7a 0%, #f85b5b 100%);
  color: #111;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 8px;
  padding: 5px 5px;

  border: 1px solid rgba(0,0,0,.25);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  opacity: .95;
  z-index: 10; 
  pointer-events: none;
}

/* ===== Waves ===== */
.section-curve {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  display: block;
  pointer-events: none;
}

.section-curve path {
  fill: var(--bg);
}

.curve-desktop {
  height: 180px;
  display: block;
}

.curve-mobile {
  height: 30px;
  display: none;
}

@media (max-width: 680px) {
  .curve-desktop {
    display: none;
  }

  .curve-mobile {
    display: block;
    height: 180px;
  }

  .top-cta {
    padding: 64px 0 120px;
  }
}

/* ========== Utility ========== */
.spacer {
  height: 50px;
  display: block;
}
