/* squaremobileapp.app — Apple-style system. Plain CSS, no framework. */
:root {
  --white: #ffffff;
  --gray: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: #d2d2d7;
  --blue: #0171ea;
  --blue-hover: #0077ed;
  --black: #000000;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1080px;
  --nav-h: 52px;
}

/* ---------- Light and dark themes ----------
   Light is the default. Dark applies when the system prefers dark (unless the visitor chose light),
   or when the visitor chose dark with the nav toggle (data-theme on <html>, saved in localStorage). */
:root {
  color-scheme: light;
  --card: #ffffff;
  --btn: #0171ea;
  --btn-hover: #0077ed;
  --body-text: #333336;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --nav-line: rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.12);
  --chip-warm: #fff4e5;
  --chip-cold: #eef0f3;
  --logo-filter: none;
  --note-bg: rgba(255, 255, 255, 0.72);
  --note-ink: #1d1d1f;
  --note-ink-2: #6e6e73;
  --note-app: #1d1d1f;
  --bezel: #1d1d1f;
  --thumb-bg: linear-gradient(180deg, #eef4ff, #f5f5f7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --white: #000000; --gray: #161617; --card: #1d1d1f; --ink: #f5f5f7; --ink-2: #a1a1a6; --line: #38383a;
    --blue: #2997ff; --blue-hover: #47a5ff; --body-text: #d2d2d7;
    --nav-bg: rgba(22, 22, 23, 0.72); --nav-line: rgba(255, 255, 255, 0.1);
    --glass: rgba(29, 29, 31, 0.82); --glass-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.6);
    --chip-warm: #3a2a12; --chip-cold: #232325; --logo-filter: brightness(0) invert(1);
    --note-bg: rgba(40, 40, 44, 0.72); --note-ink: #f5f5f7; --note-ink-2: #a1a1a6; --note-app: #3a3a3c;
    --bezel: #2c2c2e; --thumb-bg: linear-gradient(180deg, #1b2433, #161617);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --white: #000000; --gray: #161617; --card: #1d1d1f; --ink: #f5f5f7; --ink-2: #a1a1a6; --line: #38383a;
  --blue: #2997ff; --blue-hover: #47a5ff; --body-text: #d2d2d7;
  --nav-bg: rgba(22, 22, 23, 0.72); --nav-line: rgba(255, 255, 255, 0.1);
  --glass: rgba(29, 29, 31, 0.82); --glass-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.6);
  --chip-warm: #3a2a12; --chip-cold: #232325; --logo-filter: brightness(0) invert(1);
  --note-bg: rgba(40, 40, 44, 0.72); --note-ink: #f5f5f7; --note-ink-2: #a1a1a6; --note-app: #3a3a3c;
  --bezel: #2c2c2e; --thumb-bg: linear-gradient(180deg, #1b2433, #161617);
}
body { transition: background-color .3s ease, color .3s ease; }
.nav-logo img { filter: var(--logo-filter); }



*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 44px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav: frosted glass ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--nav-line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 13px; letter-spacing: -0.01em; }
.nav-links a { color: var(--ink); opacity: 0.85; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-links .pill { opacity: 1; }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--btn);
  color: #fff !important;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}
