/* Product pages: app-native, premium.
   Mirrors the apps themselves: system UI type (SF Pro on Apple devices), soft white
   canvas, generous rounded cards, real screens in device frames, pill buttons.
   Each product sets its palette in mymoney.css / snaptidy.css. */

.p-product {
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, var(--font-cjk);
  --r-xl: 34px;
  --r-lg: 26px;
  --r-md: 18px;
  --shadow-card: 0 1px 2px rgb(16 24 40 / .04), 0 12px 32px -12px rgb(16 24 40 / .12);
  --shadow-phone: 0 50px 90px -40px rgb(10 30 70 / .45), 0 20px 40px -24px rgb(10 30 70 / .35);
  font-family: var(--font-ui);
  font-feature-settings: "kern";
}
.p-product .monogram, .p-product .footer-mark { font-family: var(--font-latin); }

/* Frosted sticky header, like an iOS navigation bar. */
.p-product .site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); --header-rule: color-mix(in srgb, var(--fg) 10%, transparent); }
.p-product .header-inner { height: 64px; border-bottom: 0; }
.p-product .site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--header-rule); }
.p-product .site-header nav { gap: 28px; font-size: 13.5px; }
.p-product .site-header nav > a { opacity: .78; transition: opacity .2s; }
.p-product .site-header nav > a:hover, .p-product .site-header nav > a[aria-current="page"] { opacity: 1; }
.p-product .site-header nav > a::after { bottom: 8px; height: 1.5px; }
.p-product .lang-link, .p-product .lang-menu > summary { border-left: 0; padding-left: 0; }

/* Type ------------------------------------------------------------------------- */
.p-product h1, .p-product h2, .p-product h3 { font-family: var(--font-ui); }
.pd-h1 { font-size: clamp(38px, 4.7vw, 68px); line-height: 1.12; font-weight: 700; letter-spacing: -.01em; }
:lang(en) .pd-h1, :lang(es) .pd-h1 { font-size: clamp(42px, 5.4vw, 78px); }
:lang(en) .pd-h1, :lang(es) .pd-h1 { letter-spacing: -.035em; line-height: 1.02; }
.pd-h2 { font-size: clamp(30px, 4vw, 54px); line-height: 1.14; font-weight: 700; letter-spacing: -.015em; }
:lang(en) .pd-h2, :lang(es) .pd-h2 { letter-spacing: -.03em; line-height: 1.06; }
.pd-lead { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6; color: var(--fg-2); max-width: 32em; }
:lang(en) .pd-lead, :lang(es) .pd-lead { line-height: 1.5; }
.pd-center { text-align: center; margin-inline: auto; }
.pd-center .pd-lead { margin-inline: auto; }
.pd-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 72px); }
.pd-head .pd-lead { margin-top: 18px; }

/* Buttons ------------------------------------------------------------------------ */
.p-product .btn-store { border-radius: 999px; padding: 14px 22px 14px 24px; min-height: 56px; font-weight: 600; box-shadow: 0 10px 24px -12px rgb(0 0 0 / .45); }
.p-product .btn-store small { font-weight: 500; }
.pd-link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--accent-ui); }
.pd-link svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.pd-link:hover svg { transform: translateX(3px); }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.pd-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--chip-bg); color: var(--chip-fg); }
.pd-chips li svg { width: 14px; height: 14px; flex: none; }

/* Lockup: icon + name, used instead of an eyebrow label. */
.pd-lockup { display: inline-flex; align-items: center; gap: 14px; }
.pd-lockup img { width: 60px; height: 60px; border-radius: 22.5%; box-shadow: 0 10px 24px -10px rgb(10 30 70 / .4); }
.pd-lockup strong { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.pd-lockup span { display: block; font-size: 13px; color: var(--fg-2); margin-top: 2px; }

/* Device frame --------------------------------------------------------------------- */
.phone { position: relative; width: var(--w, 300px); aspect-ratio: 1320 / 2868; padding: calc(var(--w, 300px) * .035); border-radius: calc(var(--w, 300px) * .17); background: linear-gradient(145deg, #2a2d33, #0c0d10 40%, #1b1d22); box-shadow: var(--shadow-phone), inset 0 0 0 1.5px rgb(255 255 255 / .08); flex: none; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--w, 300px) * .137); display: block; background: #f4f6fa; }
.phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); pointer-events: none; }

/* Hero ----------------------------------------------------------------------------- */
.pd-hero { position: relative; overflow: hidden; padding-block: clamp(28px, 4vw, 56px) clamp(40px, 5vw, 72px); }
.pd-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.pd-hero-copy .breadcrumb { margin-bottom: 26px; }
.pd-hero-copy .pd-lockup { margin-bottom: clamp(28px, 4vw, 44px); }
.pd-hero-copy .pd-lead { margin-top: 22px; }
.pd-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 34px; }
.pd-hero-copy .pd-chips { margin-top: 28px; }
.pd-stage { position: relative; height: clamp(560px, 56vw, 780px); }
.pd-stage .phone { position: absolute; }
.pd-stage .phone-a { --w: clamp(250px, 23vw, 330px); left: 50%; top: 50%; transform: translate(-70%, -50%); z-index: 2; }
.pd-stage .phone-b { --w: clamp(210px, 19.5vw, 280px); left: 50%; top: 50%; transform: translate(2%, -43%) rotate(5deg); z-index: 1; }
.pd-glow { position: absolute; top: 8%; right: -6%; width: 62%; height: 90%; background: radial-gradient(closest-side, var(--glow), transparent 70%); z-index: 0; pointer-events: none; }
.pd-hero-grid { position: relative; z-index: 1; }

