/* squarecast.app: shared styles for the landing page, /support and shared show pages.
   The look follows the app: Fraunces for titles, Plus Jakarta Sans for everything else, a black canvas with the
   App Store screenshots' blue glow, and white capsule buttons for the main action. */

@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #020407;
  --card: #111317;
  --card-hi: #181a1f;
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --dim: rgba(235, 235, 245, 0.64);
  --faint: rgba(235, 235, 245, 0.4);
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.16);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Jakarta", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* The blue glow at the top of every page, as on the App Store screenshots. */
.glow {
  position: absolute;
  inset: 0 0 auto;
  height: 980px;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(16, 84, 190, 0.55), transparent 72%),
    radial-gradient(40% 40% at 50% 62%, rgba(10, 132, 255, 0.22), transparent 70%);
  z-index: -1;
}

/* Navigation */
.nav { position: sticky; top: 0; z-index: 20; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(2, 4, 7, 0.72); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line-hi); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a:not(.btn) { padding: 8px 14px; border-radius: 999px; color: var(--dim); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav-links a:not(.btn):hover { color: var(--text); }

/* Buttons: white capsule for the main action, like the app's primary buttons. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font: 700 16px/1 var(--sans);
  background: var(--text); color: #000;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(10, 132, 255, 0.55); }
.btn svg { width: 20px; height: 20px; margin-top: -2px; }
.btn.small { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.small svg { width: 16px; height: 16px; }
.btn.ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hi); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.13); box-shadow: inset 0 0 0 1px var(--line-hi); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }

/* Phone frame around the App Store screenshots. --w sets its width; corners scale with it. */
.phone {
  --w: 300px;
  width: var(--w);
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.165);
  background: linear-gradient(160deg, #2a2c31, #0c0d10 40%, #1b1c20);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 50px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
  flex: none;
}
.phone img, .phone .screen { width: 100%; height: auto; aspect-ratio: 1320 / 2868; border-radius: calc(var(--w) * 0.135); background: #000; object-fit: cover; }

/* Hero */
.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 0; text-align: center; overflow: hidden; }
.hero h1 { font-size: clamp(46px, 8.4vw, 104px); max-width: 11ch; margin: 22px auto 0; }
.hero h1 em { font-style: normal; color: transparent; background: linear-gradient(100deg, #b9dcff 0%, #5aa9ff 45%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; }
.hero .lede { max-width: 560px; margin: 24px auto 0; font-size: clamp(17px, 2vw, 20px); color: var(--dim); }
.hero .ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.hero .meta { margin-top: 18px; font-size: 14px; color: var(--faint); }
.hero .meta span + span::before { content: "·"; margin: 0 8px; }

.fan {
  position: relative; height: clamp(440px, 62vw, 700px); margin-top: clamp(40px, 5vw, 64px);
  display: flex; justify-content: center;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
}
.fan .phone { position: absolute; top: 0; left: 50%; }
.fan .center { --w: clamp(250px, 31vw, 340px); transform: translateX(-50%); z-index: 2; }
.fan .side { --w: clamp(220px, 27vw, 300px); top: clamp(60px, 9vw, 110px); opacity: 0.92; }
.fan .left { transform: translateX(calc(-50% - clamp(150px, 26vw, 330px))) rotate(-9deg); }
.fan .right { transform: translateX(calc(-50% + clamp(150px, 26vw, 330px))) rotate(9deg); }
.fan .phone { animation: rise 1.2s var(--ease) both; }
.fan .left { animation-delay: 0.12s; }
.fan .right { animation-delay: 0.2s; }
@keyframes rise { from { opacity: 0; translate: 0 80px; } }

/* Word band between the hero and the features */
.band { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.band-track { display: flex; width: max-content; animation: band 46s linear infinite; }
.band-track span { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); color: var(--dim); padding: 0 28px; white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.band-track span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
@keyframes band { to { transform: translateX(-50%); } }

/* Feature story: chapters scroll past a phone that stays in place and swaps its screen. */
.story { position: relative; padding: clamp(80px, 10vw, 140px) 0 40px; }
.story .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(40px, 7vw, 110px); align-items: start; }
.story-phone { position: sticky; top: max(84px, calc(50vh - 330px)); }
.story-phone .phone { --w: min(304px, calc((100vh - 120px) / 2.3)); position: relative; }
.story-phone .screens { position: relative; }
.story-phone .screens img { position: absolute; inset: 0; height: 100%; opacity: 0; transform: scale(1.03); transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); }
.story-phone .screens img:first-child { position: relative; }
.story-phone .screens img.on { opacity: 1; transform: none; }
.story-phone::before { content: ""; position: absolute; inset: 10% -30%; background: radial-gradient(closest-side, rgba(10, 132, 255, 0.32), transparent); z-index: -1; }

.chapter { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; transition: opacity 0.5s; }
.js .story .chapter { opacity: 0.28; }
.js .story .chapter.active { opacity: 1; }
.chapter h2 { font-size: clamp(36px, 5vw, 64px); margin-top: 18px; max-width: 13ch; }
.chapter > p { margin-top: 22px; font-size: clamp(17px, 1.6vw, 19px); color: var(--dim); max-width: 520px; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; max-width: 520px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; }
.ticks li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; transform: translateY(3px); background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%230a84ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.chapter-shot { display: none; }

/* Grid of smaller features */
.more { padding: clamp(80px, 10vw, 140px) 0; }
.section-head { max-width: 720px; }
.section-head h2 { font-size: clamp(36px, 5vw, 60px); margin-top: 18px; }
.section-head p { margin-top: 18px; color: var(--dim); font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.card {
  position: relative; padding: 28px; border-radius: 28px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line-hi), 0 24px 50px -24px rgba(10, 132, 255, 0.45); }
.card .icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 24px; margin-top: 22px; }
.card p { margin-top: 10px; color: var(--dim); font-size: 16px; }

/* Closing call to action */
.cta { padding: 0 0 clamp(80px, 10vw, 140px); }
.cta-box {
  position: relative; overflow: hidden; text-align: center; border-radius: 40px;
  padding: clamp(56px, 8vw, 96px) var(--gutter);
  background: radial-gradient(70% 90% at 50% 0%, rgba(16, 84, 190, 0.6), transparent 70%), var(--card);
  box-shadow: inset 0 0 0 1px var(--line-hi);
}
.cta-box img.app-icon { width: 108px; height: 108px; border-radius: 26px; margin: 0 auto; box-shadow: 0 20px 60px -10px rgba(10, 132, 255, 0.6), 0 0 0 1px var(--line-hi); }
.cta-box h2 { font-size: clamp(38px, 6vw, 72px); margin-top: 32px; }
.cta-box p { margin: 18px auto 0; max-width: 460px; color: var(--dim); font-size: 18px; }
.cta-box .btn { margin-top: 34px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 15px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer .brand { font-size: 19px; }
.footer .tag { margin-top: 10px; color: var(--faint); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-start; }
.footer nav a { color: var(--dim); transition: color 0.2s; }
.footer nav a:hover { color: var(--text); }
.footer .copy { width: 100%; color: var(--faint); font-size: 13px; }

/* Reveal on scroll (only when scripts run, so nothing stays hidden without them) */
.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; }

/* Support page */
.page-hero { position: relative; padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 6vw, 64px); text-align: center; }
.page-hero h1 { font-size: clamp(44px, 7vw, 84px); margin-top: 20px; }
.page-hero p { max-width: 540px; margin: 20px auto 0; color: var(--dim); font-size: 19px; }
.help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.help .card { padding: 36px; display: flex; flex-direction: column; }
.help .card p { flex: 1; }
.help .card .btn { margin-top: 28px; align-self: flex-start; }
.help .card .note { margin-top: 18px; font-size: 14px; color: var(--faint); flex: none; }
.faq { margin: clamp(64px, 9vw, 110px) auto 0; max-width: 820px; }
.faq h2 { font-size: clamp(32px, 4.4vw, 48px); text-align: center; margin-bottom: 32px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 4px; font-size: 18px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); font-weight: 400; font-size: 22px; transition: transform 0.3s var(--ease), background 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent-soft); color: var(--accent); }
.faq details p { padding: 0 4px 24px; color: var(--dim); max-width: 680px; }
.faq details a, .prose a { color: var(--accent); }
.support-main { padding-bottom: clamp(80px, 10vw, 130px); }

