:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --turquoise-1: #2dd4bf; /* start */
  --turquoise-2: #06b6d4; /* end */
  --pink-1: #f472b6;
  --pink-2: #ec4899;
  --green-1: #34d399;
  --green-2: #22c55e;
  --orange-1: #fdba74;
  --orange-2: #f59e0b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Place background textures on the root so they are never hidden */
html {
  background-color: var(--bg);
  background-image: url('./assets/stock-grid.svg'), url('./assets/noise.svg');
  background-repeat: repeat, repeat;
  background-size: 800px 800px, 160px 160px;
  background-attachment: fixed, scroll;
  background-position: center top, 0 0;
}
body {
  margin: 0;
  background-color: transparent; /* show html background */
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* avoid accidental horizontal scroll from decorative elements */
}

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* Optional local LANE script font */
@font-face {
  font-family: 'LANE';
  src:
    local('LANE'), local('Lane'), local('LaneNarrow'), local('LANE Upper'),
    url('./fonts/Lane.woff2') format('woff2'),
    url('./fonts/Lane.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Optional local THINOO script font */
@font-face {
  font-family: 'THINOO';
  src:
    local('THINOO'), local('Thinoo'),
    url('./fonts/Thinoo.woff2') format('woff2'),
    url('./fonts/Thinoo.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Typography */
.script { font-family: 'Cinzel', 'LANE', 'THINOO', 'Alex Brush', serif; font-weight: 600; letter-spacing: 0.2px; }
.display { font-size: clamp(1.9rem, 7.6vw, 4.5rem); line-height: 1.08; letter-spacing: 0.2px; }
.headline { font-size: clamp(1.6rem, 6.4vw, 3rem); line-height: 1.12; }
.subcopy { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 56ch; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.brand { font-size: clamp(1.6rem, 3.2vw, 2rem); color: var(--text); text-decoration: none; display:flex; align-items:center; gap:10px; }
.brand-logo{ width: 50px; height: 50px; object-fit: contain; border-radius: 6px; }
.header-links { display: flex; align-items: center; gap: 24px; }
.header-link { color: var(--text); text-decoration: none; font-weight: 600; opacity: .6; }
.header-link:hover { opacity: .9; }

.primary-btn,
.waitlist-btn {
  appearance: none; border: none; background: var(--text); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; letter-spacing: 0.2px;
  cursor: pointer; transition: transform .15s ease, opacity .2s ease; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.1;
}
.primary-btn:hover,
.waitlist-btn:hover { transform: translateY(-1px); }
.primary-btn:active,
.waitlist-btn:active { transform: translateY(0); opacity: .9; }

/* Folds */
.fold { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 12vh 0; }
.fold-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.fold-copy > * + * { margin-top: 12px; }
.fold-media { margin: 0; }
.fold-media img { width: 100%; max-width: 560px; height: auto; display: block; border-radius: 16px; }

/* Paintbrush highlight */
.paint { position: relative; display: inline-block; z-index: 0; box-decoration-break: clone; isolation: isolate; }
.paint::after {
  content: ""; position: absolute; z-index: -1; left: -0.2em; right: -0.2em; bottom: -0.05em;
  height: 1.05em; transform: rotate(-0.2deg) scaleX(1);
  /* color + subtle paper grain inside the paint */
  background-image: linear-gradient(90deg, var(--start), var(--end)), url('./assets/noise-strong.svg');
  background-size: 100% 100%, 100px 100px;
  background-repeat: no-repeat, repeat;
  mix-blend-mode: multiply;
  -webkit-mask-image: url('./assets/brush-mask-rect.svg');
  mask-image: url('./assets/brush-mask-rect.svg');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  opacity: 0.98;
  filter: drop-shadow(0 1px .5px rgba(15,23,42,.06));
}
.paint::before{
  content: ""; position: absolute; left: -0.2em; right: -0.2em; bottom: -0.05em; height: 1.05em;
  -webkit-mask-image: url('./assets/brush-mask-rect.svg');
  mask-image: url('./assets/brush-mask-rect.svg');
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  pointer-events: none; opacity: .32; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.85) 18%, transparent 36%) 0 0/240% 100% no-repeat;
  animation: paintShimmer 8s linear infinite;
}
.paint.sm::after { height: .75em; bottom: -0.02em; }
.paint.turquoise { --start: var(--turquoise-1); --end: var(--turquoise-2); }
.paint.pink { --start: var(--pink-1); --end: var(--pink-2); }
.paint.green { --start: var(--green-1); --end: var(--green-2); }
.paint.orange { --start: var(--orange-1); --end: var(--orange-2); }

/* Fallback when CSS mask is not supported */
.no-mask .paint::after {
  -webkit-mask-image: none; mask-image: none;
  border-radius: 8px;
  transform: skewX(-3deg) rotate(-0.2deg);
  height: 1.05em; bottom: -0.05em; left: -0.2em; right: -0.2em;
  clip-path: polygon(0% 30%, 6% 18%, 14% 24%, 22% 16%, 32% 22%, 42% 16%, 52% 24%, 62% 18%, 72% 26%, 82% 20%, 92% 24%, 100% 28%, 100% 78%, 92% 86%, 82% 82%, 72% 90%, 62% 84%, 52% 92%, 42% 86%, 32% 92%, 22% 86%, 14% 92%, 6% 86%, 0% 80%);
}

/* Fold beacons: faint oversized brush swash per fold */
.fold { position: relative; }
.fold::before{
  content:""; position:absolute; inset:auto; left: -10%; right:auto; top: 8%; width: 50%; height: 40%;
  pointer-events: none; z-index:-1; opacity:.03; transform: rotate(-3deg);
  background: linear-gradient(90deg, var(--bstart, #2dd4bf), var(--bend, #06b6d4));
  -webkit-mask-image: url('./assets/brush-mask-rect.svg'); mask-image: url('./assets/brush-mask-rect.svg');
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
}
.fold--turquoise{ --bstart: var(--turquoise-1); --bend: var(--turquoise-2); }
.fold--pink{ --bstart: var(--pink-1); --bend: var(--pink-2); }
.fold--green{ --bstart: var(--green-1); --bend: var(--green-2); }
.fold--orange{ --bstart: var(--orange-1); --bend: var(--orange-2); }


/* App CTA */
.cta,
.waitlist { padding: 14vh 0 18vh; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.cta h3,
.waitlist h3 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); margin: 0; }
.waitlist-form { display: none; }
.email { display: none; }
.success { display: none; }
.form-embed { width: 100%; height: min(1200px, 140vh); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.6); box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.form-embed iframe { width: 100%; height: 100%; border: 0; }
.bottom-cta { margin-top: 6vh; }
.beta-note {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 48ch;
}

/* Footer */
.site-footer { padding: 32px 0 56px; color: var(--muted); font-size: .95rem; }
.site-footer p { margin: 0; }

/* FAQ */
.faq { padding: 8vh 0 12vh; }
.faq-card { border: 1px solid rgba(15,23,42,0.06); border-radius: 16px; padding: 28px 24px; background: rgba(255,255,255,0.9); box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.faq-title { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: 28px; }
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: transparent; }
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  color: var(--text);
  position: relative;
  padding-right: 28px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::before{
  content:""; position:absolute; left:-4px; right:36px; bottom:4px; height:12px; transform-origin:left center;
  transform: scaleX(0.02) rotate(-0.2deg); opacity:.0;
  -webkit-mask-image:url('./assets/brush-mask-rect.svg'); mask-image:url('./assets/brush-mask-rect.svg');
  -webkit-mask-size:100% 100%; mask-size:100% 100%; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  background: linear-gradient(90deg, var(--faq-start,var(--turquoise-1)), var(--faq-end,var(--turquoise-2)));
  transition: transform .28s ease, opacity .28s ease;
}
.faq-item > summary::after {
  content: '';
  position: absolute; right: 0; top: 22px;
  width: 12px; height: 12px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(-45deg);
  opacity: .45;
  transition: transform .2s ease, opacity .2s ease;
}
.faq-item[open] > summary::after { transform: rotate(45deg); opacity: .7; }
.faq-item[open] > summary::before{ transform: scaleX(1) rotate(-0.2deg); opacity:.6; }
.faq-item:nth-child(odd){ --faq-start: var(--pink-1); --faq-end: var(--pink-2); }
.faq-item:nth-child(even){ --faq-start: var(--turquoise-1); --faq-end: var(--turquoise-2); }
.faq-content { color: var(--muted); padding: 0; max-width: 70ch; overflow: hidden; }
.faq-item[open] .faq-content { padding-bottom: 16px; }
/* scripted dust particles removed for a cleaner look */

/* Lattice breathe removed for readability */

/* Header brand paint reveal on load */
.site-header .brand .paint::after { transform-origin: left center; }
.animate-paints .site-header .brand .paint::after { animation: paintReveal 900ms cubic-bezier(.3,.7,.2,1) .15s both; }
@keyframes paintReveal { from { transform: rotate(-0.2deg) scaleX(0.02);} to { transform: rotate(-0.2deg) scaleX(1);} }

/* CTA brush swipe on hover */
/* Remove CTA swipe effect as requested */
.primary-btn,
.waitlist-btn { position: relative; z-index: auto; overflow: visible; }

/* Dust micro-motion for first fold image */
.with-dust{ position: relative; }
.with-dust img{ animation: none; }
.with-dust::after{
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: url('./assets/hero-money-dust.png') center/100% 100% no-repeat;
  /* tightly crop to the top-right dust cloud only */
  -webkit-mask-image: radial-gradient(22% 22% at 92% 10%, #000 55%, rgba(0,0,0,0.6) 70%, transparent 80%);
  mask-image: radial-gradient(22% 22% at 92% 10%, #000 55%, rgba(0,0,0,0.6) 70%, transparent 80%);
  transform-origin: 92% 10%;
  opacity: .65; filter: blur(.2px);
  animation: dustRise 4.8s ease-out infinite;
}
@keyframes dustRise{
  0%   { transform: translate3d(0,0,0) scale(1);   opacity: .65; filter: blur(.2px); }
  60%  { transform: translate3d(4px,-18px,0) scale(1.03); opacity: .28; filter: blur(1px); }
  100% { transform: translate3d(6px,-28px,0)  scale(1.05); opacity: 0;    filter: blur(1.6px); }
}

/* secondary plume for depth */
.with-dust::before{
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: url('./assets/hero-money-dust.png') center/100% 100% no-repeat;
  -webkit-mask-image: radial-gradient(18% 18% at 88% 14%, #000 45%, transparent 72%);
  mask-image: radial-gradient(18% 18% at 88% 14%, #000 45%, transparent 72%);
  transform-origin: 88% 14%;
  opacity: .35; filter: blur(.6px);
  animation: dustRise2 6.4s ease-out infinite;
}
@keyframes dustRise2{
  0%   { transform: translate3d(0,0,0) scale(1);   opacity: .35; }
  70%  { transform: translate3d(8px,-22px,0) scale(1.02); opacity: .1; }
  100% { transform: translate3d(10px,-30px,0)  scale(1.03); opacity: 0; }
}

/* Reduced motion: turn off non-essential animations */
@media (prefers-reduced-motion: reduce){
  html{ animation: none; }
  .paint::before{ animation: none; }
  .with-dust::after, .with-dust::before{ animation: none; }
  .dust-dot{ animation: none !important; }
  .animate-paints .site-header .brand .paint::after{ animation: none; transform: rotate(-0.2deg) scaleX(1); }
}

/* Mobile tweaks */
@media (max-width: 640px){
  .cta,
  .waitlist { align-items: center; text-align: center; }
  .cta .primary-btn,
  .waitlist .waitlist-btn { align-self: center; }
}

@keyframes paintShimmer { to { background-position: 200% 0; } }

/* A11y */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Mobile tweaks */
@media (max-width: 720px) {
  /* soften background on mobile and avoid iOS fixed-attachment jank */
  html { background-attachment: scroll, scroll; background-size: 640px 640px, 120px 120px; background-position: center top, 0 0; }

  /* Comfortable gutters with safe-area support */
  .container {
    padding-left: max(clamp(20px, 5.5vw, 28px), env(safe-area-inset-left));
    padding-right: max(clamp(20px, 5.5vw, 28px), env(safe-area-inset-right));
  }

  /* header compaction */
  .header-inner { padding: 12px 0; }
  .brand-logo { width: 40px; height: 40px; }

  /* fold spacing and layout */
  .fold { min-height: auto; padding: 8vh 0; }
  .fold-grid { grid-template-columns: 1fr; gap: 24px; }

  /* subtle grey brush separator between folds */
  .fold::after{
    content: "";
    display: block;
    width: clamp(120px, 60%, 320px);
    height: 10px;
    margin: 20px auto 0;
    opacity: .6;
    background-image: linear-gradient(90deg, rgba(15,23,42,0.12), rgba(15,23,42,0.2)), url('./assets/noise-strong.svg');
    background-size: 100% 100%, 100px 100px;
    background-repeat: no-repeat, repeat;
    -webkit-mask-image: url('./assets/brush-mask-rect.svg');
    mask-image: url('./assets/brush-mask-rect.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  }

  /* prevent paint highlight from bleeding to edges */
  .paint::after { left: -0.1em; right: -0.1em; }

  /* app cta: stack and full-width buttons */
  .cta,
  .waitlist { padding: 8vh 0 12vh; }
  .cta .primary-btn,
  .waitlist .waitlist-btn,
  .waitlist-form .primary-btn,
  .waitlist-form .waitlist-btn { width: 100%; }
  .email { width: 100%; min-width: 0; }

  /* FAQ + footer breathing room */
  .faq-card { padding: 20px 16px; }
  .site-footer { padding: 24px 0 40px; }
}
/* Extra-small phones: roomier gutters */
@media (max-width: 420px) {
  .container {
    padding-left: max(clamp(24px, 7vw, 40px), env(safe-area-inset-left));
    padding-right: max(clamp(24px, 7vw, 40px), env(safe-area-inset-right));
  }
}

/* Ensure paint highlight never bleeds on small screens */
@media (max-width: 720px) { .paint::after { left: 0; right: 0; } }
