/* ============================================================
   NodePath Academy — student login (tuition site disguise)
   Mobile-first friendly · scoped under .tut-*
   ============================================================ */

.tut-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    color: #e8f0e9;
    background: #0c1410;
    -webkit-font-smoothing: antialiased;
    /* Notch / home-indicator safe areas */
    padding:
        env(safe-area-inset-top, 0)
        env(safe-area-inset-right, 0)
        env(safe-area-inset-bottom, 0)
        env(safe-area-inset-left, 0);
    box-sizing: border-box;
    overflow-x: hidden;
}

.tut-body *,
.tut-body *::before,
.tut-body *::after {
    box-sizing: border-box;
}

.tut-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 480px);
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
}

/* ── Hero (left) ─────────────────────────────────────────── */

.tut-hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: 48px 56px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(60, 135, 58, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 90% 80%, rgba(104, 160, 99, 0.18) 0%, transparent 50%),
        linear-gradient(160deg, #0f1a14 0%, #0a120e 45%, #122018 100%);
    border-right: 1px solid rgba(104, 160, 99, 0.18);
}

.tut-hero-bg {
    pointer-events: none;
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image:
        linear-gradient(rgba(104, 160, 99, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 160, 99, 0.5) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
}

.tut-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    width: 100%;
}

.tut-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
    min-width: 0;
}

.tut-logo {
    flex-shrink: 0;
    filter: drop-shadow(0 6px 16px rgba(60, 135, 58, 0.45));
}

.tut-logo svg {
    display: block;
    width: 44px;
    height: 44px;
}

.tut-brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f2faf2;
    line-height: 1.2;
}

.tut-brand-tag {
    font-size: 0.78rem;
    font-weight: 500;
    color: #8fbc8f;
    margin-top: 2px;
    line-height: 1.3;
}