/* Shared show page */
.shared { position: relative; padding: clamp(32px, 7vw, 80px) 0 clamp(72px, 9vw, 120px); text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500; color: var(--dim); }
.pill svg { width: 15px; height: 15px; color: var(--accent); }
.artwork-wrap { position: relative; width: min(340px, 78vw); margin: 36px auto 0; }
.artwork-wrap .blur { position: absolute; inset: 8%; background-size: cover; filter: blur(48px) saturate(1.4); opacity: 0.75; transform: translateY(12%); z-index: -1; }
.artwork-wrap img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 28px; box-shadow: 0 0 0 1px var(--line-hi), 0 40px 80px -30px rgba(0, 0, 0, 0.9); }
.shared h1 { font-size: clamp(34px, 5.4vw, 56px); margin: 36px auto 0; max-width: 18ch; }
.shared .by { margin-top: 12px; font-size: 18px; color: var(--dim); }
.shared .facts { margin-top: 10px; font-size: 14px; color: var(--faint); }
.shared .facts span + span::before { content: "·"; margin: 0 8px; }
.shared .ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.shared .hint { margin-top: 18px; font-size: 14px; color: var(--faint); }

@media (max-width: 960px) {
  .story .wrap { grid-template-columns: minmax(0, 1fr); }
  .story-phone { display: none; }
  .chapter { min-height: 0; padding: 56px 0; align-items: center; text-align: center; }
  .js .story .chapter { opacity: 1; }
  .chapter h2, .chapter > p { margin-left: auto; margin-right: auto; }
  .ticks { text-align: left; margin-left: auto; margin-right: auto; }
  .chapter-shot { display: block; margin: 44px auto 0; }
  .chapter-shot .phone { --w: min(300px, 72vw); margin: 0 auto; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links .hide-sm { display: none; }
  .fan .side { display: none; }
  .cards, .help { grid-template-columns: minmax(0, 1fr); }
  .card, .help .card { padding: 26px; border-radius: 24px; }
  .cta-box { border-radius: 30px; }
  .hero .btn, .shared .btn { width: 100%; max-width: 340px; }
}

@media (max-width: 440px) {
  .nav-links a:not(.btn) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
