/* ============================================================
   happycalligraphy.com  style.css
   Light Cream theme. Paper-inspired base, sage primary, terracotta accent.
   ============================================================ */

/* 1. Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #fdfaf2;
    color: #2c2925;
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
a { color: #7a9b76; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #c2664f; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* 2. Typography */
h1, h2, h3, h4 { color: #2c2925; line-height: 1.2; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem); font-weight: 600; margin-top: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { color: #4a463f; margin-bottom: 1rem; }

.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #c2664f; font-family: 'Inter', sans-serif; }
.subtitle { color: #6b6660; font-size: 1.15rem; max-width: 60ch; }

/* 3. Container */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* 4. Brand wordmark */
.brand { display: inline-block; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1; }
.brand-happy { color: #c2664f; font-style: italic; }
.brand-calligraphy { color: #2c2925; }

/* 5. Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(253, 250, 242, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e8e1d0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; }
.nav-list { display: flex; gap: 1.5rem; align-items: center; }
.nav-list a { color: #4a463f; font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-list a:hover { color: #c2664f; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem; flex-direction: column; gap: 4px; }
.nav-toggle-bar { display: block; width: 24px; height: 2px; background: #2c2925; transition: transform 0.2s; }

@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .nav-list { display: none; position: absolute; top: 100%; right: 1rem; background: #fdfaf2; padding: 1rem 1.5rem; flex-direction: column; gap: 1rem; border-radius: 8px; border: 1px solid #e8e1d0; box-shadow: 0 12px 32px rgba(44, 41, 37, 0.1); }
    .nav-list.open { display: flex; }
}

/* 6. Buttons */
.btn { display: inline-block; padding: 0.85rem 1.75rem; border-radius: 4px; font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 0; text-align: center; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease; font-family: 'Inter', sans-serif; }
.btn-primary { background: #7a9b76; color: #ffffff; }
.btn-primary:hover { background: #698a65; transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(122, 155, 118, 0.5); }
.btn-secondary { background: transparent; color: #7a9b76; border: 1.5px solid #7a9b76; }
.btn-secondary:hover { background: rgba(122, 155, 118, 0.1); color: #c2664f; border-color: #c2664f; }
.btn:disabled, .btn.disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* 7. Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; }
.hero-inner { max-width: 720px; }
.hero h1 { margin: 0.5rem 0 1.25rem; }
.hero p.subtitle { margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* 8. Email form */
.email-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; align-items: stretch; }
.email-form .btn { white-space: nowrap; }
.email-input { padding: 0.85rem 1rem; background: #ffffff; border: 1px solid #e8e1d0; border-radius: 4px; color: #2c2925; font-family: inherit; font-size: 0.95rem; }
.email-input:focus { outline: none; border-color: #7a9b76; box-shadow: 0 0 0 3px rgba(122, 155, 118, 0.2); }
.opt-in { font-size: 0.8rem; color: #6b6660; margin-top: 0.5rem; display: flex; gap: 0.5rem; align-items: flex-start; }
.opt-in input { margin-top: 0.2rem; }

/* 9. Cards (product / guide) */
.section { padding: 3rem 0; }
.section-header { margin-bottom: 2rem; display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background: #ffffff; border: 1px solid #e8e1d0; border-radius: 8px; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; display: block; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -12px rgba(44, 41, 37, 0.15); }
.card-thumb { aspect-ratio: 4 / 3; overflow: hidden; background: #f5f0e3; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-category { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #c2664f; }
.card h3 { color: #2c2925; margin: 0.4rem 0 0.5rem; font-size: 1.25rem; }
.card-body p { font-size: 0.9rem; color: #4a463f; }
.card-meta { font-size: 0.8rem; color: #8a857d !important; margin-top: 0.5rem !important; }
.card-price { font-size: 1.1rem; font-weight: 700; color: #7a9b76; margin-top: 0.5rem; }

/* 10. Lead magnet box */
.lead-magnet { background: #ffffff; border: 1px solid #e8e1d0; border-radius: 12px; padding: 2.5rem; }
.lead-magnet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
@media (max-width: 720px) { .lead-magnet-grid { grid-template-columns: 1fr; } }
.lead-magnet h2 { margin-top: 0; }

/* 11. Tutorial / guide body */
.tutorial-body { max-width: 760px; padding-top: 1rem; padding-bottom: 4rem; }
.tutorial-body h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.tutorial-body h3 { font-size: 1.3rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }
.tutorial-body p { font-size: 1rem; line-height: 1.7; }
.tutorial-body ul, .tutorial-body ol { margin-left: 1.5rem; margin-bottom: 1rem; color: #4a463f; }
.tutorial-body ul li, .tutorial-body ol li { margin-bottom: 0.4rem; }

/* 12. Disclosure box */
.disclosure-box { padding: 1rem 1.25rem; background: #fff8e8; border: 1px solid #f0d894; border-radius: 6px; margin: 1rem 0; color: #6b5a1f; font-size: 0.95rem; }

/* 13. Footer */
.site-footer { margin-top: 4rem; background: #f5f0e3; border-top: 1px solid #e8e1d0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding: 3rem 1.25rem; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col h4 { color: #2c2925; margin-bottom: 0.75rem; font-family: 'Inter', sans-serif; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col a { color: #4a463f; font-size: 0.9rem; }
.footer-col a:hover { color: #c2664f; }
.footer-tagline { color: #6b6660; font-size: 0.9rem; margin-top: 0.5rem; max-width: 36ch; }
.footer-bottom { border-top: 1px solid #e8e1d0; padding: 1.25rem 0; }
.footer-copyright { font-size: 0.8rem; color: #8a857d; }

/* 14. AdSense placeholders (hidden until approved) */
.ad-placeholder { display: none; align-items: center; justify-content: center; background: #f5f0e3; color: #8a857d; font-size: 0.85rem; border-radius: 6px; margin: 2rem 0; }
.ad-leaderboard { min-height: 90px; }
.ad-rectangle { min-height: 250px; max-width: 336px; margin: 2rem auto; }

/* 15. Affiliate placeholder block (used in product pages) */
.affiliate-placeholder { background: #ffffff; border: 1.5px solid #e8e1d0; border-radius: 8px; padding: 1.5rem; margin: 2rem 0; }
.affiliate-placeholder .label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #c2664f; }
.affiliate-placeholder h4 { color: #2c2925; margin: 0.4rem 0 0.5rem; font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; }
.affiliate-placeholder p { font-size: 0.95rem; }
