/* Pocket Panel website. Colors match the app (see Marketing/assets/source/app-store-screenshots/studio.html). */

:root {
  --bg: #07090d;
  --surface: #0e1218;
  --surface-raised: #141921;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --text: #e8edf5;
  --text-2: #8a96a8;
  --text-3: #576173;
  --accent: #2e7aff;
  --accent-bright: #5c9bff;
  --cyan: #57d5ff;
  --live: #2bd98f;
  --caution: #f5b83d;
  --critical: #ff595e;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
  --shell: min(1120px, calc(100% - 40px));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::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: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px; background: var(--accent); color: #fff;
}
.skip-link:focus { top: 12px; }

.shell { width: var(--shell); margin-inline: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 13, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--hairline); }
.site-header .shell { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand:hover { color: var(--text); }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 7px 12px; border-radius: 999px;
  color: var(--text-2); font-size: 15px;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-raised); }

/* Buttons */

.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s, color 0.2s;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 30px -10px rgba(46, 122, 255, 0.8); }
.button-primary:hover { background: var(--accent-bright); color: #fff; }
.button-secondary { background: var(--surface-raised); color: var(--text); border: 1px solid var(--hairline-strong); }
.button-secondary:hover { color: var(--text); border-color: var(--text-3); }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 12px;
  background: var(--text); color: var(--bg);
}
.store-badge svg { width: 24px; height: 24px; }
.store-badge span { display: grid; line-height: 1.15; }
.store-badge small { font-size: 11px; opacity: 0.7; }
.store-badge strong { font-size: 17px; }
.store-badge:hover { color: var(--bg); }

/* Hero */

.hero { position: relative; padding: 72px 0 40px; isolation: isolate; }
.hero .shell { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; }

.hero-glow {
  position: absolute; inset: -20% -10% auto; height: 720px; z-index: -2;
  background:
    radial-gradient(40% 50% at 70% 40%, rgba(46, 122, 255, 0.22), transparent 70%),
    radial-gradient(30% 40% at 20% 20%, rgba(87, 213, 255, 0.08), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(60% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: 0.6;
}

.hero h1 { font-size: clamp(42px, 6.4vw, 76px); margin: 16px 0 20px; }
.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent-bright), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy { font-size: 20px; color: var(--text-2); max-width: 32ch; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; align-items: center; }
.hero-note { margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--text-3); }

.trace { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; width: 100%; height: 140px; opacity: 0.35; pointer-events: none; }
.trace path { fill: none; stroke: url(#traceGradient); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Phone frame */

.phone {
  position: relative;
  width: min(300px, 100%);
  margin-inline: auto;
  padding: 10px;
  border-radius: 48px;
  background: linear-gradient(160deg, #262d38, #11151c 40%, #1c222b);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.9),
    0 30px 100px -40px rgba(46, 122, 255, 0.45);
}
.phone img { width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; border-radius: 39px; background: var(--bg); }

.hero-visual { position: relative; }
.hero-visual .phone { animation: float 7s ease-in-out infinite; }

.chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--tone, var(--accent-bright));
  background: rgba(14, 18, 24, 0.82);
  border: 1px solid color-mix(in srgb, var(--tone, var(--accent)) 45%, transparent);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2.2s ease-out infinite; }
.chip-live { --tone: var(--live); }
.chip-caution { --tone: var(--caution); }
.chip-critical { --tone: var(--critical); }

.hero-visual .chip:nth-of-type(1) { top: 22%; left: -6%; }
.hero-visual .chip:nth-of-type(2) { top: 52%; right: -8%; }
.hero-visual .chip:nth-of-type(3) { bottom: 14%; left: -2%; }

/* Fact strip */

.facts { padding: 28px 0 8px; }
.facts ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden;
}
.facts li { background: var(--surface); padding: 20px 22px; }
.facts strong { display: block; font-size: 16px; }
.facts span { font-size: 14px; color: var(--text-2); }

/* Sections */

.section { padding: 112px 0 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 48px); margin-top: 12px; }
.section-head p { margin-top: 16px; color: var(--text-2); font-size: 19px; }

