/* ============================================================
   lots2do — Site Theme CSS
   Matches plugin palette exactly: DM Sans UI, JetBrains Mono,
   charcoal sidebar → cobalt blue, white content, Monday colors
   ============================================================ */

:root {
    --sidebar:      #16161A;
    --accent:       #0085FF;
    --accent-dark:  #0065CC;
    --bg:           #FFFFFF;
    --bg-subtle:    #F5F7FA;
    --border:       #E6E9EF;
    --text:         #1F2D3D;
    --text-muted:   #6B7A8D;
    --text-faint:   #A8B4C0;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-pill: 999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
    --font-ui:   'DM Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* App pages — zero body margin, plugin owns everything */
body.l2d-app-page {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--bg) !important;
}
body.l2d-app-page .site-header,
body.l2d-app-page .site-footer { display: none !important; }

/* ── Links ── */
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-dark); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: 18px; }
h5 { font-size: 15px; }

p { margin-bottom: 1.2em; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

code, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-subtle);
    border-radius: var(--r-sm);
}
code { padding: 2px 6px; color: var(--accent); }
pre { padding: 16px 20px; overflow-x: auto; border: 1px solid var(--border); }

/* ── Layout helpers ── */
.content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
.content-narrow {
    max-width: 720px;
}

/* ════════════════════════════════════════
   SITE HEADER
════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--sidebar);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,133,255,0.4);
    flex-shrink: 0;
}
.logo-text {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
}

/* Nav */
.site-nav { flex: 1; }
.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-list li a {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    border-radius: var(--r-sm);
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}
.nav-list li a:hover,
.nav-list li.current-menu-item a {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* Header CTA */
.header-cta { margin-left: auto; flex-shrink: 0; }
.btn-primary {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-ui);
    padding: 8px 18px;
    border-radius: var(--r-lg);
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,133,255,0.35);
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    white-space: nowrap;
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,133,255,0.4);
    color: #fff !important;
}

/* ════════════════════════════════════════
   LOGOUT — app pages and marketing header
════════════════════════════════════════ */

/* App-page top bar: thin strip with user name + logout link.
   App pages render no theme chrome; this is injected in header.php
   when is_user_logged_in() is true on an l2d_is_app_page(). */
.l2d-app-topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 6px 18px;
    background: var(--sidebar);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 12px;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.l2d-app-topbar-user {
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}
.l2d-app-topbar-logout {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.l2d-app-topbar-logout:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.admin-bar .l2d-app-topbar { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .l2d-app-topbar { top: 46px; }
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
    transition: all 0.25s;
}

/* ════════════════════════════════════════
   SITE MAIN
════════════════════════════════════════ */
.site-main { min-height: calc(100vh - 60px - 200px); }

/* ════════════════════════════════════════
   HOME PAGE
════════════════════════════════════════ */
.site-home {
    /* Home page content is self-contained HTML from lots2do-home.html */
}

/* ════════════════════════════════════════
   CONTENT PAGES (Privacy, Terms, etc.)
════════════════════════════════════════ */
.entry {
    padding: 60px 0 80px;
}
.entry-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.entry-title {
    font-size: clamp(28px, 4vw, 42px);
    color: var(--text);
    margin-bottom: 8px;
}
.entry-meta {
    font-size: 13px;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

/* Rich content styles */
.entry-content h2 {
    font-size: 22px;
    color: var(--text);
    margin: 40px 0 14px;
    padding-top: 8px;
}
.entry-content h3 {
    font-size: 17px;
    color: var(--text);
    margin: 28px 0 10px;
}
.entry-content p {
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.75;
}
.entry-content ul, .entry-content ol {
    padding-left: 24px;
    margin-bottom: 18px;
    color: var(--text-muted);
}
.entry-content li { margin-bottom: 6px; line-height: 1.7; }
.entry-content strong { color: var(--text); font-weight: 600; }
.entry-content a { color: var(--accent); }
.entry-content a:hover { text-decoration: underline; }
.entry-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    background: var(--bg-subtle);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-muted);
}
.entry-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 14px;
}
.entry-content th {
    background: var(--bg-subtle);
    font-weight: 700;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid var(--border);
    color: var(--text);
}
.entry-content td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    vertical-align: top;
}
.entry-content tr:nth-child(even) td { background: var(--bg-subtle); }

