/* =========================================
   KV HERBALS - LOGIN PAGE
   Premium Animated Edition + Botanical Copper brand section
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --green: #00522f;
    --dark-green: #002b1b;

    /* Copper/terracotta accent palette — used in brand-section */
    --copper: #c9834a;
    --copper-light: #e8b077;
    --copper-deep: #8a5225;
    --cream: #f3ead9;

    /* Gold accent — used in login-section (right side) */
    --gold: #d3a52c;
    --light-gold: #efd26f;

    /* Dark ink text palette — used for contrast on the golden brand-section */
    --ink: #201404;
    --ink-soft: rgba(32, 20, 4, 0.72);
    --ink-muted: rgba(32, 20, 4, 0.55);

    /* Warm golden background palette — based on #d5ad3e */
    --charcoal-1: #7a5f1f;
    --charcoal-2: #d5ad3e;
    --charcoal-3: #3a2c0d;
    --charcoal-glass: rgba(122, 95, 31, 0.55);

    --white: #ffffff;
    --text: #17372b;
    --muted: #718078;

    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-gold: 0 8px 24px rgba(211, 165, 44, 0.25);
}

/* ---------- Reset ---------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    overflow: hidden;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 20%, rgba(201, 131, 74, 0.20), transparent 32%),
        radial-gradient(circle at 15% 80%, rgba(120, 40, 70, 0.35), transparent 40%),
        linear-gradient(135deg, #1a0a14 0%, #2b0f1e 45%, #170812 100%);
    background-size: 100% 100%, 100% 100%, 260% 260%;
    animation: kvBgDrift 14s ease-in-out infinite;
}

@keyframes kvBgDrift {
    0%, 100% { background-position: 80% 20%, 15% 80%, 0% 50%; }
    50% { background-position: 65% 35%, 30% 60%, 100% 50%; }
}

/* ---------- Animated Background ---------- */

.background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.background-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(201, 131, 74, 0.07);
    border: 1px solid rgba(211, 165, 44, 0.16);
    animation: floatingCircle 10s ease-in-out infinite;
}

/* Large slow-moving ambient glow blob — extra motion in the outer background */
.kv-glow-blob {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(154, 58, 96, 0.30), transparent 70%);
    filter: blur(30px);
    top: 60%;
    left: 5%;
    animation: kvBlobFloat 13s ease-in-out infinite;
    pointer-events: none;
}

.circle-one { width: 190px; height: 190px; top: 7%; left: -60px; }
.circle-two { width: 110px; height: 110px; top: 12%; left: 28%; animation-delay: 2s; }
.circle-three { width: 240px; height: 240px; top: 4%; right: -80px; animation-delay: 1s; }
.circle-four { width: 150px; height: 150px; right: 20%; bottom: 8%; animation-delay: 3s; }
.circle-five { width: 90px; height: 90px; left: 12%; bottom: 12%; animation-delay: 4s; }

@keyframes floatingCircle {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    50% { transform: translate(14px, -24px) scale(1.08); opacity: 0.7; }
}

@keyframes kvBlobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, -50px) scale(1.2); }
}

/* Drifting gold sparkle particles */
.background::after,
.background::before {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow:
        120px 80px 0 var(--gold),
        340px 220px 0 rgba(211, 165, 44, 0.6),
        620px 60px 0 rgba(211, 165, 44, 0.4),
        860px 340px 0 var(--gold),
        180px 420px 0 rgba(211, 165, 44, 0.5),
        720px 480px 0 rgba(211, 165, 44, 0.35);
    opacity: 0.55;
    animation: kvSparkleDrift 14s linear infinite;
}

.background::before {
    top: -10%;
    animation-duration: 20s;
    animation-direction: reverse;
    opacity: 0.3;
}

@keyframes kvSparkleDrift {
    0% { transform: translateY(-10px) translateX(0); }
    50% { transform: translateY(30px) translateX(-15px); }
    100% { transform: translateY(-10px) translateX(0); }
}

/* ---------- Main Layout ---------- */

.login-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 28px;
}

.login-card {
    width: min(1080px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background: var(--charcoal-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.50);

    opacity: 0;
    transform: translateY(28px) scale(0.98);
    animation: kvCardIn 0.9s var(--ease-premium) 0.1s forwards;
}

@keyframes kvCardIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Rotating gold-seam border sheen */
.login-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 28px;
    padding: 2px;
    background: conic-gradient(from 0deg, transparent 0%, rgba(211, 165, 44, 0.55) 12%, transparent 24%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: kvSeamSpin 7s linear infinite;
    pointer-events: none;
    opacity: 0.8;
    z-index: 1;
}

@keyframes kvSeamSpin {
    to { transform: rotate(360deg); }
}

/* ---------- Brand Section (Botanical Copper) ---------- */

.brand-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    z-index: 2;
    overflow: hidden;

    background:
        radial-gradient(circle at 15% 85%, rgba(213, 173, 62, 0.45), transparent 55%),
        radial-gradient(circle at 90% 10%, rgba(213, 173, 62, 0.30), transparent 50%),
        linear-gradient(160deg, var(--charcoal-3) 0%, var(--charcoal-1) 45%, var(--charcoal-2) 100%);
    background-size: 160% 160%, 140% 140%, 220% 220%;
    animation: kvBrandBgDrift 16s ease-in-out infinite;
}