.feature {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px;
  padding: 48px 0;
}
.feature + .feature { border-top: 1px solid var(--hairline); }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-media { position: relative; }
.feature-media::before {
  content: ""; position: absolute; inset: 10% 5%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(46, 122, 255, 0.22), transparent);
  filter: blur(10px);
}
.feature-media .phone { width: min(270px, 100%); }
.feature-media .chip:nth-of-type(1) { top: 30%; left: 4%; }
.feature-media .chip:nth-of-type(2) { top: 58%; right: 4%; }

.feature-tag { display: inline-flex; align-items: center; gap: 10px; }
.feature-tag .num { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.feature h3 { font-size: clamp(28px, 3.4vw, 40px); margin: 14px 0 16px; }
.feature p { color: var(--text-2); font-size: 18px; max-width: 42ch; }

.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; }
.ticks li::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 2px; translate: 0 -2px;
  background: var(--accent-bright); box-shadow: 0 0 10px var(--accent);
}

/* Read-only panel */

.safety {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  padding: 56px; border-radius: 28px;
  background: linear-gradient(160deg, #0f1724, var(--surface) 55%);
  border: 1px solid var(--hairline-strong);
}
.safety::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(43, 217, 143, 0.18);
  box-shadow: 0 0 0 40px rgba(43, 217, 143, 0.03), 0 0 0 80px rgba(43, 217, 143, 0.02);
  pointer-events: none;
}
.safety .eyebrow { color: var(--live); }
.safety h2 { font-size: clamp(32px, 4.4vw, 48px); margin: 12px 0 16px; }
.safety p { color: var(--text-2); font-size: 18px; max-width: 40ch; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 14px;
  background: rgba(7, 9, 13, 0.6); border: 1px solid var(--hairline);
  font-family: var(--mono); font-size: 15px; font-weight: 600;
}
.checks svg { flex: none; width: 22px; height: 22px; color: var(--live); }
.checks svg path { stroke-dasharray: 24; stroke-dashoffset: 0; }

/* Notes grid */

.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.note {
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--hairline);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.note:hover { border-color: var(--hairline-strong); transform: translateY(-3px); }
.note .icon {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  background: rgba(46, 122, 255, 0.12); color: var(--accent-bright); margin-bottom: 18px;
}
.note .icon svg { width: 20px; height: 20px; }
.note h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -0.01em; }
.note p { color: var(--text-2); font-size: 15.5px; }

/* Closing CTA */

.cta { text-align: center; padding: 120px 0 112px; }
.cta img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 28px; box-shadow: 0 20px 60px -20px rgba(46, 122, 255, 0.7); }
.cta h2 { font-size: clamp(32px, 4.6vw, 52px); }
.cta p { color: var(--text-2); font-size: 19px; margin: 16px auto 0; max-width: 46ch; }
.cta .button-row { justify-content: center; }

/* Inner pages */

.page-hero { padding: 80px 0 40px; max-width: 720px; }
.page-hero h1 { font-size: clamp(38px, 5.6vw, 60px); margin: 14px 0 16px; }
.page-hero .lead { color: var(--text-2); font-size: 20px; }
.meta-line { margin-top: 14px; font-family: var(--mono); font-size: 13px; color: var(--text-3); }

.content { max-width: 720px; padding-bottom: 112px; display: grid; gap: 16px; }
.content section {
  padding: 28px 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--hairline);
}
.content h2 { font-size: 21px; margin-bottom: 10px; letter-spacing: -0.01em; }
.content p { color: var(--text-2); }
.content p + p, .content p + ul, .content ul + p { margin-top: 12px; }
.content ul { margin: 0; padding-left: 20px; color: var(--text-2); }
.content li + li { margin-top: 6px; }
.content strong { color: var(--text); font-weight: 600; }

.faq { display: grid; gap: 0; }
.faq details { border-top: 1px solid var(--hairline); }
.faq details:first-of-type { border-top: 0; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; translate: 0 -3px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  rotate: 45deg; transition: rotate 0.3s var(--ease), translate 0.3s var(--ease);
}
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details p { padding: 0 0 20px; }
.faq details[open] p { animation: fade-down 0.35s var(--ease); }

