/* ==========================================================
   APICAL HORTICULTURE
   All brand colours and type sizes live in :root below.
   Change them there and the whole site follows.
   ========================================================== */

:root {
  --green:       #2A7A54;
  --green-dark:  #054B32;
  --green-deep:  #054B32;
  --red:         #C85550;
  --red-soft:    #E8A5A2;
  --cream:       #DCC888;
  --ink:         #14201A;
  --ink-soft:    #4A5A51;
  --rule:        rgba(20,32,26,.12);

  --display: "Newsreader", Georgia, serif;
  --body:    "Sen", system-ui, -apple-system, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
}

/* Course-row horizontal stripes */
:root{
  /* adjust these to your brand palette (you probably already have :root at top of file) */
  --brand-1: #95D7B4; /* pale green */
  --brand-2: #DCC888; /* pale warm */
  --brand-3: #E0CCA4; /* pale violet */
  --course-text: #1b2b18;
  --course-accent: #2f6b3a;
  --wrap-width: 1100px;
}

.courses-list { margin: 0; padding: 0; }

.course-row {
  padding: 3rem 0;
  color: var(--course-text);
}

.course-row__inner {
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.course-row__media { flex: 0 0 300px; }
.course-row__media img { display:block; width:100%; height:auto; border-radius:6px; object-fit:cover; }

.course-row__content { flex: 1 1 300px; }
.course-row__title { color: var(--course-accent); margin-top:0; margin-bottom:0.5rem; }
.course-row__desc { margin:0 0 1rem 0; }
.course-row__meta { margin:0; }

@media (max-width: 720px) {
  .course-row__inner { flex-direction: column; align-items: stretch; }
  .course-row__media { width: 100%; flex: 0 0 auto; }
}

/* explicit per-card background classes */
.course-row.bg-1 { background: var(--brand-1); }
.course-row.bg-2 { background: var(--brand-2); }
.course-row.bg-3 { background: var(--brand-3); }

/* fallback alternating colours when no bg_class set */
.courses-list .course-row:nth-child(odd):not([class*="bg-"]) { background: var(--brand-1); }
.courses-list .course-row:nth-child(even):not([class*="bg-"]) { background: var(--brand-2); }

.course-row a, .course-row button { color: var(--course-accent); }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--green-dark); text-decoration-color: var(--red);
    text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- TYPE ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0 0 1rem; }

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.05; letter-spacing: -.02em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); line-height: 1.15; letter-spacing: -.015em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.25; }

p { margin: 0 0 1.15rem; max-width: 64ch; }

.lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.6; color: var(--ink-soft); }

/* Eyebrow — the small label above every heading */
.eyebrow {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--red);
  margin: 0 0 .75rem;
}

/* The short red rule under section headings — from the
   HORTICULTURE bar in the logo. The site's one repeated device. */
.ruled::after {
  content: ""; display: block;
  width: 52px; height: 3px;
  background: var(--red);
  margin-top: 1.1rem;
}

/* ---------- LAYOUT ---------- */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: var(--section-y) 0; }

.grid-3 { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: 1fr 1fr; align-items: center; }

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

/* ---------- COLOUR BANDS ---------- */

