/* AvanzaSuite public entry: same visual language as the marketing landing.
   Scoped to auth/product pages so the operator panel and billing remain intact. */

body.auth-page,
body.product-page {
    --portal-bg: #fff;
    --portal-card: #fff;
    --portal-border: #dddee1;
    --portal-text: #101214;
    --portal-muted: #505258;
    --portal-quiet: #757982;
    --portal-field: #fff;
    --portal-soft: #f4f5f7;
    --portal-link: #1868db;
    --portal-active-border: #1868db;
    --portal-brand: #1868db;
    --portal-brand-hover: #1558bc;
    --portal-display: 'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui, sans-serif;
    background: var(--portal-bg);
    font-size: 15px;
}

html[data-theme='dark'] body.auth-page,
html[data-theme='dark'] body.product-page {
    --portal-bg: #15171c;
    --portal-card: #1d2027;
    --portal-border: #363b45;
    --portal-text: #f7f7fb;
    --portal-muted: #c4c8d0;
    --portal-quiet: #a6abb6;
    --portal-field: #252a33;
    --portal-soft: #292e38;
    --portal-link: #8fbdff;
    --portal-active-border: #8fbdff;
    --portal-brand: #1868db;
    --portal-brand-hover: #1558bc;
}

.auth-page h1,
.auth-page h2,
.product-page h1,
.product-page h2,
.auth-page .auth-brand,
.product-page .product-brand {
    font-family: var(--portal-display);
    letter-spacing: -.035em;
}

.auth-page .auth-header,
.product-page .product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    min-height: 82px;
    padding: 1rem max(1.5rem, calc((100vw - 1240px) / 2));
    border-bottom: 1px solid var(--portal-border);
    text-align: left;
}

.auth-page .auth-brand,
.product-page .product-brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--portal-text) !important;
}

.auth-page .theme-switch,
.product-page .theme-switch {
    position: static;
    min-height: 40px;
    padding: .55rem .95rem;
    border-radius: 2rem;
    background: var(--portal-soft);
    font-size: .8rem;
    font-weight: 600;
}

.auth-page .theme-switch:hover,
.product-page .theme-switch:hover { background: var(--portal-card); }