.support-cta { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.support-cta p { flex: 1 1 320px; }

/* Footer */

.site-footer { border-top: 1px solid var(--hairline); padding: 32px 0 48px; }
.site-footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.site-footer p { color: var(--text-3); font-size: 14px; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { color: var(--text-2); font-size: 14px; }
.footer-nav a:hover { color: var(--text); }
.disclaimer { width: 100%; color: var(--text-3); font-size: 13px; }

/* 404 */

.not-found { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 16px; padding: 80px 0; }
.not-found .code { font-family: var(--mono); font-size: 14px; color: var(--caution); }
.not-found h1 { font-size: clamp(36px, 5vw, 56px); }
.not-found p { color: var(--text-2); }
.not-found .button-row { justify-content: center; margin-top: 12px; }

/* Motion */

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 8px transparent; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero .rise { animation: rise 0.9s var(--ease) both; }
.hero .rise:nth-child(2) { animation-delay: 0.08s; }
.hero .rise:nth-child(3) { animation-delay: 0.16s; }
.hero .rise:nth-child(4) { animation-delay: 0.24s; }
.hero .rise:nth-child(5) { animation-delay: 0.32s; }
.hero-visual.rise { animation-delay: 0.2s; animation-duration: 1.2s; }

.trace path { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 3.2s 0.3s var(--ease) forwards; }

/* Scroll reveal: only hidden when JavaScript has marked the page ready. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal .chip { opacity: 0; transform: scale(0.9); transition: opacity 0.6s 0.45s var(--ease), transform 0.6s 0.45s var(--ease); }
.js .reveal.in .chip { opacity: 1; transform: none; }
.js .reveal.in .chip:nth-of-type(2) { transition-delay: 0.6s; }
.js .checks.reveal li { opacity: 0; transform: translateX(-12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .checks.reveal.in li { opacity: 1; transform: none; }
.js .checks.reveal li:nth-child(2) { transition-delay: 0.1s; }
.js .checks.reveal li:nth-child(3) { transition-delay: 0.2s; }
.js .checks.reveal li:nth-child(4) { transition-delay: 0.3s; }
.js .checks.reveal li:nth-child(5) { transition-delay: 0.4s; }
.js .checks.reveal svg path { stroke-dashoffset: 24; }
.js .checks.reveal.in svg path { animation: draw 0.6s 0.5s var(--ease) forwards; }
.js .notes .note.reveal:nth-child(2) { transition-delay: 0.1s; }
.js .notes .note.reveal:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .reveal .chip, .js .checks.reveal li { opacity: 1; transform: none; }
  .trace path, .js .checks.reveal svg path { stroke-dashoffset: 0; }
}

/* Responsive */

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero .shell { grid-template-columns: 1fr; gap: 56px; text-align: center; }
  .hero-copy { margin-inline: auto; }
  .hero .button-row { justify-content: center; }
  .trace { bottom: auto; top: 40%; }
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature-media { order: -1; }
  .safety { grid-template-columns: 1fr; padding: 36px 24px; }
  .notes { grid-template-columns: 1fr; }
  .section { padding-top: 88px; }
}

@media (max-width: 560px) {
  :root { --shell: calc(100% - 32px); }
  body { font-size: 16px; }
  .site-nav a { padding: 6px 9px; font-size: 14px; }
  .brand span { display: none; }
  .hero-copy { font-size: 18px; }
  .facts li { padding: 16px; }
  .hero-visual .chip:nth-of-type(1) { left: 0; }
  .hero-visual .chip:nth-of-type(2) { right: 0; }
  .hero-visual .chip:nth-of-type(3) { left: 4%; }
  .feature-media .chip:nth-of-type(1) { left: 0; }
  .feature-media .chip:nth-of-type(2) { right: 0; }
  .chip { font-size: 12px; padding: 7px 12px; }
  .content section { padding: 22px 20px; }
}
