/* JellyBolt: Screw Puzzle - Gummy Candy Workshop theme (mobile first) */

:root {
  --cream: #FFF5F0;
  --white: #FFFFFF;
  --peach: #FFE0D6;
  --mint: #A8E6CF;
  --mint-soft: #DDF5EA;
  --mint-deep: #1F7356;
  --coral: #C93A54;
  --coral-lip: #8E2340;
  --coral-light: #FF8FA3;
  --ink: #3B1E2A;
  --ink-soft: #6B4352;
  --band: #8E2340;
  --band-text: #FFF5F0;
  --band-soft: #FFD3DC;
  --footer: #2A1520;
  --footer-text: #F7E6EC;
  --footer-soft: #D9BCC7;
  --disabled-bg: #2A2A2A;
  --disabled-text: #E8E8E8;
  --font-display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 28px;
  --radius-md: 20px;
  --header-h: 56px;
  --squish: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cream);
  /* faint hole grid, like a peg board */
  background-image: radial-gradient(circle, rgba(201, 58, 84, .09) 3px, transparent 3.5px);
  background-size: 36px 36px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: 2.125rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--mint-deep); outline-offset: 3px; }
.eyebrow { font-family: var(--font-display); font-weight: 800; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-deep); margin-bottom: .5em; }
.section-lead { color: var(--ink-soft); max-width: 36em; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 245, 240, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--peach);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand-icon { width: 36px; height: 36px; border-radius: 10px; }
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; }
.site-nav { display: none; }
.header-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--coral); color: var(--white); text-decoration: none;
  box-shadow: 0 4px 0 var(--coral-lip);
  transition: transform .2s var(--squish), box-shadow .2s;
}
.header-cta:active { transform: translateY(3px) scaleX(1.05); box-shadow: 0 1px 0 var(--coral-lip); }
.header-cta-glyph { width: 22px; height: 22px; }
.header-cta-text { display: none; }

/* Hero */
.hero { padding: calc(var(--header-h) + env(safe-area-inset-top) + 32px) 0 56px; }
.hero-inner { display: flex; flex-direction: column; gap: 36px; }
.hero-copy { text-align: center; }
.hero-icon { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 24px; box-shadow: 0 8px 0 var(--peach), 0 14px 28px rgba(142, 35, 64, .18); }
.hero-lead { font-size: 1.0625rem; color: var(--ink-soft); max-width: 32em; margin: 0 auto 1.5em; }

/* Jelly board around the banner */
.jelly-board {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--mint) 0%, var(--mint-soft) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -6px 0 rgba(31, 115, 86, .18), 0 10px 0 #7FCDB1, 0 22px 40px rgba(31, 115, 86, .22);
}
.hero-banner { width: 100%; border-radius: var(--radius-md); box-shadow: 0 4px 0 rgba(31, 115, 86, .25); }

/* CSS bolt heads with a screw slot */
.bolt, .feature-bolt {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFC2CE 0 20%, var(--coral-light) 45%, var(--coral) 100%);
  box-shadow: 0 2px 0 var(--coral-lip);
}
.bolt::after, .feature-bolt::after {
  content: ""; position: absolute; left: 22%; right: 22%; top: 50%; height: 3px; margin-top: -1.5px;
  border-radius: 2px; background: var(--coral-lip); transform: rotate(-35deg);
}
.bolt--tl { top: 6px; left: 6px; }
.bolt--tr { top: 6px; right: 6px; }
.bolt--bl { bottom: 6px; left: 6px; }
.bolt--br { bottom: 6px; right: 6px; }

