/*
 * PocketPad home page. Dark, like the app itself: charcoal surfaces and the app's
 * periwinkle accent (its Menu/Layouts button). Screens are real captures from the app.
 */
:root {
  --bg: #111215;
  --band: #16181c;
  --panel: #1c1e23;
  --line: #2b2e35;
  --text: #eceef3;
  --muted: #a0a6b2;
  --faint: #737a87;
  --peri: #b4c2ff;
  --peri-ink: #151a33;
  --radius: 22px;
  --display: "Archivo", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--peri);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 50;
  background: var(--peri);
  color: var(--peri-ink);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip:focus {
  left: 8px;
}

/* Condensed, heavy display type */
.display,
.band__head h2,
.way h3 {
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 0.98;
  margin: 0;
}
.display span {
  display: block;
}

/* ---------- Buttons and small parts ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--peri);
  color: var(--peri-ink);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.pill:hover {
  background: #c8d2ff;
}
.pill svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
}
.pill--line {
  min-height: 42px;
  padding: 0 18px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--line);
  font-size: 0.95rem;
}
.pill--line:hover {
  background: var(--panel);
}

.note {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 0.93rem;
  line-height: 1.55;
}

.textlink {
  color: var(--peri);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.textlink:hover {
  color: #d3dbff;
}

.tag {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.tag--peri {
  border-color: color-mix(in srgb, var(--peri) 45%, transparent);
  color: var(--peri);
}

/* ---------- Header ---------- */
.head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.head__row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.12rem;
  text-decoration: none;
  flex: none;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.97rem;
  white-space: nowrap;
}
.nav a:hover {
  color: var(--text);
}
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--panel);
}

/* ---------- Device frames around real screenshots ---------- */
.device {
  margin: 0;
  background: #07080a;
  border: 1px solid #30343c;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.device img {
  width: 100%;
}
.device--land {
  padding: 1.1%;
  border-radius: clamp(14px, 2.4vw, 30px);
}
.device--land img {
  border-radius: clamp(8px, 1.5vw, 20px);
}
.device--port {
  padding: 3.2%;
  border-radius: clamp(18px, 3vw, 30px);
}
.device--port img {
  border-radius: clamp(12px, 2vw, 22px);
}

.shot {
  margin: 0;
}
.shot figcaption {
  margin-top: 18px;
}
.shot figcaption b,
.points b,
.promises b,
.tester b {
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}
.shot figcaption span,
.points span,
.promises span,
.tester span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(32px, 6vw, 88px) 0 clamp(24px, 4vw, 48px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero .display {
  font-size: clamp(3rem, 1.6rem + 4.6vw, 5.6rem);
}
.hero__lead {
  margin: 24px 0 32px;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  color: var(--muted);
  max-width: 28em;
}
.hero__actions .note {
  max-width: 30em;
}

/* ---------- Bands ---------- */
.band {
  padding: clamp(64px, 9vw, 120px) 0;
}
.band--panel {
  background: var(--band);
}
.band--deep {
  background: #0c0d0f;
}
.band__head {
  max-width: 44rem;
  margin-bottom: clamp(32px, 4vw, 52px);
}
.band__head h2 {
  font-size: clamp(2.3rem, 1.5rem + 2.8vw, 3.8rem);
}
.band__head p {
  margin: 18px 0 0;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--muted);
}

/* Gamepad */
.pad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.points {
  list-style: none;
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: clamp(28px, 3vw, 40px) 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(24px, 3vw, 40px);
}

/* Other layouts: four phones */
.phones {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

/* Connect */
.ways {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}
.way {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
}
.way--pc {
  background: var(--panel);
  scroll-margin-top: 96px;
}
.way__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 14px;
}
.way h3 {
  font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.5rem);
  scroll-margin-top: 110px;
}
.way > p {
  margin: 0 0 24px;
  color: var(--muted);
}
.way__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}
.dl-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 24px;
}
.dl-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.dl-option .pill {
  width: 100%;
  justify-content: center;
}
.dl-option .note {
  margin: 0;
}
.warn {
  margin: 24px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.warn summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.warn summary::-webkit-details-marker {
  display: none;
}
.warn summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1.2;
  transition: rotate 0.2s;
}
.warn[open] summary::after {
  rotate: 45deg;
}
.warn__body {
  padding-bottom: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
.warn__body p {
  margin: 0 0 10px;
}
.warn__body ol {
  margin: 0 0 12px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.warn__body b {
  color: var(--text);
  font-weight: 600;
}
.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 0.93rem;
}
.links a {
  color: var(--muted);
  text-underline-offset: 3px;
}
.links a:hover {
  color: var(--text);
}

/* Also in the app */
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}
.bento__side {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
}
.promises {
  list-style: none;
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: clamp(24px, 3vw, 32px) 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 28px;
}
.tester {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.tester .textlink {
  display: inline-block;
  margin-top: 14px;
}

/* Closing */
.closing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 32px 48px;
  align-items: center;
}
.closing .display {
  font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.6rem);
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 52px 0 64px;
  background: #0c0d0f;
  font-size: 0.95rem;
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.foot__title {
  margin: 0 0 12px;
  font-weight: 700;
}
.foot__muted {
  margin: 0 0 10px;
  color: var(--faint);
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.foot a {
  text-decoration: none;
  color: var(--text);
  overflow-wrap: anywhere;
}
.foot a:hover {
  color: var(--peri);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav a {
    padding: 8px 10px;
  }
  .head__cta span {
    display: none;
  }
  .head__cta {
    padding: 0 13px;
  }
}

@media (max-width: 960px) {
  .hero__grid,
  .ways,
  .bento,
  .closing {
    grid-template-columns: minmax(0, 1fr);
  }
  .phones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 24px;
  }
  .phones .shot {
    max-width: 300px;
  }
}

/* Header wraps to two rows: brand + store button, then the page links. */
@media (max-width: 820px) {
  .head {
    position: static;
  }
  .head__row {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 12px 0 8px;
  }
  .head__cta {
    margin-left: auto;
  }
  .nav {
    order: 3;
    width: calc(100% + 20px);
    margin: 0 -10px;
    flex-wrap: wrap;
  }
  .nav a {
    padding: 6px 10px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .pad-grid,
  .points,
  .promises {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot__grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .foot__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .wrap {
    width: min(1200px, 100% - 32px);
  }
  .phones {
    gap: 28px 16px;
  }
  .phones figcaption span {
    font-size: 0.92rem;
  }
  .pill {
    padding: 0 20px;
  }
}

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