/* Australian Vegetarian and Vegan Resource
   Mobile-first, no frameworks. Light + dark via prefers-color-scheme. */

:root {
  --green: #0a7f26;
  --green-dark: #075a1b;
  --green-tint: #e8f4ea;
  --accent: #c25e00;
  --bg: #f7faf5;
  --surface: #ffffff;
  --text: #1c2a1f;
  --muted: #566659;
  --link: #14702b;
  --border: #d6e2d3;
  --shadow: 0 1px 2px rgba(10, 40, 15, .08), 0 2px 8px rgba(10, 40, 15, .06);
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green-tint: #17301c;
    --accent: #ffa64d;
    --bg: #0f1911;
    --surface: #16231a;
    --text: #e5efe6;
    --muted: #9db2a0;
    --link: #74d98d;
    --border: #28392b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.wrap { width: 100%; max-width: 62rem; margin-inline: auto; padding-inline: 1rem; }

.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 100;
  background: var(--surface); color: var(--text);
  padding: .6rem 1rem; border-radius: 6px; box-shadow: var(--shadow);
}
.skip-link:focus { top: .5rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header + navigation ---------- */

.site-header { background: var(--green); color: #fff; }

/* Photo strip sits behind the title bar only; fades out toward the text. */
.banner {
  background:
    linear-gradient(90deg, var(--green) 0, var(--green) calc(100% - 440px), rgba(10, 127, 38, 0) calc(100% - 290px)),
    url("../images/banner.jpg") right center / auto 100% no-repeat,
    var(--green);
}
@media (max-width: 47.99rem) {
  .banner {
    background:
      linear-gradient(90deg, var(--green) 40%, rgba(10, 127, 38, .25) 100%),
      url("../images/banner.jpg") right center / auto 100% no-repeat,
      var(--green);
  }
}

.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem; min-height: 4.7rem;
}

.brand { color: #fff; text-decoration: none; display: block; line-height: 1.15; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.brand:hover { color: #fff; }
.brand-small { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .04em; }
.brand-main  { display: block; font-size: clamp(1.25rem, 5.2vw, 1.9rem); font-weight: 700; }

.nav-toggle {
  display: none;
  font: inherit; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 8px; padding: .5rem .9rem; min-height: 44px; cursor: pointer;
}
.nav-toggle:hover { background: rgba(0, 0, 0, .4); }

.site-nav { background: var(--green-dark); }
.site-nav ul { list-style: none; margin: 0 auto; padding: 0 1rem; max-width: 62rem; display: flex; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: .8rem 1rem; color: #fff; text-decoration: none; font-weight: 600;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.site-nav a[aria-current="page"],
body[data-section="home"] .site-nav a[data-section="home"],
body[data-section="restaurants"] .site-nav a[data-section="restaurants"],
body[data-section="recipes"] .site-nav a[data-section="recipes"],
body[data-section="books"] .site-nav a[data-section="books"],
body[data-section="info"] .site-nav a[data-section="info"] {
  border-bottom-color: #ffd37a; background: rgba(255, 255, 255, .1);
}

@media (max-width: 47.99rem) {
  .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 0; }
  .site-nav a { padding: .95rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, .12); border-left: 4px solid transparent; }
  .site-nav a[aria-current="page"],
  body[data-section="home"] .site-nav a[data-section="home"],
  body[data-section="restaurants"] .site-nav a[data-section="restaurants"],
  body[data-section="recipes"] .site-nav a[data-section="recipes"],
  body[data-section="books"] .site-nav a[data-section="books"],
  body[data-section="info"] .site-nav a[data-section="info"] { border-bottom-color: rgba(255, 255, 255, .12); border-left-color: #ffd37a; }
}

/* ---------- Page content ---------- */

main { padding-block: 1.5rem 3rem; min-height: 55vh; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); color: var(--green); margin: .2em 0 .5em; }
h2 { font-size: clamp(1.25rem, 3.6vw, 1.55rem); margin: 2em 0 .6em; padding-bottom: .25em; border-bottom: 2px solid var(--green-tint); }
h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
@media (prefers-color-scheme: dark) { h1 { color: #7fe39a; } }

p { margin: 0 0 1em; }
.lead { font-size: 1.1rem; }
.muted, .note { color: var(--muted); }
.note { font-size: .92rem; }

.breadcrumb { font-size: .92rem; color: var(--muted); margin-bottom: .5rem; }
.breadcrumb a { color: var(--muted); }

.notice {
  background: var(--green-tint); border-left: 4px solid var(--green);
  padding: .75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1rem 0 1.5rem;
  font-size: .95rem;
}

/* Cards (home page) */
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 1.5rem 0; padding: 0; list-style: none; }
.card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow); height: 100%;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { border-color: var(--green); transform: translateY(-2px); color: var(--text); }
.card strong { display: block; color: var(--link); font-size: 1.15rem; margin-bottom: .25rem; }
.card span { color: var(--muted); font-size: .95rem; }

.friends { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; justify-content: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); text-align: center; font-size: .95rem; }
.friends img { background: #fff; border-radius: 4px; }

/* Sub navigation (restaurant cities) */
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0 1.5rem; list-style: none; }
.subnav a {
  display: inline-block; padding: .45rem .95rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); text-decoration: none; font-weight: 600; font-size: .95rem; min-height: 40px; line-height: 1.7;
}
.subnav a:hover { border-color: var(--green); }
.subnav a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }

