/* ==========================================================================
   public-home.css
   Page-specific styles for the public (unauthenticated) homepage. Loads
   after tokens.css + common.css, following the same convention as every
   other page stylesheet — draws colors/radii/shadows from tokens.css rather
   than hardcoding new ones. Always light-themed (no data-theme toggle here,
   same as login.ejs): dark mode is a saved per-user preference and this
   page never has a logged-in user to read one from.
   ========================================================================== */

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

/* --- Small utility classes shared with the loading/empty/error states
   the catalogue script borrows from the guest workspace's JS --- */
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.text-center { text-align: center; }
.italic { font-style: italic; }
.text-slate-400 { color: var(--color-text-muted); }
.text-slate-500 { color: var(--color-text-muted); }
.text-red-500 { color: var(--color-danger); }

/* --- Top nav --- */
.public-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.public-brand {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.3px;
    color: var(--color-text-primary);
    text-decoration: none;
}

.public-nav-links {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.public-nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.public-nav-links a:hover {
    color: var(--color-primary);
}

.public-login-link {
    white-space: nowrap;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
}

/* --- Hero --- */
.public-hero {
    padding: 72px 24px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-primary-soft-bg), var(--color-surface));
}

.public-hero-inner {
    max-width: 640px;
    margin: 0 auto;
}

.public-hero h1 {
    font-size: 32px;
    margin: 0 0 16px;
    color: var(--color-text-primary);
}

.public-hero p {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin: 0 0 28px;
    line-height: 1.6;
}

/* --- Generic section shell --- */
.public-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px;
}

.public-section h2 {
    font-size: 24px;
    margin: 0 0 12px;
    color: var(--color-text-primary);
}

.public-section-lede {
    max-width: 720px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0 0 28px;
}

/* --- About feature cards --- */
.public-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.public-feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.public-feature-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--color-primary-strong);
}

.public-feature-card p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* --- Products section ---
   toolbar-action-grid / search-input-group / gallery-component-wrapper /
   breadcrumb-trail are generic layout primitives normally supplied by a
   page-specific stylesheet (guest.css/home.css) that this standalone page
   doesn't load — defined here instead of pulling in those unrelated
   workspace/sidebar stylesheets just for a handful of shared rules. */
.toolbar-action-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 480px;
}

.search-input-group input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
}

.search-input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

.gallery-component-wrapper {
    margin-top: 8px;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

/* --- Contact --- */
.public-contact-section {
    text-align: center;
}

.public-contact-section .public-section-lede {
    margin-left: auto;
    margin-right: auto;
}

.public-contact-email {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary-strong);
    text-decoration: none;
}

.public-contact-email:hover {
    text-decoration: underline;
}

/* --- Footer --- */
.public-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 13px;
}

.public-footer a {
    color: var(--color-text-muted);
}

@media (max-width: 640px) {
    .public-nav-links {
        display: none;
    }
}
