/* ============================================================
   JoyCast v2 — vanilla port of the Figma Sites mirror.
   Source of truth: /tmp/joycast-map.json (Desktop 1024 / Tablet 800
   / Mobile 375). Sizes/colors/spacings derived from Figma JSON.
   ============================================================ */

:root {
  --text: #1d1d1f;
  --muted: #86868b;
  --muted-2: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-dark: #0a0a0a;
  --bubble: rgba(255, 255, 255, 0.5);
  --grad-from: #1d6bff;
  --grad-via: #a833ff;
  --grad-to: #ff3ea0;
  --grad-cta: linear-gradient(135deg, #1976d2 0%, #8244c1 100%);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);
  --r-bubble: 16px;
  --r-button: 9.6px;
  --r-card: 20px;
  --container: 1024px;
  --inner: 980px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; padding: 0; color: inherit; }

.muted { color: var(--muted); }
.muted-strong { color: var(--muted-2); font-weight: 700; }

.gradient {
  background: linear-gradient(90deg, var(--grad-from), var(--grad-via), var(--grad-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header (sticky island bubble) ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 22px;
}
.header__bubble {
  width: 100%;
  max-width: var(--inner);
  height: 80px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--r-bubble);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 12px 32px -16px rgba(0, 0, 0, 0.18);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand__mark {
  width: 48px;
  height: 48px;
  border-radius: var(--r-button);
  background: linear-gradient(135deg, #151b1e 0%, #000000 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand__mark img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
}
.brand__name {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 28px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: var(--r-button);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.08px;
  line-height: 23.2px;
  white-space: nowrap;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--dark { background: var(--text); color: #ffffff; }
.btn--large { padding: 16px 28px; font-size: 17px; }
.btn--gradient {
  background: var(--grad-cta);
  color: #ffffff;
  padding: 18px 32px;
  font-size: 18px;
  border-radius: 100px;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 76px 22px 0;
  text-align: center;
}
.hero__title {
  font-size: 60px;
  font-weight: 700;
  line-height: 72.6px;
  letter-spacing: -1.2px;
  margin: 0 0 26px;
  color: var(--text);
}
.hero__title .gradient { display: inline; }
.hero__lead {
  font-size: 32px;
  font-weight: 600;
  line-height: 38.7px;
  letter-spacing: -0.96px;
  color: var(--muted);
  margin: 0 auto 64px;
  max-width: 760px;
}
.hero__macbook {
  margin: 0 auto 80px;
  position: relative;
  width: min(860px, 100%);
}
.hero__macbook img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.18));
}
.hero__bullets {
  display: grid;
  gap: 14px;
  max-width: 651px;
  margin: 0 auto 80px;
  text-align: left;
}
.hero__bullets li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 14px;
  align-items: start;
}
.hero__bullets p { margin: 0; font-size: 17px; line-height: 1.45; }
.hero__bullets strong { font-weight: 600; }
.hero__bullets .check { margin-top: 4px; }
.hero__pitch {
  font-size: 28px;
  font-weight: 600;
  line-height: 33.9px;
  letter-spacing: 0;
  margin: 0 0 28px;
}

/* ---------- Generic section ---------- */
.section {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 96px 22px;
  text-align: center;
}
.section__title {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.28px;
  margin: 0 0 22px;
}
.section__title--small {
  font-size: 56px;
  letter-spacing: -1.12px;
}
.section__title--invert { color: #ffffff; }
.section__title--invert .gradient {
  background: linear-gradient(90deg, #59a7ff, #c98bff, #ff7fb5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section__lead {
  font-size: 20px;
  line-height: 29px;
  letter-spacing: -0.1px;
  color: rgba(0, 0, 0, 0.55);
  margin: 0 auto 64px;
  max-width: 640px;
}
.section__lead--invert { color: rgba(255, 255, 255, 0.7); }
.section--dark {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(168, 51, 255, 0.18) 0%, transparent 60%),
    radial-gradient(80% 60% at 50% 100%, rgba(29, 107, 255, 0.18) 0%, transparent 65%),
    var(--bg-dark);
  color: #ffffff;
  max-width: none;
  padding: 112px 0;
}
.section--dark > * {
  max-width: var(--inner);
  margin-left: auto;
  margin-right: auto;
  padding-left: 22px;
  padding-right: 22px;
}

/* ---------- Logos ---------- */
.logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: 28px 44px;
  max-width: 880px;
  margin: 0 auto;
}
.logos-grid img {
  height: 36px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(0.2);
}

/* ---------- Quote (Pavel) ---------- */
.section--quote .quote {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-soft);
  border-radius: var(--r-card);
  padding: 64px 56px;
}
.quote p {
  font-size: 32px;
  font-weight: 500;
  line-height: 38.7px;
  letter-spacing: -0.96px;
  color: var(--text);
  margin: 0 0 32px;
}
.quote__author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.quote__avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}
.quote__author > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.quote__name { font-size: 28px; font-weight: 400; color: var(--text); }
.quote__role { font-size: 20px; font-weight: 500; color: var(--muted-2); }

