/* ==========================================================
   Bailey Chihuahua — site styles
   Edit the colour tokens below to re-theme the whole site.
   ========================================================== */

:root {
  --green: #55a630;          /* brand green (matches the logo) */
  --green-dark: #3f7f22;
  --green-soft: #e8f3e0;
  --fawn: #e9c58f;           /* chihuahua fawn */
  --fawn-soft: #fbf1e1;
  --cream: #fffaf2;          /* page background */
  --paper: #ffffff;          /* card background */
  --ink: #2b2620;            /* main text */
  --ink-soft: #6b6157;       /* secondary text */
  --line: #eadfce;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .08);
  --shadow-lg: 0 2px 4px rgba(60, 40, 20, .06), 0 18px 48px rgba(60, 40, 20, .14);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1120px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green: #7cc957;
    --green-dark: #9bd97c;
    --green-soft: #22301b;
    --fawn: #c9a46d;
    --fawn-soft: #2a241c;
    --cream: #1a1714;
    --paper: #24201b;
    --ink: #f3ece2;
    --ink-soft: #b9ad9f;
    --line: #3a332b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 48px rgba(0, 0, 0, .45);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 16px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tint { background: var(--fawn-soft); }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: .8rem;
}
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.center { text-align: center; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em;
  border-radius: 999px;
  font-weight: 800; font-size: 1rem;
  text-decoration: none;
  background: var(--green); color: #fff;
  box-shadow: 0 6px 18px rgba(85, 166, 48, .3);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { color: #fff; background: var(--green-dark); transform: translateY(-2px); }
@media (prefers-color-scheme: dark) { .btn, .btn:hover { color: #14200e; } }
.btn--ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
}
.btn--ghost:hover { background: var(--paper); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(60, 40, 20, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 42px; height: 42px; border-radius: 11px; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.brand span b { color: var(--green-dark); font-weight: 700; }

.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .5em .95em; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: .98rem;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--green-soft); color: var(--green-dark); }
.nav a[aria-current="page"] { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .nav a[aria-current="page"] { color: #14200e; } }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: var(--paper); box-shadow: var(--shadow); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  position: relative; transition: transform .2s ease, background .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 72px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(60, 40, 20, .1);
    display: none;
  }
  .nav-open .nav { display: block; }
  .nav ul { flex-direction: column; padding: 12px 16px 18px; gap: 4px; }
  .nav a { padding: .8em 1em; font-size: 1.05rem; }
}

/* ---------- Hero (home) ---------- */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 72px); align-items: center;
}
.hero h1 { margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: var(--green-dark); }
.hero-copy p { font-size: 1.12rem; }
.hero-copy .btn-row { margin-top: 28px; }
.hero-photo { position: relative; justify-self: center; width: min(100%, 440px); }
.hero-photo::before {
  content: ""; position: absolute; inset: -18px -18px 18px 18px;
  background: var(--fawn); border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
  opacity: .55; z-index: 0;
}
.hero-photo img {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 28px; box-shadow: var(--shadow-lg);
}
.hero-badge {
  position: absolute; z-index: 2; left: -20px; bottom: 28px;
  background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: .95rem; line-height: 1.3;
}
.hero-badge small { display: block; font-weight: 600; color: var(--ink-soft); font-size: .8rem; }
.hero-badge .flag { font-size: 1.6rem; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; width: min(100%, 360px); }
  .hero-badge { left: 0; }
}

/* ---------- Fact cards ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.fact {
  background: var(--paper); border-radius: var(--radius); padding: 24px 22px;
  box-shadow: var(--shadow);
}
.fact .icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-dark); margin-bottom: 14px;
}
.fact .icon svg { width: 24px; height: 24px; }
.fact h3 { font-size: 1.1rem; margin-bottom: .3em; }
.fact p { margin: 0; color: var(--ink-soft); font-size: .97rem; line-height: 1.55; }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.post-card .thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--fawn-soft); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255, 255, 255, .92); color: #2b2620;
  font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
}
.post-card .tag svg { width: 12px; height: 12px; }
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card time { font-size: .85rem; color: var(--ink-soft); font-weight: 700; }
.post-card h3 { margin: .3em 0 .4em; font-size: 1.35rem; }
.post-card p { color: var(--ink-soft); margin: 0 0 1em; }
.post-card .more { margin-top: auto; font-weight: 800; color: var(--green-dark); }

/* ---------- Gallery strip (home) ---------- */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.strip a { display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.strip a:hover img { transform: scale(1.06); }
@media (max-width: 760px) { .strip { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Page header ---------- */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); text-align: center; }
.page-hero p { max-width: 620px; margin: 0 auto; color: var(--ink-soft); font-size: 1.15rem; }

/* ---------- Gallery (masonry) ---------- */
.masonry { columns: 3 280px; column-gap: 18px; }
.masonry a {
  display: block; margin-bottom: 18px; break-inside: avoid;
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); position: relative;
  background: var(--fawn-soft);
}
.masonry img { width: 100%; transition: transform .4s ease; }
.masonry a::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .25), transparent 40%);
  opacity: 0; transition: opacity .25s ease;
}
.masonry a:hover img { transform: scale(1.03); }
.masonry a:hover::after { opacity: 1; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(16, 13, 10, .94);
  display: none; align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1400px); max-height: 86vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lightbox button {
  position: absolute; border: 0; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
  display: grid; place-items: center; transition: background .15s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox button svg { width: 24px; height: 24px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, .75); font-weight: 700; font-size: .9rem;
}
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
  .lb-count { bottom: 26px; }
}