/* Restaurant listings + info links */
.listings { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); padding: 0; margin: 0 0 1rem; list-style: none; }
.listing { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.listing h2, .listing h3 { margin: 0 0 .35rem; padding: 0; border: 0; font-size: 1.05rem; }
.listing p { margin: 0 0 .5rem; font-size: .96rem; }
.listing p:last-child { margin-bottom: 0; }

/* Recipe index */
.recipe-cats { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.recipe-cat h2 { margin-top: 0; }
.recipe-list { list-style: none; margin: 0; padding: 0; }
.recipe-list li { padding: .55rem 0; border-bottom: 1px solid var(--border); }
.recipe-list li:last-child { border-bottom: 0; }
.recipe-list a { font-weight: 600; }
.recipe-list small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.4; }

/* Single recipe */
.recipe { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.recipe > header h1, .recipe > header h2 { margin-top: 0; border: 0; padding: 0; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; color: var(--muted); font-weight: 600; margin-bottom: 1rem; }
.tag { display: inline-block; background: var(--green); color: #fff; font-size: .8rem; padding: .1rem .6rem; border-radius: 999px; letter-spacing: .02em; }
.recipe-body h2, .recipe-body h3 { margin-top: 1.2em; }
.recipe-body h2 { border: 0; padding: 0; }
.ingredients ul { padding-left: 1.2rem; }
.ingredients li, .instructions li { margin-bottom: .4rem; }
.instructions ol { padding-left: 1.4rem; }
.instructions li::marker { color: var(--green); font-weight: 700; }

@media (min-width: 48rem) {
  .recipe-body { display: grid; grid-template-columns: minmax(15rem, 5fr) 7fr; gap: 0 2.5rem; align-items: start; }
  .recipe-body .ingredients { background: var(--green-tint); border-radius: var(--radius); padding: 1rem 1.25rem 1rem 1rem; }
  .recipe-body .instructions { padding-top: 1rem; }
  .recipe-body section > :first-child { margin-top: 0; }
  .recipe { padding: 1.75rem 2rem 2rem; }
}

.back-link { display: inline-block; margin: .5rem 0 1rem; font-weight: 600; }

/* Book reviews */
.book { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.book h3 { margin: 0 0 .3rem; }
.book-meta { color: var(--muted); font-size: .92rem; margin-bottom: .6rem; }
.stars { color: #d98e00; letter-spacing: .08em; font-size: 1.05rem; }
.book .summary { font-weight: 600; }
.book .description p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--green-dark); color: #e9f5eb; padding-block: 1.75rem; font-size: .93rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffd37a; }
.site-footer p { margin: 0 0 .5rem; }
.footer-links a { display: inline-block; margin-right: 1rem; padding-block: .2rem; }
.statcounter { position: absolute; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Print (recipes get printed) ---------- */

@media print {
  .site-header, .site-nav, .site-footer, .skip-link, .subnav, .back-link, .breadcrumb, ins.adsbygoogle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main { padding: 0; }
  .recipe, .book, .listing { box-shadow: none; border: 0; padding: 0; break-inside: avoid; }
  .recipe-body { display: block; }
  .recipe-body .ingredients { background: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  h1 { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
