/* Paperhanger site. Layout: a dark night-blue page; the hero is one sheet of
   Paperhanger's own wave wallpaper with its corner peeling back to the wall,
   then real app screenshots in alternating rows, a privacy band, a grid of
   smaller features, the FAQ and a closing call to action. */
:root {
  color-scheme: dark;
  --ground: #050c22;
  --ground-2: #081535;
  --surface: #0c1b42;
  --surface-2: #12285a;
  --line: rgb(140 180 255 / 0.16);
  --ink: #eef4ff;
  --ink-soft: #b6c5e4;
  --ink-faint: #8497bf;
  --aqua: #79d6ff;
  --blue: #2b6dff;
  --wall: #e6ddcf;

  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.75rem, 1.6rem + 5vw, 5.5rem);

  --radius-sheet: clamp(28px, 4vw, 44px);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--aqua); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 8px;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* ---------- Top bar ---------- */
.topbar { padding-block: 18px; }
.topbar .wrap { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.125rem/1 var(--display); }
.brand img { width: 32px; height: 32px; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px); }
.topnav a { color: var(--ink-soft); text-decoration: none; font-size: 0.9375rem; }
.topnav a:hover { color: var(--ink); }
@media (max-width: 560px) { .topnav .opt { display: none; } }

/* ---------- Hero sheet ---------- */
.sheet {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sheet);
  background:
    linear-gradient(100deg, rgb(4 32 120 / 0.55) 0%, rgb(4 32 120 / 0.15) 55%, rgb(4 32 120 / 0) 100%),
    url("waves.jpg") center 35% / cover no-repeat,
    #0656ea;
  box-shadow: 0 40px 120px -40px rgb(20 90 255 / 0.55);
}
.sheet-inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  padding: clamp(40px, 7vw, 92px) clamp(24px, 6vw, 84px) clamp(96px, 10vw, 120px);
  display: grid;
  gap: 22px;
  justify-items: start;
}
.app-icon { width: clamp(72px, 9vw, 104px); height: auto; filter: drop-shadow(0 10px 24px rgb(0 20 80 / 0.45)); }
.sheet h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.025em; text-shadow: 0 2px 30px rgb(0 20 90 / 0.35); }
.sheet .lede { font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem); line-height: 1.45; color: rgb(255 255 255 / 0.92); max-width: 34rem; }
.sheet .lede strong { color: #fff; font-weight: 650; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.meta { font-size: var(--step--1); color: rgb(255 255 255 / 0.78); }
@media (max-width: 700px) { .sheet-inner { padding-bottom: 180px; } }

/* The peeling corner: the icon's own curl and wall layers. */
.corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(150px, 24vw, 300px);
  aspect-ratio: 424 / 444;
  background: url("corner.png") right bottom / 100% 100% no-repeat;
  filter: drop-shadow(-10px -8px 18px rgb(0 10 60 / 0.35));
  transform-origin: 100% 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet:hover .corner { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .corner { transition: none; } .sheet:hover .corner { transform: none; } }

/* ---------- App Store placeholder button ---------- */
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 14px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgb(255 255 255 / 0.28);
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.6);
  line-height: 1.1;
}
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 0.75rem; color: rgb(255 255 255 / 0.75); letter-spacing: 0.01em; }
.store b { display: block; font: 600 1.25rem/1.15 var(--display); }
.store[aria-disabled="true"] { cursor: default; }
.store.small { padding: 6px 12px 6px 10px; border-radius: 10px; gap: 8px; }
.store.small svg { width: 18px; height: 18px; }
.store.small b { font-size: 0.875rem; white-space: nowrap; }

/* ---------- Screenshots ---------- */
.shot { margin: 0; }
.shot img { width: 100%; filter: drop-shadow(0 30px 50px rgb(0 0 0 / 0.55)) drop-shadow(0 0 1px rgb(255 255 255 / 0.25)); }
.shot figcaption { margin-top: 18px; font-size: var(--step--1); color: var(--ink-faint); text-align: center; }
.hero-shot { margin-top: clamp(40px, 6vw, 72px); }
.hero-shot .shot { max-width: 1080px; margin-inline: auto; }

