/* ============================================================
   FotoMalta — Shared Design System
   Sepia editorial theme — consistent with biography pages
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

/* ── Variables ───────────────────────────────────────────── */
:root {
    --ink:        #1a1209;
    --sepia:      #7a5230;
    --warm:       #c8893e;
    --light:      #f5ede0;
    --paper:      #fdf6ec;
    --fade:       #a08060;
    --rule:       rgba(122, 82, 48, 0.25);
    --error:      #c0392b;
    --success:    #27ae60;
    --shadow:     0 4px 18px rgba(0, 0, 0, 0.08);
}

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

/* ── Base ────────────────────────────────────────────────── */
body {
    font-family: 'Lora', Georgia, serif;
    background-color: var(--light);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.7;
}

/* Grain overlay */
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 999;
}

a { color: var(--warm); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Hero / Page header ──────────────────────────────────── */
.hero {
    background: linear-gradient(160deg, #2b1a0a 0%, #5c320b 60%, #8b5a2b 100%);
    color: var(--light);
    padding: 70px 40px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--paper);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-label {
    font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
    color: var(--warm); margin-bottom: 18px;
    animation: fadeUp 0.8s ease both;
}
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700; line-height: 1.15; letter-spacing: -0.5px;
    margin-bottom: 10px;
    animation: fadeUp 0.8s 0.1s ease both;
}
.hero p {
    font-style: italic; font-size: 1rem;
    color: rgba(245, 237, 224, 0.65);
    animation: fadeUp 0.8s 0.2s ease both;
}

/* ── Page wrap ───────────────────────────────────────────── */
.page-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* ── Card ────────────────────────────────────────────────── */
.card {
    background: var(--paper);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 40px;
    margin-top: 40px;
    animation: fadeUp 0.7s 0.2s ease both;
}

/* ── Form elements ───────────────────────────────────────── */
.form-group { margin-bottom: 22px; }

.form-group label {
    display: block;
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sepia);
    margin-bottom: 7px;
    font-family: 'Lora', serif;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--rule);
    border-radius: 8px;
    background: #fff;
    font-family: 'Lora', serif;
    font-size: 0.97rem;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--warm);
    box-shadow: 0 0 0 3px rgba(200, 137, 62, 0.15);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 13px 36px;
    border: none;
    border-radius: 8px;
    font-family: 'Lora', serif;
    font-size: 0.97rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    text-align: center;
    letter-spacing: 0.3px;
}
.btn-primary {
    background: linear-gradient(135deg, #d16e12 0%, #5c320b 100%);
    color: var(--paper);
    box-shadow: 0 4px 14px rgba(92, 50, 11, 0.3);
    width: 100%;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--rule);
    color: var(--sepia);
}
.btn-secondary:hover { border-color: var(--warm); color: var(--warm); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 13px 18px;
    border-radius: 8px;
    font-size: 0.93rem;
    margin-bottom: 22px;
    border-left: 4px solid;
}
.alert-error   { background: #fdf0f0; border-color: var(--error);   color: var(--error); }
.alert-success { background: #f0fdf4; border-color: var(--success); color: #1e6e3e; }
.alert-info    { background: var(--paper); border-color: var(--warm); color: var(--sepia); }

/* ── Auth card specific ──────────────────────────────────── */
.auth-card { max-width: 460px; margin: 40px auto 60px; }
.auth-card .card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    color: var(--sepia);
    margin-bottom: 6px;
}
.auth-card .card-sub {
    font-size: 0.9rem;
    color: var(--fade);
    margin-bottom: 28px;
}
.auth-switch {
    text-align: center;
    margin-top: 22px;
    font-size: 0.9rem;
    color: var(--fade);
}

/* ── Ornament divider ────────────────────────────────────── */
.ornament {
    text-align: center;
    color: var(--warm);
    font-size: 1.2rem;
    letter-spacing: 10px;
    margin: 32px 0;
    opacity: 0.4;
}

/* ── Nav bar ─────────────────────────────────────────────── */
.navbar {
    background: #2b1a0a;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--light);
    font-style: italic;
    letter-spacing: 1px;
}
.navbar-links { display: flex; gap: 24px; align-items: center; }
.navbar-links a {
    color: rgba(245,237,224,0.75);
    font-size: 0.87rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.navbar-links a:hover,
.navbar-links a.active { color: var(--warm); text-decoration: none; }

/* ── Dashboard grid ──────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.dash-card {
    background: var(--paper);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s;
    border-top: 3px solid var(--warm);
}
.dash-card:hover { transform: translateY(-3px); }
.dash-card .dash-icon { font-size: 2rem; margin-bottom: 12px; }
.dash-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--sepia);
    margin-bottom: 6px;
}
.dash-card p { font-size: 0.88rem; color: var(--fade); }

/* ── Password strength indicator ─────────────────────────── */
.pwd-strength { height: 4px; border-radius: 4px; margin-top: 8px; background: #e0d5c5; overflow: hidden; }
.pwd-bar { height: 100%; width: 0; border-radius: 4px; transition: width 0.3s, background 0.3s; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 0.8rem;
    color: var(--fade);
    border-top: 1px solid var(--rule);
    margin-top: 40px;
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 560px) {
    .hero { padding: 50px 20px 55px; }
    .card { padding: 28px 20px; }
    .navbar { padding: 0 16px; }
    .navbar-links { gap: 14px; }
    .navbar-links a { font-size: 0.78rem; }
}