@keyframes kvBrandBgDrift {
    0%, 100% { background-position: 15% 85%, 90% 10%, 0% 50%; }
    50% { background-position: 25% 70%, 80% 20%, 100% 50%; }
}

/* Subtle botanical texture — faint dotted pattern */
.brand-section::before {
    content: "";
    position: absolute;
    inset: -10% -10% -10% -10%;
    background-image: radial-gradient(rgba(211, 165, 44, 0.13) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.5;
    pointer-events: none;
    animation: kvDotsDrift 22s linear infinite;
}

@keyframes kvDotsDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-26px, -26px); }
}

/* Soft copper glow floating behind the title */
.brand-section::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    left: -120px;
    bottom: -140px;
    background: radial-gradient(circle, rgba(211, 165, 44, 0.30), transparent 70%);
    filter: blur(10px);
    pointer-events: none;
    animation: kvGlowFloat 9s ease-in-out infinite;
}

@keyframes kvGlowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -35px) scale(1.12); }
}

/* ---------- Large Top Logo (centered, above brand name row) ---------- */

.brand-top-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: kvFadeUp 0.8s var(--ease-premium) 0.2s forwards;
}

.brand-top-logo-ring {
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    border: 2px solid var(--copper);
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, rgba(201, 131, 74, 0.10), transparent 70%);
    animation: kvTopLogoPulse 3.4s ease-in-out infinite;
}

.brand-top-logo-ring::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(201, 131, 74, 0.35);
    animation: kvTopLogoRingSpin 12s linear infinite;
}

.brand-top-logo-ring img {
    width: 142px;
    height: 142px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-premium);
}

.brand-top-logo-ring:hover img {
    transform: scale(1.06) rotate(-4deg);
}

@keyframes kvTopLogoPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 131, 74, 0.35), 0 0 30px rgba(201, 131, 74, 0.15); }
    50% { box-shadow: 0 0 0 14px rgba(201, 131, 74, 0), 0 0 46px rgba(201, 131, 74, 0.28); }
}

@keyframes kvTopLogoRingSpin {
    to { transform: rotate(360deg); }
}

/* ---------- Brand Logo Row (existing small logo next to brand name) ---------- */
.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    margin-bottom: 42px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: kvFadeUp 0.7s var(--ease-premium) 0.35s forwards;
}

/* Small circular logo mark next to the name — no longer used since the
   big top logo replaces it, kept here in case it's still in markup */
.logo-mark {
    display: none;
}

.logo-mark {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    border: 2px solid var(--copper);
    border-radius: 50%;
    color: var(--copper-light);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    position: relative;
    animation: kvLogoPulseCopper 3.2s ease-in-out infinite;
}

@keyframes kvLogoPulseCopper {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 131, 74, 0.38); }
    50% { box-shadow: 0 0 0 10px rgba(201, 131, 74, 0); }
}

.logo-mark img {
    transition: transform 0.5s var(--ease-premium);
}

.logo-mark:hover img {
    transform: rotate(-8deg) scale(1.08);
}

.logo-title {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--ink);
}

.logo-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.welcome-label {
    margin-bottom: 18px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: kvFadeUp 0.7s var(--ease-premium) 0.45s forwards;
}

.brand-title {
    margin-bottom: 22px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 58px;
    font-weight: 700;
    line-height: 1.02;
    color: var(--ink);
    text-shadow: 0 2px 14px rgba(255, 255, 255, 0.18);
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: kvFadeUp 0.8s var(--ease-premium) 0.55s forwards;
}

/* "Wellness." — deep green shimmer, strong pop against the golden background */
.brand-title span {
    position: relative;
    background: linear-gradient(90deg, var(--dark-green), var(--green), var(--dark-green));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: kvCopperShimmer 4s linear infinite;
}

@keyframes kvCopperShimmer {
    to { background-position: 200% center; }
}

/* Decorative underline stroke beneath the title */
.brand-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin-top: 18px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--dark-green), transparent);
}

.brand-description {
    max-width: 470px;
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: kvFadeUp 0.8s var(--ease-premium) 0.65s forwards;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 35px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: kvFadeUp 0.8s var(--ease-premium) 0.75s forwards;
}

.feature-item {
    padding: 10px 17px;
    border: 1px solid rgba(32, 20, 4, 0.45);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.20);
    color: var(--ink);
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s var(--ease-premium);
    cursor: default;
}

