/* ==========================================================
   ONLYPHOTO - style.css
   Dirección: revista de fotografía nocturna / cuarto oscuro.
   Negro cálido, acentos oro-flash y carmín "premium",
   serif editorial + sans utilitaria, motivo de obturador/diafragma.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,300;0,500;0,600;1,400&family=Work+Sans:wght@300;400;500;600&display=swap');

:root {
    --bg: #0e0d0f;
    --bg-elevated: #17151a;
    --glass: rgba(255, 255, 255, 0.045);
    --glass-border: rgba(255, 255, 255, 0.09);
    --ivory: #f1ede6;
    --muted: #a79e91;
    --gold: #d4a24c;
    --gold-soft: rgba(212, 162, 76, 0.14);
    --crimson: #a23b3b;
    --crimson-soft: rgba(162, 59, 59, 0.16);
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --font-display: 'Fraunces', serif;
    --font-body: 'Work Sans', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ivory);
    font-family: var(--font-body);
    scroll-behavior: smooth;
}

body {
    background-image:
        radial-gradient(circle at 15% 0%, rgba(212, 162, 76, 0.07), transparent 45%),
        radial-gradient(circle at 85% 100%, rgba(162, 59, 59, 0.08), transparent 45%);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.01em;
    margin: 0;
}

p { line-height: 1.6; color: var(--muted); }

::selection { background: var(--gold-soft); color: var(--ivory); }

/* ---------------- Scrollbar ---------------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a262c; border-radius: 10px; }

/* ---------------- Utility ---------------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    text-align: center;
}

.btn-gold {
    background: linear-gradient(135deg, #e6bb6b, var(--gold));
    color: #14110b;
    box-shadow: 0 8px 24px rgba(212, 162, 76, 0.25);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(212, 162, 76, 0.35); }

.btn-ghost {
    background: transparent;
    color: var(--ivory);
    border-color: var(--glass-border);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-block { width: 100%; }

/* ---------------- Navbar ---------------- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 0;
}

.logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ivory);
}

.logo .aperture { color: var(--gold); }

.nav-actions { display: flex; gap: 12px; }

/* ---------------- Hero (Inicio) ---------------- */
.hero {
    padding: 90px 0 70px;
    text-align: center;
    position: relative;
}

.hero .eyebrow {
    display: inline-block;
    font-size: 12.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    color: var(--ivory);
    max-width: 780px;
    margin: 0 auto 22px;
}

.hero h1 em {
    font-style: italic;
    color: var(--gold);
}

.hero p.lead {
    max-width: 520px;
    margin: 0 auto 40px;
    font-size: 17px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Aperture / shutter graphic */
.aperture-mark {
    width: 220px;
    height: 220px;
    margin: 56px auto 0;
    opacity: 0.9;
}

/* ---------------- Auth cards (login / registro) ---------------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: var(--radius-lg);
    padding: 42px 36px;
    box-shadow: var(--shadow);
}

.auth-card .logo { justify-content: center; margin-bottom: 6px; }

.auth-card h2 {
    text-align: center;
    font-size: 26px;
    margin-bottom: 6px;
}

.auth-card .sub {
    text-align: center;
    font-size: 14px;
    margin-bottom: 30px;
}

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 12.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.field input, .field textarea, .field select {
    width: 100%;
    padding: 13px 15px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--ivory);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.field input:focus, .field textarea:focus, .field select:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.06);
}

.field textarea { resize: vertical; min-height: 90px; }

.auth-alt {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: var(--muted);
}
.auth-alt a { color: var(--gold); font-weight: 600; }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
.alert-error { background: var(--crimson-soft); color: #e8a3a3; border: 1px solid rgba(162,59,59,0.4); }
.alert-success { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(212,162,76,0.4); }

/* ---------------- Perfil ---------------- */
.profile-cover {
    height: 300px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.profile-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14,13,15,0) 0%, var(--bg) 96%);
}

.profile-header {
    max-width: 900px;
    margin: -70px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.profile-avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    border: 4px solid var(--bg);
    object-fit: cover;
    background: var(--bg-elevated);
}

.profile-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.profile-name { font-size: 28px; margin-bottom: 4px; }
.profile-username { color: var(--gold); font-size: 14.5px; }

.profile-bio {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 0 24px;
    font-size: 15px;
}

.subscribe-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 10px 10px 10px 20px;
    border-radius: 999px;
}

.subscribe-price {
    font-family: var(--font-display);
    font-size: 19px;
    color: var(--gold);
}
.subscribe-price span { font-size: 12px; color: var(--muted); display: block; font-family: var(--font-body); }

/* ---------------- Publicaciones ---------------- */
.posts-section { max-width: 900px; margin: 50px auto 90px; padding: 0 24px; }

.posts-title {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.post-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
}

.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(22px) brightness(0.55) saturate(1.1);
    transform: scale(1.15);
}

.post-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, rgba(14,13,15,0.25), rgba(14,13,15,0.55));
}

.post-lock-overlay svg { width: 30px; height: 30px; color: var(--gold); }

.premium-tag {
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--crimson-soft);
    color: #eab6b6;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(162,59,59,0.4);
}

@media (max-width: 640px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- Modal de suscripción ---------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 7, 9, 0.72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 34px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    animation: modalIn 0.35s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 3px solid var(--gold-soft);
}

.modal-card h3 { font-size: 20px; margin-bottom: 4px; }
.modal-card .modal-price {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 24px;
    margin: 14px 0 24px;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
}
.modal-card { position: relative; }

/* Loading state inside modal */
.loading-stage {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px 0;
}
.loading-stage.active { display: flex; }

.shutter-spinner {
    width: 64px;
    height: 64px;
    animation: spin 1.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { font-size: 14px; color: var(--muted); }

/* Reveal stage */
.reveal-stage {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.reveal-stage.active { display: flex; }

.reveal-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--radius);
}

.reveal-message {
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.4;
}

/* ---------------- Footer ---------------- */
.site-footer {
    text-align: center;
    padding: 40px 0 60px;
    color: var(--muted);
    font-size: 13px;
}