.pill:hover { background: var(--btn-hover); text-decoration: none; }
.pill-lg { padding: 12px 24px; font-size: 17px; }
.link-more { font-size: 19px; }
.link-more::after { content: " ›"; }
.actions { display: flex; justify-content: center; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Type ---------- */
.headline {
  font-size: clamp(44px, 7.4vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0;
}
.title {
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0;
}
.sub {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.33;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 34em;
  margin: 18px auto 0;
}
.center { text-align: center; }

/* ---------- Hero: phones grow as you scroll ---------- */
.hero { padding: 96px 0 0; text-align: center; overflow: hidden; }
.hero-media {
  --p: 0;
  margin: 64px auto 0;
  width: min(1171px, 100% - 24px);
  transform-origin: 50% 0;
  transform: scale(calc(0.86 + 0.14 * var(--p))) translateY(calc((1 - var(--p)) * 40px));
  will-change: transform;
}
.hero-media img { width: 100%; }

/* ---------- Brands ---------- */
.brands { padding: 72px 0 96px; border-bottom: 1px solid var(--line); }
.brands p { text-align: center; color: var(--ink-2); font-size: 14px; margin: 0 0 28px; }
.brand-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px 32px; }
.brand-row img { width: 56px; height: 56px; object-fit: contain; filter: grayscale(1); opacity: 0.75; transition: filter .3s, opacity .3s; }
.brand-row a:hover img, .brand-row img:hover { filter: none; opacity: 1; }

/* ---------- Tour: sticky image, scrolling text ---------- */
.tour { padding: 140px 0 60px; background: var(--white); }
.tour-head { margin-bottom: 72px; }
.tour-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.tour-steps .step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.28; transition: opacity .45s ease; }
.tour-steps .step.is-active { opacity: 1; }
.step h3 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -0.028em; margin: 0 0 14px; }
.step p { color: var(--ink-2); font-size: 19px; line-height: 1.42; margin: 0; max-width: 28em; }
.step p strong { color: var(--ink); font-weight: 600; }
.step .step-img { display: none; }
.tour-stage {
  position: sticky;
  top: calc(var(--nav-h) + 6vh);
  height: 80vh;
  display: grid; place-items: center;
}
.tour-stage img {
  grid-area: 1 / 1;
  max-height: 72vh; width: auto;
  opacity: 0; transform: scale(0.96);
  transition: opacity .6s ease, transform .6s ease;
}
.tour-stage img.is-active { opacity: 1; transform: none; }
.tour-progress { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.tour-progress span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .3s, width .3s; }
.tour-progress span.is-active { background: var(--ink); width: 22px; border-radius: 4px; }

@media (max-width: 860px) {
  .tour-grid { grid-template-columns: 1fr; }
  .tour-stage { display: none; }
  .tour-steps .step { min-height: 0; opacity: 1; padding: 36px 0; }
  .step .step-img { display: block; margin: 0 auto 28px; max-height: 420px; width: auto; }
}

