/* HebeBooks Main Page — styles for public/index.html only.
   Requires: base.css (fonts, reset, header, footer). */

/* ── Design tokens ───────────────────────────────────────────── */

:root {
    --hb-primary:        #DD183B;
    --hb-primary-rgb:    221, 24, 59;   /* keep in sync with --hb-primary for rgba() */
    --hb-primary-dark:   #b81330;
    --hb-bg-warm:        #FFEDE6;
    --hb-text-muted:     #666666;
    --hb-border-light:   #e0e0e0;
    --hb-disabled:       #cccccc;
    --hb-success-bg:     #d4edda;
    --hb-success-text:   #155724;
    --hb-success-border: #c3e6cb;
    --hb-error-bg:       #f8d7da;
    --hb-error-text:     #721c24;
    --hb-error-border:   #f5c6cb;
}

/* ── Hero ────────────────────────────────────────────────────── */

.hero {
    margin-top: 80px;
    background: linear-gradient(135deg, var(--hb-bg-warm) 0%, var(--white) 100%);
    padding: 80px 20px 60px;
    text-align: center;
}
.hero-title    { font-size: 3.5rem; color: var(--hb-primary); margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.3rem; color: var(--hb-text-muted); max-width: 700px; margin: 0 auto 2rem; }
.hero-content  { max-width: 800px; margin: 0 auto; padding-top: 1.5rem; }
.hero-content p { font-size: 1.1rem; color: var(--hb-text-muted); line-height: 1.8; }

/* ── Books ───────────────────────────────────────────────────── */

.books { padding: 80px 20px; background: var(--hb-bg-warm); }
.books h2 { text-align: center; font-size: 2.5rem; color: var(--text); margin-bottom: 3rem; }

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    justify-content: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.book-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}
.book-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(var(--hb-primary-rgb), 0.2); }

.book-card-link { display: block; text-decoration: none; color: inherit; cursor: pointer; }

.book-cover { width: 100%; height: 400px; object-fit: cover; background: var(--hb-bg-warm); }

.book-info { padding: 1.5rem; }
.book-info h3 { font-size: 1.5rem; color: var(--hb-primary); margin-bottom: 0.5rem; }
.book-info p  { color: var(--hb-text-muted); font-size: 0.95rem; line-height: 1.6; }

/* ── Contact ─────────────────────────────────────────────────── */

.contact { padding: 80px 20px; background: var(--white); text-align: center; }
.contact h2 { font-size: 2.5rem; color: var(--text); margin-bottom: 1rem; }

.contact-description { font-size: 1.1rem; color: var(--hb-text-muted); margin-bottom: 2rem; }

.contact-form { max-width: 600px; margin: 2rem auto; text-align: left; }

.contact-alt { margin-top: 2rem; font-size: 0.95rem; color: var(--hb-text-muted); }
.contact-alt a { color: var(--hb-primary); text-decoration: none; font-weight: 600; }
.contact-alt a:hover { text-decoration: underline; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--hb-border-light);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--white);
    transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--hb-primary);
    box-shadow: 0 0 0 3px rgba(var(--hb-primary-rgb), 0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--hb-primary);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: var(--transition);
}
.submit-btn:hover   { background: var(--hb-primary-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(var(--hb-primary-rgb), 0.3); }
.submit-btn:active  { transform: translateY(0); }
.submit-btn:disabled { background: var(--hb-disabled); cursor: not-allowed; transform: none; }

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    display: none;
}
.form-status.success { display: block; background: var(--hb-success-bg); color: var(--hb-success-text); border: 1px solid var(--hb-success-border); }
.form-status.error   { display: block; background: var(--hb-error-bg);   color: var(--hb-error-text);   border: 1px solid var(--hb-error-border); }

/* ── Scroll to top ───────────────────────────────────────────── */

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--hb-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 999;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover   { background: var(--hb-primary-dark); transform: translateY(-3px); }

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 922px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .books h2, .contact h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .hero { padding: 50px 20px 40px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-content p { font-size: 1rem; }

    .books, .contact { padding: 50px 20px; }
    .books-grid { grid-template-columns: 1fr; }
    .contact-form { padding: 0 10px; }

    .form-group input,
    .form-group textarea { font-size: 16px; } /* prevents zoom on iOS */
    .submit-btn { font-size: 1rem; }

    .scroll-top { width: 45px; height: 45px; bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .books h2, .contact h2 { font-size: 1.8rem; }
    .book-info h3 { font-size: 1.3rem; }
}