.auth-page .auth-main { margin-top: clamp(2rem, 5vw, 5rem); }
.auth-page .auth-account { max-width: 580px; }
.auth-page .auth-intro { margin-bottom: 2rem; }
.auth-page .auth-intro h1,
.product-page .product-intro h1 {
    font-size: clamp(2.25rem, 3.3vw, 3.55rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.auth-page .auth-intro p,
.product-page .product-intro p {
    margin-top: .9rem;
    font-size: 1rem;
    line-height: 1.65;
}

.auth-page .auth-card {
    padding: 2.25rem;
    border-radius: 1.25rem;
    box-shadow: 0 20px 55px -35px rgb(16 18 20 / 25%);
}

.auth-page .auth-account.auth-split {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(2.5rem, 5vw, 5.5rem);
    align-items: start;
    max-width: 1240px;
    margin-bottom: 3rem;
}

.auth-page .auth-split .auth-intro {
    grid-column: 1;
    grid-row: 1;
    margin-top: 1.5rem;
    text-align: left;
}

.auth-page .auth-split .auth-card {
    grid-column: 1;
    grid-row: 2;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-page .auth-showcase {
    position: relative;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: start;
    display: flex;
    flex-direction: column;
    min-height: 590px;
    padding: clamp(2rem, 3vw, 3.5rem);
    overflow: hidden;
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at 86% 24%, rgb(255 255 255 / 38%) 0 12%, transparent 12.5%),
        radial-gradient(circle at 10% 88%, rgb(255 255 255 / 25%) 0 18%, transparent 18.5%),
        #ca83f4;
    color: #17121e;
    box-shadow: 0 30px 65px -36px rgb(93 44 143 / 40%);
}

.auth-page .auth-showcase-copy { position: relative; z-index: 1; max-width: 27rem; }
.auth-page .auth-showcase-eyebrow {
    margin: 0 0 1.4rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.auth-page .auth-showcase h2 {
    margin: 0;
    color: #17121e;
    font-size: clamp(2rem, 3vw, 3.25rem);
    font-weight: 600;
    line-height: 1.1;
}
.auth-page .auth-showcase-copy > p:last-child {
    max-width: 34ch;
    margin: 1.1rem 0 0;
    color: #30233a;
    font-size: .98rem;
    line-height: 1.55;
}

.auth-page .auth-showcase-window {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    min-height: 230px;
    margin: auto 0 0 auto;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 75%);
    border-radius: .9rem;
    background: #fff;
    box-shadow: 0 25px 55px -25px rgb(31 21 51 / 33%);
    transform: rotate(-3deg);
}
.auth-page .auth-showcase-window-bar {
    display: flex;
    align-items: center;
    gap: .32rem;
    height: 35px;
    padding: 0 .8rem;
    border-bottom: 1px solid #e5e7eb;
}
.auth-page .auth-showcase-window-bar > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d6d7dc;
}
.auth-page .auth-showcase-window-bar small {
    margin-left: .4rem;
    color: #6b7280;
    font-size: .62rem;
}
.auth-page .auth-showcase-window-body { display: grid; grid-template-columns: 70px 1fr; min-height: 195px; }
.auth-page .auth-showcase-window-sidebar { display: grid; align-content: start; gap: 15px; padding: 20px; background: #1b2031; }
.auth-page .auth-showcase-window-sidebar i { width: 30px; height: 7px; border-radius: 3px; background: #7883a7; }
.auth-page .auth-showcase-window-sidebar i:first-child { background: #a79cfa; }
.auth-page .auth-showcase-window-content { padding: 20px; }
.auth-page .auth-showcase-window-content > b,
.auth-page .auth-showcase-window-content > span { display: block; height: 8px; border-radius: 3px; background: #e8eaf1; }
.auth-page .auth-showcase-window-content > b { width: 48%; height: 12px; background: #2b3040; }
.auth-page .auth-showcase-window-content > span { width: 78%; margin-top: 11px; }
.auth-page .auth-showcase-window-content > span + span { width: 59%; margin-top: 6px; }
.auth-page .auth-showcase-window-content > div { display: flex; gap: 10px; margin-top: 20px; }
.auth-page .auth-showcase-window-content > div i { flex: 1; height: 73px; border-radius: .45rem; background: #eee8ff; }
.auth-page .auth-showcase-window-content > div i:nth-child(2) { background: #d9e8ff; }
.auth-page .auth-showcase-window-content > div i:nth-child(3) { background: #d8f5ea; }
.auth-page .auth-showcase-chip {
    position: absolute;
    z-index: 2;
    right: 1.5rem;
    bottom: 1.35rem;
    padding: .6rem .8rem;
    border-radius: .3rem;
    background: #101214;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.auth-page .signup-label { display: inline-block; margin-bottom: .3rem; font-weight: 700; }
.auth-page .signup-input {
    min-height: 49px;
    padding-inline: 1rem;
    border-color: var(--portal-border);
    border-radius: .65rem;
    background: var(--portal-field);
    font-size: .95rem;
}
.auth-page .signup-input:focus { border-color: var(--portal-brand); }
.auth-page .portal-primary,
.product-page .product-action {
    min-height: 49px;
    border-color: var(--portal-brand);
    border-radius: 2rem;
    background: var(--portal-brand);
    font-size: .92rem;
    font-weight: 600;
    transition: scale .15s cubic-bezier(.4, 0, 0, 1), background-color .15s cubic-bezier(.4, 0, 0, 1), border-color .15s cubic-bezier(.4, 0, 0, 1);
}
.auth-page .portal-primary:hover:not(:disabled),
.product-page .product-action:hover:not(:disabled) {
    border-color: var(--portal-brand-hover);
    background: var(--portal-brand-hover);
    scale: 1.02;
}
.auth-page .portal-primary:active:not(:disabled),
.product-page .product-action:active:not(:disabled) { scale: .985; }
.product-page .product-action:disabled {
    border-color: var(--portal-border);
    background: var(--portal-soft);
    color: var(--portal-quiet) !important;
}
.auth-page .google-action { min-height: 49px; border-radius: 2rem; font-size: .92rem; }
.auth-page .selected-product { padding: 1rem; border: 1px solid #ded3fc; border-radius: .75rem; background: #f3edff; }
.auth-page .selected-product svg { color: var(--portal-brand); }
.auth-page .registration-confirmation { margin: 1.1rem 0 1.5rem; }
.auth-page .auth-footer,
.product-page .product-footer { padding-bottom: 2rem; font-size: .75rem; }

.auth-page .registration-steps,
.product-page .product-steps { margin-top: 2rem; }
.auth-page .registration-steps li > span,
.product-page .product-steps li > span { width: 28px; height: 28px; }
.auth-page .registration-steps [aria-current] > span,
.product-page .product-steps [aria-current] > span {
    border-color: var(--portal-brand);
    background: var(--portal-brand);
}

/* Product comparison stays a grid: buyers can still compare every option. */
.product-page .product-main { max-width: 1240px; margin-top: 4.5rem; }
.product-page .product-intro { max-width: 800px; margin-bottom: 2.75rem; text-align: left; }
.product-page .product-grid { gap: 1.5rem; }
.product-page .product-card {
    --product-wash: #ead1fb;
    padding: 1.7rem;
    border-color: var(--portal-border);
    border-radius: 1.2rem;
    box-shadow: 0 10px 30px -24px rgb(16 18 20 / 28%);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.product-page .product-card:nth-child(2) { --product-wash: #cfe1ff; }
.product-page .product-card:nth-child(3) { --product-wash: #cff1df; }
.product-page .product-card:nth-child(4) { --product-wash: #ffdfc5; }
.product-page .product-card:nth-child(5) { --product-wash: #d9d0ff; }
.product-page .product-card:nth-child(6) { --product-wash: #ffd8e4; }
.product-page .product-card:hover,
.product-page .product-card:focus-within {
    border-color: var(--portal-active-border);
    box-shadow: 0 18px 38px -24px rgb(16 18 20 / 26%);
}
.product-page .product-icon { width: 60px; height: 60px; border-radius: .9rem; background: var(--product-wash); color: #20212a; }
.product-page .product-icon svg { width: 30px; height: 30px; }
.product-page .product-badge { padding: .4rem .7rem; border-radius: 2rem; font-size: .72rem; font-weight: 700; }
html[data-theme='light'] .product-page .product-badge.is-ready {
    border-color: #a8c7fa;
    background: #e9f2ff;
    color: #0c4a9e;
}
.product-page .product-category { color: var(--portal-muted); font-size: .73rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.product-page .product-card h2 { margin-top: .4rem; font-size: 1.55rem; font-weight: 700; }
.product-page .product-description { font-size: .91rem; line-height: 1.6; }
.product-page .product-features { font-size: .85rem; }
.product-page .product-card-bottom { margin-top: auto; }
.product-page .product-choice-guide { border-radius: 1rem; }
.product-page .product-choice-guide {
    margin-bottom: 2rem;
    border: 1px solid var(--portal-border);
    background: var(--portal-soft);
}
.product-page .product-choice-guide > summary {
    padding: 1.15rem 1.4rem;
    color: var(--portal-text);
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
}
.product-page .product-choice-content { padding: 0 1.4rem 1.4rem; }
.product-page .product-choice-content > p { margin: 0 0 1rem; color: var(--portal-muted); }
.product-page .product-choice-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.product-page .product-choice-option {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: 1rem;
    border: 1px solid var(--portal-border);
    border-radius: .75rem;
    background: var(--portal-card);
    text-decoration: none;
}
.product-page .product-choice-option span { color: var(--portal-muted); }
.product-page .product-choice-option strong { color: var(--portal-link); }
.product-page .product-choice-option em { color: var(--portal-quiet); font-style: normal; }
.product-page .product-choice-option:hover { border-color: var(--portal-active-border); }
.product-page .product-fit { margin: 0 0 1.25rem; padding: 1rem; border-radius: .75rem; background: var(--portal-soft); }
.product-page .product-fit h3,
.product-page .product-details h3 { margin: 0 0 .3rem; color: var(--portal-text); font-size: .82rem; font-weight: 700; }
.product-page .product-fit p { margin: 0; color: var(--portal-muted); font-size: .82rem; line-height: 1.6; }
.product-page .product-details { margin-bottom: 1.25rem; }
.product-page .product-details > summary { color: var(--portal-link); font-size: .82rem; font-weight: 700; cursor: pointer; }
.product-page .product-details-content { padding: 1rem 0 0; color: var(--portal-muted); font-size: .84rem; }
.product-page .product-details-content > p { margin: 0 0 1rem; }
.product-page .product-module-list > div { margin: 0 0 .8rem; }
.product-page .product-module-list dt { font-weight: 700; }
.product-page .product-module-list dd { margin: .2rem 0 0; }
.product-page .product-benefits { padding-left: 1rem; }
.product-page .product-benefits li { margin: .25rem 0; }
.product-page .product-example { padding: 1rem; border-radius: .7rem; background: var(--portal-soft); }
.product-page .product-example p { margin: 0; }
.product-page .product-choice-guide > summary:focus-visible,
.product-page .product-details > summary:focus-visible { outline: 2px solid var(--portal-active-border); outline-offset: 3px; }
.product-page .product-guidance { padding: 1.4rem; border: 0; border-radius: 1rem; background: #f3edff; }
.product-page .product-login { margin-top: 2rem; font-size: .9rem; }

html[data-theme='dark'] .auth-page .selected-product,
html[data-theme='dark'] .product-page .product-guidance { border-color: #5c5072; background: #2b2637; }
html[data-theme='dark'] .auth-page .selected-product svg { color: #c4b5fd; }
html[data-theme='dark'] .product-page .product-icon { color: #20212a; }

@media (max-width: 950px) {
    .auth-page .auth-account.auth-split { display: block; max-width: 600px; }
    .auth-page .auth-split .auth-intro { margin-top: 0; text-align: center; }
    .auth-page .auth-split .auth-card { padding: 1.75rem; border: 1px solid var(--portal-border); border-radius: 1.1rem; background: var(--portal-card); }
    .auth-page .auth-showcase { display: none; }
    .product-page .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .auth-page .auth-header,
    .product-page .product-header { min-height: 72px; padding: .9rem 1.25rem; }
    .auth-page .auth-brand,
    .product-page .product-brand { font-size: 1.18rem; }
    .auth-page .auth-main,
    .product-page .product-main { margin-top: 2.5rem; padding-inline: 1.25rem; }
    .auth-page .auth-split .auth-card { padding: 1.4rem; }
    .auth-page .auth-intro h1,
    .product-page .product-intro h1 { font-size: clamp(2rem, 8vw, 2.65rem); }
    .product-page .product-grid { grid-template-columns: 1fr; }
    .product-page .product-intro { text-align: center; }
    .product-page .product-card { padding: 1.4rem; }
    .product-page .product-choice-options { grid-template-columns: 1fr; }
    .product-page .product-choice-guide > summary { padding: 1rem; }
    .product-page .product-choice-content { padding: 0 1rem 1rem; }
    .auth-page .registration-steps ol,
    .product-page .product-steps ol { gap: .65rem; }
    .auth-page .registration-steps li,
    .product-page .product-steps li { font-size: .65rem; }
}

@media (prefers-reduced-motion: no-preference) {
    .auth-page .auth-showcase-window { animation: auth-window-appear .55s ease-out both; }
    .product-page .product-card { animation: auth-card-appear .4s ease-out both; }
    .product-page .product-card:nth-child(2),
    .product-page .product-card:nth-child(5) { animation-delay: .06s; }
    .product-page .product-card:nth-child(3),
    .product-page .product-card:nth-child(6) { animation-delay: .12s; }
    @keyframes auth-window-appear { from { opacity: 0; transform: translateY(12px) rotate(-4deg); } to { opacity: 1; transform: translateY(0) rotate(-3deg); } }
    @keyframes auth-card-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page .portal-primary,
    .product-page .product-action,
    .product-page .product-card,
    .auth-page .theme-switch,
    .product-page .theme-switch { transition: none; animation: none; }
    .auth-page .portal-primary:hover,
    .product-page .product-action:hover,
    .product-page .product-card:hover { scale: 1; }
    .auth-page .portal-primary:active,
    .product-page .product-action:active { scale: 1; }
}
