/* Rocky Perks — site styles. Colors and type match the iOS design system (docs/DESIGN.md). */
:root {
  --blue: #2B4BFD;
  --blue-tint: #E9ECFF;
  --ink: #0A090D;
  --ink-raised: #2A292F;
  --lime: #C6E12B;
  --coral: #FF5A3C;
  --coral-tint: #FFEDE8;
  --cream: #EFEEEA;
  --surface: #F4F3F0;
  --line: #E2E1DD;
  --muted: #6B6A68;
  --faint: #A3A29F;
  --sky: #B9C6FF;
  --white: #FFFFFF;
  --radius: 24px;
  --gutter: max(20px, env(safe-area-inset-left));
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --ui: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right)); }
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.display { font-family: var(--display); text-transform: uppercase; font-weight: 400; line-height: .95; letter-spacing: .005em; margin: 0; }
.blue { color: var(--blue); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 12px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-family: var(--display); text-transform: uppercase; font-size: 22px; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 12px; border-radius: 12px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:active { background: var(--surface); }
@media (hover: hover) { .nav a:hover { background: var(--surface); } }
.nav .lang { font-family: var(--mono); font-size: 13px; border: 1.5px solid var(--ink); padding: 8px 12px; margin-left: 6px; }
.nav .hide-sm { display: none; }
@media (min-width: 760px) { .nav .hide-sm { display: inline-flex; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px; border-radius: 16px;
  font-family: var(--ui); font-weight: 600; font-size: 17px; text-decoration: none;
  border: 0; cursor: pointer; transition: transform .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none;
}
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-lime { background: var(--lime); color: var(--ink); }
.appstore { padding: 0 22px 0 18px; }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore .lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.appstore small { font-size: 11px; font-weight: 500; opacity: .85; }
.appstore strong { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }

/* ---------- Hero ---------- */
.hero { background: var(--cream); position: relative; overflow: hidden; }
.hero .wrap { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 0; align-items: end; }
.hero-copy { padding-bottom: 8px; }
.hero .logo { width: min(340px, 82%); margin-bottom: 26px; }
.hero h1 { font-size: clamp(46px, 11vw, 84px); line-height: .92; }
.hero p.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-raised); max-width: 520px; margin: 18px 0 26px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { margin-top: 16px; color: var(--muted); }
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 480px; padding: 24px 0 40px; }
.hero-art .blob { position: absolute; top: 50%; left: 50%; width: min(440px, 88%); aspect-ratio: 1; border-radius: 50%; background: var(--blue); transform: translate(-50%, -50%); box-shadow: 0 40px 80px rgba(43,75,253,.25); }
.hero-art .orbit { position: absolute; top: 50%; left: 50%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(43,75,253,.28); translate: -50% -50%; animation: spin 38s linear infinite; pointer-events: none; }
.hero-art .orbit.o1 { width: min(540px, 104%); }
.hero-art .orbit.o2 { width: min(380px, 74%); border-color: rgba(255,255,255,.35); animation-duration: 26s; animation-direction: reverse; }
.hero-art .orbit i { position: absolute; top: -8px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(198,225,43,.3); }
.hero-art .orbit.o2 i { background: #fff; width: 10px; height: 10px; top: -6px; margin-left: -5px; box-shadow: none; }
.hero-art .spark { position: absolute; z-index: 1; color: var(--lime); font-size: 28px; line-height: 1; animation: twinkle 3.2s ease-in-out infinite; text-shadow: 0 2px 8px rgba(10,9,13,.12); }
.hero-art .spark.k1 { top: 10%; right: 18%; }
.hero-art .spark.k2 { bottom: 16%; left: 8%; font-size: 22px; color: var(--blue); animation-delay: -1.1s; }
.hero-art .spark.k3 { top: 46%; left: 2%; font-size: 18px; animation-delay: -2.2s; }
.hero-art .rocky { position: relative; z-index: 1; width: min(330px, 66%); -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 99%); mask-image: linear-gradient(to bottom, #000 80%, transparent 99%); }
.bubble {
  position: absolute; z-index: 2; background: #fff; border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(10,9,13,.12); font-size: 14px; font-weight: 500; max-width: 210px;
}
.bubble .mono { display: block; color: var(--muted); font-size: 10px; margin-bottom: 2px; }
.bubble b { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; }
.bubble.b1 { top: 14%; left: 0; animation: float 6s ease-in-out infinite; }
.bubble.b2 { top: 56%; right: 0; animation: float 7s ease-in-out -2s infinite; }
.bubble.b2 b { color: var(--blue); }
.tick { display: inline-block; background: var(--lime); border-radius: 999px; padding: 2px 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-left: 6px; vertical-align: middle; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr 1fr; padding-top: 48px; align-items: center; }
  .hero-copy { padding: 40px 0 72px; }
  .hero-art { min-height: 640px; align-self: center; padding: 0; }
  .hero-art .blob { width: min(500px, 92%); }
  .hero-art .orbit.o1 { width: min(610px, 112%); }
  .hero-art .orbit.o2 { width: min(430px, 80%); }
  .hero-art .rocky { width: min(390px, 72%); }
  .bubble.b1 { left: -4%; }
  .bubble.b2 { right: -4%; }
}

/* ---------- Marquee strip ---------- */
.strip { background: var(--ink); color: #fff; overflow: hidden; padding: 16px 0; }
.strip .track { display: flex; gap: 40px; width: max-content; animation: marquee 32s linear infinite; }
.strip span { font-family: var(--display); text-transform: uppercase; font-size: 26px; white-space: nowrap; display: inline-flex; align-items: center; gap: 40px; }
.strip span::after { content: "✦"; color: var(--lime); font-size: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head .mono { color: var(--blue); }
.section-head h2 { font-size: clamp(40px, 7vw, 68px); margin-top: 10px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 14px 0 0; }

.features { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .features { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden; }
.card h3 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 30px; line-height: 1; margin: 18px 0 10px; }
.card p { margin: 0; color: var(--ink-raised); }
.card .icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #fff; }
.card .icon svg { width: 26px; height: 26px; }
.card.dark { background: var(--ink); color: #fff; }
.card.dark p { color: #cfcfd4; }
.card.dark .icon { background: var(--ink-raised); }
.card.blue { background: var(--blue); color: #fff; }
.card.blue p { color: #e3e8ff; }
.card.blue .icon { background: rgba(255,255,255,.16); }
.card.lime { background: var(--lime); }
.card .tag { position: absolute; top: 22px; right: 22px; }
.pill { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: #fff; color: var(--ink); }
.pill.lime { background: var(--lime); }
.pill.ink { background: var(--ink); color: #fff; }

/* ---------- Screens gallery ---------- */
.screens { background: var(--cream); }
.gallery {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 22px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  margin: 0 auto; max-width: 1180px;
}
.phone {
  flex: none; width: 236px; scroll-snap-align: center;
  aspect-ratio: 1320 / 2868; border-radius: 36px; background: var(--ink); padding: 8px;
  box-shadow: 0 20px 40px rgba(10,9,13,.16);
}
.phone .screen { width: 100%; height: 100%; border-radius: 29px; overflow: hidden; background: var(--blue); position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone .screen .ph { padding: 18px; color: #fff; }
.phone .screen .ph b { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 26px; line-height: 1; display: block; }
.phone .screen .ph img.mini { position: static; width: 64px; height: 64px; border-radius: 16px; margin-bottom: 12px; }
@media (min-width: 1100px) { .gallery { justify-content: center; padding-left: 20px; padding-right: 20px; } .phone { width: 176px; } }

/* ---------- Edu / Pro ---------- */
.edu { background: var(--blue); color: #fff; border-radius: 32px; padding: 40px 28px; display: grid; gap: 28px; align-items: center; position: relative; overflow: hidden; }
.edu h2 { font-size: clamp(42px, 8vw, 76px); }
.edu h2 em { font-style: normal; color: var(--lime); }
.edu p { color: #e3e8ff; font-size: 18px; margin: 14px 0 0; max-width: 560px; }
.edu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.edu li { background: rgba(255,255,255,.12); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.edu li::before { content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230A090D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; margin-top: 2px; }
@media (min-width: 900px) { .edu { grid-template-columns: 1.2fr 1fr; padding: 56px; } }

/* ---------- Privacy blurb ---------- */
.privacy-band { display: grid; gap: 16px; }
@media (min-width: 900px) { .privacy-band { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; } }
.checks { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.check { background: var(--surface); border-radius: 18px; padding: 18px; }
.check b { display: block; font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 24px; line-height: 1.05; }
.check span { color: var(--muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border-radius: 18px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; font-weight: 600; font-size: 18px; position: relative; min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 22px; transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 20px 20px; color: var(--ink-raised); }
.faq details > div p { margin: 0 0 10px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; text-align: center; }
.cta-band img.face { width: 96px; height: 96px; border-radius: 26px; margin: 0 auto 20px; }
.cta-band h2 { font-size: clamp(44px, 9vw, 88px); }
.cta-band h2 em { font-style: normal; color: var(--lime); }
.cta-band p { color: #cfcfd4; margin: 14px auto 28px; max-width: 520px; font-size: 18px; }
.cta-band .btn-lime { min-width: 240px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfcfd4; border-top: 1px solid var(--ink-raised); padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 22px; }
.site-footer .brand span { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-footer nav a { text-decoration: none; padding: 10px 12px 10px 0; min-height: 44px; display: inline-flex; align-items: center; margin-right: 10px; }
@media (hover: hover) { .site-footer nav a:hover { color: #fff; text-decoration: underline; } }
.site-footer .small { color: var(--faint); font-size: 13px; }
@media (min-width: 900px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Legal / docs pages ---------- */
.doc-hero { background: var(--cream); padding: 48px 0 40px; }
.doc-hero h1 { font-size: clamp(48px, 10vw, 88px); margin-top: 10px; }
.doc-hero .meta { color: var(--muted); margin-top: 14px; }
.doc { padding: 40px 0 80px; }
.doc .wrap { display: grid; gap: 40px; }
@media (min-width: 1000px) { .doc .wrap { grid-template-columns: 260px 1fr; align-items: start; } }
.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; position: sticky; top: 92px; font-size: 14px; }
  .toc ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
  .toc a { text-decoration: none; color: var(--muted); display: block; padding: 6px 0; }
  .toc a:hover { color: var(--blue); }
}
.prose { max-width: 760px; min-width: 0; }
.prose h2 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 34px; line-height: 1.05; margin: 44px 0 12px; scroll-margin-top: 90px; }
.prose h3 { font-size: 19px; margin: 24px 0 6px; }
.prose p, .prose li { color: var(--ink-raised); }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--blue); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose .caps { text-transform: uppercase; font-size: 15px; letter-spacing: .01em; }
.summary { background: var(--blue-tint); border-radius: 22px; padding: 24px; margin-bottom: 8px; }
.summary .mono { color: var(--blue); }
.summary ul { margin: 10px 0 0; padding-left: 20px; }
.summary li { color: var(--ink); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--surface); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.placeholder { background: #FFF3B0; padding: 0 4px; border-radius: 4px; font-weight: 700; }
.contact-card { background: var(--ink); color: #fff; border-radius: 24px; padding: 28px; display: grid; gap: 14px; }
.contact-card h2 { margin: 0; color: #fff; }
.contact-card p { color: #cfcfd4; margin: 0; }
.contact-card .btn { justify-self: start; }

/* ---------- 404 ---------- */
.notfound { min-height: calc(var(--vh, 1vh) * 70); display: grid; place-items: center; text-align: center; background: var(--cream); padding: 60px 0; }
.notfound img { width: 160px; margin: 0 auto 18px; }
.notfound h1 { font-size: clamp(56px, 14vw, 120px); }

/* Mobile: stack table rows as cards instead of scrolling sideways. */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; }
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { background: var(--surface); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
  td { border: 0; padding: 2px 0; }
  td:first-child { font-size: 17px; margin-bottom: 4px; }
  td:last-child { color: var(--muted); margin-top: 6px; }
  td:last-child::before { content: "→ "; color: var(--blue); }
  .bubble.b2 { top: auto; bottom: 120px; }
}

/* ---------- App Store badge ---------- */
.store-badge { display: inline-flex; border-radius: 12px; min-height: 44px; transition: transform .15s ease; -webkit-tap-highlight-color: transparent; }
.store-badge img { display: block; height: 56px; width: auto; }
.store-badge:active { transform: scale(.97); }
@media (hover: hover) { .store-badge:hover { transform: translateY(-2px); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes twinkle { 0%,100% { opacity: .35; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }

/* Mobile hero: keep the bubbles off Rocky's face and body */
@media (max-width: 899px) {
  .hero-art { min-height: 520px; padding: 56px 0 72px; }
  .hero-art .rocky { width: min(290px, 62%); }
  .bubble { padding: 9px 12px; font-size: 13px; max-width: 170px; border-radius: 14px; }
  .bubble b { font-size: 22px; }
  .bubble.b1 { top: 0; left: 0; }
  .bubble.b2 { top: auto; bottom: 12px; right: 0; }
}