.tut-headline {
    margin: 0 0 16px;
    font-size: clamp(1.45rem, 2.6vw, 2.35rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: #f5faf5;
}

.tut-accent {
    color: #7dce78;
    background: linear-gradient(120deg, #68a063, #a8e6a1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tut-lead {
    margin: 0 0 28px;
    font-size: 1.02rem;
    line-height: 1.6;
    color: #a8c4ab;
    max-width: 48ch;
}

.tut-curriculum {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tut-curriculum li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(12, 28, 18, 0.55);
    border: 1px solid rgba(104, 160, 99, 0.22);
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

.tut-mod {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: #68a063;
    background: rgba(104, 160, 99, 0.12);
    border: 1px solid rgba(104, 160, 99, 0.28);
    border-radius: 8px;
    padding: 6px 8px;
    line-height: 1;
    flex-shrink: 0;
}

.tut-curriculum strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #e8f5e9;
    margin-bottom: 2px;
}

.tut-curriculum span {
    font-size: 0.82rem;
    color: #8faa92;
}

.tut-stats {
    display: flex;
    gap: 28px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.tut-stats div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tut-stats strong {
    font-size: 1.45rem;
    font-weight: 700;
    color: #c8efc4;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.tut-stats span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6f8f72;
    font-weight: 600;
}

.tut-snippet {
    margin: 0;
    padding: 16px 18px;
    background: #08110c;
    border: 1px solid rgba(104, 160, 99, 0.25);
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.78rem;
    line-height: 1.65;
    color: #b8d4bb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    max-width: 100%;
}

.tut-snippet .c-kw { color: #c792ea; }
.tut-snippet .c-fn { color: #82aaff; }
.tut-snippet .c-str { color: #c3e88d; }
.tut-snippet .c-cm { color: #546e7a; }

/* ── Login panel (right) ─────────────────────────────────── */

.tut-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 28px;
    background:
        radial-gradient(ellipse at 80% 0%, rgba(60, 135, 58, 0.12) 0%, transparent 45%),
        #0e1612;
}

.tut-panel-card {
    width: 100%;
    max-width: 400px;
}

.tut-panel-top {
    margin-bottom: 28px;
}

.tut-eyebrow {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #68a063;
}

.tut-panel-title {
    margin: 0 0 8px;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f0f7f0;
    line-height: 1.25;
}

.tut-panel-sub {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #8faa92;
}

.tut-form .form-group {
    margin-bottom: 16px;
}

.tut-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #c5dbc8;
}

.tut-form .input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #121c16;
    border: 1px solid rgba(104, 160, 99, 0.28);
    border-radius: 12px;
    padding: 0 12px;
    min-height: 48px; /* touch target */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tut-form .input-wrapper:focus-within {
    border-color: #68a063;
    box-shadow: 0 0 0 3px rgba(104, 160, 99, 0.18);
}

.tut-form .input-wrapper input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: #eef6ee;
    font-family: inherit;
    /* ≥16px prevents iOS Safari zoom on focus */
    font-size: 16px;
    padding: 12px 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.tut-form .input-wrapper input::placeholder {
    color: #5f7a62;
}

.tut-form .input-icon {
    opacity: 0.7;
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.tut-form .toggle-password {
    cursor: pointer;
    opacity: 0.75;
    user-select: none;
    padding: 10px 6px; /* larger tap area */
    margin: -4px -2px -4px 0;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.tut-form .toggle-password:hover,
.tut-form .toggle-password:active {
    opacity: 1;
}

.tut-form .error-msg {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
    color: #f07178;
    min-height: 1em;
}

.tut-form .form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: #9bb89e;
}

.tut-form .checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.tut-form .checkbox-wrapper input {
    accent-color: #3c873a;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tut-form .forgot-link {
    color: #7dce78;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.tut-form .forgot-link:hover {
    text-decoration: underline;
}

.tut-submit {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    min-height: 48px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #0a120e;
    background: linear-gradient(135deg, #7dce78 0%, #3c873a 100%);
    box-shadow: 0 8px 24px rgba(60, 135, 58, 0.35);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tut-submit:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 28px rgba(60, 135, 58, 0.45);
}

.tut-submit:active {
    transform: translateY(1px);
}

.tut-body .tut-submit.btn {
    background: linear-gradient(135deg, #7dce78 0%, #3c873a 100%);
    color: #0a120e;
    border: none;
    width: 100%;
    min-height: 48px;
}

.tut-signup {
    text-align: center;
    margin: 18px 0 0;
    font-size: 0.86rem;
    color: #7d9780;
    line-height: 1.5;
}

.tut-signup a {
    color: #7dce78;
    font-weight: 600;
    text-decoration: none;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
}

.tut-signup a:hover {
    text-decoration: underline;
}

.tut-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(104, 160, 99, 0.15);
}

.tut-pill {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8fbc8f;
    background: rgba(104, 160, 99, 0.1);
    border: 1px solid rgba(104, 160, 99, 0.22);
    border-radius: 999px;
    padding: 6px 11px;
}

.tut-legal {
    margin: 16px 0 0;
    font-size: 0.72rem;
    color: #4d6650;
    line-height: 1.45;
}

/* Mobile brand strip (hidden on desktop) */
.tut-mobile-brand {
    display: none;
}

/* ============================================================
   RESPONSIVE — tablet
   ============================================================ */

@media (max-width: 960px) {
    /* Login form first on mobile — primary action */
    .tut-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        min-height: 100dvh;
    }

    .tut-panel {
        order: 1;
        padding: 20px 20px 28px;
        align-items: flex-start;
        flex: 1;
        min-height: 0;
    }

    .tut-hero {
        order: 2;
        padding: 20px 20px 28px;
        border-right: none;
        border-top: 1px solid rgba(104, 160, 99, 0.18);
        align-items: flex-start;
    }

    .tut-panel-card {
        max-width: 440px;
        margin: 0 auto;
    }

    .tut-mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(104, 160, 99, 0.15);
    }

    .tut-mobile-brand .tut-logo svg {
        width: 40px;
        height: 40px;
    }

    /* Compact hero — less scroll on phones */
    .tut-hero .tut-brand {
        margin-bottom: 16px;
    }

    .tut-headline {
        font-size: 1.35rem;
        margin-bottom: 10px;
    }

    .tut-lead {
        font-size: 0.9rem;
        margin-bottom: 16px;
        max-width: none;
    }

    .tut-snippet {
        display: none;
    }

    .tut-curriculum {
        margin-bottom: 16px;
        gap: 8px;
    }

    .tut-curriculum li:nth-child(n+3) {
        display: none;
    }

    .tut-curriculum li {
        padding: 10px 12px;
    }

    .tut-stats {
        gap: 20px;
        margin-bottom: 0;
    }

    .tut-stats strong {
        font-size: 1.25rem;
    }

    .tut-panel-title {
        font-size: 1.35rem;
    }

    .tut-panel-top {
        margin-bottom: 20px;
    }
}

/* ============================================================
   RESPONSIVE — phone
   ============================================================ */

@media (max-width: 480px) {
    .tut-panel {
        padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    }

    .tut-hero {
        padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    }

    .tut-mobile-brand {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .tut-brand-name {
        font-size: 1.05rem;
    }

    .tut-brand-tag {
        font-size: 0.72rem;
    }

    /* Hide full hero brand block on small phones — mobile-brand is enough */
    .tut-hero .tut-brand {
        display: none;
    }

    .tut-headline {
        font-size: 1.2rem;
    }

    .tut-lead {
        font-size: 0.85rem;
        margin-bottom: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Only first curriculum module on very small screens */
    .tut-curriculum li:nth-child(n+2) {
        display: none;
    }

    .tut-stats {
        gap: 14px 20px;
        width: 100%;
        justify-content: space-between;
    }

    .tut-stats strong {
        font-size: 1.15rem;
    }

    .tut-stats span {
        font-size: 0.65rem;
    }

    .tut-panel-title {
        font-size: 1.25rem;
    }

    .tut-panel-sub {
        font-size: 0.85rem;
    }

    .tut-form .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 16px;
    }

    .tut-form .forgot-link {
        padding: 4px 0 8px;
        min-height: 36px;
    }

    .tut-foot {
        margin-top: 20px;
        padding-top: 14px;
        gap: 6px;
    }

    .tut-pill {
        font-size: 0.65rem;
        padding: 5px 9px;
    }

    .tut-legal {
        font-size: 0.68rem;
        margin-top: 12px;
        padding-bottom: 4px;
    }

    .tut-submit {
        font-size: 1rem;
        padding: 15px 18px;
    }
}

/* ============================================================
   Very small phones (≤360)
   ============================================================ */

@media (max-width: 360px) {
    .tut-panel,
    .tut-hero {
        padding-left: 14px;
        padding-right: 14px;
    }

    .tut-headline {
        font-size: 1.1rem;
    }

    .tut-stats {
        gap: 12px;
    }

    /* Hide curriculum entirely — keep form + brand focus */
    .tut-curriculum {
        display: none;
    }
}

/* Landscape phones: keep form usable without huge hero */
@media (max-height: 500px) and (orientation: landscape) {
    .tut-shell {
        grid-template-columns: 1fr 1.1fr;
        grid-template-rows: 1fr;
    }

    .tut-panel {
        order: 2;
        padding: 16px 20px;
        align-items: center;
        overflow-y: auto;
    }

    .tut-hero {
        order: 1;
        padding: 16px 20px;
        border-top: none;
        border-right: 1px solid rgba(104, 160, 99, 0.18);
        overflow-y: auto;
    }

    .tut-mobile-brand {
        display: none;
    }

    .tut-hero .tut-brand {
        display: flex;
        margin-bottom: 12px;
    }

    .tut-curriculum,
    .tut-snippet,
    .tut-stats,
    .tut-lead {
        display: none;
    }

    .tut-headline {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .tut-panel-top {
        margin-bottom: 12px;
    }

    .tut-panel-sub {
        display: none;
    }

    .tut-foot {
        display: none;
    }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tut-submit {
        transition: none;
    }
}

/* Toast on mobile — stay above safe area */
@media (max-width: 480px) {
    .tut-body .toast {
        left: 12px !important;
        right: 12px !important;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        max-width: none !important;
        width: auto !important;
    }
}