.feature-item:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--light-gold);
    transform: translateY(-3px);
}

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

/* ---------- Login Form Section ---------- */

.login-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 55px 58px;
    background: rgba(255, 255, 255, 0.97);
    color: var(--text);
    position: relative;
    z-index: 2;
}

.portal-label {
    margin-bottom: 10px;
    color: #bd8d18;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) 0.5s forwards;
}

.login-title {
    margin-bottom: 9px;
    color: var(--green);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 42px;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) 0.58s forwards;
}

.login-intro {
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) 0.66s forwards;
}

/* ---------- Form Fields ---------- */

.form-group {
    margin-bottom: 19px;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) forwards;
}

.form-group:nth-of-type(1) { animation-delay: 0.74s; }
.form-group:nth-of-type(2) { animation-delay: 0.82s; }

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #244237;
    font-size: 13px;
    font-weight: 700;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #829088;
    transition: color 0.25s ease;
    z-index: 2;
}

.form-input {
    width: 100%;
    height: 55px;
    padding: 0 46px;
    border: 1px solid #dbe3df;
    border-radius: 12px;
    outline: none;
    background: #fbfcfb;
    color: var(--text);
    font-size: 15px;
    position: relative;
    transition: 0.3s var(--ease-premium);
}

.input-container::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    padding: 1px;
    background: linear-gradient(120deg, var(--green), var(--gold));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.form-input:focus {
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 101, 61, 0.10);
    border-color: transparent;
}

.form-input:focus ~ .input-icon,
.input-container:focus-within .input-icon {
    color: #06673f;
}

.input-container:focus-within::after {
    opacity: 1;
}

.password-toggle {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 35px;
    height: 35px;
    border: 0;
    background: transparent;
    color: #7b8982;
    cursor: pointer;
    z-index: 2;
    transition: color 0.25s ease, transform 0.25s ease;
}

.password-toggle:hover {
    color: var(--green);
    transform: scale(1.12);
}

/* ---------- Form Options ---------- */

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 25px;
    font-size: 13px;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) 0.9s forwards;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #66766e;
}

.remember-me input {
    accent-color: #006039;
}

.forgot-password,
.create-account {
    color: #006039;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: color 0.25s ease;
}

.forgot-password::after,
.create-account::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width 0.3s var(--ease-premium);
}

.forgot-password:hover,
.create-account:hover {
    color: #bd8d18;
}

.forgot-password:hover::after,
.create-account:hover::after {
    width: 100%;
}

/* ---------- Login Button ---------- */

.login-button-wrapper {
    position: relative;
    z-index: 100;
    width: 100%;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) 0.98s forwards;
}

.login-button {
    position: relative;
    z-index: 101;
    display: block;
    width: 100%;
    height: 57px;
    overflow: hidden;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #00663d, #004628);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 13px 28px rgba(0, 72, 43, 0.22);
    transition: 0.3s var(--ease-premium);
}

.login-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 32px rgba(0, 72, 43, 0.30), 0 0 0 3px rgba(211, 165, 44, 0.18);
}

.login-button:hover::before {
    left: 130%;
}

.login-button:active {
    transform: translateY(0);
}

/* ---------- Login Message ---------- */

.login-message:empty {
    display: none;
}

.login-message {
    margin: -6px 0 14px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    animation: kvFadeUp 0.4s var(--ease-premium) forwards;
}

/* ---------- Divider ---------- */

.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 25px 0 18px;
    color: #a0aaa5;
    font-size: 10px;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) 1.05s forwards;
}

.form-divider::before,
.form-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e3e7e5, transparent);
}

/* ---------- Footer Text ---------- */

.signup-text {
    text-align: center;
    color: #78857f;
    font-size: 13px;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) 1.1s forwards;
}

.security-message {
    margin-top: 26px;
    padding: 11px;
    border-radius: 10px;
    background: #f1f7f3;
    color: #587066;
    font-size: 11px;
    text-align: center;
    opacity: 0;
    animation: kvFadeUp 0.6s var(--ease-premium) 1.15s forwards;
}

body.modal-open {
    overflow-y: auto !important;
}

/* ---------- Scrollbar (webkit) ---------- */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(211, 165, 44, 0.5);
    border-radius: 10px;
}

/* ---------- Responsive ---------- */

@media (max-width: 850px) {
    body { overflow: auto; }

    .login-card {
        max-width: 560px;
        grid-template-columns: 1fr;
    }

    .brand-section { padding: 40px 35px; }
    .brand-title { font-size: 45px; }
    .login-section { padding: 42px 35px; }
}

@media (max-width: 480px) {
    .login-wrapper { padding: 15px; }

    .brand-section,
    .login-section { padding: 30px 23px; }

    .brand-title { font-size: 38px; }
    .login-title { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
