/* Ensalle - Dining, Remembered */
/* Sotto brand system: charcoal text, warm muted, Playfair Display + Inter */

:root {
    /* Sotto shared palette */
    --sotto-charcoal: #1a1a2e;
    --sotto-warm: #8a8378;
    --sotto-silver: #c0c0c8;
    --sotto-white: #f5f5f0;

    /* Ensalle brand */
    --ensalle-cream: #faf8f5;
    --ensalle-warm-white: #f5f2ed;
    --ensalle-text: #1a1a2e;
    --ensalle-text-muted: #8a8378;
    --ensalle-green: #5a7a4a;
    --ensalle-green-dark: #3d5633;
    --ensalle-orange: #c9884a;
    --ensalle-orange-light: #e5a86a;
    --ensalle-gold: #b8985c;
    --ensalle-border: #e5e0d8;

    /* Sotto brand family accents */
    --vinelog-plum: #7d2f70;
    --ensalle-accent: #b8985c;
    --sommwise-teal: #3d5a6c;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: #ffffff;
    color: var(--ensalle-text);
    margin: 0;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ensalle-text);
}

/* =========================
   Brand Typography
   ========================= */

.brand-vinelog {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--vinelog-plum);
}

.brand-ensalle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.3rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ensalle-accent);
}

.brand-sommwise {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--sommwise-teal);
}

.ensalle-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================
   Navbar
   ========================= */

.navbar {
    background: #ffffff;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--ensalle-border);
}

.navbar-brand {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--ensalle-text) !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.brand-icon {
    height: 32px;
    width: auto;
}

.brand-text {
    letter-spacing: 0.2em;
}

.navbar-toggler {
    border-color: var(--ensalle-border);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 26, 46, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
    color: var(--ensalle-text-muted) !important;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--ensalle-text) !important;
}

/* =========================
   Buttons
   ========================= */

