/* RubberPop Screw Puzzle — Ceramic Pop Calm, mobile-first */
:root {
  --ivory: #f7f3e8;
  --ivory-deep: #ece5d2;
  --sage: #9db497;
  --sage-soft: #dfe8da;
  --sage-deep: #3f5e45;
  --sage-dark: #26392a;
  --ink: #22302a;
  --ink-soft: #4b5850;
  --coral: #e5735a;
  --coral-soft: #f8ddd3;
  --mustard: #e8b64c;
  --mustard-soft: #f7ead0;
  --cobalt: #4a6fd1;
  --cobalt-soft: #dde4f6;
  --line: #c9c0a8;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, Roboto, sans-serif;
  --radius: 22px;
  --header-h: 48px;
  --raise: 0 6px 0 var(--ivory-deep), 0 14px 28px rgba(38, 57, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.6 var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-deep); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 8.5vw, 2.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 6.5vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

.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(--ivory); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 8px; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-deep); margin-bottom: 0.6em; }
.section-lead { color: var(--ink-soft); max-width: 40em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 232, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-inner { height: var(--header-h); 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: 32px; height: 32px; border-radius: 9px; border: 1.5px solid var(--sage-deep); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.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(--sage-deep); color: var(--ivory); text-decoration: none; font-weight: 600;
  box-shadow: inset 0 0 0 3px var(--sage-deep), inset 0 0 0 4.5px rgba(247, 243, 232, 0.6);
  transition: background 0.2s, transform 0.15s;
}
.header-cta:hover, .header-cta:active { background: var(--sage-dark); }
.header-cta:active { transform: scale(0.95); }
.header-cta-icon { width: 22px; height: 22px; }
.header-cta-text { display: none; }

/* Hero */
.hero { padding: 32px 0 56px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; }
.hero-lead { font-size: 1.1rem; color: var(--ink); }
.hero-note { font-family: var(--font-display); font-style: italic; color: var(--ink-soft); }
.hero-visual { position: relative; isolation: isolate; padding: 0 6px 26px; }
.glaze-tile {
  position: relative; overflow: hidden;
  background: var(--sage-soft); border: 2px solid var(--sage-deep); border-radius: var(--radius);
  padding: 10px; box-shadow: var(--raise);
}
.glaze-tile::after { /* ceramic glaze sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 45%, transparent 60%);
}
.hero-banner { width: 100%; border-radius: calc(var(--radius) - 10px); border: 1.5px solid var(--sage-deep); }
.hero-badge {
  position: absolute; right: -2px; bottom: 0; width: 84px; height: 84px; z-index: 2;
  border-radius: 22px; border: 3px solid var(--ivory); box-shadow: 0 0 0 2px var(--sage-deep), 0 10px 20px rgba(38, 57, 42, 0.18);
}
.block { position: absolute; z-index: -1; }
.block--circle { width: 72px; height: 72px; border-radius: 50%; background: var(--mustard); top: -22px; left: -10px; }
.block--square { width: 54px; height: 54px; background: var(--coral); bottom: 4px; left: 18%; transform: rotate(12deg); border-radius: 8px; }

/* Store buttons: double-outline glazed tiles */
.store-buttons { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.store-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 10px 22px; border-radius: 16px; border: 0;
  font: inherit; text-decoration: none; text-align: left;
  background: var(--sage-deep); color: var(--ivory);
  box-shadow: inset 0 0 0 4px var(--sage-deep), inset 0 0 0 5.5px rgba(247, 243, 232, 0.7), 0 5px 0 var(--sage-dark);
  transition: transform 0.12s, box-shadow 0.12s, background 0.2s;
  overflow: hidden;
}
.store-btn--play::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transition: transform 0.6s ease;
}
.store-btn--play:hover::after, .store-btn--play:active::after { transform: translateX(120%); }
.store-btn--play:hover { background: #46694d; }
.store-btn--play:active { transform: translateY(4px); box-shadow: inset 0 0 0 4px var(--sage-deep), inset 0 0 0 5.5px rgba(247, 243, 232, 0.7), 0 1px 0 var(--sage-dark); }
.store-btn-icon { width: 26px; height: 26px; flex: none; }
.store-btn-text { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn-text small { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.store-btn-text strong { font-size: 1.2rem; font-weight: 700; }
.store-btn--light { background: var(--ivory); color: var(--sage-dark); box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5.5px var(--sage-deep), 0 5px 0 var(--sage-dark); }
.store-btn--light:hover { background: #fffdf6; }
.store-btn--light:active { box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5.5px var(--sage-deep), 0 1px 0 var(--sage-dark); }
.store-btn--soon {
  background: #2a2a2a; color: #ffffff;
  box-shadow: inset 0 0 0 4px #2a2a2a, inset 0 0 0 5.5px rgba(255, 255, 255, 0.5);
  opacity: 0.55; filter: grayscale(0.6); cursor: not-allowed;
}
.soon-tag {
  position: absolute; top: 6px; right: 8px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: #ffffff; color: #2a2a2a; padding: 2px 7px; border-radius: 999px;
}

/* Features */
.features { padding: 64px 0; background: var(--ivory-deep); border-block: 1.5px solid var(--line); }
.tile-grid { display: grid; gap: 18px; margin-top: 32px; }
.tile {
  position: relative; overflow: hidden; padding: 26px 22px 22px; border-radius: var(--radius);
  border: 2px solid var(--sage-deep); background: var(--ivory);
  box-shadow: inset 0 0 0 5px var(--ivory), inset 0 0 0 6.5px var(--line), 0 5px 0 var(--line);
}
.tile p { color: var(--ink-soft); margin: 0; }
.tile h3 { padding-right: 52px; }
.tile--sage { background: var(--sage-soft); box-shadow: inset 0 0 0 5px var(--sage-soft), inset 0 0 0 6.5px var(--sage), 0 5px 0 var(--line); }
.tile--coral { background: var(--coral-soft); box-shadow: inset 0 0 0 5px var(--coral-soft), inset 0 0 0 6.5px #e9b2a3, 0 5px 0 var(--line); }
.tile--mustard { background: var(--mustard-soft); box-shadow: inset 0 0 0 5px var(--mustard-soft), inset 0 0 0 6.5px #e3cb93, 0 5px 0 var(--line); }
.tile--cobalt { background: var(--cobalt-soft); box-shadow: inset 0 0 0 5px var(--cobalt-soft), inset 0 0 0 6.5px #afbfe8, 0 5px 0 var(--line); }
.tile-mark { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border: 2px solid var(--ink); }
.tile-mark--circle { border-radius: 50%; background: var(--mustard); }
.tile-mark--triangle { border: 0; width: 44px; background: var(--cobalt); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tile-mark--quarter { border-radius: 0 0 0 100%; background: var(--coral); }
.tile-mark--square { border-radius: 8px; background: var(--sage); transform: rotate(14deg); }
.tile-mark--pill { width: 52px; height: 26px; border-radius: 999px; background: var(--cobalt); }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 14px; counter-reset: none; }
.step { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; align-items: start; padding: 16px; border-radius: 18px; background: var(--ivory); border: 1.5px dashed var(--sage-deep); }
.step h3 { margin: 4px 0 2px; }
.step p { grid-column: 2; margin: 0; color: var(--ink-soft); }
.step-num { grid-row: span 2; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--sage-deep); color: var(--ivory); font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; box-shadow: inset 0 0 0 3px var(--sage-deep), inset 0 0 0 4.5px rgba(247, 243, 232, 0.6); }

/* Download CTA */
.download { padding: 72px 0; background: var(--sage-deep); color: var(--ivory); text-align: center; position: relative; overflow: hidden; }
.download::before, .download::after { content: ""; position: absolute; border-radius: 50%; opacity: 0.9; }
.download::before { width: 180px; height: 180px; background: var(--mustard); top: -90px; left: -60px; }
.download::after { width: 120px; height: 120px; background: var(--coral); bottom: -60px; right: -30px; border-radius: 18px; transform: rotate(18deg); }
.download-inner { position: relative; z-index: 1; }
.download h2 { color: var(--ivory); max-width: 16em; margin-inline: auto; }
.download p { color: #e6eee2; max-width: 32em; margin-inline: auto; }
.download-icon { width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 22px; border: 3px solid var(--ivory); }
.store-buttons--center .store-btn { width: 100%; }

/* About */
.about { padding: 64px 0; }
.about-inner { display: grid; gap: 28px; }
.about-copy p { color: var(--ink-soft); }
.contact-card { padding: 24px 22px; border-radius: var(--radius); background: var(--sage-soft); border: 2px solid var(--sage-deep); box-shadow: var(--raise); align-self: start; }
.contact-card p { color: var(--ink-soft); }
.contact-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; word-break: break-all; }
.contact-link:hover, .contact-link:active { color: var(--sage-dark); }

/* Footer */
.site-footer { padding: 36px 0 28px; border-top: 1.5px solid var(--line); background: var(--ivory-deep); font-size: 0.95rem; }
.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 11px; border: 1.5px solid var(--sage-deep); }
.footer-brand div { display: flex; flex-direction: column; }
.footer-brand a { word-break: break-all; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-legal a:hover, .footer-legal a:active, .footer-brand a:hover, .footer-brand a:active { color: var(--sage-dark); }
.copyright { margin: 0; color: var(--ink-soft); }

/* Mobile sticky CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--ivory); border-top: 2px solid var(--sage-deep);
  box-shadow: 0 -8px 24px rgba(38, 57, 42, 0.12);
  transform: translateY(110%); transition: transform 0.3s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta img { width: 40px; height: 40px; border-radius: 11px; }
.sticky-cta-text { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.sticky-cta-text small { font-size: 0.8rem; color: var(--ink-soft); }
.sticky-cta-btn { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 12px; background: var(--sage-deep); color: var(--ivory); font-weight: 700; font-size: 0.9rem; text-decoration: none; white-space: nowrap; box-shadow: 0 3px 0 var(--sage-dark); }
.sticky-cta-btn:hover, .sticky-cta-btn:active { background: var(--sage-dark); }
.sticky-cta-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sage-dark); }

/* Motion: soft reveal (enabled by JS only) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Tablet */
@media (min-width: 768px) {
  :root { --header-h: 64px; }
  body { padding-bottom: 0; }
  .sticky-cta { display: none; }
  .container { padding: 0 32px; }
  h1 { font-size: 3rem; }
  h2 { font-size: 2.4rem; }
  .site-nav { display: flex; gap: 8px; margin-left: auto; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 10px; }
  .site-nav a:hover, .site-nav a:active { background: var(--sage-soft); }
  .header-cta { width: auto; height: 44px; padding: 0 20px; border-radius: 12px; }
  .header-cta-icon { display: none; }
  .header-cta-text { display: inline; }
  .store-buttons { flex-direction: row; flex-wrap: wrap; }
  .store-btn { min-width: 210px; }
  .store-buttons--center { justify-content: center; }
  .store-buttons--center .store-btn { width: auto; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .tile--wide { grid-column: span 2; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { grid-template-columns: 1fr; }
  .step-num { grid-row: auto; margin-bottom: 8px; }
  .step p { grid-column: auto; }
  .hero-badge { width: 112px; height: 112px; border-radius: 28px; }
}

/* Desktop: banner tile left, copy right */
@media (min-width: 1024px) {
  .hero { padding: 72px 0 96px; }
  .hero-grid { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 64px; }
  .hero-visual { order: -1; }
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
  .tile--wide { grid-column: span 2; }
  .about-inner { grid-template-columns: 1.5fr 1fr; gap: 56px; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .copyright { grid-column: 1 / -1; }
}