/* ---------- Punch card: stamps fill with scroll (signature moment) ---------- */
.punch { background: var(--black); color: #f5f5f7; height: 260vh; position: relative; }
.punch-pin {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 22px;
}
.punch .title { color: #f5f5f7; max-width: 14em; }
.punch .sub { color: #a1a1a6; }
.card {
  --p: 0;
  margin-top: 56px;
  width: min(620px, 100%);
  padding: 28px 28px 24px;
  border-radius: 28px;
  background: linear-gradient(145deg, #1c1c1e 0%, #2c2c2e 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px rgba(1, 113, 234, calc(var(--p) * 0.35));
  text-align: left;
}
.card-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
.card-name { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.card-count { font-size: 15px; color: #a1a1a6; font-variant-numeric: tabular-nums; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed #48484a;
  display: grid; place-items: center;
  transition: background .35s ease, border-color .35s ease, transform .35s cubic-bezier(.2, 1.6, .4, 1);
}
.stamp svg { width: 46%; height: 46%; opacity: 0; transform: scale(0.4); transition: opacity .3s, transform .35s cubic-bezier(.2, 1.6, .4, 1); }
.stamp.is-on { background: var(--blue); border: 2px solid var(--blue); }
.stamp.is-on svg { opacity: 1; transform: none; }
.stamp.is-goal { border-color: #f5f5f7; }
.stamp.is-goal.is-on { background: #f5f5f7; border-color: #f5f5f7; }
.stamp.is-goal.is-on svg { color: var(--black); }
.card-reward {
  margin-top: 22px; font-size: 17px; color: #a1a1a6; min-height: 1.5em;
  transition: color .3s;
}
.card.is-full .card-reward { color: #f5f5f7; }
.punch-notes { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin-top: 44px; font-size: 15px; color: #a1a1a6; max-width: 820px; }
.punch-notes span { max-width: 15em; }
@media (max-height: 720px) { .punch .sub { display: none; } .card { margin-top: 28px; } .punch-notes { display: none; } }

/* ---------- Results ---------- */
.results { padding: 140px 0; background: var(--gray); }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 72px; }
.result .num { font-size: clamp(48px, 6vw, 72px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--ink); }
.result p { color: var(--ink-2); margin: 12px 0 0; font-size: 17px; }
.result p strong { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .results-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Engage (CEP) ---------- */
.engage { padding: 140px 0; }
.engage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; margin-top: 80px; }
.channels { list-style: none; margin: 0; padding: 0; }
.channels li { padding: 28px 0; border-top: 1px solid var(--line); }
.channels li:last-child { border-bottom: 1px solid var(--line); }
.channels h3 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 6px; }
.channels p { color: var(--ink-2); margin: 0; font-size: 17px; max-width: 30em; }
.ch-price { float: right; margin-left: 16px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.channels li:first-child .ch-price { color: var(--blue); }

.lockscreen {
  position: relative; display: flex; flex-direction: column; width: min(100%, 380px); aspect-ratio: 9 / 16; margin: 0 auto; padding: 40px 14px 34px;
  border-radius: 48px; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 70% at 20% 10%, rgba(120, 180, 255, 0.55), transparent 60%),
    radial-gradient(90% 60% at 90% 90%, rgba(255, 170, 120, 0.45), transparent 60%),
    linear-gradient(160deg, #0b3a7a, #0171ea 55%, #3a2f6b);
  box-shadow: 0 0 0 10px var(--bezel), 0 40px 80px -30px rgba(1, 50, 120, 0.55);
}
.ls-clock { display: flex; flex-direction: column; align-items: center; margin-bottom: auto; }
.lockscreen::after { content: ""; position: absolute; left: 50%; bottom: 10px; width: 120px; height: 5px; margin-left: -60px; border-radius: 3px; background: rgba(255, 255, 255, 0.8); }
.ls-date { font-size: 15px; font-weight: 500; opacity: 0.85; }
.ls-time { font-size: 80px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.note {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: start;
  padding: 12px 14px; margin-bottom: 8px; border-radius: 22px; color: var(--note-ink);
  background: var(--note-bg); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  transform: translateY(-24px) scale(0.96); opacity: 0;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .7s ease;
  transition-delay: calc(var(--i) * 0.45s + 0.2s);
}
.lockscreen.is-in .note { transform: none; opacity: 1; }
.note-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.note-icon svg { width: 20px; height: 20px; }
.note-app { background: var(--note-app); }
.note-mail { background: #0171ea; }
.note-sms { background: #34c759; }
.note-body { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; min-width: 0; }
.note-body b { font-weight: 600; }
.note-when { font-size: 12px; color: var(--note-ink-2); }

.segments { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 96px auto 0; max-width: 760px; padding: 0; }
.segments li { list-style: none; padding: 10px 18px; border-radius: 980px; background: var(--gray); font-size: 15px; color: var(--ink); cursor: default; }
.segments li.warm { background: var(--chip-warm); }
.segments li.cold { background: var(--chip-cold); color: var(--ink-2); }
.engage-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 64px; }
.engage-cols h3 { font-size: 21px; letter-spacing: -0.02em; margin: 0 0 8px; }
.engage-cols p { color: var(--ink-2); margin: 0; }
@media (max-width: 860px) {
  .engage-grid { grid-template-columns: 1fr; gap: 56px; }
  .lockscreen { width: min(100%, 320px); }
  .ls-time { font-size: 64px; }
}
@media (max-width: 760px) { .engage-cols { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .note { transform: none; opacity: 1; transition: none; } }

/* ---------- Blog teaser ---------- */
.latest { padding: 120px 0; background: var(--gray); }
.latest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 56px; }
.post-card { display: block; padding: 32px; border-radius: 22px; background: var(--card); color: var(--ink); transition: transform .3s ease; }
.post-card:hover { text-decoration: none; transform: scale(1.015); }
.post-card time { font-size: 13px; color: var(--ink-2); }
.post-card h3 { font-size: 24px; line-height: 1.17; letter-spacing: -0.02em; margin: 8px 0 10px; }
.post-card p { color: var(--ink-2); margin: 0 0 14px; font-size: 16px; }
.post-card .link-more { font-size: 17px; color: var(--blue); }

/* ---------- Final CTA ---------- */
.final { padding: 160px 0; text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--gray); color: var(--ink-2); font-size: 12px; padding: 32px 0 40px; border-top: 1px solid var(--line); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer a { color: var(--ink); opacity: 0.8; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ---------- Reduced motion: no scrubbing, no pinning ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-media { transform: none; }
  .punch { height: auto; padding: 120px 0; }
  .punch-pin { position: static; height: auto; }
  .tour-steps .step { opacity: 1; }
  * { transition: none !important; }
}

/* Small screens: keep the pinned punch card inside one screen */
@media (max-width: 640px) { .punch-notes { display: none; } }

/* Blog thumbnails and covers */
.post-thumb { display: grid; place-items: center; margin: -32px -32px 24px; aspect-ratio: 16 / 9; border-radius: 22px 22px 0 0; overflow: hidden; background: var(--thumb-bg); }
.post-thumb img { height: 88%; width: auto; max-width: 90%; object-fit: contain; margin-top: 12%; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.post-card:hover .post-thumb img { transform: translateY(-6px); }
.blog-cover { margin: 40px 0 8px; border-radius: 28px; overflow: hidden; background: var(--thumb-bg); display: grid; place-items: center; aspect-ratio: 16 / 9; }
.blog-cover img { height: 92%; width: auto; max-width: 92%; object-fit: contain; margin-top: 8%; }

/* FAQ */
.faq { padding: 120px 0; }
.faq-list { max-width: 820px; margin: 56px auto 0; border-top: 1px solid var(--line); }
.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: 24px; padding: 24px 0; font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s ease; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { margin: -8px 0 24px; color: var(--ink-2); font-size: 17px; line-height: 1.55; max-width: 44em; }
@media (max-width: 640px) { .faq summary { font-size: 18px; } }

/* Scroll-driven motion (driven by js/scroll.js; --r, --h and --d default to the resting state) */
.sr {
  opacity: calc(0.08 + 0.92 * var(--r, 1));
  transform: translate3d(0, calc((1 - var(--r, 1)) * 56px), 0) scale(calc(0.96 + 0.04 * var(--r, 1)));
  will-change: transform, opacity;
}
.hero .wrap {
  opacity: calc(1 - 0.85 * var(--h, 0));
  transform: translate3d(0, calc(var(--h, 0) * -48px), 0) scale(calc(1 - 0.04 * var(--h, 0)));
}
.brand-row { transform: translate3d(calc((0.5 - var(--d, 0.5)) * 80px), 0, 0); }
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 2px;
  background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}
.result .num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .sr, .hero .wrap, .brand-row { opacity: 1; transform: none; }
}

/* Cookie consent banner (js/consent.js) */
.consent {
  position: fixed; z-index: 1100; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: min(680px, calc(100% - 24px)); display: flex; align-items: center; gap: 20px;
  padding: 18px 20px; border-radius: 20px; color: var(--ink);
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--glass-shadow);
}
.consent[hidden] { display: none; }
.consent-text { margin: 0; flex: 1; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.consent-text strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.consent-actions { display: flex; gap: 10px; flex: none; }
.consent-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; min-width: 96px; padding: 10px 18px;
  border-radius: 980px; font: inherit; font-size: 15px; letter-spacing: -0.01em;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.consent-btn:hover { border-color: var(--ink-2); }
.consent-accept { background: var(--btn); border-color: var(--btn); color: #fff; }
.consent-accept:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.consent-open #footer-banner { display: none; }
@media (max-width: 640px) {
  .consent { flex-direction: column; align-items: stretch; bottom: 12px; gap: 14px; }
  .consent-btn { flex: 1; }
}
.footer button.link-btn { appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--ink); opacity: 0.8; cursor: pointer; }
.footer button.link-btn:hover { opacity: 1; text-decoration: underline; }