/* Store buttons: squishy jelly pills */
.store-buttons { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.store-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 10px 26px;
  border: 0; border-radius: 999px;
  font: inherit; text-decoration: none; text-align: left;
  transition: transform .22s var(--squish), box-shadow .22s;
}
.store-btn::before {
  /* glossy jelly highlight */
  content: ""; position: absolute; top: 6px; left: 18%; right: 18%; height: 30%;
  border-radius: 999px; background: rgba(255, 255, 255, .28); pointer-events: none;
}
.store-glyph { width: 26px; height: 26px; flex: none; }
.store-label { display: flex; flex-direction: column; line-height: 1.15; }
.store-label small { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.store-label strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; }
.store-btn--play { background: var(--coral); color: var(--white); box-shadow: 0 6px 0 var(--coral-lip), 0 12px 22px rgba(142, 35, 64, .25); }
.store-btn--play:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--coral-lip), 0 16px 26px rgba(142, 35, 64, .28); }
.store-btn--play:active { transform: translateY(5px) scale(1.03, .95); box-shadow: 0 1px 0 var(--coral-lip), 0 4px 10px rgba(142, 35, 64, .2); }
.store-btn--light { background: var(--cream); color: var(--ink); box-shadow: 0 6px 0 var(--band-soft), 0 12px 22px rgba(0, 0, 0, .2); }
.store-btn--light::before { background: rgba(255, 255, 255, .6); }
.store-btn--light:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--band-soft), 0 16px 26px rgba(0, 0, 0, .22); }
.store-btn--light:active { transform: translateY(5px) scale(1.03, .95); box-shadow: 0 1px 0 var(--band-soft); }

/* App Store placeholder: disabled, neutral gray, never brand colored */
.store-btn--soon {
  background: var(--disabled-bg); color: var(--disabled-text);
  opacity: .55; filter: grayscale(.6); cursor: not-allowed;
  box-shadow: 0 4px 0 #111111;
}
.store-btn--soon::before { background: rgba(255, 255, 255, .08); }
.soon-tag {
  position: absolute; top: -8px; right: 14px;
  padding: 2px 10px; border-radius: 999px;
  background: #E8E8E8; color: #2A2A2A;
  font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}