.band-dark  { background: var(--green-dark); color: #fff; }
.band-deep  { background: var(--green-deep); color: #fff; }
.band-green { background: var(--green); color: #fff; }
.band-cream { background: var(--cream); }

.band-dark h1, .band-dark h2, .band-dark h3,
.band-deep h1, .band-deep h2, .band-deep h3,
.band-green h1, .band-green h2, .band-green h3 { color: #fff; }

.band-dark .lede, .band-deep .lede, .band-green .lede { color: rgba(255,255,255,.88); }
.band-dark .eyebrow, .band-deep .eyebrow, .band-green .eyebrow { color: var(--red-soft); }
.band-dark a, .band-deep a, .band-green a { color: #fff; }

/* ---------- HEADER ---------- */

.site-header {
  background: var(--ink);
  position: sticky; top: 0; z-index: 50;
}

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: .85rem; padding-bottom: .85rem;
}

.brand img { height: 58px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.9rem; }

.nav a {
  color: #fff; text-decoration: none;
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .74rem; font-weight: 700;
  padding-bottom: 4px; position: relative;
}

.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 2px; width: 0; background: var(--red);
  transition: width .22s ease;
}

.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }

.btn-nav {
  background: var(--red); color: #fff !important;
  padding: .7rem 1.35rem !important; border-radius: 2px;
}
.btn-nav::after { display: none !important; }
.btn-nav:hover { background: #a94642; }

.nav-toggle {
  display: none; background: none; border: 0; color: #fff;
  font-size: 1.5rem; cursor: pointer; padding: .25rem .5rem;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); flex-direction: column; align-items: flex-start;
    gap: 0; padding: .5rem var(--gutter) 1.5rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .85rem 0; width: 100%; }
  .btn-nav { margin-top: .75rem; }
  .brand img { height: 44px; }
}

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-block;
  font-family: var(--body);
  background: var(--red); color: #fff !important;
  text-decoration: none;
  text-transform: uppercase; letter-spacing: .09em;
  font-size: .78rem; font-weight: 700;
  padding: 1.05rem 2.1rem; border-radius: 2px;
  border: 1.5px solid var(--red);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }

.btn-ghost { background: transparent; color: inherit !important; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* Inline arrow link */
.arrow { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--red);
         padding-bottom: 2px; display: inline-block; }
.arrow:hover { border-bottom-color: currentColor; }

/* ---------- HERO ---------- */

.hero { padding: clamp(5rem, 12vw, 9rem) 0; }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 48ch; }

/* ---------- LISTS ----------
   Triangular markers, after the A in the logo. */

ul.tri { list-style: none; padding-left: 0; margin: 0 0 1.5rem; }
ul.tri li { position: relative; padding-left: 1.6rem; margin-bottom: .7rem; }
ul.tri li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid var(--red);
}
/* Narrow variant of the hero/banner used on some pages */
.hero--narrow { padding: clamp(3rem, 7vw, 5.5rem) 0; }

/* Reduce how wide the inner wrap becomes only for this hero */
.hero--narrow .wrap {
  max-width: 760px; /* change to taste: 640–880px depending how narrow you want it */
  margin-left: auto;
  margin-right: auto;
}

/* If you want an even tighter vertical rhythm on very small screens */
@media (max-width: 540px) {
  .hero--narrow { padding: 2.25rem 0; }
}
/* ---------- CARDS ---------- */

.card { border-top: 3px solid var(--red); padding-top: 1.5rem; }
.card h3 { margin-bottom: .6rem; }

.course {
  border-top: 1px solid var(--rule);
  padding: 2.25rem 0;
}
.course:last-child { border-bottom: 1px solid var(--rule); }
.course .meta {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-soft); font-weight: 700; margin-bottom: .9rem;
}
.course .meta span + span::before { content: " · "; color: var(--red); }

/* ---------- FORM ---------- */

.form { display: grid; gap: 1.1rem; max-width: 560px; }
.form label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em;
              font-weight: 700; display: block; margin-bottom: .4rem; }
.form input, .form select, .form textarea {
  font-family: var(--body); font-size: 1rem;
  width: 100%; padding: .85rem;
  border: 1px solid var(--rule); border-radius: 2px;
  background: #fff; color: var(--ink);
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent;
}

/* ---------- FOOTER ---------- */

.site-footer { background: var(--green-deep); color: rgba(255,255,255,.82); padding: 4rem 0 2rem; }
.site-footer h4 { font-family: var(--body); text-transform: uppercase; letter-spacing: .16em;
                  font-size: .72rem; color: var(--red-soft); margin: 0 0 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 3rem; padding-top: 1.5rem;
  font-size: .82rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}

/* ---------- ACCESSIBILITY ---------- */

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red); outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; background: #fff; color: var(--ink);
  padding: .75rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

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