/* =============================================================
   public.css - marketing / auth pages (unauthenticated shell)
   Clean fintech-editorial theme, Ripple blue accent.
   ============================================================= */

html, body {
    background: var(--bg);
    color: var(--text-2);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

/* Keeps the footer pinned to the bottom of the viewport on short pages
   (e.g. Privacy) instead of leaving a big empty gap of page background
   below it, while still flowing normally once content is taller than the
   viewport. Scoped to _PublicLayout only - the auth split-screen pages also
   load this stylesheet but manage their own full-height layout. */
.public-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.public-main {
    flex: 1 1 auto;
}

a { text-decoration: none; color: var(--text); }

h1, h2, h3, h4, h5 {
    color: var(--text);
    letter-spacing: -.015em;
    font-weight: 700;
}

::selection { background: var(--brand-tint); color: var(--text); }

/* ---- Kicker pill ---- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .4rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--brand-tint-soft);
    color: var(--brand-strong);
}

.pill i { color: var(--brand); }

.section-heading {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.section-heading h2 { margin-top: .75rem; }

.section-heading .lead {
    color: var(--muted);
    margin-top: .85rem;
    margin-bottom: 0;
}

.section-heading::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin: 1.25rem auto 0;
    border-radius: 999px;
    background: var(--brand);
    opacity: .7;
}

/* ---- Navbar ---- */
.navbar-public {
    background: color-mix(in oklab, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
    padding-top: .7rem;
    padding-bottom: .7rem;
    position: sticky;
    top: 0;
    z-index: 40;
}

.navbar-public .navbar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.navbar-public .navbar-brand .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .95rem;
}

.navbar-public .nav-link {
    color: var(--text-2);
    font-weight: 500;
    font-size: .95rem;
    position: relative;
}

.navbar-public .nav-link:hover { color: var(--text); }

.navbar-public .nav-link.active { color: var(--brand-strong); }

.navbar-public .navbar-nav > .nav-item > .nav-link:not(.nav-link-signin)::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: .05rem;
    height: 2px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.navbar-public .navbar-nav > .nav-item > .nav-link:not(.nav-link-signin):hover::after,
.navbar-public .navbar-nav > .nav-item > .nav-link.active::after {
    transform: scaleX(1);
}

.navbar-public .navbar-toggler {
    border-color: var(--line);
    padding: .45rem .6rem;
}

.navbar-public .nav-link-signin {
    color: #fff;
    background: var(--brand);
    border-radius: 999px;
    padding: .5rem 1.2rem;
    font-weight: 600;
}

.navbar-public .nav-link-signin:hover { background: var(--brand-strong); }

.navbar-public .theme-toggle-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-2);
    display: grid;
    place-items: center;
    cursor: pointer;
    appearance: none;
    font-size: .95rem;
}

.navbar-public .theme-toggle-btn:hover { background: var(--hover); color: var(--text); }

.navbar-public .theme-toggle-btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

@media (max-width: 991.98px) {
    .navbar-public .navbar-collapse {
        margin-top: .75rem;
        padding: .5rem 0 1.25rem;
        border-top: 1px solid var(--line);
    }

    .navbar-public .nav-link { padding: .65rem 0; font-size: 1.05rem; text-align: center; }

    .navbar-public .nav-link-signin {
        margin-top: .5rem;
        border-radius: var(--radius-sm);
        padding: .75rem 1rem;
        display: block;
        text-align: center;
    }

    .navbar-public .theme-toggle-btn {
        margin: .5rem auto 0;
    }
}

/* ---- Buttons ---- */
.btn { border-radius: var(--radius-sm); font-weight: 600; }

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
    color: #fff;
    transform: translateY(-1px);
}

.btn-light {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
}

.btn-light:hover {
    background: var(--brand-tint-soft);
    border-color: var(--brand);
    color: var(--text);
}

/* Filled secondary CTA (Aqua Mint) - used instead of .btn-light for marketing "Log in" style
   secondary actions, so a secondary button reads as filled rather than bordered/outline (this
   app's buttons are always filled, never outline-only - see also public.css's .btn-primary and
   the CoinHODL design-system's Secondary Button color). .btn-light itself is left unchanged
   since it's already used in 40+ places across the authenticated app shell. */
