/* Public pages: home (index.php), sign in (login.php), register (register.php).
   Self-contained: no external fonts or libraries. Brand: pine night, marigold, mint. */
@font-face {
    font-family: "Schibsted Grotesk"; src: url("fonts/SchibstedGrotesk.woff") format("woff");
    font-weight: 400 900; font-style: normal; font-display: swap;
}
:root {
    --night: #0a1d17;
    --night-2: #0f2a22;
    --night-3: #163a2f;
    --pine: #1d6b52;
    --pine-2: #24846a;
    --mint: #7fd8b4;
    --mint-2: #b9f0d8;
    --marigold: #f0a93b;
    --marigold-2: #ffc96b;
    --coral: #ff8a6b;
    --cream: #f6f4ee;
    --paper: #fbfaf6;
    --ink: #13201b;
    --ink-2: #3d4c45;
    --muted: #6d7c75;
    --line: #e2e6e1;
    --red: #c2412d;
    --glass: rgba(255, 255, 255, .07);
    --glass-line: rgba(255, 255, 255, .12);
    --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { width: 20px; height: 20px; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }

/* ---------- Shared: brand, buttons ---------- */
.p-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.p-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 900; font-size: 18px; color: var(--night);
    background: linear-gradient(145deg, var(--marigold-2), var(--marigold)); box-shadow: 0 6px 18px -6px rgba(240,169,59,.7), inset 0 -3px 0 rgba(0,0,0,.14); }
.p-btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 22px; border-radius: 12px; border: 0;
    font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; position: relative; isolation: isolate;
    transition: transform .25s var(--spring), box-shadow .25s var(--ease), background .2s; }
