  /* ════════ MOBILE / TABLET RESPONSIVE FIXES ════════ */
  /* NOTE: never set overflow-x on <html>, it makes <html> a scroll container and
     breaks position:sticky (the pinned story + house-drawing sections). The original
     body{overflow-x:hidden} handles horizontal clipping; off-edge sketches are clipped
     at their own containers instead. */

  /* hide off-edge decorative column sketches on small screens (prevents overflow + clutter) */
  @media (max-width: 900px) {
    .gk-story-l, .gk-story-r, .gk-bento-l, .gk-bento-r, .gk-cta-l, .gk-cta-r { display: none !important; }
    .gk-hero { opacity: .06; }
  }

  /* STORY: convert pinned scroll-steps into a clean stacked flow on mobile/tablet,
     but KEEP the card entrance animation via scroll reveal (no overlap). */
  @media (max-width: 900px) {
    #story-sticky { position: static !important; height: auto !important; display: block !important; }
    #story-spacer { display: none !important; }
    #story-glow, #story-dots { display: none !important; }
    #story-chapter { position: relative !important; top: auto !important; left: auto !important;
      transform: none !important; text-align: center; display: block; padding: 3rem 1rem 0; margin: 0; }
    #story-stage { height: auto !important; max-width: 640px !important; padding: 0 1.1rem !important; }
    /* each step stacks; starts hidden + slightly down, animates in when scrolled into view */
    .story-step { position: relative !important; inset: auto !important;
      padding: 2.6rem 0 !important; min-height: 0 !important;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      opacity: 0 !important; transform: translateY(30px) !important;
      transition: opacity .7s ease, transform .8s cubic-bezier(0.16,1,0.3,1); }
    .story-step.in-view { opacity: 1 !important; transform: translateY(0) !important; }
    .story-step:last-child { border-bottom: none; }
    /* chat bubbles reveal (full width) using their own inline transition */
    .story-step .chat-msg { max-width: 100% !important; }
    .story-step.in-view .chat-msg { opacity: 1 !important; transform: none !important; }
    /* side stat cards flow inline instead of floating, and fade up on reveal */
    .story-aside { position: relative !important; inset: auto !important; right: auto !important;
      left: auto !important; top: auto !important; bottom: auto !important;
      transform: translateY(16px) !important;
      max-width: 100% !important; width: 100% !important; margin: 1.2rem 0 0 !important; box-sizing: border-box;
      opacity: 0; transition: opacity .6s ease .12s, transform .6s cubic-bezier(0.16,1,0.3,1) .12s; }
    .story-step.in-view .story-aside { opacity: 1; transform: translateY(0) !important; }
    /* outcome stat grid: keep 3 up but tighten so values fit */
    .story-stat-grid { gap: 0.55rem !important; }
    .story-stat-grid > div { padding: 0.9rem 0.45rem !important; }
    .story-stat-grid > div > div:nth-child(2) { font-size: 1.1rem !important; }
  }

  /* AFX house-drawing scrolly: hide custom cursor on touch/narrow */
  @media (max-width: 1080px) {
    #afxCursor { display: none !important; }
  }

  /* General small-screen polish */
  @media (max-width: 600px) {
    .section { padding: 4rem 1.25rem; }
    .testimonials-section, .how-section { padding: 4rem 1.25rem; }
    .cta-section { padding: 3.5rem 1.25rem 5rem; }
    .footer-inner { justify-content: center; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
  }

  /* Phones: stop bento cards being crushed into 2 cramped columns.
     Stack to a single column so inner BUY/RENT + SIP boxes never overflow. */
  @media (max-width: 680px) {
    .bento { grid-template-columns: 1fr; gap: 1rem; }
    .bc-1, .bc-2, .bc-3, .bc-4, .bc-5, .bc-6 { grid-column: 1 / -1; grid-row: auto; }
    .bento-card { padding: 1.5rem; }
    .bento-title { font-size: 1.6rem; }
  }

  /* ════════ GREEK ARCHITECTURE BACKGROUND SKETCHES ════════ */
  .gk{ position:absolute; pointer-events:none; line-height:0; z-index:0; }
  .gk .gk-svg{ display:block; width:100%; height:auto; }
  .gk-cyan{ color:#56C9D8; }
  .gk-ink{ color:#0a0a0a; }
  .gk-anim{ animation:gkFloat 13s ease-in-out infinite; }
  .gk-anim.s2{ animation-duration:16s; animation-direction:reverse; }
  .gk-anim.s3{ animation-duration:18s; }
  @keyframes gkFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-12px); } }

  /* placement */
  .gk-hero     { left:50%; bottom:-1%;  width:min(900px,78%); transform:translateX(-50%); opacity:.085; z-index:1; }
  .gk-story-l  { left:-26px; top:50%;   width:116px; transform:translateY(-50%); opacity:.12; }
  .gk-story-r  { right:-26px; top:46%;  width:116px; transform:translateY(-50%); opacity:.12; }
  .gk-testi    { left:50%; top:5%;      width:min(740px,76%); transform:translateX(-50%); opacity:.06; }
  .gk-bento-r  { right:-46px; top:120px; width:130px; opacity:.06; }
  .gk-bento-l  { left:-44px; bottom:40px; width:118px; opacity:.05; }
  .gk-how      { left:50%; bottom:-3%;  width:min(820px,74%); transform:translateX(-50%); opacity:.05; }
  .gk-cta-ped  { left:50%; top:2px;     width:min(540px,68%); transform:translateX(-50%); opacity:.09; }
  .gk-cta-l    { left:1.5%;  bottom:-26px; width:86px; opacity:.10; }
  .gk-cta-r    { right:1.5%; bottom:-26px; width:86px; opacity:.10; }

  /* Greek-key meander frieze (scrolling) */
  .gk-frieze{ position:relative; height:30px; width:100%; background-repeat:repeat-x;
    background-size:30px 30px; animation:gkMeander 14s linear infinite;
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent);
            mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent); }
  .gk-frieze-cyan{ background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSczMicgaGVpZ2h0PSczMicgdmlld0JveD0nMCAwIDMyIDMyJz48cGF0aCBkPSdNMCAxNkwwIDBMMjQgMEwyNCAyNEw4IDI0TDggOEwxNiA4TDE2IDE2TDMyIDE2JyBmaWxsPSdub25lJyBzdHJva2U9JyM1NkM5RDgnIHN0cm9rZS13aWR0aD0nMicvPjwvc3ZnPg=="); }
  .gk-frieze-ink { background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSczMicgaGVpZ2h0PSczMicgdmlld0JveD0nMCAwIDMyIDMyJz48cGF0aCBkPSdNMCAxNkwwIDBMMjQgMEwyNCAyNEw4IDI0TDggOEwxNiA4TDE2IDE2TDMyIDE2JyBmaWxsPSdub25lJyBzdHJva2U9J3JnYmEoMTAsMTAsMTAsMC41KScgc3Ryb2tlLXdpZHRoPScyJy8+PC9zdmc+"); }
  @keyframes gkMeander{ from{ background-position-x:0; } to{ background-position-x:30px; } }
  .gk-frieze-band{ background:#0a0a0a; padding:1.5rem 0; border-top:1px solid #161616;
    border-bottom:1px solid #121212; position:relative; z-index:5; }
  .gk-frieze-band-light{ background:var(--light-bg); padding:1.3rem 0; position:relative; z-index:1; }

  /* section stacking fixes so sketches sit behind content */
  .testimonials-section{ position:relative; overflow:hidden; }
  .testimonials-inner{ position:relative; z-index:1; }
  #features{ position:relative; overflow:hidden; }
  #features .section-tag, #features .section-title, #features .section-desc, #features .bento{ position:relative; z-index:1; }
  .how-section{ position:relative; overflow:hidden; }
  .how-section .section-tag, .how-section .section-title, .how-section .section-desc, .how-section .how-steps{ position:relative; z-index:1; }
  .cta-inner{ position:relative; z-index:1; }
