/* ==========================================================================
   Dumaflow — homepage styles.
   Tokens, resets, .display and .grain all live in site.css (loaded first);
   this file only carries homepage-specific layout and components.
   ========================================================================== */

  /* progress bar + nav are styled once, in site.css */

  /* ---- pinned hero ---- */
  .hero-pin-wrap { position: relative; height: 130vh; width: 100%; }
  .hero { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; color: var(--ink); display: flex; flex-direction: column;
    background: #fff;
    background-image:
      radial-gradient(88% 68% at 78% -6%, rgba(29,160,158,.18) 0%, rgba(29,160,158,0) 60%),
      radial-gradient(80% 62% at 6% 104%, rgba(32,41,91,.12) 0%, rgba(32,41,91,0) 62%),
      linear-gradient(180deg, #FFFFFF 0%, #F4F7FC 100%); }
  .hero-glow { display: none; }
  .hero-watermark { position: absolute; right: -12vw; bottom: -18vh; height: 82vh; opacity: .04; z-index: 0; pointer-events: none; will-change: transform; }
  .hero-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 92px 6vw 0; font-size: 13px; font-weight: 500; letter-spacing: .02em; text-transform: none; color: rgba(32,41,91,.65); }
  .hero-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 96px 6vw 0; }
  .hero-copy { text-align: center; }
  @media (max-width: 920px) {
    /* Unpin the hero on mobile: let it grow so the phone demo is never clipped */
    .hero-pin-wrap { height: auto; }
    .hero { position: relative; height: auto; min-height: 100vh; min-height: 100svh; }
    .hero-mid { padding-top: 84px; padding-bottom: 26px; }
    #hero .hero-phone { margin-bottom: 0; animation: none; opacity: 1; }
    .hero-phone .phone-frame { width: 224px; height: 462px; }
    .hero-bottom { padding-top: 26px; }
  }
  .hero-logo-wrap { display: inline-block; margin-bottom: 18px; opacity: 0; transform: translateY(18px) scale(.9); animation: logoIn 1s cubic-bezier(.19,1,.22,1) .15s forwards; }
  .hero-logo { display: block; height: clamp(56px, 6.2vw, 80px); width: auto; }
  @keyframes logoIn {
    0%   { opacity: 0; transform: translateY(18px) scale(.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  .hero-mid .display { font-size: clamp(34px, 5.2vw, 72px); line-height: 1.03; max-width: 15ch; margin-inline: auto; }
  .hero-mid .display .accent { color: var(--teal); }
  .hero-mid .display .line { display: block; overflow: hidden; }
  .hero-mid .display .line span { display: inline-block; transform: translateY(110%); animation: lineUp .9s cubic-bezier(.19,1,.22,1) forwards; }
  .hero-mid .display .line:nth-child(2) span { animation-delay: .15s; }
  @keyframes lineUp { to { transform: translateY(0); } }
  .hero-mid .sub { font-size: clamp(15px, 1.7vw, 19px); font-weight: 400; line-height: 1.6; color: rgba(32,41,91,.68); margin: 18px auto 0; max-width: 46ch; opacity: 0; animation: fadeUp .8s ease .9s forwards; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .hero-bottom { text-align: center; padding-bottom: 42px; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: .01em; color: rgba(32,41,91,.65); }
  .hero-bottom .arrow { display: block; margin: 10px auto 0; font-size: 20px; animation: bob 1.6s ease-in-out infinite; }
  @keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

  /* ---- hero phone (auto-playing app demo) ---- */
  .hero-phone { position: relative; z-index: 20; margin-top: 34px; margin-bottom: -150px; opacity: 1; transform: none;
    animation: phoneIn 1.3s cubic-bezier(.19, 1.1, .32, 1) .55s both; perspective: 900px; cursor: zoom-in;
    transition: transform .55s cubic-bezier(.3, 1.1, .35, 1); }
  @keyframes phoneIn {
    0%   { opacity: 0; transform: translateY(110vh) rotate(9deg) scale(.85); }
    65%  { opacity: 1; transform: translateY(-22px) rotate(-2.5deg) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  }
  /* zoomed state — click to read the screen (transform is computed in JS to true-center it) */
  .hero-phone.zoomed { animation: none; opacity: 1; cursor: zoom-out; z-index: 300; }
  .hero-phone.zoomed .phone-frame { animation: none; }
  body.phone-zoom .hero { z-index: 300; }
  body.od-zoom .office-section { z-index: 300; }
  .phone-backdrop { position: fixed; inset: 0; background: rgba(23,31,69,.72); backdrop-filter: blur(7px); opacity: 0; pointer-events: none; transition: opacity .4s ease; z-index: 250; }
  .phone-backdrop.show { opacity: 1; pointer-events: auto; }

  /* ---- office dashboard live demo ---- */
  .office-section { background: var(--ink); background-image: radial-gradient(90% 70% at 84% 4%, rgba(29,160,158,.26) 0%, rgba(29,160,158,0) 58%); color: #fff; padding: 11vh 6vw 12vh; text-align: center; }
  .office-head { margin-bottom: 42px; }
  .office-head h2.display { font-size: clamp(28px, 4.4vw, 50px); }
  .office-head p { font-size: 16.5px; line-height: 1.6; color: rgba(255,255,255,.72); margin-top: 14px; }
  .office-demo { max-width: 880px; margin: 0 auto; cursor: zoom-in; position: relative; z-index: 20; transition: transform .55s cubic-bezier(.3, 1.1, .35, 1); }
  .office-demo.zoomed { cursor: zoom-out; z-index: 300; }
  .browser-frame { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.34); text-align: left; color: var(--ink); }
  .browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #eceff1; border-bottom: 1px solid rgba(32,41,91,.08); }
  .browser-bar .bdot { width: 9px; height: 9px; border-radius: 50%; }
  .browser-bar .bdot.r { background: #ff5f57; } .browser-bar .bdot.y { background: #febc2e; } .browser-bar .bdot.g { background: #28c840; }
  .browser-url { flex: 1; max-width: 300px; margin: 0 auto; background: #fff; border-radius: 6px; font-size: 9.5px; color: rgba(32,41,91,.55); padding: 4px 10px; text-align: center; }
  .od-body { display: flex; min-height: 440px; }
  .od-side { width: 136px; background: #fbfbf9; border-right: 1px solid rgba(32,41,91,.07); padding: 12px 10px; flex-shrink: 0; }
  .od-logo { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 900; margin-bottom: 14px; }
  .od-logo img { height: 14px; }
  .od-nav div { font-size: 8.6px; font-weight: 600; color: rgba(32,41,91,.55); padding: 5.5px 8px; border-radius: 6px; margin-bottom: 2px; }
  .od-nav div.on { background: rgba(58,75,160,.1); color: var(--ink); font-weight: 800; }
  .od-main { flex: 1; padding: 14px 16px 16px; position: relative; }
  .od-title { font-size: 13.5px; font-weight: 900; }
  .od-date { font-size: 8px; color: rgba(32,41,91,.5); margin-bottom: 10px; }
  .od-banner { display: flex; align-items: center; gap: 8px; background: #e8f7ee; border: 1px solid #b7e4c7; border-radius: 8px; padding: 8px 10px; font-size: 8.6px; margin-bottom: 10px; opacity: 0; transform: translateY(-8px); transition: opacity .45s ease, transform .45s ease, background .3s ease, border-color .3s ease; min-height: 31px; }
  .od-banner.show { opacity: 1; transform: none; }
  .od-banner.done { background: rgba(29,160,158,.1); border-color: rgba(29,160,158,.45); }
  .od-banner b { font-weight: 800; }
  .od-sched-btn { margin-left: auto; background: var(--ink); color: #fff; font-size: 8px; font-weight: 800; padding: 5px 11px; border-radius: 6px; white-space: nowrap; }
  .od-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
  .od-kpi { background: #f6f8fa; border-radius: 8px; padding: 9px 9px; }
  .od-kpi .v { font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
  .od-kpi .l { font-size: 6.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: rgba(32,41,91,.48); margin-top: 3px; }
  .od-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .od-card { background: #f6f8fa; border-radius: 8px; padding: 10px; }
  .od-card .h { font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: rgba(32,41,91,.45); margin-bottom: 7px; }
  .od-job { background: #fff; border-radius: 7px; padding: 7px 9px 7px 11px; margin-bottom: 6px; position: relative; font-size: 8.4px; font-weight: 700; box-shadow: 0 1px 3px rgba(32,41,91,.06); }
  .od-job::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 7px 0 0 7px; background: var(--blue); }
  .od-job.orange::before { background: #E08A1E; }
  .od-job .r { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
  .od-job .meta { font-size: 7px; font-weight: 400; color: rgba(32,41,91,.5); margin-top: 2px; }
  .od-job.new { animation: rowIn .5s ease; }
  @keyframes rowIn { from { opacity: 0; transform: translateY(-9px); } }
  .od-chip { font-size: 5.8px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 2.5px 6px; border-radius: 8px; background: rgba(58,75,160,.13); color: var(--blue); white-space: nowrap; }
  .od-chip.prog { background: rgba(224,138,30,.14); color: #8a5a05; }
  .od-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 8.4px; }
  .od-stop { font-size: 7px; font-weight: 800; color: #c0392b; border: 1px solid rgba(192,57,43,.4); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
  .od-cursor { position: absolute; width: 15px; height: 15px; z-index: 10; opacity: 0; transition: top .85s cubic-bezier(.45,0,.2,1), left .85s cubic-bezier(.45,0,.2,1), opacity .3s ease; pointer-events: none; }
  .od-cursor.show { opacity: 1; }
  .od-tap { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: rgba(29,160,158,.45); border: 2px solid rgba(255,255,255,.9); z-index: 9; pointer-events: none; opacity: 0; transform: scale(.4); }
  .od-tap.go { animation: tapPing .55s ease forwards; }
  @media (max-width: 720px) {
    .od-side { display: none; }
    .od-cols { grid-template-columns: 1fr; }
    .od-kpis { grid-template-columns: repeat(2, 1fr); }
  }
  .phone-frame { position: relative; width: 258px; height: 532px; margin-left: auto; margin-right: auto; background: #171F45; border-radius: 38px; padding: 10px;
    box-shadow: 0 40px 80px rgba(32,41,91,.30), 0 6px 18px rgba(32,41,91,.14), inset 0 0 0 2px rgba(255,255,255,.10); animation: phoneFloat 5.5s ease-in-out 2s infinite; }
  @keyframes phoneFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(.6deg); } }
  .phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 86px; height: 22px; background: #171F45; border-radius: 0 0 14px 14px; z-index: 5; }
  .phone-screen { position: relative; width: 100%; height: 100%; background: #f6f8fa; border-radius: 29px; overflow: hidden; }
  .p-screens { display: flex; width: 300%; height: 100%; transition: transform .55s cubic-bezier(.4,0,.2,1); }
  .p-screen { width: 33.3333%; height: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: var(--font); color: #20295B; }
  .p-head { display: flex; align-items: center; gap: 6px; padding: 30px 14px 8px; }
  .p-head img { height: 14px; }
  .p-head .t { font-size: 10.5px; font-weight: 900; letter-spacing: .02em; }
  .p-head .s { font-size: 7.5px; color: rgba(32,41,91,.5); margin-left: auto; }
  .p-body { flex: 1; overflow: hidden; padding: 4px 12px 8px; position: relative; }
  .p-date { font-size: 12px; font-weight: 900; margin: 4px 2px 8px; }
  .p-stats { display: flex; gap: 6px; margin-bottom: 8px; }
  .p-stat { flex: 1; background: #fff; border-radius: 9px; padding: 8px 4px; text-align: center; box-shadow: 0 1px 4px rgba(32,41,91,.07); }
  .p-stat .n { font-size: 12px; font-weight: 900; }
  .p-stat .l { font-size: 5.8px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: rgba(32,41,91,.5); margin-top: 2px; }
  .p-qb { background: var(--ink); color: #fff; text-align: center; font-size: 9px; font-weight: 800; border-radius: 9px; padding: 9px 0; margin-bottom: 9px; }
  .p-list { display: flex; flex-direction: column; gap: 7px; transition: transform .8s cubic-bezier(.4,0,.2,1); }
  .p-job { background: #fff; border-radius: 9px; padding: 8px 9px 8px 11px; position: relative; box-shadow: 0 1px 4px rgba(32,41,91,.07); }
  .p-job::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.5px; border-radius: 9px 0 0 9px; background: var(--teal); }
  .p-job.amber::before { background: var(--amber); }
  .p-job .r1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
  .p-job .id { font-size: 8.5px; font-weight: 900; }
  .p-job .id b { font-weight: 900; }
  .p-chip { font-size: 5.6px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 2.5px 6px; border-radius: 8px; background: rgba(29,160,158,.14); color: var(--teal); }
  .p-chip.amber { background: rgba(240,169,46,.2); color: #8a5a05; }
  .p-chip.blue { background: rgba(58,75,160,.13); color: var(--blue); }
  .p-job .addr { font-size: 6.8px; color: rgba(32,41,91,.55); line-height: 1.35; }
  .p-tabs { display: flex; justify-content: space-around; align-items: center; padding: 7px 6px 12px; background: #fff; border-top: 1px solid rgba(32,41,91,.07); }
  .p-tabs span { font-size: 6px; font-weight: 700; color: rgba(32,41,91,.45); text-align: center; }
  .p-tabs .fab { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: -16px; box-shadow: 0 4px 10px rgba(32,41,91,.35); }
  /* job card screen */
  .p-back { font-size: 8px; color: rgba(32,41,91,.5); margin: 4px 2px 6px; }
  .p-jobtitle { font-size: 11.5px; font-weight: 900; margin: 0 2px 2px; }
  .p-jobtitle small { font-weight: 700; color: rgba(32,41,91,.45); font-size: 7px; }
  .p-time { font-size: 7px; color: rgba(32,41,91,.55); margin: 0 2px 7px; }
  .p-omw { display: inline-block; background: #22c55e; color: #fff; font-size: 7.2px; font-weight: 800; border-radius: 20px; padding: 4px 9px; margin: 0 2px 8px; }
  .p-card { background: #fff; border-radius: 9px; padding: 8px 10px; margin-bottom: 7px; box-shadow: 0 1px 4px rgba(32,41,91,.07); }
  .p-card .h { font-size: 6.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: rgba(32,41,91,.45); margin-bottom: 5px; }
  .p-timer-btn { background: var(--ink); color: #fff; text-align: center; font-size: 9px; font-weight: 800; border-radius: 8px; padding: 8px 0; transition: background .3s ease; }
  .p-timer-btn.running { background: #E08A1E; font-variant-numeric: tabular-nums; }
  .p-row { display: flex; justify-content: space-between; font-size: 7.5px; padding: 3.5px 0; }
  .p-row span:first-child { color: rgba(32,41,91,.5); }
  .p-row b { font-weight: 800; }
  .p-toast { position: absolute; left: 12px; right: 12px; bottom: 14px; background: #20295B; color: #fff; font-size: 7.5px; font-weight: 700; border-radius: 8px; padding: 8px 10px; opacity: 0; transform: translateY(14px); transition: opacity .35s ease, transform .35s ease; z-index: 4; }
  .p-toast.show { opacity: 1; transform: none; }
  /* success screen */
  .p-success { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 18px; }
  .p-check { width: 44px; height: 44px; border-radius: 50%; background: rgba(29,160,158,.14); color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 10px; }
  .p-success .big { font-size: 12px; font-weight: 900; margin-bottom: 3px; }
  .p-success .amt { font-family: var(--font); font-size: 19px; margin: 6px 0 2px; }
  .p-success .sm { font-size: 7.5px; color: rgba(32,41,91,.5); line-height: 1.5; }
  .p-success .stat-pill { margin-top: 9px; font-size: 6.5px; font-weight: 800; text-transform: uppercase; background: rgba(240,169,46,.2); color: #8a5a05; border-radius: 12px; padding: 4px 10px; }
  /* tap indicator */
  .p-tap { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: rgba(29,160,158,.45); border: 2px solid rgba(255,255,255,.8); z-index: 6; pointer-events: none; opacity: 0; transform: scale(.4); }
  .p-tap.go { animation: tapPing .55s ease forwards; }
  @keyframes tapPing { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
  .phone-caption { text-align: center; margin-bottom: 14px; font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: rgba(32,41,91,.62); }
  .phone-caption b { color: var(--teal-deep); font-weight: 600; }

  /* ---- stage sections ---- */
  .stage { min-height: 74vh; display: flex; align-items: center; padding: 9vh 6vw; }
  .stage-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; max-width: 1180px; margin: 0 auto; width: 100%; }
  .stage-visual { order: 2; perspective: 1100px; }
  .stage-inner { order: 1; max-width: 560px; }
  .stage.right .stage-inner { order: 2; justify-self: end; }
  .stage.right .stage-visual { order: 1; }
  @media (max-width: 860px) {
    .stage-row { grid-template-columns: 1fr; }
    .stage-inner, .stage-visual { order: 0 !important; }
  }
  .stage .tag { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 18px; }
  .stage .tag::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--teal); }
  .stage h2.display { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.06; margin-bottom: 20px; }
  .stage p { font-size: 17px; line-height: 1.7; color: rgba(var(--ink-rgb),.7); max-width: 46ch; }
  .stage p strong { color: var(--ink); font-weight: 600; }

  /* ---- ui cards (recreated product UI) ---- */
  .ui-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 26px 60px rgba(32,41,91,.14); overflow: hidden; color: var(--ink); max-width: 460px; margin: 0 auto; transition: transform .18s ease-out, box-shadow .3s ease; will-change: transform; }
  .ui-card:hover { box-shadow: 0 36px 80px rgba(32,41,91,.20); }
  .ui-card-head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .ui-card-head .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(32,41,91,.15); }
  .ui-card-head .ui-card-title { margin-left: 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: rgba(32,41,91,.5); }
  .ui-card-head .live { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-deep); }
  .ui-card-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: blink 1.4s ease-in-out infinite; }
  @keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
  .ui-card-body { padding: 20px 20px 22px; }

  .ai-box { background: rgba(58,75,160,.06); border: 1px dashed rgba(58,75,160,.35); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
  .ai-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); margin-bottom: 8px; }
  .ai-msg { font-size: 12.5px; line-height: 1.5; color: rgba(32,41,91,.75); font-style: italic; margin-bottom: 12px; min-height: 3em; }
  .ai-msg .caret { display: inline-block; width: 1.5px; height: 1em; background: var(--blue); vertical-align: text-bottom; animation: blink 1s step-end infinite; }
  .ai-btn { display: inline-block; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 8px 14px; border-radius: 7px; transition: background .2s ease, transform .15s ease; }
  .ai-btn.flash { animation: btnFlash .5s ease; }
  @keyframes btnFlash { 30% { transform: scale(.94); background: var(--teal); } }
  .ai-result { border-top: 1px solid rgba(32,41,91,.08); padding-top: 14px; display: flex; flex-direction: column; gap: 9px; }
  .ai-row { display: flex; justify-content: space-between; font-size: 12.5px; }
  .ai-row span { color: rgba(32,41,91,.5); }
  .ai-row strong { font-weight: 700; }
  .ai-row strong.urgent { color: #c0392b; }
  .ai-result .ai-row { opacity: 0; transform: translateX(-10px); transition: opacity .4s ease, transform .4s ease; }
  .ai-result .ai-row.show { opacity: 1; transform: none; }

  .ui-line { display: flex; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid rgba(32,41,91,.07); font-size: 13px; gap: 10px; }
  .ui-line:last-of-type { border-bottom: none; }
  .ui-line .name { font-weight: 600; }
  .ui-line .sub { display: block; font-size: 11px; color: rgba(32,41,91,.45); font-weight: 400; margin-top: 2px; }
  .ui-totals { margin-top: 10px; padding-top: 12px; border-top: 1.5px solid var(--ink); display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
  .ui-totals .grand { font-size: 16px; font-weight: 700; display: flex; justify-content: space-between; margin-top: 2px; }
  .ui-totals .row { display: flex; justify-content: space-between; color: rgba(32,41,91,.6); }

  .ui-badge { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 20px; }
  .ui-badge.accepted, .ui-badge.paid { background: rgba(29,160,158,.13); color: var(--teal); }
  .ui-badge.draft { background: rgba(32,41,91,.08); color: rgba(32,41,91,.55); }
  .ui-badge.sent { background: rgba(58,75,160,.13); color: var(--blue); }
  .ui-badge.tidy { background: rgba(240,169,46,.18); color: #8a5a05; }
  .stamp { opacity: 0; transform: scale(2.2) rotate(14deg); }
  .stamp.in { animation: stampIn .5s cubic-bezier(.2,1.4,.4,1) forwards; }
  @keyframes stampIn { to { opacity: 1; transform: scale(1) rotate(0deg); } }

  .ui-progress { display: flex; align-items: center; margin: 2px 0 8px; }
  .ui-progress .step { width: 9px; height: 9px; border-radius: 50%; background: rgba(32,41,91,.15); flex-shrink: 0; transition: background .4s ease, box-shadow .4s ease; }
  .ui-progress .ln { flex: 1; height: 2px; background: rgba(32,41,91,.12); margin: 0 2px; overflow: hidden; position: relative; }
  .ui-progress .ln::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s ease; }
  .ui-progress.lit .s1, .ui-progress.lit .s2 { background: var(--ink); }
  .ui-progress.lit .s2 { box-shadow: 0 0 0 4px rgba(32,41,91,.1); }
  .ui-progress.lit .l1::after { transform: scaleX(1); }
  .ui-progress-labels { display: flex; justify-content: space-between; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: rgba(32,41,91,.4); margin-bottom: 18px; }
  .ui-progress-labels .active { color: var(--ink); }

  .ui-photos { display: flex; gap: 8px; margin-bottom: 16px; }
  .ui-photo { position: relative; flex: 1; aspect-ratio: 1; border-radius: 8px; display: flex; align-items: flex-end; padding: 6px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #fff; overflow: hidden; transition: transform .25s ease; }
  .ui-photo:hover { transform: translateY(-4px) scale(1.04); }
  .ui-photo svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-58%); width: 38%; height: 38%; opacity: .9; }
  .ui-photo span { position: relative; }
  .ui-photo.before { background: linear-gradient(135deg,#3a4750,#5c6f7a); }
  .ui-photo.during { background: linear-gradient(135deg,var(--blue),#2A357A); }
  .ui-photo.after { background: linear-gradient(135deg,var(--teal),#17827F); }

  .timer-chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(32,41,91,.05); border-radius: 8px; padding: 8px 12px; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 14px; }
  .timer-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E08A1E; animation: blink 1.2s ease-in-out infinite; }

  /* tidy morph */
  .tidy-wrap { position: relative; min-height: 2.6em; }
  .tidy-wrap .t { position: absolute; inset: 0; font-size: 11px; color: rgba(32,41,91,.45); transition: opacity .6s ease; }
  .tidy-wrap .t.rough { font-style: italic; }
  .tidy-wrap .t.clean { opacity: 0; color: rgba(32,41,91,.7); }
  .tidy-wrap.clean .t.rough { opacity: 0; }
  .tidy-wrap.clean .t.clean { opacity: 1; }

  .ui-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 16px; }
  .ui-stat { background: rgba(32,41,91,.03); border-radius: 8px; padding: 10px 6px; text-align: center; }
  .ui-stat .n { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
  .ui-stat .l { font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: rgba(32,41,91,.45); margin-top: 2px; }

  /* ---- dashboard ---- */
  .strip { background: var(--surface); padding: 10vh 6vw; }
  .strip-head { text-align: center; margin-bottom: 48px; }
  .strip-head .display { font-size: clamp(28px, 4.4vw, 50px); }
  .strip-head p { font-size: 16.5px; line-height: 1.6; color: var(--muted); margin-top: 14px; }
  .dash-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 26px 60px rgba(32,41,91,.13); max-width: 860px; margin: 0 auto; padding: 30px 34px 34px; color: var(--ink); transition: transform .18s ease-out; will-change: transform; }
  .dash-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid rgba(32,41,91,.08); }
  .dash-title { font-family: var(--font); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
  .dash-sub { font-size: 12px; color: rgba(32,41,91,.5); margin-top: 3px; }
  .dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
  .dash-kpi { background: rgba(32,41,91,.03); border-radius: 10px; padding: 16px 14px; transition: transform .2s ease, background .2s ease; }
  .dash-kpi:hover { transform: translateY(-3px); background: rgba(29,160,158,.09); }
  .dash-kpi .v { font-size: 23px; font-weight: 900; font-variant-numeric: tabular-nums; }
  .dash-kpi .l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: rgba(32,41,91,.5); margin-top: 5px; }
  .dash-status-head { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: rgba(32,41,91,.45); margin-bottom: 16px; }
  .dash-bars { display: flex; flex-direction: column; gap: 13px; }
  .dash-bar-row { display: grid; grid-template-columns: 132px 1fr 26px; align-items: center; gap: 14px; }
  .dash-bar-row .lbl { font-size: 12.5px; font-weight: 600; }
  .dash-bar-row .bar { background: rgba(32,41,91,.06); border-radius: 5px; height: 10px; overflow: hidden; }
  .dash-bar-row .fill { height: 100%; border-radius: 5px; width: 0; transition: width 1.1s cubic-bezier(.25,1,.3,1); }
  .dash-bar-row .fill.done { background: var(--teal); }
  .dash-bar-row .ct { font-size: 12.5px; font-weight: 800; text-align: right; }
  @media (max-width: 700px) {
    .dash-kpis { grid-template-columns: repeat(2, 1fr); }
    .dash-bar-row { grid-template-columns: 96px 1fr 22px; gap: 8px; }
  }

  /* ---- role switcher ---- */
  .roles { background: var(--ink); background-image: radial-gradient(80% 60% at 12% 100%, rgba(29,160,158,.22) 0%, rgba(29,160,158,0) 60%); color: #fff; padding: 11vh 6vw; text-align: center; }
  .roles h2.display { font-size: clamp(28px, 4.4vw, 50px); margin-bottom: 14px; }
  .roles .lead { color: rgba(255,255,255,.72); font-size: 16.5px; line-height: 1.6; margin-bottom: 40px; }
  .role-tabs { display: inline-flex; border: 1.5px solid rgba(255,255,255,.25); border-radius: 40px; padding: 5px; gap: 4px; margin-bottom: 38px; }
  .role-tab { border: none; background: transparent; color: rgba(255,255,255,.65); font-family: var(--font); font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; padding: 10px 26px; border-radius: var(--radius-pill); cursor: pointer; transition: all .25s ease; }
  .role-tab.active { background: #fff; color: var(--ink); font-weight: 600; }
  .role-panels { position: relative; max-width: 660px; margin: 0 auto; }
  .role-panel { display: none; animation: fadeUp .45s ease; }
  .role-panel.active { display: block; }
  .role-points { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; }
  .role-point { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 18px 20px; transition: background .2s ease, transform .2s ease; }
  .role-point:hover { background: rgba(29,160,158,.12); transform: translateY(-2px); }
  .role-point h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
  .role-point p { font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.6); }
  @media (max-width: 620px) { .role-points { grid-template-columns: 1fr; } .role-tab { padding: 9px 16px; font-size: 11.5px; } }

  /* ---- feature grid ---- */
  .grid-section { background: #fff; padding: 10vh 6vw; }
  .grid-head { text-align: center; margin-bottom: 60px; }
  .grid-head .display { font-size: clamp(28px, 4.4vw, 50px); }
  .grid-head p { font-size: 16.5px; line-height: 1.6; color: var(--muted); margin-top: 14px; }
  .flavour-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1180px; margin: 0 auto; }
  .flavour-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 28px 24px; min-height: 296px; display: flex; flex-direction: column; background: #fff; transition: transform .3s ease, box-shadow .3s ease; overflow: hidden; }
  .flavour-card::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--ink); transition: height .35s cubic-bezier(.4,0,.2,1); z-index: 0; }
  .flavour-card:hover { transform: translateY(-6px); box-shadow: 0 26px 56px rgba(32,41,91,.18); }
  .flavour-card:hover::before { height: 100%; }
  .flavour-card > * { position: relative; z-index: 1; }
  .flavour-card:hover h3.display, .flavour-card:hover p { color: #fff; }
  .flavour-card:hover .num { color: rgba(255,255,255,.4); }
  .flavour-card:hover .role { color: #6FD3D1; }
  .flavour-card h3.display, .flavour-card p, .flavour-card .num, .flavour-card .role { transition: color .3s ease; }
  .flavour-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .flavour-top .num { font-family: var(--font); font-weight: 600; font-size: 14px; color: rgba(var(--ink-rgb),.45); line-height: 1; }
  .flavour-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .3s ease; }
  .flavour-card:hover .flavour-icon { transform: scale(1.12) rotate(-6deg); }
  .flavour-icon svg { width: 21px; height: 21px; }
  .flavour-icon.c1 { background: rgba(var(--ink-rgb),.08); color: var(--ink); }
  .flavour-icon.c2 { background: rgba(29,160,158,.14); color: var(--teal-deep); }
  .flavour-icon.c3 { background: rgba(240,169,46,.2); color: #8a5a05; }
  .flavour-icon.c4 { background: var(--ink); color: var(--paper); }
  .flavour-card:hover .flavour-icon.c4 { background: var(--paper); color: var(--ink); }
  .flavour-card h3.display { font-size: 20px; margin: 0 0 10px; line-height: 1.2; min-height: 2.4em; }
  .flavour-card p { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }
  .flavour-card .role { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-deep); margin-top: auto; padding-top: 10px; }
  @media (max-width: 900px) { .flavour-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { .flavour-grid { grid-template-columns: 1fr; } .flavour-card { min-height: 0; } }

  /* ---- promo ---- */
  .promo { background: linear-gradient(135deg, #20295B 0%, #1B3A6B 48%, #17827F 100%); color: #fff; text-align: center; padding: 12vh 6vw; overflow: hidden; }
  .promo .eyebrow { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.72); margin-bottom: 18px; }
  .promo h2.display { font-size: clamp(30px, 5.2vw, 62px); line-height: 1.05; margin-bottom: 8px; }
  .promo .code { font-family: var(--font); font-weight: 700; font-size: clamp(52px, 11vw, 128px); line-height: 1; margin: 30px 0; letter-spacing: -.03em;
    background: linear-gradient(100deg, #7FE3E1 28%, #FFFFFF 50%, #7FE3E1 72%); background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: shimmer 3.2s linear infinite; }
  @keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
  /* on the promo gradient the primary button flips to white-on-navy for contrast */
  .promo .btn-claim { margin-top: 10px; background: #fff; color: var(--ink); }
  .promo .btn-claim:hover { background: #EAF6F6; box-shadow: 0 12px 28px rgba(0,0,0,.18); }

  /* ---- final CTA / footer ---- */
  .final { background: var(--ink-deep); color: #fff; text-align: center; padding: 11vh 6vw 8vh; }
  .final h2.display { font-size: clamp(32px, 5.2vw, 62px); line-height: 1.05; margin-bottom: 28px; }
  .final .cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; align-items: center; }
  /* buttons and .reveal are defined once, in site.css */

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
    html { scroll-behavior: auto; }
  }