.btn-teal {
    background: var(--accent, #14b8a6);
    border-color: var(--accent, #14b8a6);
    color: #fff;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-teal:hover, .btn-teal:focus {
    background: color-mix(in oklab, var(--accent, #14b8a6) 85%, white 15%);
    border-color: color-mix(in oklab, var(--accent, #14b8a6) 85%, white 15%);
    color: #fff;
    transform: translateY(-1px);
}

/* ---- Hero ---- */
.hero-public {
    position: relative;
    overflow: hidden;
    padding-top: 3.25rem;
    padding-bottom: 3.5rem;
    background:
        radial-gradient(1100px 560px at 88% -12%, color-mix(in oklab, var(--brand) 12%, transparent), transparent 60%),
        radial-gradient(700px 420px at -8% 8%, color-mix(in oklab, var(--brand) 8%, transparent), transparent 60%);
}

.hero-public > .container { position: relative; z-index: 1; }

.hero-title {
    display: block;
    font-weight: 800;
    font-size: clamp(2.3rem, 4vw, 3.3rem);
    line-height: 1.12;
    letter-spacing: -.02em;
    color: var(--text);
    margin-top: .5rem;
}

.hero-title .break {
    display: block;
    color: var(--brand);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-public .pill { opacity: 0; animation: rise .6s var(--ease) forwards; }
    .hero-title { opacity: 0; animation: rise .7s var(--ease) .1s forwards; }
    .hero-public .lead { opacity: 0; animation: rise .6s var(--ease) .26s forwards; }
}

.hero-title-sm { font-size: clamp(2rem, 3.2vw, 2.5rem); }

.hero-public .lead {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 46ch;
}

/* ---- Scroll reveal ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity .6s var(--ease), transform .6s var(--ease);
    }
    .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---- Cards ---- */
.card-public {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card-public.h-100:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: color-mix(in oklab, var(--brand) 35%, var(--line));
}

/* ---- Plain icon medallion, used as the hero side-visual on Features,
   WhatsNew and HowItWorks - intentionally text-free since each page's body
   already spells out its own content right below the hero. ---- */
.hero-icon-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon-badge {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: #fff;
    font-size: 3.4rem;
    box-shadow: var(--shadow);
}

@keyframes iconWobble {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-icon-badge {
        animation: iconWobble 3.2s ease-in-out infinite;
    }
}

/* ---- "Learn more" text link, used on home page teaser cards ---- */
.card-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    font-size: .92rem;
    color: var(--brand-strong);
    transition: gap .2s ease;
}

.card-link:hover, .card-link:focus {
    gap: .65rem;
    color: var(--brand-strong);
}

.card-link i { font-size: .78rem; }

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-tint);
    color: var(--brand-strong);
    font-size: 1.05rem;
}

.section { padding: 3.5rem 0; }

.trust-strip {
    position: relative;
    padding: 1.5rem 0;
    background: var(--surface-2);
    font-size: .88rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    max-width: 230px;
    text-align: left;
    color: var(--text);
    font-weight: 600;
}

.trust-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-tint);
    color: var(--brand-strong);
    font-size: .95rem;
}

.trust-strip::before, .trust-strip::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
}

.trust-strip::before { top: 0; }
.trust-strip::after { bottom: 0; }


.section-tinted {
    position: relative;
    background: var(--surface-2);
}

.section-tinted::before, .section-tinted::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 4rem;
}

.section-tinted::before { top: -4rem; background: linear-gradient(180deg, transparent, var(--surface-2)); }
.section-tinted::after { bottom: -4rem; background: linear-gradient(0deg, transparent, var(--surface-2)); }

.step-card {
    position: relative;
    height: 100%;
    padding: 2rem 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: visible;
}

.step-num {
    position: absolute;
    top: -18px;
    left: 14px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

.step-arrow {
    position: absolute;
    top: 50%;
    right: -16px;
    transform: translateY(-50%);
    color: var(--brand);
    opacity: .5;
    font-size: .95rem;
    z-index: 2;
}

@media (max-width: 767.98px) {
    .step-arrow { display: none; }
}

/* Last section before the footer - keep it close instead of the usual
   full 5.5rem section gap. */
.section-tight-bottom { padding-bottom: 1.5rem; }

/* ---- Final "ready when you are" CTA card (Home/Index) ---- */
.cta-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 3rem 2.75rem;
    background: linear-gradient(135deg, #0b1320 0%, #142138 50%, #1d3057 100%);
}

.cta-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(620px 320px at 88% -15%, rgba(255, 255, 255, .09), transparent 60%),
        radial-gradient(520px 300px at 6% 130%, color-mix(in oklab, var(--brand) 55%, transparent), transparent 65%);
    pointer-events: none;
}

