/*
Theme Name: Beardie With a Blog
Theme URI: https://fallathedragon.com
Author: Falla's Beardie Lover
Description: A warm, editorial theme for Falla the bearded dragon's blog — real care tips, honest product picks, and stories from a devoted 12-year-old beardie lover. Built from the approved site design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: beardie-with-a-blog
Tags: one-column, custom-colors, custom-menu, editor-style, accessibility-ready, blog
*/

/* ===== Design tokens ===== */
:root {
  --cream: #fbf4e6;
  --cream-soft: #f3e9d6;
  --ink: #1e1a16;
  --ink-soft: #4a423b;
  --muted: #6e655c;
  --border: #e1d6c2;

  --green-deep: #002c00;
  --green: #00480e;
  --green-active: #003306;
  --green-btn: #005211;

  --amber: #f77f00;
  --amber-soft: #ffaf76;
  --amber-text: #1f0c01;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 0.5rem;
  --wrap: 1120px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 0.5em; line-height: 1.2; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 999; border-radius: 4px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius); font-weight: 700; font-size: 0.95rem; transition: transform 0.15s ease, opacity 0.15s ease; }
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-green { background: var(--green-btn); color: var(--cream); }
.btn-amber { background: var(--amber); color: var(--amber-text); }
.btn-ghost { background: transparent; border: 2px solid var(--green-btn); color: var(--green-btn); }

/* ===== Header ===== */
.site-header { background: var(--green); position: sticky; top: 0; z-index: 50; }
.header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); font-weight: 700; font-family: var(--font-display); font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a { padding: 8px 14px; border-radius: var(--radius); font-size: 0.92rem; font-weight: 600; color: var(--cream-soft); }
.main-nav a:hover { background: var(--green-active); color: var(--amber-soft); }
.main-nav a.is-active { background: var(--green-active); color: var(--amber-soft); }
.nav-toggle { display: none; background: transparent; border: 0; color: var(--cream); padding: 8px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--green); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .main-nav.is-open { display: flex; }
  .main-nav a { width: 100%; }
  .site-header { position: relative; }
}

/* ===== Hero =====
   The banner photo is zoomed in (150% width, height auto-scales to match)
   and left-anchored (position-x: 0%). Because both the zoom and position are
   expressed as percentages of the container, Falla's face lands at roughly
   the same ~78% mark across the width at ANY screen size -- comfortably
   clear of the text column on the left on all normal desktop/tablet widths.
   A dedicated mobile override below keeps her fully visible once the text
   column would otherwise start reaching that far. */
.hero { position: relative; padding: 140px 0 100px; background-size: 150% auto; background-position: 0% 19%; background-repeat: no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,44,0,0.9) 0%, rgba(0,44,0,0.72) 48%, rgba(0,44,0,0.3) 78%); z-index: 0; }
.hero__grid { position: relative; z-index: 1; max-width: 600px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--amber); margin-bottom: 12px; }
.hero h1 { font-size: 2.6rem; color: var(--cream); }
.hero h1 em, .hero h1 .accent { font-style: italic; color: var(--amber-soft); font-family: var(--font-display); }
.hero__lede { font-size: 1.1rem; color: var(--cream-soft); max-width: 46ch; }
.hero__actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero { padding: 96px 0 72px; background-size: 260% auto; background-position: 15% 20%; }
  .hero h1 { font-size: 2rem; }
}

/* Plain solid-color banner for interior page titles (About, Care Guide, Favorites, Blog) */
.page-title { background: var(--green-deep); padding: 56px 0; }
.page-title h1 { color: var(--cream); margin-bottom: 6px; }
.page-title .hero__lede { color: var(--cream-soft); margin-top: 10px; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section--alt { background: var(--cream-soft); }
.section__head { max-width: 640px; margin-bottom: 32px; }
.section h2 { font-size: 1.9rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { display: flex; justify-content: center; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* Polaroid-style photo frame — matches the site's real-photo treatment */
.polaroid { background: #fff; padding: 12px 12px 16px; border-radius: 2px; box-shadow: 0 14px 30px rgba(30,26,22,0.18); max-width: 340px; }
.polaroid img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 1px; }
.polaroid figcaption { text-align: center; font-family: var(--font-display); font-style: italic; font-size: 0.88rem; color: var(--ink-soft); margin-top: 10px; }
.polaroid--wide { max-width: 420px; }
.polaroid--wide img { aspect-ratio: 4/3; }

/* Feature pill list (care topics on home) */
.pill-list { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.pill { background: var(--cream); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); }

/* Card grid (Falla's setup teasers, personality, gallery) */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.card__icon { font-size: 1.8rem; margin-bottom: 10px; }
.card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
}

.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .card-grid--4 { grid-template-columns: 1fr; }
}

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.gallery-grid .polaroid { max-width: none; }
.gallery-grid .polaroid img { aspect-ratio: 4/5; }

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
}