/* ---------- Split layout (about / contact) ---------- */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.split--reverse { grid-template-columns: 1.15fr .85fr; }
.split .photo { position: sticky; top: 100px; }
.split .photo img { border-radius: 24px; box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split .photo figcaption { text-align: center; color: var(--ink-soft); font-size: .92rem; margin-top: 12px; font-style: italic; }
@media (max-width: 860px) {
  .split, .split--reverse { grid-template-columns: 1fr; }
  .split .photo { position: static; max-width: 420px; margin: 0 auto; }
}

.prose { max-width: 680px; }
.prose p:first-of-type::first-letter {
  font-family: var(--font-display); font-weight: 700;
  float: left; font-size: 3.6em; line-height: .9; padding: .06em .12em 0 0; color: var(--green-dark);
}
.pullquote {
  margin: 1.8em 0; padding: 1.2em 1.4em;
  border-left: 5px solid var(--green);
  background: var(--paper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1.4; font-style: italic;
  box-shadow: var(--shadow);
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1.6em; padding: 0; list-style: none; }
.chips li {
  background: var(--green-soft); color: var(--green-dark);
  padding: .4em .9em; border-radius: 999px; font-weight: 800; font-size: .9rem;
}

/* ---------- Note card (contact / privacy) ---------- */
.note {
  background: var(--paper); border-radius: 24px; box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 48px); position: relative;
}
.note p:last-child { margin-bottom: 0; }
.note .big { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.45; }
.note-paw { position: absolute; right: 24px; top: -22px; width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); }
.note-paw svg { width: 28px; height: 28px; }
.narrow { max-width: 760px; margin: 0 auto; }

/* ---------- Single post ---------- */
.post-header { text-align: center; padding: clamp(40px, 6vw, 72px) 0 32px; }
.post-meta { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); font-weight: 700; font-size: .95rem; }
.post-meta img { width: 32px; height: 32px; border-radius: 9px; }
.post-body { max-width: 760px; margin: 0 auto; }
.post-body > p { font-size: 1.2rem; text-align: center; margin-bottom: 1.8em; }
.post-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.post-images a { display: block; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.post-images img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-images a:hover img { transform: scale(1.03); }
.videos { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 26px; }
.video {
  width: min(100%, 340px); aspect-ratio: 9 / 16;
  border-radius: 18px; overflow: hidden; background: #000; box-shadow: var(--shadow-lg);
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  max-width: 760px; margin: 56px auto 0; padding-top: 32px; border-top: 1px solid var(--line);
}
.post-nav a {
  display: block; padding: 16px 20px; border-radius: 14px; background: var(--paper);
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
}
.post-nav a:hover { color: var(--ink); box-shadow: var(--shadow-lg); }
.post-nav small { display: block; color: var(--ink-soft); font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.post-nav strong { font-family: var(--font-display); font-size: 1.1rem; }
.post-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { grid-column: 1; } }

/* ---------- Paw divider ---------- */
.paws { display: flex; justify-content: center; gap: 14px; color: var(--fawn); margin: 8px 0 0; }
.paws svg { width: 22px; height: 22px; }
.paws svg:nth-child(2) { transform: translateY(-8px) rotate(12deg); }
.paws svg:nth-child(3) { transform: rotate(-8deg); }

/* ---------- CTA band ---------- */
.cta {
  background: var(--green); color: #fff; border-radius: 28px;
  padding: clamp(32px, 5vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta h2 { margin: 0 0 .2em; }
.cta p { margin: 0; opacity: .92; }
.cta .btn { background: #fff; color: var(--green-dark); box-shadow: none; }
.cta .btn:hover { background: var(--fawn-soft); color: var(--green-dark); }
.cta-paw { position: absolute; right: -30px; bottom: -40px; width: 200px; height: 200px; opacity: .12; }
@media (prefers-color-scheme: dark) {
  .cta { background: #2f5a1c; }
  .cta .btn { color: #2f5a1c; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 48px 0 32px; margin-top: clamp(56px, 8vw, 96px); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 700; }
.footer-nav a:hover { color: var(--green-dark); }
.footer-bottom { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: .92rem; }
.footer-bottom a { color: var(--ink-soft); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* Pull quote under the favourite-things cards */
.facts + .pullquote { margin: 44px auto 0; }

/* Keep the footer at the bottom on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* Posts page: fit all four posts on one row on wide screens */
.post-grid--all { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 22px; }