.btn-ensalle {
    background: var(--ensalle-green);
    border-color: var(--ensalle-green);
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-ensalle:hover {
    background: var(--ensalle-green-dark);
    border-color: var(--ensalle-green-dark);
    color: white;
}

.btn-outline-ensalle {
    background: transparent;
    border: 2px solid var(--ensalle-green);
    color: var(--ensalle-green);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-outline-ensalle:hover {
    background: var(--ensalle-green);
    color: white;
}

.bg-ensalle {
    background-color: var(--ensalle-green) !important;
}

/* =========================
   Hero Section
   ========================= */

.hero-section {
    position: relative;
    padding: 6rem 0 8rem;
    background: linear-gradient(180deg,
        rgba(245, 240, 232, 0.4) 0%,
        rgba(245, 240, 232, 0.15) 40%,
        #ffffff 100%);
    overflow: hidden;
}

.hero-icon {
    margin-bottom: 1.5rem;
}

.carrots-logo {
    height: 120px;
    width: auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--ensalle-text);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--ensalle-text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* =========================
   Features Section
   ========================= */

.features-section {
    background: #ffffff;
}

.feature-card {
    background: rgba(245, 240, 232, 0.3);
    border: 1px solid var(--ensalle-border);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.feature-icon {
    font-size: 2rem;
    color: var(--ensalle-orange);
    margin-bottom: 1rem;
    width: 60px;
    height: 60px;
    background: rgba(201, 136, 74, 0.1);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--ensalle-text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Privacy Section */
.privacy-section {
    background: #ffffff;
}

.section-title {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.privacy-section .lead {
    color: var(--ensalle-text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* =========================
   Journal / Timeline
   ========================= */

.journal-title {
    font-size: 2rem;
    font-weight: 500;
}

.journal-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.journal-card {
    background: white;
    border: 1px solid var(--ensalle-border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ensalle-text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.journal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    color: var(--ensalle-text);
}

.journal-card-photo {
    width: 100%;
    height: 180px;
    background: var(--ensalle-warm-white);
    overflow: hidden;
}

.journal-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.journal-card-photo .no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ensalle-border);
    font-size: 2rem;
}

.journal-card-body {
    padding: 1rem 1.25rem;
}

.journal-card-restaurant {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 0.35rem;
}

.journal-card-date {
    font-size: 0.85rem;
    color: var(--ensalle-text-muted);
}

.journal-card-rating {
    font-size: 0.85rem;
    color: var(--ensalle-orange);
    margin-left: 0.75rem;
}

.empty-journal .empty-icon {
    font-size: 3rem;
    color: var(--ensalle-border);
    display: block;
    margin-bottom: 1rem;
}

/* =========================
   Log Meal Form
   ========================= */

.page-title {
    font-size: 2rem;
    font-weight: 500;
}

.log-form {
    max-width: 640px;
}

.log-form .form-label {
    font-weight: 500;
    color: var(--ensalle-text);
    margin-bottom: 0.35rem;
}

.log-form .form-control {
    border-color: var(--ensalle-border);
    background: white;
}

.log-form .form-control:focus {
    border-color: var(--ensalle-green);
    box-shadow: 0 0 0 3px rgba(90, 122, 74, 0.1);
}

.search-results {
    border: 1px solid var(--ensalle-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
    max-height: 240px;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--ensalle-border);
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--ensalle-warm-white);
}

.photo-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.photo-preview-card {
    background: white;
    border: 1px solid var(--ensalle-border);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

.photo-preview-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

/* =========================
   Meal Detail
   ========================= */

.meal-gallery {
    display: grid;
    gap: 1rem;
}

.meal-gallery-item img {
    width: 100%;
    border-radius: 12px;
    max-height: 500px;
    object-fit: cover;
}

.photo-caption {
    font-size: 0.9rem;
    color: var(--ensalle-text-muted);
    margin-top: 0.35rem;
    font-style: italic;
}

.meal-restaurant-name {
    font-size: 2.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.meal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.95rem;
    color: var(--ensalle-text-muted);
}

.meal-rating {
    color: var(--ensalle-orange);
}

.meal-review h3,
.meal-private-notes h3 {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-body);
    margin-bottom: 0.5rem;
}

.meal-review p,
.meal-private-notes p {
    line-height: 1.7;
    color: var(--ensalle-text-muted);
}

.meal-private-notes {
    background: var(--ensalle-warm-white);
    border: 1px solid var(--ensalle-border);
    border-radius: 8px;
    padding: 1.25rem;
}

/* =========================
   Footer - Sotto Brand Family
   ========================= */

.footer-brand-family {
    margin-top: auto;
    padding: 3rem 0 1.5rem;
    background: #fafafa;
    border-top: 1px solid var(--ensalle-border);
    text-align: center;
}

.footer-sotto-section {
    margin-bottom: 1.5rem;
}

.footer-sotto-arch {
    height: 48px;
    width: auto;
    opacity: 0.6;
}

.footer-family-text {
    font-size: 0.8rem;
    color: var(--ensalle-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.footer-brands {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.footer-brand-link:hover {
    background: rgba(0, 0, 0, 0.03);
}

.footer-brand-link.active {
    background: rgba(0, 0, 0, 0.03);
}

.footer-brand-icon {
    height: 32px;
    width: auto;
}

.footer-brand-name {
    font-size: 0.95rem;
}

.footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid var(--ensalle-border);
}

.footer-bottom p {
    color: var(--ensalle-text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* ─── Sotto ID Auth Pages ──────────────────── */

.auth-page {
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 1rem;
}

.auth-bg-pattern { display: none; }

.auth-content {
    width: 100%;
    max-width: 420px;
}

/* Sotto Brand Header */
.sotto-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.sotto-arch {
    height: 52px;
    width: auto;
    opacity: 0.7;
}

.sotto-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: #1a1a2e;
    letter-spacing: -0.02em;
}

/* App Family Logos (footer-style) */
.sotto-brands {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.sotto-brands-label {
    width: 100%;
    text-align: center;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    color: #b0aca6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.sotto-brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.sotto-brand-link:hover {
    opacity: 1;
}

.sotto-brand-icon {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.sotto-brand-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.75rem;
    color: #8a8378;
}

/* Main Card (shaded) */
.auth-card {
    background: #f0ede8;
    border: none;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: #1a1a2e;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    color: #8a8378;
    margin: 0;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-label {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-input {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9375rem;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #ffffff;
    color: #1a1a2e;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.auth-input::placeholder {
    color: #b0aca6;
}

.auth-input:focus {
    outline: none;
    border-color: #8a8378;
    box-shadow: 0 0 0 3px rgba(138, 131, 120, 0.12);
}

.auth-field-error {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8125rem;
    color: #c0392b;
}

.auth-validation-summary {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    color: #c0392b;
    background: rgba(192, 57, 43, 0.08);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.auth-validation-summary:empty {
    display: none;
}

/* Options */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    color: #1a1a2e;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #1a1a2e;
    cursor: pointer;
}

.auth-link {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    color: #8a8378;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-link:hover {
    color: #1a1a2e;
    text-decoration: underline;
}

/* Primary Button */
.auth-btn-primary {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.875rem 1.5rem;
    background: #1a1a2e;
    color: #f5f5f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.auth-btn-primary:hover {
    background: #2d2d44;
}

.auth-btn-primary:active {
    transform: translateY(1px);
}

.auth-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.2);
}

/* Secondary Button */
.auth-btn-secondary {
    display: block;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #1a1a2e;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
}

.auth-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: #1a1a2e;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.auth-divider span {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    color: #8a8378;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alternate Actions */
.auth-alternate-actions {
    text-align: center;
}

.auth-alt-text {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    color: #8a8378;
    margin: 0 0 0.75rem 0;
}

.auth-terms {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    color: #8a8378;
    text-align: center;
    margin: 1rem 0 0 0;
    line-height: 1.5;
}

/* Footer */
.auth-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: auto;
}

.auth-footer p {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    color: #b0aca6;
    margin: 0;
    line-height: 1.6;
}

.auth-footer a {
    color: #8a8378;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-footer a:hover {
    color: #1a1a2e;
}

/* Alert styling */
.auth-card .alert {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    border-radius: 8px;
    border: none;
}

.auth-card .alert-danger {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
}

/* Responsive */
@media (max-width: 576px) {
    .auth-container {
        padding: 1.5rem 1rem;
    }

    .sotto-brands {
        gap: 1.5rem;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Alert overrides */
.alert-success {
    background: rgba(90, 122, 74, 0.1);
    border-color: var(--ensalle-green);
    color: var(--ensalle-green-dark);
}

.alert-danger {
    background: rgba(201, 136, 74, 0.1);
    border-color: var(--ensalle-orange);
    color: #8b4513;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0 5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .carrots-logo {
        height: 80px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .ms-3 {
        margin-left: 0 !important;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .footer-brands {
        gap: 1.5rem;
    }

    .footer-brand-icon {
        height: 24px;
    }

    .footer-brand-name {
        font-size: 0.8rem;
    }

    .journal-timeline {
        grid-template-columns: 1fr;
    }

    .meal-restaurant-name {
        font-size: 1.75rem;
    }

    .meal-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