/* ===== Care Guide tabs ===== */
.cg-topics { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0; }
.cg-topic { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 0.9rem; cursor: pointer; color: var(--ink-soft); }
.cg-topic.is-active { background: var(--green-btn); color: var(--cream); border-color: var(--green-btn); }
.cg-callout { background: var(--cream-soft); border: 1px solid var(--border); border-radius: 14px; padding: 20px 24px; margin-bottom: 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cg-panel { display: none; }
.cg-panel.is-active { display: block; }
.cg-panel h2 { font-size: 1.6rem; display: flex; align-items: center; gap: 10px; }
.cg-panel h3 { font-size: 1.15rem; margin-top: 28px; }
.cg-nav { display: flex; justify-content: space-between; margin-top: 32px; }
.cg-nav button { background: transparent; border: 2px solid var(--green-btn); color: var(--green-btn); border-radius: var(--radius); padding: 10px 20px; font-weight: 700; cursor: pointer; font-family: var(--font-body); }
.cg-nav button:disabled { opacity: 0.35; cursor: default; }

/* ===== Favorites / product cards ===== */
.fav-group { margin-bottom: 48px; }
.fav-group__title { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; margin-bottom: 20px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; }
.product-card__icon { font-size: 1.6rem; margin-bottom: 10px; }
.product-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.product-card p { color: var(--muted); font-size: 0.92rem; }
.product-card__love { background: var(--cream-soft); border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; margin: 12px 0; }
.product-card__love strong { color: var(--ink); }
.product-card a.btn { margin-top: auto; justify-content: center; font-size: 0.88rem; padding: 10px 16px; }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: 1fr; }
}

.merch-banner { background: var(--green); color: var(--cream); border-radius: 16px; padding: 36px; text-align: center; margin-bottom: 48px; }
.merch-banner .eyebrow { color: var(--amber-soft); }
.merch-banner h2 { color: var(--cream); }
.merch-banner p { color: var(--cream-soft); max-width: 52ch; margin: 0 auto 20px; }

.disclosure { background: var(--cream-soft); border-radius: 12px; padding: 16px 20px; font-size: 0.88rem; color: var(--muted); margin-bottom: 32px; }
.disclosure strong { color: var(--ink-soft); }

/* ===== Blog ===== */
.post { max-width: 720px; margin: 0 auto; }
.post .eyebrow { }
.post__meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
.post__body p { font-size: 1.05rem; color: var(--ink-soft); }
.post__body img { border-radius: 14px; margin: 24px 0; }
.post__body figcaption { color: var(--muted); font-size: 0.88rem; margin-top: -12px; margin-bottom: 24px; }
.post__author { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--border); margin-top: 40px; padding-top: 24px; }
.post__author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.post__author strong { display: block; }
.post__author span { color: var(--muted); font-size: 0.9rem; }
.post__cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.blog-list article { border-bottom: 1px solid var(--border); padding: 28px 0; }
.blog-list h2 { font-size: 1.4rem; margin-bottom: 6px; }
.blog-list .post__meta { margin-bottom: 10px; }

/* ===== Footer ===== */
.site-footer { background: var(--green-deep); color: var(--cream-soft); padding: 56px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer__brand { display: flex; align-items: center; gap: 10px; color: var(--cream); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
.footer__brand img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.footer h4 { color: var(--cream); font-family: var(--font-body); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--amber-soft); }
.footer__disclosure { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; font-size: 0.82rem; color: #c3b69b; }
.footer__bottom { display: flex; justify-content: space-between; margin-top: 16px; font-size: 0.82rem; color: #c3b69b; flex-wrap: wrap; gap: 8px; }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 120px 24px; }
.error-404 h1 { font-size: 3rem; }