.cta-card > .row { position: relative; z-index: 1; }

.cta-card h2 { color: #fff; margin-top: .75rem; }

.cta-card .pill {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
}

.cta-card .pill i { color: #fff; }

.cta-card .lead {
    color: rgba(255, 255, 255, .72);
    margin-top: .85rem;
    margin-bottom: 0;
}

.footer-public {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 1.1rem 0;
    font-size: .88rem;
}

.footer-public .brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    overflow: hidden;
    flex: 0 0 auto;
}

.footer-public .nav-link { color: var(--muted); font-size: .88rem; }
.footer-public .nav-link:hover { color: var(--brand); }

.link-arrow { transition: transform .18s ease; display: inline-block; }
.link-arrow:hover { transform: translateX(4px); }

.text-muted-2 { color: var(--muted); }

/* ---- Pricing page: plan groups & cards ----
   Views/Home/Pricing.cshtml. Data-driven from real SubscriptionTier / PortfolioManagerTier
   rows (Controllers/HomeController.Pricing) - these are purely layout/presentation classes,
   no content is hardcoded here. */
.pricing-plan-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--line);
}

.pricing-plan-group:last-child { border-bottom: none; }

@media (min-width: 900px) {
    .pricing-plan-group {
        grid-template-columns: 220px 1fr;
        gap: 2rem;
    }
}

.pricing-plan-group-head-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-tint);
    color: var(--brand-strong);
    font-size: 1rem;
}

.pricing-plan-group-title {
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text);
    margin: .75rem 0 .25rem;
}

.pricing-plan-group-desc {
    color: var(--muted);
    font-size: .85rem;
    margin: 0;
}

.pricing-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.pricing-plan-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pricing-plan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}


.pricing-plan-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .35rem;
}

.pricing-plan-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.pricing-plan-price {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--brand-strong);
    white-space: nowrap;
}

.pricing-plan-price .pricing-plan-price-period {
    font-weight: 600;
    font-size: .8rem;
    color: var(--muted);
}

.pricing-plan-desc {
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.pricing-plan-features {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pricing-plan-feature {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .85rem;
    color: var(--text-2);
}

.pricing-plan-feature i {
    color: var(--success);
    margin-top: .2rem;
    flex-shrink: 0;
}

/* ---- Auth cards (Login / Register / AccessDenied) ---- */
.auth-shell {
    min-height: calc(100svh - 74px);
    display: flex;
    align-items: center;
    padding: 3rem 0;
    background:
        radial-gradient(900px 480px at 90% -10%, color-mix(in oklab, var(--brand) 10%, transparent), transparent 60%);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2.25rem;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
}

.auth-card .form-control, .auth-card .form-select {
    background: var(--field-bg);
    color: var(--field-text);
    border: 1px solid var(--field-border);
    border-radius: var(--radius-sm);
    padding: .65rem .85rem;
}

.auth-card .form-control:focus {
    border-color: var(--field-focus-border);
    box-shadow: 0 0 0 .2rem var(--field-focus-ring);
}

.auth-card .form-label {
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
}

/* ---- Portfolio snapshot card (marketing hero illustration) ----
   Shared by Views/Home/Index.cshtml and Views/Home/Pricing.cshtml via
   Views/Shared/_PortfolioSnapshotCard.cshtml. Static/illustrative sample data - there's no
   signed-in user on these pages, so this is never real holdings. */
.snapshot-card {
    position: relative;
    overflow: visible;
}

.snapshot-chart-wrap {
    position: relative;
    margin: .5rem -.5rem -.5rem;
    height: 92px;
}

.snapshot-chart {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.coin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.coin-icon-btc { background: #f7931a; color: #fff; }
.coin-icon-eth { background: var(--coinhodl-indigo, #6366f1); color: #fff; }

.coin-icon-xrp {
    background: var(--surface);
    color: var(--coinhodl-deep-navy, #0b1320);
    border: 1px solid var(--line);
}

/* ---- Password field with show/hide toggle ---- */
.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: .35rem;
    transform: translateY(-50%);
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    appearance: none;
    font-size: .95rem;
}

.password-toggle-btn:hover { background: var(--hover); color: var(--text); }

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
