/* Pen Fight: tokens match the iOS app (Motion.deskNavy, 14pt radius, system rounded). */

:root {
  --navy: #001a33;
  --navy-deep: #000f1f;
  --navy-lift: #052444;
  --blue: #007aff;
  --blue-bright: #0a84ff;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --green: #30d158;
  --ink: #f4f7fb;
  --ink-soft: #b7c4d4;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --stroke: rgba(255, 255, 255, 0.14);
  --radius: 14px;
  --radius-device: 36px;
  --maxw: 1080px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--navy);
  color: var(--ink);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.08), transparent 46%);
}

a { color: var(--blue-bright); }
a:hover { color: #5eb1ff; }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 20;
  background: var(--blue);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

/* ---------- header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  background: color-mix(in srgb, var(--navy) 88%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--stroke);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}
nav.site { display: flex; align-items: center; gap: 22px; }
nav.site a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
nav.site a:hover { color: #fff; }
nav.site a.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius);
}
nav.site a.nav-cta:hover { background: var(--blue-bright); color: #fff; }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100dvh - 64px);
  display: flex;
  align-items: center;
  padding: 36px 0 48px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.kicker {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  margin: 0 0 14px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.hero h1 span { color: var(--blue-bright); }
.hero p.tagline {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 0 26px;
  line-height: 1.45;
}
.btn-store {
  display: inline-block;
  line-height: 0;
}
.btn-store img {
  height: 54px;
  width: auto;
  display: block;
}
.btn-store:hover { opacity: 0.88; }
.btn-store:active { transform: scale(0.98); }

.device {
  width: min(300px, 100%);
  margin: 0 auto;
  border-radius: var(--radius-device);
  overflow: hidden;
  border: 1px solid var(--glass-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 28px 70px rgba(0, 0, 0, 0.45);
  background: var(--navy-deep);
}
.device img {
  display: block;
  width: 100%;
  height: auto;
}
.hero .device {
  animation: flick-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes flick-in {
  from { opacity: 0; transform: translateY(18px) rotate(-2.4deg); }
  to { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */
section.block { padding: 72px 0; position: relative; z-index: 1; }
section.block h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
section.block > .wrap > h2 + p,
.lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 28px;
}

.modes {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 14px;
}
.mode {
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  min-height: 148px;
}
.mode h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
}
.mode p { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.mode-ai {
  background: var(--blue);
  color: #fff;
}
.mode-ai p { color: rgba(255, 255, 255, 0.86); }
.mode-weekly {
  background: rgba(255, 159, 10, 0.22);
  color: #fff;
  border: 1px solid rgba(255, 159, 10, 0.4);
}
.mode-weekly h3 { color: var(--orange); }
.mode-weekly p { color: #f3d7a4; }
.mode-friend {
  background: var(--glass);
  color: #fff;
  border: 1px solid var(--stroke);
}
.mode-friend p { color: var(--ink-soft); }
.mode-friend small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}
.split.reverse { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.split .copy h2 { margin-bottom: 12px; }
.split .copy p { color: var(--ink-soft); margin: 0 0 14px; }
.split .device { width: min(280px, 100%); }

.mods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.mods div {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.mods dt {
  font-weight: 800;
  color: var(--orange);
  font-size: 0.88rem;
}
.mods dd {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.desks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.desk {
  margin: 0;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 8px 8px 10px;
  text-align: center;
}
.desk img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.desk figcaption {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.pens {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.pen {
  margin: 0;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px 10px 12px;
  text-align: center;
}
.pen img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
  transform: rotate(-28deg);
}
.pen figcaption {
  font-size: 0.8rem;
  font-weight: 700;
}
.pen figcaption span {
  display: block;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.72rem;
  margin-top: 2px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: none;
  margin: 28px 0 0;
  padding: 0;
}
.facts > div {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.facts dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.facts dd {
  margin: 4px 0 0;
  font-weight: 700;
  color: #fff;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  max-width: 820px;
}
.shot-row figure { margin: 0; text-align: center; }
.shot-row img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  background: var(--navy-deep);
}
.shot-row figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.howto {
  background: var(--navy-lift);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}
.howto ol {
  max-width: 640px;
  margin: 0;
  padding-left: 22px;
}
.howto li { margin-bottom: 12px; color: var(--ink-soft); }
.howto li strong { color: #fff; }

.compare-list {
  max-width: 640px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
}
.compare-list li { margin-bottom: 8px; }

.cta {
  text-align: center;
  background: var(--navy-deep);
  border-top: 1px solid var(--stroke);
}
.cta h2 { color: #fff; }
.cta p { color: var(--ink-soft); margin: 0 auto 16px; max-width: 560px; }
.cta .download-url a { color: var(--yellow); }
.download-url {
  font-size: 1.05rem;
  word-break: break-all;
  margin-bottom: 18px;
}

.note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- footer ---------- */
footer.site {
  background: var(--navy-deep);
  color: #8b98a8;
  padding: 28px 0;
  font-size: 0.9rem;
  border-top: 1px solid var(--stroke);
  position: relative;
  z-index: 1;
}
footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
footer.site a { color: #c5d0dc; text-decoration: none; margin-left: 16px; }
footer.site a:hover { color: #fff; }

/* ---------- text pages ---------- */
.page {
  background: var(--navy-lift);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 44px 48px;
  margin: 48px auto;
  position: relative;
  z-index: 1;
}
.page h1 {
  margin-top: 0;
  font-size: 2rem;
  letter-spacing: -0.03em;
}
.page h2 {
  font-size: 1.2rem;
  margin: 32px 0 8px;
  color: #fff;
}
.page p, .page li { color: var(--ink-soft); }
.page ul { padding-left: 22px; }
.updated {
  color: #8b98a8;
  font-size: 0.85rem;
  margin-top: -8px;
}

details.faq {
  border-bottom: 1px solid var(--stroke);
  padding: 14px 0;
}
details.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: #fff;
}
details.faq p { margin: 10px 0 4px; color: var(--ink-soft); }
.faq-block .faq { max-width: 720px; }

@media (prefers-reduced-transparency: reduce) {
  header.site {
    background: var(--navy);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .device { animation: none; }
  .btn-store:active { transform: none; }
}

@media (max-width: 900px) {
  .hero { min-height: 0; padding: 28px 0 36px; }
  .hero-grid,
  .split,
  .split.reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-grid .device { width: min(220px, 58%); }
  .modes { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .desks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .shot-row figure {
    flex: 0 0 220px;
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 2.1rem; }
  .page { padding: 28px 22px; margin: 28px auto; }
  nav.site { gap: 12px; }
  nav.site a { font-size: 0.84rem; }
  .nav-home { display: none; }
  header.site .wrap { padding-left: 16px; padding-right: 16px; }
  .facts { grid-template-columns: 1fr; }
  .mods { grid-template-columns: 1fr; }
}