/* ---------- Cards row (3 across) ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--inner);
  margin: 0 auto;
  text-align: left;
}
.uses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: var(--inner);
  margin: 0 auto;
  text-align: left;
}
.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: var(--shadow-card);
}
.card__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0;
}
.card__body {
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted-2);
  margin: 0;
}
.card--soon { background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%); }

/* dark cards */
.cards-3--dark .card.card--dark {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cards-3--dark .card.card--dark:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}
.card--dark .card__body { color: rgba(255, 255, 255, 0.7); }

/* ---------- Absolute privacy ---------- */
.section--privacy .privacy__apple {
  width: 60px;
  height: 60px;
  margin: 0 auto 28px;
  opacity: 0.9;
}
.privacy-list {
  display: grid;
  gap: 18px;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
}
.privacy-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: center;
}

/* ---------- Testimonials grid ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--inner);
  margin: 0 auto;
}
.testimonial {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px;
  margin: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.testimonial .stars { width: 90px; height: 18px; }
.testimonial p {
  font-size: 18px;
  font-weight: 500;
  line-height: 26.1px;
  letter-spacing: -0.09px;
  margin: 0;
  color: var(--text);
}
.testimonial figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1.4;
}
.testimonial figcaption strong { font-weight: 600; color: var(--text); }

/* ---------- Alternatives ---------- */
.alts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.alt {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px;
}
.alt__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.alt p {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  color: var(--muted-2);
}
.alt p strong { color: var(--text); font-weight: 600; }

/* ---------- Built in chaos ---------- */
.section--chaos .chaos {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  max-width: var(--inner);
  margin: 0 auto;
  text-align: left;
  align-items: center;
}
.chaos p {
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: -0.24px;
  color: var(--text);
  margin: 0;
}
.chaos__photo { margin: 0; }
.chaos__photo img {
  width: 100%;
  height: auto;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.chaos__photo figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 780px;
  margin: 0 auto 64px;
}
.plan {
  background: var(--bg-soft);
  border-radius: var(--r-card);
  padding: 40px 32px;
  text-align: center;
}
.plan--featured {
  background: var(--text);
  color: #ffffff;
}
.plan--featured .plan__note { color: rgba(255, 255, 255, 0.7); }
.plan__name { font-size: 21px; font-weight: 600; margin: 0 0 16px; letter-spacing: -0.42px; }
.plan__price { font-size: 40px; font-weight: 700; line-height: 1; margin-bottom: 12px; }
.plan__price span { font-size: 20px; font-weight: 500; opacity: 0.7; }
.plan__note { font-size: 14px; margin: 0; }

/* ---------- Built solo & Footer ---------- */
.section--solo {
  padding: 72px 22px;
  text-align: center;
}
.section--solo .section__title {
  font-size: 64px;
  letter-spacing: -1.28px;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 22px;
}
.footer__row {
  max-width: var(--inner);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.footer a {
  color: var(--text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}
.footer a:hover { border-color: rgba(0, 0, 0, 0.5); }

/* ============================================================
   Responsive: Tablet (≤1024) and Mobile (≤640)
   ============================================================ */
@media (max-width: 1023px) {
  .hero__title { font-size: 48px; line-height: 1.1; letter-spacing: -0.96px; }
  .hero__lead  { font-size: 24px; line-height: 1.3; }
  .section__title { font-size: 56px; letter-spacing: -1.12px; }
  .section__title--small { font-size: 48px; }
  .cards-3, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .section--chaos .chaos { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; overflow-x: hidden; }
  h1, h2, h3, p { overflow-wrap: anywhere; word-break: normal; hyphens: auto; }
  .section, .hero, .footer__row { overflow-wrap: break-word; }
  .header { padding: 12px; }
  .header__bubble {
    height: auto;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
  .brand__name { font-size: 24px; }
  .hero { padding: 32px 18px 0; }
  .hero__title { font-size: 28px; line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 18px; }
  .hero__lead  { font-size: 20px; line-height: 1.3; letter-spacing: -0.4px; margin-bottom: 36px; }
  .hero__macbook { margin-bottom: 36px; }
  .hero__bullets { gap: 12px; margin-bottom: 36px; }
  .hero__bullets p { font-size: 15px; line-height: 1.45; }
  .hero__pitch { font-size: 20px; margin-bottom: 20px; }

  .section { padding: 56px 18px; }
  .section__title { font-size: 30px; line-height: 1.15; letter-spacing: -0.56px; }
  .section__title--small, .section--solo .section__title { font-size: 26px; }
  .section__lead { font-size: 17px; line-height: 1.45; margin-bottom: 36px; }

  .cards-3, .uses-grid, .testimonials-grid, .alts { grid-template-columns: 1fr; gap: 12px; }
  .card, .testimonial, .alt { padding: 24px; }
  .card__title, .alt__title { font-size: 22px; }
  .card__body { font-size: 16px; }

  .section--quote .quote { padding: 36px 22px; }
  .quote p { font-size: 20px; line-height: 1.35; }
  .quote__author { gap: 12px; }
  .quote__avatar { width: 56px; height: 56px; }
  .quote__name { font-size: 20px; }
  .quote__role { font-size: 16px; }

  .privacy-list { font-size: 18px; }

  .chaos p { font-size: 18px; }

  .logos-grid { gap: 20px 32px; max-width: 320px; }
  .logos-grid img { height: 28px; }

  .footer__row { flex-direction: column; align-items: center; text-align: center; }
}