/* ---------- Sections ---------- */
section { padding-block: clamp(72px, 10vw, 136px); }
.eyebrow {
  font: 600 0.8125rem/1 var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aqua);
}
.section-title { font-size: var(--step-3); font-weight: 700; }
.section-lede { color: var(--ink-soft); font-size: var(--step-1); max-width: 40rem; }
.center { text-align: center; }
.center .section-lede { margin-inline: auto; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.row + .row { margin-top: clamp(80px, 11vw, 150px); }
.row.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.row.flip .copy { order: 2; }
.copy { display: grid; gap: 18px; min-width: 0; }
.copy h2 { font-size: var(--step-3); font-weight: 700; }
.copy p { color: var(--ink-soft); max-width: 34rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 6px 0 0; list-style: none; }
.chips li {
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
@media (max-width: 860px) {
  .row, .row.flip { grid-template-columns: minmax(0, 1fr); }
  .row.flip .copy { order: 0; }
}

kbd {
  font: 500 0.8125rem/1 var(--mono);
  color: var(--ink);
  background: linear-gradient(var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 3px 6px;
  white-space: nowrap;
}

/* ---------- Privacy band ---------- */
.band {
  background:
    radial-gradient(120% 140% at 85% 0%, rgb(43 109 255 / 0.35), transparent 60%),
    linear-gradient(180deg, var(--ground-2), var(--surface));
  border-block: 1px solid var(--line);
}
.band .wrap { display: grid; gap: 22px; justify-items: center; text-align: center; }
.band p { color: var(--ink-soft); font-size: var(--step-1); max-width: 44rem; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 8px 0 0; list-style: none; }
.pills li {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgb(5 12 34 / 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}
.pills svg { width: 16px; height: 16px; color: var(--aqua); }

/* ---------- More features ---------- */
.more .wrap { display: grid; gap: 18px; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.tile {
  background: linear-gradient(180deg, var(--surface), rgb(12 27 66 / 0.6));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 24px;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}
.tile .ico {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #3d8bff, #1046d8);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.tile .ico svg { width: 22px; height: 22px; }
.tile h3 { font-size: 1.125rem; font-weight: 650; margin-top: 4px; }
.tile p { color: var(--ink-soft); font-size: 0.9688rem; line-height: 1.55; }
.tile .keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tile .note { font-size: 0.8125rem; color: var(--ink-faint); }

/* ---------- FAQ ---------- */
.faq .wrap { max-width: 860px; display: grid; gap: 14px; }
.faq .section-title { margin-bottom: 18px; }
details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--ground-2);
}
details[open] { background: var(--surface); }
summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 56px 18px 22px;
  font: 600 1.0625rem/1.4 var(--display);
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  position: absolute; right: 22px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--aqua); border-bottom: 2px solid var(--aqua);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { summary::after { transition: none; } }
details .answer { padding: 0 22px 20px; color: var(--ink-soft); display: grid; gap: 10px; }
.faq .more-help { margin-top: 18px; color: var(--ink-soft); text-align: center; }

/* ---------- Closing ---------- */
.closing { padding-top: clamp(24px, 4vw, 56px); }
.closing .wrap { display: grid; justify-items: center; gap: 20px; text-align: center; }
.closing img { width: 112px; filter: drop-shadow(0 14px 30px rgb(20 90 255 / 0.45)); }
.closing p { color: var(--ink-soft); font-size: var(--step-1); }

footer {
  border-top: 1px solid var(--line);
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px));
  color: var(--ink-faint);
  font-size: 0.875rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Legal page ---------- */
.legal { padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 100px); }
.legal .wrap { max-width: 760px; display: grid; gap: 16px; }
.legal h1 { font-size: var(--step-3); }
.legal h2 { font-size: 1.25rem; margin-top: 18px; }
.legal p { color: var(--ink-soft); }
.legal .date { color: var(--ink-faint); font-size: var(--step--1); }