/* Features */
.features { padding: 64px 0; }
.feature-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 18px; }
.feature-card {
  position: relative;
  padding: 26px 22px 22px 70px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: inset 0 -5px 0 var(--peach), 0 6px 18px rgba(142, 35, 64, .08);
  transition: transform .25s var(--squish);
}
.feature-card:hover { transform: translateY(-3px) rotate(-.4deg); }
.feature-card:active { transform: scale(.98, .96); }
.feature-card p { color: var(--ink-soft); margin: 0; }
.feature-card h3 { margin-bottom: .35em; }
.feature-bolt { top: 26px; left: 22px; width: 32px; height: 32px; }
.feature-bolt::after { height: 4px; margin-top: -2px; }
.feature-bolt--mint { background: radial-gradient(circle at 35% 30%, #F0FFF8 0 20%, var(--mint) 50%, #4FB58E 100%); box-shadow: 0 3px 0 var(--mint-deep); }
.feature-bolt--mint::after { background: var(--mint-deep); }
.feature-bolt--peach { background: radial-gradient(circle at 35% 30%, #FFFFFF 0 20%, #FFC8B5 50%, #F49A7E 100%); box-shadow: 0 3px 0 #B5583D; }
.feature-bolt--peach::after { background: #B5583D; }

/* Download band */
.download {
  padding: 64px 0;
  background: var(--band);
  background-image: radial-gradient(circle, rgba(255, 255, 255, .07) 3px, transparent 3.5px), linear-gradient(160deg, #A12B4B 0%, var(--band) 60%, #75193A 100%);
  background-size: 36px 36px, 100% 100%;
  color: var(--band-text);
  text-align: center;
}
.download-inner { max-width: 720px; }
.download-icon { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 26px; box-shadow: 0 8px 0 rgba(0, 0, 0, .2); }
.download p { color: var(--band-soft); font-size: 1.0625rem; margin-bottom: 1.75em; }

/* About */
.about { padding: 64px 0 72px; }
.about-card {
  max-width: 760px; margin: 0 auto; padding: 32px 24px;
  border-radius: var(--radius-lg);
  background: var(--mint-soft);
  box-shadow: inset 0 -6px 0 rgba(31, 115, 86, .14);
}
.about-card p { color: var(--ink); }
.about-contact { margin: 1.5em 0 0; font-weight: 600; }
.about-contact a { color: var(--mint-deep); font-weight: 800; word-break: break-all; display: inline-block; padding: 10px 0; }

/* Footer */
.site-footer { background: var(--footer); color: var(--footer-text); padding: 40px 0 calc(110px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 900; font-size: 1.125rem; }
.footer-brand img { width: 40px; height: 40px; border-radius: 12px; }
.footer-mail, .footer-legal a { color: var(--footer-soft); display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.footer-mail:hover, .footer-legal a:hover, .footer-mail:active, .footer-legal a:active { color: var(--white); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.copyright { color: var(--footer-soft); font-size: .875rem; margin: 0; }

/* Mobile sticky download bar */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 22px;
  background: var(--white);
  box-shadow: 0 6px 0 var(--peach), 0 14px 30px rgba(59, 30, 42, .22);
  transform: translateY(160%);
  transition: transform .45s var(--squish);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta img { width: 40px; height: 40px; border-radius: 11px; }
.sticky-cta-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sticky-cta-text strong { font-family: var(--font-display); font-weight: 900; }
.sticky-cta-text small { color: var(--ink-soft); font-size: .875rem; }
.sticky-cta-btn {
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  display: inline-flex; align-items: center;
  background: var(--coral); color: var(--white); font-weight: 800; text-decoration: none;
  box-shadow: 0 4px 0 var(--coral-lip);
  transition: transform .2s var(--squish), box-shadow .2s;
}
.sticky-cta-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--coral-lip); }

/* Motion: jelly wobble on the icon + squishy reveal (JS adds .js) */
@keyframes jelly-wobble {
  0%, 100% { transform: scale(1, 1); }
  30% { transform: scale(1.08, .92); }
  50% { transform: scale(.95, 1.05); }
  70% { transform: scale(1.03, .97); }
}
@keyframes bolt-twist { from { transform: rotate(-35deg); } to { transform: rotate(145deg); } }
.hero-icon { animation: jelly-wobble 3.6s ease-in-out 1s infinite; }
.jelly-board:hover .bolt::after { animation: bolt-twist .6s var(--squish) forwards; }
.js .reveal { opacity: 0; transform: translateY(24px) scale(.96, 1.04); transition: opacity .5s ease, transform .6s var(--squish); }
.js .reveal.is-in { opacity: 1; transform: none; }

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

/* Tablet */
@media (min-width: 768px) {
  :root { --header-h: 64px; }
  h1 { font-size: 3rem; }
  h2 { font-size: 2.375rem; }
  .container { padding: 0 32px; }
  .site-nav { display: flex; gap: 4px; margin-left: auto; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--ink); font-weight: 700; text-decoration: none; }
  .site-nav a:hover, .site-nav a:active { background: var(--peach); }
  .header-cta { width: auto; height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 800; }
  .header-cta-text { display: inline; }
  .store-buttons { flex-direction: row; flex-wrap: wrap; }
  .store-buttons--center { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .about-card { padding: 44px 48px; }
  .site-footer { padding-bottom: 40px; }
  .sticky-cta { display: none; }
}

/* Desktop: board left, copy right */
@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
  .hero { padding-top: calc(var(--header-h) + 64px); padding-bottom: 88px; }
  .hero-inner { flex-direction: row-reverse; align-items: center; gap: 56px; }
  .hero-copy { flex: 1 1 44%; text-align: left; }
  .hero-icon, .hero-lead { margin-left: 0; }
  .hero-board { flex: 1 1 56%; }
  .jelly-board { transform: rotate(-1.5deg); padding: 28px; }
  .bolt { width: 22px; height: 22px; }
  .features, .download { padding: 96px 0; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .footer-inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; text-align: left; }
  .copyright { width: 100%; text-align: center; }
}