/* Sections --------------------------------------------------------------------------- */
.pd-section { padding-block: clamp(80px, 11vw, 160px); }
.pd-section + .pd-section { padding-top: 0; }
.pd-section.tinted { background: var(--tint); padding-top: clamp(80px, 11vw, 160px); }
.pd-section.tinted + .pd-section { padding-top: clamp(80px, 11vw, 160px); }

/* Promise strip: what people run into, and what this app does instead */
.pd-promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; }
.pd-promises li { background: var(--card); border-radius: var(--r-lg); padding: 28px 28px 30px; box-shadow: var(--shadow-card); }
.pd-promises .was { font-size: 14px; color: var(--fg-2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--fg-2) 50%, transparent); text-decoration-thickness: 1px; }
.pd-promises h3 { margin-top: 14px; font-size: 21px; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
.pd-promises p { margin-top: 10px; font-size: 15px; color: var(--fg-2); line-height: 1.65; }

/* Feature row: copy beside real screens */
.pd-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.pd-feature.flip > :first-child { order: 2; }
.pd-feature .pd-lead { margin-top: 18px; }
.pd-feature ul.pd-points { list-style: none; margin-top: 28px; border-top: 1px solid var(--line); }
.pd-points li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.6; }
.pd-points li strong { display: block; font-size: 16px; font-weight: 650; margin-bottom: 2px; color: var(--fg); }
.pd-points li span { color: var(--fg-2); }
.pd-shots { display: flex; justify-content: center; align-items: flex-end; gap: clamp(14px, 2vw, 28px); }
.pd-shots .phone { --w: clamp(200px, 19vw, 280px); }
.pd-shots .phone:nth-child(2) { transform: translateY(36px); }

