/* ============================================================
   Niko — App Pages
   Product marketing pages (GPS Mapper, Blackjack Flash).
   ============================================================ */

.app-page { padding-top: 0; }

/* ============================================================
   App Hero
   ============================================================ */
.app-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 56px;
  overflow: hidden;
}
.app-hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--pad-x);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 8vw, 96px);
  align-items: center;
  width: 100%;
}
@media (max-width: 900px) {
  .app-hero-inner { grid-template-columns: 1fr; gap: 40px; }
}
.app-hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 28px;
  display: inline-flex; align-items: center; gap: 10px;
}
.app-hero-eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--forest);
  display: inline-block;
}
.app-hero-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  color: var(--ink);
  text-wrap: balance;
}
.app-hero-tagline {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.25;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.85;
  letter-spacing: -0.015em;
  margin: 0 0 36px;
  max-width: 22ch;
  text-wrap: balance;
}
.app-hero-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.72;
  max-width: 48ch;
  margin: 0 0 36px;
  text-wrap: pretty;
}
.app-hero-icon-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.app-hero-icon-stack::before {
  content: "";
  position: absolute;
  inset: -8% -8% -8% -8%;
  background: radial-gradient(circle at center,
    color-mix(in oklab, var(--forest) 28%, transparent) 0%,
    color-mix(in oklab, var(--forest) 8%, transparent) 35%,
    transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}
.app-hero-icon {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  justify-self: center;
  position: relative;
  border-radius: 22.37%;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.4),
    0 28px 80px -20px rgba(0,0,0,0.7),
    inset 0 0 0 1px rgba(255,255,255,0.08);
}
.app-hero-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.app-hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.app-hero-meta {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 20px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.app-hero-meta span {
  padding: 0 28px;
  border-right: 1px solid var(--hairline);
}
.app-hero-meta span:first-child { padding-left: 0; }
.app-hero-meta span:last-child { border-right: none; padding-right: 0; }
.app-hero-meta span strong {
  color: var(--ink);
  font-weight: 500;
  display: block;
  margin-top: 6px;
  letter-spacing: 0;
  font-family: var(--sans);
  text-transform: none;
  font-size: 14px;
}

/* ============================================================
   Overview
   ============================================================ */
.app-overview {
  padding: clamp(40px, 7vw, 72px) 0;
  border-top: 1px solid var(--hairline);
}
.app-overview-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.app-overview-headline {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.app-overview-headline em {
  font-style: normal;
  color: var(--forest);
}

/* ============================================================
   Feature blocks
   ============================================================ */
.features {
  padding: clamp(40px, 7vw, 84px) 0;
}
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 32px);
  align-items: stretch;
}
.feature-block + .feature-block { margin-top: clamp(20px, 3vw, 32px); }
.feature-block .feature-text,
.feature-block .feature-visual {
  padding: clamp(32px, 5vw, 56px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.feature-block.reverse .feature-text { order: 2; }
.feature-block.reverse .feature-visual { order: 1; }
@media (max-width: 820px) {
  .feature-block, .feature-block.reverse { grid-template-columns: 1fr; }
  .feature-block.reverse .feature-text, .feature-block.reverse .feature-visual { order: 0; }
}
.feature-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--forest);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.feature-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--ink);
  text-wrap: balance;
}
.feature-body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.82;
  max-width: 50ch;
  margin: 0;
  text-wrap: pretty;
}
.feature-visual {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.feature-phone {
  position: relative;
  aspect-ratio: 1419 / 2796;
  flex: 0 0 auto;
  width: 180px;
  isolation: isolate;
}
.feature-phone::after {
  /* Official iPhone 15 Pro bezel — screenshots are 1179x2556 (native iPhone 15 Pro),
     screen cutout in this bezel is 1178x2555 → perfect 1:1 fit. */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/device-frames/iphone-15-pro.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 3;
  pointer-events: none;
}
.feature-video,
.feature-screenshot {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 20px;
  background: var(--bg-soft);
}

/* Apple Watch Ultra 2 device frame — official Apple bezel */
.watch-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 600 / 940;
  isolation: isolate;
}
/* No overflow:hidden on watch — the band extends to image edges and would be clipped. The watch's screen is well inset (15-23%), so bleeding isn't an issue. */
.watch-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/device-frames/apple-watch-ultra-2.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 3;
  pointer-events: none;
}
.watch-frame .watch-screen {
  position: absolute;
  top: 23.30%;
  bottom: 23.40%;
  left: 15.83%;
  right: 16.00%;
  border-radius: 18%;
  overflow: hidden;
  background: #000;
  z-index: 1;
}
.watch-frame .feature-video,
.watch-frame .feature-screenshot {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border-radius: 0;
  background: transparent;
  display: block;
}
.feature-phone .phone-screen {
  position: absolute;
  top: 4.29%;
  bottom: 4.33%;
  left: 8.46%;
  right: 8.53%;
  border-radius: 10% / 8.5%;
  overflow: hidden;
  z-index: 1;
  background: #000;
}
.feature-phone .phone-screen img,
.feature-phone .phone-screen .stripe-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.feature-phone .phone-screen img {
  object-fit: cover;
  display: block;
}
.feature-phone .stripe-bg {
  background:
    radial-gradient(circle at center,
      color-mix(in oklab, var(--forest) 14%, transparent) 0%,
      transparent 60%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}
.feature-phone .stripe-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--forest) 12%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--forest) 12%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.feature-phone .stripe-bg::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 28%;
  aspect-ratio: 1;
  background: var(--forest);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: 0.45;
}
.feature-phone .placeholder-tag {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--forest);
  text-transform: uppercase;
  background: color-mix(in oklab, var(--forest) 10%, var(--bg));
  padding: 5px 10px;
  border: 1px solid color-mix(in oklab, var(--forest) 30%, transparent);
  border-radius: 100px;
  text-align: center;
  white-space: nowrap;
  font-weight: 500;
}
/* .screenshot positioning is handled by the .phone-screen wrapper above */
.feature-phone .screenshot {
  z-index: 2;
}
@media (max-width: 820px) {
  .feature-phone { width: 140px; }
}
@media (max-width: 640px) {
  .feature-visual { gap: 10px; }
  .feature-phone { width: 110px; }
  .feature-phone .placeholder-tag { font-size: 7px; padding: 3px 6px; }
}