/* ════════════════════════════════════════
   SITE FOOTER
════════════════════════════════════════ */
.site-footer {
    background: var(--sidebar);
    color: rgba(255,255,255,0.6);
    padding: 56px 0 0;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 64px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.footer-logo .logo-mark { background: rgba(0,133,255,0.8); }
.footer-logo .logo-text { color: #fff; }
.footer-tagline {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    margin: 0;
    letter-spacing: 0.02em;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    margin-bottom: 4px;
    font-family: var(--font-ui);
}
.footer-col a {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.80);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
}
.footer-mono {
    font-family: var(--font-mono);
    font-size: 10px;
}

/* ════════════════════════════════════════
   WP ADMIN BAR COMPENSATION
════════════════════════════════════════ */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

/* ════════════════════════════════════════
   MOBILE
════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .header-cta { display: none; }
    .header-inner { gap: 16px; }

    .site-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--sidebar);
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding: 12px 0;
        z-index: 99;
        box-shadow: var(--shadow-md);
    }
    body.nav-open .site-nav { display: block; }
    .nav-list { flex-direction: column; gap: 2px; padding: 0 16px; }
    .nav-list li a { padding: 10px 14px; }

    .footer-inner { grid-template-columns: 1fr; gap: 40px; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }

    .entry { padding: 40px 0 60px; }
    .entry-title { font-size: 28px; }
}

@media (max-width: 480px) {
    .footer-links { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════
   PRINT
════════════════════════════════════════ */
@media print {
    .site-header, .site-footer, .nav-toggle { display: none !important; }
    body { font-size: 12pt; color: #000; }
    a { color: #000; }
    .entry { padding: 0; }
}

/* ════════════════════════════════════════
   HOME PAGE — PHOTO GRID
════════════════════════════════════════ */

/* Grid shell — fills viewport below the header */
.home-grid {
    --cell-h: 240px;       /* overridden by PHP inline style */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, var(--cell-h));
    width: 100%;
    min-height: calc(var(--cell-h) * 3);
}

/* ── Photo cells ── */
.home-cell--photo {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, filter 0.35s ease;
}
.home-cell--photo:hover {
    transform: scale(1.03);
    z-index: 1;
    filter: brightness(1.08);
}

/* Caption overlay — hidden by default, slides up on hover */
.home-cell-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(22,22,26,0.92) 0%, rgba(22,22,26,0.6) 60%, transparent 100%);
    padding: 28px 16px 14px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}
.home-cell-caption span {
    display: block;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.home-cell--photo.has-caption:hover .home-cell-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Placeholder shown when no photo assigned */
.home-cell-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0,0,0,0.55);
}
.home-cell-placeholder span {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.04em;
}
.home-cell-placeholder small {
    font-family: var(--font-ui);
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    text-align: center;
    padding: 0 16px;
}

/* ── Login cell (center) ── */
.home-cell--login {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.45), 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Login card */
.login-card {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Tagline — replaces logo block */
/* tagline removed */

/* Error box */
.login-error {
    width: 100%;
    background: #FFECEB;
    color: #CC2020;
    border: 1px solid #FFB3B3;
    border-radius: var(--r-md);
    padding: 9px 12px;
    font-size: 12px;
    font-family: var(--font-ui);
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

/* Form */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.login-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
}
.login-field label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    font-family: var(--font-ui);
}
.login-field input {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-subtle);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,133,255,0.12);
    background: #fff;
}

/* Remember me */
.login-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font-ui);
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}
.login-remember input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* Sign in button */
.login-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    padding: 9px;
    border: none;
    border-radius: var(--r-lg);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,133,255,0.3);
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    margin-top: 0;
}
.login-btn:hover:not(:disabled) {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0,133,255,0.35);
}
.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Forgot password */
.login-forgot {
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-ui);
    text-decoration: none;
    transition: color 0.15s;
    text-align: center;
    display: block;
    margin-top: 4px;
}
.login-forgot:hover { color: var(--accent); }

/* Shake animation on bad login */
@keyframes l2d-shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}
.login-shake { animation: l2d-shake 0.45s ease; }

/* ── MOBILE: single column ── */
@media (max-width: 700px) {
    .home-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 220px auto 220px;
    }
    /* On mobile: show photo 2 (top), login (center), photo 7 (bottom) */
    .home-cell:nth-child(1),
    .home-cell:nth-child(3),
    .home-cell:nth-child(4),
    .home-cell:nth-child(6),
    .home-cell:nth-child(7),
    .home-cell:nth-child(9) {
        display: none;
    }
    .home-cell--login {
        padding: 24px 20px;
        height: auto;
        min-height: 340px;
    }
    .login-card {
        max-width: 320px;
    }
}

/* ── TABLET: 2 col ── */
@media (min-width: 701px) and (max-width: 960px) {
    .home-grid {
        grid-template-columns: repeat(3, 1fr);
        --cell-h: 180px;
    }
}

/* ── Password show/hide toggle ── */
.login-pw-wrap {
    position: relative;
    width: 100%;
}
.login-pw-wrap input {
    width: 100%;
    padding-right: 36px;
}
.login-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s;
    line-height: 1;
}
.login-pw-toggle:hover {
    color: var(--accent);
}

/* ─── 404 Page ─────────────────────────────────────────────── */
.page-404 {
    max-width: 480px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}
.page-404__code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 72px;
    font-weight: 700;
    color: var(--border);
    line-height: 1;
    margin-bottom: 16px;
}
.page-404__title {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}
.page-404__message {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--text-muted);
    margin-bottom: 32px;
}