.p-btn:active { transform: scale(.97); }
.p-btn .ic { width: 18px; height: 18px; transition: transform .3s var(--spring); }
.p-btn:hover .ic.go { transform: translateX(4px); }
.p-btn.gold { color: var(--night); background: linear-gradient(135deg, var(--marigold-2), var(--marigold)); box-shadow: 0 10px 30px -10px rgba(240,169,59,.9), inset 0 1px 0 rgba(255,255,255,.5); }
.p-btn.gold:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(240,169,59,1), inset 0 1px 0 rgba(255,255,255,.5); }
.p-btn.pine { color: #fff; background: linear-gradient(135deg, var(--pine-2), var(--pine)); box-shadow: 0 10px 26px -10px rgba(29,107,82,.9), inset 0 1px 0 rgba(255,255,255,.2); }
.p-btn.pine:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(29,107,82,1), inset 0 1px 0 rgba(255,255,255,.2); }
.p-btn.glass { color: #fff; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); }
.p-btn.glass:hover { background: rgba(255,255,255,.13); }
.p-btn.line { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.p-btn.line:hover { border-color: #c8d0ca; transform: translateY(-1px); }
.p-btn.lg { height: 54px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.p-btn.sm { height: 38px; padding: 0 15px; font-size: 14px; border-radius: 10px; }
.p-btn.block { width: 100%; }

/* ---------- Shared: aurora background ---------- */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.aurora i:nth-child(1) { width: 52vmax; height: 52vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, #1f8a66 0%, transparent 65%); animation: drift1 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 40vmax; height: 40vmax; right: -14vmax; top: 10%; background: radial-gradient(circle, rgba(240,169,59,.55) 0%, transparent 62%); animation: drift2 26s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 46vmax; height: 46vmax; left: 10%; bottom: -30vmax; background: radial-gradient(circle, rgba(127,216,180,.45) 0%, transparent 60%); animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vmax, 14vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(10vmax, -12vmax) scale(1.1); } }
.grid-dots { position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px); background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Auth pages (sign in + register) ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--paper); }
.auth-stage { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, var(--night-3) 0%, var(--night) 55%); color: #eaf3ef;
    padding: 40px 56px; display: flex; flex-direction: column; gap: 32px; isolation: isolate; }
.auth-stage > * { position: relative; z-index: 1; }
.auth-stage .aurora, .auth-stage .grid-dots, .auth-stage .grain { z-index: 0; }
.auth-stage .p-brand { color: #fff; }
.stage-copy { margin-top: auto; max-width: 520px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: var(--glass); border: 1px solid var(--glass-line); color: var(--mint-2); backdrop-filter: blur(8px); }
.eyebrow b { background: var(--mint); color: var(--night); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; letter-spacing: .02em; }
.stage-copy h1 { font-size: clamp(38px, 4.4vw, 62px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; margin: 18px 0 14px; color: #fff; }
.stage-copy p { font-size: 17px; color: #b9cdc5; margin: 0; max-width: 440px; }
.shine { background: linear-gradient(100deg, var(--mint-2) 0%, var(--marigold-2) 45%, var(--coral) 70%, var(--mint-2) 100%); background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: -220% 0; } }

/* Live activity feed on the stage */
.feed { position: relative; height: 236px; max-width: 420px; margin-bottom: auto; }
.feed-card { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.04)); border: 1px solid var(--glass-line); backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); transition: transform .8s var(--ease), opacity .8s var(--ease); }
.feed-card .fi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: var(--night); font-weight: 800; }
.feed-card strong { display: block; font-size: 14.5px; color: #fff; font-weight: 700; }
.feed-card small { display: block; font-size: 12.5px; color: #9fb7ad; }
.feed-card .amt { margin-left: auto; font-weight: 800; color: var(--mint); font-size: 14px; white-space: nowrap; }
.fi.g { background: var(--mint); } .fi.y { background: var(--marigold-2); } .fi.c { background: var(--coral); } .fi.b { background: #9cc3ff; }
.stage-foot { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: #87a096; }
.stage-foot span { display: inline-flex; align-items: center; gap: 7px; }
.stage-foot .ic { width: 16px; height: 16px; color: var(--mint); }

.auth-main { position: relative; display: flex; flex-direction: column; padding: 28px 40px; background:
    radial-gradient(60% 50% at 100% 0%, rgba(240,169,59,.10), transparent 70%), radial-gradient(50% 40% at 0% 100%, rgba(29,107,82,.08), transparent 70%), var(--paper); }
.auth-top { display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.auth-top a { color: var(--pine); font-weight: 700; text-decoration: none; }
.auth-top a:hover { text-decoration: underline; }
.auth-center { flex: 1; display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 34px; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 8px; font-weight: 800; }
.auth-card .lead { color: var(--muted); margin: 0 0 28px; }
.auth-foot { font-size: 12.5px; color: var(--muted); text-align: center; }

/* Floating-label fields */
.fl { position: relative; margin-bottom: 16px; }
.fl input, .fl select, .fl textarea { width: 100%; height: 58px; padding: 22px 16px 8px 48px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff;
    font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none; }
.fl.no-ic input, .fl.no-ic select, .fl.no-ic textarea { padding-left: 16px; }
.fl textarea { height: auto; min-height: 96px; padding-top: 26px; resize: vertical; line-height: 1.45; }
.fl select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236d7c75' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.fl label { position: absolute; left: 48px; top: 18px; font-size: 16px; color: var(--muted); pointer-events: none; transform-origin: left top; transition: transform .2s var(--ease), color .2s; }
.fl.no-ic label { left: 16px; }
.fl > .ic { position: absolute; left: 16px; top: 19px; color: #9aa8a1; transition: color .2s; }
.fl input:focus, .fl select:focus, .fl textarea:focus { border-color: var(--pine); box-shadow: 0 0 0 4px rgba(29,107,82,.12); }
.fl input:focus ~ .ic, .fl select:focus ~ .ic { color: var(--pine); }
.fl input:focus + label, .fl input:not(:placeholder-shown) + label, .fl select + label, .fl textarea:focus + label, .fl textarea:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.76); color: var(--pine); font-weight: 600; }
.fl input:not(:focus):not(:placeholder-shown) + label, .fl select:not(:focus) + label, .fl textarea:not(:focus):not(:placeholder-shown) + label { color: var(--muted); }
.fl input::placeholder, .fl textarea::placeholder { color: transparent; }
.fl input:focus::placeholder, .fl textarea:focus::placeholder { color: #b3bdb8; }
.fl.bad input, .fl.bad select, .fl.bad textarea { border-color: var(--red); box-shadow: 0 0 0 4px rgba(194,65,45,.1); }
.fl .msg { display: block; font-size: 13px; color: var(--red); margin: 6px 4px 0; animation: drop .3s var(--ease); }
.fl .hint { display: block; font-size: 12.5px; color: var(--muted); margin: 6px 4px 0; }
.fl .eye { position: absolute; right: 8px; top: 9px; width: 40px; height: 40px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.fl .eye:hover { background: #f1f3ef; color: var(--ink); }
.fl.has-eye input { padding-right: 52px; }
.caps { display: none; font-size: 12.5px; color: #9a6a12; margin: -8px 4px 12px; }
.caps.on { display: block; animation: drop .25s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }

.alert-x { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: 14.5px; animation: drop .35s var(--ease); }
.alert-x .ic { width: 18px; height: 18px; margin-top: 2px; }
.alert-x.err { background: #fcebe7; color: #8c2c1c; border: 1px solid #f4cfc6; }
.alert-x.ok { background: #e4f4ec; color: #145a43; border: 1px solid #c4e6d5; }
.alert-x ul { margin: 0; padding-left: 18px; }

/* Submit button states */
.p-btn .spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; display: none; }
.p-btn.busy { pointer-events: none; }
.p-btn.busy .lbl, .p-btn.busy .ic { display: none; }
.p-btn.busy .spin { display: block; }
.p-btn.done { background: linear-gradient(135deg, #2aa37f, var(--pine)); }
@keyframes spin { to { transform: rotate(360deg); } }
.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.swap-link { text-align: center; font-size: 14.5px; color: var(--muted); }
.swap-link a { color: var(--pine); font-weight: 700; text-decoration: none; }
.swap-link a:hover { text-decoration: underline; }

/* Entrance animation for auth content */
.rise { opacity: 0; transform: translateY(14px); animation: rise .7s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 70ms + 120ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Full-screen transition (after sign in / registration / sign out) */
.portal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; color: #fff; pointer-events: none;
    background: radial-gradient(120% 120% at 50% 40%, var(--night-3), var(--night)); clip-path: circle(0 at var(--x, 50%) var(--y, 50%)); transition: clip-path .9s cubic-bezier(.7,0,.2,1); }
.portal.open { clip-path: circle(150vmax at var(--x, 50%) var(--y, 50%)); pointer-events: auto; }
.portal .aurora i { opacity: .45; }
.portal-in { position: relative; text-align: center; padding: 24px; opacity: 0; transform: scale(.94); transition: opacity .5s .45s var(--ease), transform .7s .45s var(--spring); }
.portal.open .portal-in { opacity: 1; transform: none; }
.portal .av { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 32px; font-weight: 800; color: var(--night);
    background: linear-gradient(145deg, var(--mint-2), var(--mint)); box-shadow: 0 20px 50px -14px rgba(127,216,180,.8); }
.portal h2 { font-size: clamp(30px, 5vw, 50px); letter-spacing: -.03em; margin: 0 0 8px; font-weight: 800; }
.portal p { color: #a9c2b8; margin: 0; font-size: 17px; }
.portal .bar { width: 180px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); margin: 26px auto 0; overflow: hidden; }
.portal .bar i { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--mint), var(--marigold-2)); animation: load 1.1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.checklist { list-style: none; padding: 0; margin: 24px auto 0; text-align: left; display: inline-flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #8aa59a; transition: color .3s; }
.checklist li .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); display: grid; place-items: center; transition: all .35s var(--spring); }
.checklist li .tick svg { width: 14px; height: 14px; stroke: var(--night); stroke-width: 3; fill: none; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s .1s; }
.checklist li.on { color: #fff; }
.checklist li.on .tick { background: var(--mint); border-color: var(--mint); transform: scale(1.08); }
.checklist li.on .tick svg { stroke-dashoffset: 0; }
.checklist li.now .tick { border-color: var(--mint); border-top-color: transparent; animation: spin .8s linear infinite; }
canvas.confetti { position: fixed; inset: 0; z-index: 101; pointer-events: none; }

/* ---------- Register wizard ---------- */
.steps-v { list-style: none; padding: 0; margin: 0 0 auto; display: flex; flex-direction: column; gap: 6px; max-width: 380px; }
.steps-v li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; transition: background .35s, color .35s; color: #86a096; }
.steps-v li .n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; border: 1.5px solid var(--glass-line); flex-shrink: 0; transition: all .4s var(--spring); }
.steps-v li strong { display: block; color: inherit; font-size: 15px; }
.steps-v li small { display: block; font-size: 12.5px; opacity: .8; }
.steps-v li.cur { background: var(--glass); color: #fff; border: 1px solid var(--glass-line); }
.steps-v li.cur .n { background: var(--marigold); color: var(--night); border-color: transparent; transform: scale(1.06); }
.steps-v li.done .n { background: var(--mint); color: var(--night); border-color: transparent; }
.steps-v li.done { color: #cfe3da; }
.progress { height: 6px; border-radius: 6px; background: #ebeee8; overflow: hidden; margin-bottom: 26px; display: none; }
.progress i { display: block; height: 100%; width: 33%; border-radius: 6px; background: linear-gradient(90deg, var(--pine-2), var(--marigold)); transition: width .6s var(--ease); }
.wiz { position: relative; }
.wiz-on .step { display: none; }
.wiz-on .step.cur { display: block; animation: stepIn .55s var(--ease); }
.wiz-on .step.cur.back { animation-name: stepBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes stepBack { from { opacity: 0; transform: translateX(-28px); } }
.step-head { margin-bottom: 22px; }
.step-head .k { font-size: 13px; font-weight: 700; color: var(--pine); letter-spacing: .06em; text-transform: uppercase; }
.step-head h2 { margin: 6px 0 6px; }
.step-head p { margin: 0; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.wiz-nav { display: flex; gap: 10px; margin-top: 10px; }
.wiz-nav .p-btn.back { flex: 0 0 auto; }
.wiz-nav .p-btn.next { flex: 1; }
.no-js-only { display: none; }
.wiz-off .step { margin-bottom: 30px; }
.wiz-off .wiz-nav .back, .wiz-off .wiz-nav .next { display: none; }
.wiz-off .no-js-only { display: block; }
.strength { display: flex; gap: 5px; margin: -6px 4px 14px; align-items: center; }
.strength i { flex: 1; height: 5px; border-radius: 5px; background: #e8ebe6; transition: background .3s; }
.strength span { font-size: 12px; color: var(--muted); min-width: 70px; text-align: right; }
.strength[data-s="1"] i:nth-child(-n+1) { background: var(--red); }
.strength[data-s="2"] i:nth-child(-n+2) { background: var(--marigold); }
.strength[data-s="3"] i:nth-child(-n+3) { background: #59b48d; }
.strength[data-s="4"] i:nth-child(-n+4) { background: var(--pine); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .2s var(--ease); user-select: none; }
.chip span .ic { width: 17px; height: 17px; color: var(--muted); }
.chip:hover span { border-color: #c4cdc7; }
.chip input:checked + span { border-color: var(--pine); background: #e8f4ee; color: var(--pine); box-shadow: 0 0 0 3px rgba(29,107,82,.1); transform: translateY(-1px); }
.chip input:checked + span .ic { color: var(--pine); }
.chip input:focus-visible + span { outline: 3px solid var(--marigold); outline-offset: 2px; }
.lbl-sm { display: block; font-size: 14px; font-weight: 700; margin: 4px 0 10px; }
.toggle-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; margin-bottom: 14px; font-size: 14.5px; }
.toggle-row input { width: 20px; height: 20px; accent-color: var(--pine); margin: 1px 0 0; flex-shrink: 0; }
details.more { margin: 0 0 16px; }
details.more summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--pine); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #e8f4ee; font-weight: 800; }
details.more[open] summary::before { content: "–"; }
details.more[open] > div { animation: drop .3s var(--ease); margin-top: 12px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Home page ---------- */
.home-hero { position: relative; overflow: hidden; color: #eaf3ef; isolation: isolate;
    background: radial-gradient(120% 80% at 50% 0%, var(--night-3) 0%, var(--night) 60%); padding-bottom: 40px; }
.home-hero .aurora, .home-hero .grid-dots, .home-hero .grain { z-index: -1; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.nav { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.nav-in { display: flex; align-items: center; gap: 24px; height: 72px; }
.nav .p-brand { color: #fff; }
.nav-links { display: flex; gap: 6px; margin-left: 28px; }
.nav-links a { text-decoration: none; color: #b8ccc4; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.nav.stuck { background: rgba(10,29,23,.78); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 10px 30px -18px rgba(0,0,0,.6); }
.nav-links .mob { display: none; }
.nav-burger { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--glass); color: #fff; cursor: pointer; place-items: center; }
.hero-in { text-align: center; padding-top: 70px; padding-bottom: 30px; }
.hero-in h1 { overflow-wrap: break-word; font-size: clamp(36px, 7vw, 88px); line-height: .98; letter-spacing: -.045em; font-weight: 850; font-weight: 800; margin: 22px auto 22px; max-width: 980px; color: #fff; }
.hero-in .blurb { font-size: clamp(17px, 1.6vw, 20px); color: #b1c7be; max-width: 680px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.trust { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 26px; font-size: 14px; color: #8fa89e; }
.trust span { display: inline-flex; gap: 7px; align-items: center; }
.trust .ic { width: 16px; height: 16px; color: var(--mint); }

/* Product mock-up in the hero */
.mock-wrap { position: relative; margin: 64px auto 0; max-width: 1040px; perspective: 1800px; }
.mock { border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05)); padding: 10px; border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 60px 120px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.2); transform: rotateX(10deg); transform-origin: 50% 0; transition: transform .9s var(--ease); }
.mock-wrap.in .mock { transform: rotateX(0); }
.mock-win { border-radius: 12px; overflow: hidden; background: #f3f5f2; color: var(--ink); display: grid; grid-template-columns: 190px 1fr; min-height: 420px; text-align: left; }
.mock-side { background: #0e2620; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.mock-side .p-brand { color: #fff; font-size: 14px; gap: 8px; margin: 0 4px 14px; }
.mock-side .p-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
.mock-side > span:not(.p-brand) { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; color: #9db6ac; font-size: 13px; font-weight: 600; }
.mock-side > span .ic { width: 15px; height: 15px; }
.mock-side > span.on { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 3px 0 0 var(--marigold); }
.mock-main { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mock-top { display: flex; align-items: center; gap: 12px; }
.mock-top h4 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.mock-top .stat { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); }
.mock-top .stat b { display: block; font-size: 20px; color: var(--pine); letter-spacing: -.02em; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; flex: 1; }
.col { background: #e9ede9; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col h5 { margin: 2px 4px 2px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; justify-content: space-between; }
.col.won { background: #ddf1e7; }
.deal { background: #fff; border-radius: 9px; padding: 9px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 10px -6px rgba(0,0,0,.15); font-size: 12.5px; border-left: 3px solid var(--c, var(--pine)); }
.deal b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal small { color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.deal.fly { position: fixed; z-index: 5; margin: 0; transition: left .9s var(--ease), top .9s var(--ease), transform .9s var(--ease); transform: rotate(-3deg) scale(1.04); box-shadow: 0 20px 40px -12px rgba(0,0,0,.35); }
.deal.pop { animation: popIn .6s var(--spring); }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } }
.floaty { position: absolute; z-index: 3; text-align: left; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.96); color: var(--ink);
    box-shadow: 0 24px 50px -18px rgba(0,0,0,.55); font-size: 13px; min-width: 230px; animation: bob 6s ease-in-out infinite; }
.floaty .fi { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: var(--night); flex-shrink: 0; }
.floaty b { display: block; font-size: 13.5px; }
.floaty small { color: var(--muted); }
.floaty.a { left: -46px; top: 120px; }
.floaty.b { right: -40px; top: 40px; animation-delay: -2s; }
.floaty.c { right: -24px; bottom: 50px; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* Sections */
.sec { padding: 110px 0; position: relative; }
.sec.cream { background: var(--cream); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pine); margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 14px; font-weight: 800; }
.sec-head p { font-size: 18px; color: var(--ink-2); margin: 0; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { grid-column: span 2; position: relative; overflow: hidden; border-radius: 22px; background: #fff; border: 1px solid var(--line); padding: 26px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(19,32,27,.35); border-color: #d3dad5; }
.tile.w3 { grid-column: span 3; } .tile.w4 { grid-column: span 4; }
.tile.dark { background: linear-gradient(160deg, var(--night-3), var(--night)); color: #e6f1ec; border-color: transparent; }
.tile.dark p { color: #a7bdb4; }
.tile .ti { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #e8f4ee; color: var(--pine); margin-bottom: 18px; }
.tile.dark .ti { background: rgba(127,216,180,.14); color: var(--mint); }
.tile h3 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 8px; line-height: 1.2; }
.tile p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.tile .art { margin-top: 22px; }
.mini-inbox { display: flex; flex-direction: column; gap: 8px; }
.mini-inbox div { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #f5f7f4; font-size: 13px; transition: transform .4s var(--ease); }
.tile:hover .mini-inbox div:nth-child(1) { transform: translateX(6px); }
.tile:hover .mini-inbox div:nth-child(2) { transform: translateX(12px); }
.tile:hover .mini-inbox div:nth-child(3) { transform: translateX(18px); }
.mini-inbox i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12px; color: var(--night); flex-shrink: 0; }
.mini-inbox b { font-size: 13px; } .mini-inbox small { color: var(--muted); margin-left: auto; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mini-cal span { aspect-ratio: 1; border-radius: 8px; background: rgba(255,255,255,.06); font-size: 11px; display: grid; place-items: center; color: #8aa59a; }
.mini-cal span.ev { background: rgba(127,216,180,.22); color: var(--mint-2); font-weight: 700; }
.mini-cal span.ev2 { background: rgba(240,169,59,.25); color: var(--marigold-2); font-weight: 700; }
.mini-cal span.today { outline: 2px solid var(--mint); }
.flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.flow span { padding: 9px 13px; border-radius: 11px; background: #f5f7f4; font-size: 13px; font-weight: 700; border: 1px solid var(--line); }
.flow i { width: 26px; height: 2px; background: linear-gradient(90deg, var(--pine), var(--marigold)); position: relative; overflow: hidden; }
.flow i::after { content: ""; position: absolute; inset: 0; background: #fff; animation: flowdash 1.8s linear infinite; width: 40%; opacity: .8; }
@keyframes flowdash { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.bars i { flex: 1; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--mint), var(--pine)); height: 0; transition: height 1.2s var(--ease); }
.in .bars i { height: var(--h); }
.orgs { display: flex; gap: 10px; flex-wrap: wrap; }
.orgs span { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid var(--glass-line); font-size: 13px; font-weight: 700; color: #fff; }
.orgs b { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--night); font-size: 12px; }
.mail-art { border-radius: 14px; background: #f5f7f4; padding: 14px; font-size: 13px; }
.mail-art .h { height: 9px; border-radius: 4px; background: #dfe5e0; margin-bottom: 7px; }
.mail-art .btnx { display: inline-block; margin-top: 8px; padding: 7px 14px; border-radius: 8px; background: var(--pine); color: #fff; font-weight: 700; font-size: 12px; }

.steps-h { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; counter-reset: s; }
.steps-h::before { content: ""; position: absolute; left: 12%; right: 12%; top: 34px; height: 2px; background: linear-gradient(90deg, var(--pine), var(--marigold)); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
.steps-h.in::before { transform: scaleX(1); }
.sh { text-align: center; position: relative; padding: 0 10px; }
.sh .n { width: 68px; height: 68px; border-radius: 22px; margin: 0 auto 20px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--night);
    background: linear-gradient(145deg, var(--marigold-2), var(--marigold)); box-shadow: 0 16px 34px -14px rgba(240,169,59,.9); position: relative; z-index: 1; }
.sh:nth-child(2) .n { background: linear-gradient(145deg, var(--mint-2), var(--mint)); box-shadow: 0 16px 34px -14px rgba(127,216,180,.9); }
.sh:nth-child(3) .n { background: linear-gradient(145deg, #9fd0ff, #6aa8f0); box-shadow: 0 16px 34px -14px rgba(106,168,240,.9); }
.sh h3 { font-size: 21px; margin: 0 0 8px; letter-spacing: -.02em; }
.sh p { margin: 0; color: var(--ink-2); }
.cta-band { position: relative; overflow: hidden; isolation: isolate; border-radius: 32px; padding: 80px 40px; text-align: center; color: #fff;
    background: radial-gradient(120% 120% at 50% 0%, var(--night-3), var(--night)); }
.cta-band .aurora, .cta-band .grid-dots { z-index: -1; }
.cta-band h2 { font-size: clamp(32px, 4.6vw, 58px); letter-spacing: -.04em; line-height: 1.02; margin: 0 0 16px; }
.cta-band p { color: #aac2b8; font-size: 18px; margin: 0 auto 30px; max-width: 560px; }
.foot { padding: 40px 0 50px; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot a { text-decoration: none; margin-left: 20px; font-weight: 600; color: var(--ink-2); }
.foot a:hover { color: var(--pine); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }

/* Toast used on sign-out arrival */
.p-toast { position: fixed; left: 50%; top: 22px; z-index: 90; transform: translate(-50%, -140%); display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: 14px;
    background: var(--night); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: 0 20px 40px -14px rgba(0,0,0,.5); transition: transform .6s var(--spring); }
.p-toast.show { transform: translate(-50%, 0); }
.p-toast .ic { color: var(--mint); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .floaty.a { left: -10px; } .floaty.b { right: -10px; } .floaty.c { display: none; }
}
@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; }
    .auth-stage { padding: 22px 22px 26px; gap: 18px; min-height: 0; }
    .stage-copy { margin-top: 6px; }
    .stage-copy h1 { font-size: 34px; margin: 12px 0 8px; }
    .stage-copy p { font-size: 15px; }
    .feed, .stage-foot, .steps-v { display: none; }
    .progress { display: block; }
    .auth-main { padding: 20px 20px 28px; }
    .auth-top { justify-content: space-between; }
    .auth-center { place-items: start center; padding-top: 18px; }
    .bento { grid-template-columns: 1fr 1fr; }
    .tile, .tile.w3, .tile.w4 { grid-column: span 2; }
    .steps-h { grid-template-columns: 1fr; gap: 36px; }
    .steps-h::before { display: none; }
    .mock-win { grid-template-columns: 1fr; }
    .mock-side { display: none; }
    .floaty { display: none; }
}
@media (max-width: 720px) {
    .nav-links { display: none; position: absolute; left: 12px; right: 12px; top: 70px; flex-direction: column; margin: 0; padding: 10px; border-radius: 16px;
        background: rgba(10,29,23,.97); border: 1px solid var(--glass-line); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
    .nav.open .nav-links { display: flex; animation: drop .3s var(--ease); }
    .nav-links a { padding: 12px 14px; }
    .nav-burger { display: grid; }
    .nav-cta { display: none; }
    .nav-links .mob { display: flex; margin-top: 6px; }
    .hero-in { padding-top: 40px; }
    .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .col:nth-child(n+3) { display: none; }
    .sec { padding: 76px 0; }
    .row2 { grid-template-columns: 1fr; }
    .cta-band { padding: 56px 22px; border-radius: 24px; }
    .foot a { margin: 0 16px 0 0; }
    .auth-card h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
    .reveal, .rise { opacity: 1; transform: none; }
}

/* HubHex brand */
.p-mark.has-logo { background: none; box-shadow: none; width: auto; height: auto; border-radius: 0; }
.p-mark.has-logo .brand-logo { width: 40px; height: auto; display: block; filter: drop-shadow(0 4px 14px rgba(240,169,59,.25)); }
.mock-side .p-mark.has-logo .brand-logo { width: 26px; filter: none; }
.wm-a { color: inherit; }
.wm-b { color: var(--marigold); }
.p-brand { font-size: 20px; letter-spacing: -.02em; }
.foot .p-brand .wm-a { color: var(--ink); }
.keep { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); margin: -4px 2px 18px; cursor: pointer; }
.keep input { width: 18px; height: 18px; accent-color: var(--pine); }

/* Tenant logo on a tenant's own sign-in page */
.p-mark.has-logo .tenant-logo { width: auto !important; height: 40px; max-width: 240px; object-fit: contain; filter: none; }
.p-mark.has-logo .tenant-logo.on-chip { background: #fff; padding: 6px 10px; border-radius: 10px; }
.passkey-btn { margin-top: 10px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: rgba(0,0,0,.45); font-size: 13px; margin: 14px 0 4px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .25; }