/* ============================================================
   Screenshot gallery
   ============================================================ */
.gallery {
  padding: clamp(56px, 10vw, 112px) 0;
  border-top: 1px solid var(--hairline);
}
.gallery-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 820px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .gallery-grid { grid-template-columns: 1fr; } }

.shot {
  position: relative;
  aspect-ratio: 9 / 19.5;
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  overflow: hidden;
}
.shot.watch { aspect-ratio: 1 / 1.18; border-radius: 36px; }
.shot .stripe-bg {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0, transparent 14px,
    var(--hairline) 14px, var(--hairline) 15px
  );
}
.shot .shot-tag {
  position: absolute;
  left: 12px; top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mid);
  text-transform: uppercase;
  background: var(--bg);
  padding: 5px 9px;
  border: 1px solid var(--hairline);
}
.shot .shot-idx {
  position: absolute;
  right: 12px; bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mid);
  text-transform: uppercase;
}

/* ============================================================
   Specs
   ============================================================ */
.specs {
  padding: clamp(56px, 10vw, 112px) 0;
  border-top: 1px solid var(--hairline);
}
.specs-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.specs-list {
  list-style: none;
  margin: 0;
  padding: clamp(24px, 4vw, 40px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(24px, 4vw, 48px);
}
.specs-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  line-height: 1.4;
}
.specs-list li:nth-last-child(-n+2) { border-bottom: none; padding-bottom: 0; }
.specs-list li:nth-child(-n+2) { padding-top: 0; }
.specs-list li dfn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-mid);
  text-transform: uppercase;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.specs-list li span {
  color: var(--ink);
  opacity: 0.95;
  font-weight: 500;
  text-wrap: pretty;
}
@media (max-width: 640px) {
  .specs-list { grid-template-columns: 1fr; gap: 0; }
  .specs-list li:nth-child(-n+2) { padding-top: 20px; }
  .specs-list li:nth-last-child(-n+2) { border-bottom: 1px solid var(--hairline); padding-bottom: 20px; }
  .specs-list li:first-child { padding-top: 0; }
  .specs-list li:last-child { border-bottom: none; padding-bottom: 0; }
}

/* ============================================================
   Support + Press
   ============================================================ */
.info-row {
  padding: clamp(56px, 10vw, 112px) 0;
  border-top: 1px solid var(--hairline);
}
.info-row-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  justify-content: center;
}
.info-row-inner .info-card {
  width: 100%;
  max-width: 520px;
}
.info-card {
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 40px);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.info-card h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.022em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--ink);
}
.info-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.78;
  max-width: 44ch;
  margin: 0 0 24px;
  text-wrap: pretty;
}
.info-card .info-links { display: flex; flex-direction: column; gap: 8px; }
.info-card .info-links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--blue);
  width: fit-content;
}
.info-card .info-links .arrow { transition: transform 200ms var(--ease); }
.info-card .info-links a:hover .arrow { transform: translateX(3px); }

/* ============================================================
   CTA Band
   ============================================================ */
.cta-band {
  padding: clamp(56px, 10vw, 112px) 0;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.cta-band-inner { max-width: 760px; margin: 0 auto; padding: 0 var(--pad-x); }
.cta-band h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.032em;
  margin: 0 0 24px;
  color: var(--ink);
  text-wrap: balance;
}
.cta-band p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  opacity: 0.72;
  margin: 0 auto 40px;
  max-width: 52ch;
  text-wrap: pretty;
}

/* Nav — active app page marker */
.nav-links a.is-current-app {
  opacity: 1;
  color: var(--forest);
  position: relative;
}
.nav-links a.is-current-app::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--forest);
  border-radius: 2px;
}