/* Bento of real screens */
.pd-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.pd-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow-card); height: 600px; }
.pd-tile.span-3 { grid-column: span 3; }
.pd-tile.span-2 { grid-column: span 2; }
.pd-tile.span-4 { grid-column: span 4; }
.pd-tile.span-6 { grid-column: span 6; }
.pd-tile-copy { padding: 30px 30px 0; position: relative; z-index: 1; }
.pd-tile h3 { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.pd-tile p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--fg-2); max-width: 30em; }
.pd-tile .req { margin-top: 10px; font-size: 12.5px; color: var(--fg-2); opacity: .85; }
.pd-tile-shot { margin-top: auto; padding: 28px 30px 0; display: flex; justify-content: center; }
.pd-tile-shot { flex: 1; align-items: flex-start; }
.pd-tile-shot .phone { --w: 290px; }
.pd-tile.span-2 .pd-tile-shot .phone { --w: 250px; }
.screen-crop { margin: 0; width: min(100%, 340px); overflow: hidden; border-radius: 24px; box-shadow: var(--shadow-phone); background: #f4f6fa; align-self: flex-end; }
.screen-crop img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pd-tile-shot:has(.screen-crop) { align-items: center; padding-bottom: 30px; }
.pd-tile.dark { background: var(--ink-card); color: #fff; --fg-2: rgb(255 255 255 / .7); }

/* Dark band: privacy */
.pd-band { background: var(--band-bg); color: var(--band-fg); border-radius: var(--r-xl); padding: clamp(40px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.pd-band .pd-h2 { color: inherit; }
.pd-band .pd-lead { color: color-mix(in srgb, var(--band-fg) 72%, transparent); margin-top: 18px; }
.pd-band dl { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.pd-band dt { font-size: 17px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.pd-band dt svg { width: 22px; height: 22px; flex: none; color: var(--band-accent); }
.pd-band dd { margin-top: 6px; font-size: 14.5px; line-height: 1.65; color: color-mix(in srgb, var(--band-fg) 70%, transparent); }

/* Comparison table */
.pd-compare { background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow-card); overflow: hidden; }
.pd-compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pd-compare th, .pd-compare td { padding: 18px 22px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.55; }
.pd-compare thead th { font-size: 13px; font-weight: 600; color: var(--fg-2); background: color-mix(in srgb, var(--tint) 70%, var(--card)); }
.pd-compare thead th.us { color: var(--fg); }
.pd-compare tbody th { font-weight: 600; width: 22%; }
.pd-compare td.us { font-weight: 600; color: var(--fg); background: color-mix(in srgb, var(--accent-ui) 6%, transparent); }
.pd-compare td.them { color: var(--fg-2); }
.pd-compare tr:last-child th, .pd-compare tr:last-child td { border-bottom: 0; }
.pd-compare-note { margin-top: 16px; font-size: 13px; color: var(--fg-2); line-height: 1.7; max-width: 60em; }
.pd-compare-note a { border-bottom: 1px solid currentColor; }

/* Steps with numbers */
.pd-steps { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 18px; list-style: none; counter-reset: s; }
.pd-steps li { background: var(--card); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-card); counter-increment: s; }
.pd-steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-ui); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 18px; }
.pd-steps h3 { font-size: 18px; font-weight: 700; }
.pd-steps p { margin-top: 8px; font-size: 15px; color: var(--fg-2); line-height: 1.6; }

/* Details + FAQ two-column */
.pd-two { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); }
.pd-two-head { position: sticky; top: 96px; align-self: start; }
.pd-two-head .checked { margin-top: 12px; font-size: 13px; color: var(--fg-2); }
.p-product .facts, .p-product .faq { border-top-color: var(--line); }
.p-product .faq summary { font-family: var(--font-ui); font-weight: 600; }

/* Final CTA */
.pd-final { text-align: center; padding-block: clamp(80px, 10vw, 140px); }
.pd-final .final-icon { display: block; width: 112px; margin: 0 auto 28px; }
.pd-final .final-icon img { width: 112px; height: 112px; border-radius: 22.5%; box-shadow: 0 24px 50px -20px rgb(10 30 70 / .5); }
.pd-final .pd-lead { margin: 16px auto 32px; }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .pd-stage .phone-a { animation: rise .9s .1s var(--ease) both; }
  html:not([data-motion="off"]) .pd-stage .phone-b { animation: rise-b 1s .25s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translate(-70%, -44%); } }
@keyframes rise-b { from { opacity: 0; transform: translate(2%, -36%) rotate(9deg); } }

@media (max-width: 1000px) {
  .pd-hero-grid, .pd-feature, .pd-band, .pd-two { grid-template-columns: 1fr; }
  .pd-feature.flip > :first-child { order: 0; }
  .pd-stage { height: 620px; }
  .pd-glow { top: auto; bottom: 0; right: 0; width: 100%; height: 55%; }
  .pd-promises { grid-template-columns: 1fr; }
  .pd-bento { grid-template-columns: 1fr 1fr; }
  .pd-tile.span-2, .pd-tile.span-3, .pd-tile.span-4 { grid-column: span 1; }
  .pd-tile.span-6 { grid-column: span 2; }
  .pd-steps { grid-template-columns: 1fr 1fr; }
  .pd-two-head { position: static; }
  .pd-band dl { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .p-product .site-header nav { gap: 16px; }
  .pd-lockup img { width: 52px; height: 52px; }
  .pd-cta .btn-store { width: 100%; justify-content: space-between; }
  .pd-stage { height: 520px; }
  .pd-stage .phone-a { --w: 220px; transform: translate(-78%, -50%); }
  .pd-stage .phone-b { --w: 190px; transform: translate(-4%, -44%) rotate(5deg); }
  .pd-bento { grid-template-columns: 1fr; }
  .pd-tile.span-6 { grid-column: span 1; }
  .pd-tile { height: 540px; }
  .pd-tile-shot .phone, .pd-tile.span-2 .pd-tile-shot .phone { --w: 250px; }
  .pd-shots .phone { --w: 160px; }
  .pd-shots .phone:nth-child(2) { transform: translateY(24px); }
  .pd-steps { grid-template-columns: 1fr; }
  .pd-compare { overflow-x: auto; }
  .pd-compare table { min-width: 560px; }
  .pd-band { padding: 32px 24px; }
}

/* Shared pieces from base.css, tuned for the product system */
.p-product .guide-strip-head { border-top: 0; }
.p-product .guide-strip-head h2 { font-family: var(--font-ui); font-weight: 700; letter-spacing: -.015em; }
.p-product .guide-cards a { border: 0; border-radius: 24px; box-shadow: var(--shadow-card); background: var(--card); }
.p-product .guide-cards a:hover { box-shadow: 0 1px 2px rgb(16 24 40 / .05), 0 18px 40px -14px rgb(16 24 40 / .22); }
.p-product .site-footer { background: transparent; }
.p-product .footer-inner { border-top-color: var(--line); }
