/* =========================
   Land Function Theme CSS
   Clean, operable, deduped
   Library = links only (NO PDF embeds)
   Contact + Courses styling included
   FIX: Button contrast + avoid invisible text
   ========================= */

/* ---------- Design Tokens ---------- */
:root{
  --bg:#ffffff;
  --surface:#f3f4f6;
  --ink:#0b1220;
  --muted:rgba(11,18,32,.72);
  --nav:#0b1220;
  --nav2:#0a1020;
  --primary:#2563eb;

  --max:1120px;
  --gutter: clamp(16px, 3vw, 28px);
  --radius: 16px;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box; }
html, body{ margin:0; padding:0; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

/* WordPress content safety */
.site-main{ display:block; }
.site-main p{ margin: 0 0 14px; }
.site-main h1, .site-main h2, .site-main h3{ margin: 0 0 10px; }
.site-main a{ color: var(--primary); }

.container{
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

/* ---------- Header + Nav ---------- */
.site-header{
  background: linear-gradient(180deg, var(--nav), var(--nav2));
  color:#fff;
  padding: 16px 0;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.brand{
  color:#fff;
  text-decoration:none;
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 18px;
}

.nav-list{
  list-style:none;
  display:flex;
  gap: 20px;
  margin:0;
  padding:0;
  flex-wrap: wrap;
}

.nav-list a{
  color: rgba(255,255,255,.9);
  text-decoration:none;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-list a:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Buttons + Links (FIXED) ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color:#fff;
  text-decoration:none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

/* CRITICAL FIX:
   Prevent .site-main a { color: var(--primary); } from overriding button text */
.site-main a.btn,
.site-main a.btn:visited,
.card a.btn,
.card a.btn:visited,
.hero a.btn,
.hero a.btn:visited{
  color:#fff !important;
}

.btn:hover{ filter: brightness(.95); }
.btn:focus{ outline: none; box-shadow: 0 0 0 4px rgba(37,99,235,.18); }

.btn-ghost{
  background: transparent;
  border: 1px solid rgba(37,99,235,.35);
}

/* Ghost buttons must remain readable */
.site-main a.btn-ghost,
.site-main a.btn-ghost:visited,
.card a.btn-ghost,
.card a.btn-ghost:visited,
.hero a.btn-ghost,
.hero a.btn-ghost:visited{
  color: var(--primary) !important;
}

.btn-ghost:hover{ background: rgba(37,99,235,.06); }

.text-link{
  text-decoration:none;
  color: var(--primary);
  font-weight: 800;
}

.text-link:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Hero ---------- */
.hero{
  background: var(--surface);
  padding: clamp(48px, 6vw, 92px) 0;
}

.hero-kicker{
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(11,18,32,.65);
  margin-bottom: 10px;
}

.hero-title{
  margin:0 0 12px;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.hero-subtitle{
  margin:0 0 18px;
  color: var(--muted);
  max-width: 75ch;
  font-size: clamp(16px, 1.2vw, 20px);
}

.hero-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Optional hero image layout (used on pages that include an image) */
.hero--with-image .hero-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items:center;
}

.hero-copy{ max-width: 70ch; }
.hero-media{ width:100%; }

/* Default hero image behavior (homepage crop is intentional) */
.hero-image{
  width:100%;
  height: clamp(240px, 30vw, 420px);
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(11,18,32,.12);
  border: 1px solid rgba(11,18,32,.08);
}

.hero-image--placeholder{
  background: rgba(11,18,32,.06);
  border-radius: 18px;
  height: clamp(240px, 30vw, 420px);
  border: 1px solid rgba(11,18,32,.08);
}

/* Shared "contain" modifier (NO CROP) */
.hero-image.hero-image--contain{
  width:100%;
  height:auto !important;
  max-height: 560px;
  object-fit: contain !important;
  background:#fff;
}

/* Hero standard bar */
.hero-standard{
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(11,18,32,.08);
  box-shadow: 0 10px 24px rgba(11,18,32,.06);
  max-width: 560px;
}

.hero-standard strong{
  display:block;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(11,18,32,.75);
}

.hero-standard span{
  display:block;
  margin-top: 6px;
  font-size: 14px;
  color: rgba(11,18,32,.68);
}

/* About hero: portrait/framework should NOT crop */
.hero--about{
  padding-top: clamp(56px, 7vw, 110px);
  padding-bottom: clamp(56px, 6vw, 90px);
}

.hero-media--about{
  display:flex;
  align-items:center;
  justify-content:center;
}

.hero-image--about{
  width: 100%;
  max-width: 420px;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(11,18,32,.15);
  border: 1px solid rgba(11,18,32,.08);
}

.hero--about .hero-copy{ max-width: 560px; }

/* ---------- Sections ---------- */
.section{
  padding: clamp(36px, 5vw, 76px) 0;
}

.section-tight{
  padding-top: clamp(22px, 3vw, 48px);
}

.section-muted{
  background: rgba(11,18,32,.04);
}

.section-title{
  margin: 0 0 10px;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.01em;
}

.section-subtitle{
  margin: 0 0 18px;
  color: rgba(11,18,32,.72);
  max-width: 75ch;
}

.section-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

/* ---------- Grids ---------- */
.grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  margin-top: 18px;
}

.grid-2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
  margin-top: 18px;
}

.split{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
  margin-top: 18px;
}

/* ---------- Cards ---------- */
.card{
  background:#fff;
  border: 1px solid rgba(11,18,32,.08);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 24px rgba(11,18,32,.06);
}

.card h3{
  margin: 0 0 8px;
  font-size: 18px;
}

.card p{
  margin: 0;
  color: var(--muted);
}

.card-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.card-actions a{ display:inline-flex; }

.card--highlight{
  border-color: rgba(37,99,235,.25);
  box-shadow: 0 18px 38px rgba(37,99,235,.08);
}

/* Lists inside cards */
.clean{
  list-style:none;
  padding:0;
  margin: 10px 0 0;
}

.clean li{
  padding: 8px 0;
  border-top: 1px solid rgba(11,18,32,.06);
  color: rgba(11,18,32,.72);
}

.clean li:first-child{
  border-top: 0;
  padding-top: 0;
}

/* Programs layout */
.program{
  display:grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
}

.program-num{
  font-weight: 900;
  letter-spacing: .08em;
  color: rgba(11,18,32,.55);
}

/* ---------- About Page Layout ---------- */
.two-col{
  display:grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 24px;
  align-items:start;
}

.prose, .sidebar{ min-width: 0; }

.section-slab{ margin-top: 26px; }

.section-slab--muted{
  padding: 18px;
  border-radius: 18px;
  background: rgba(11,18,32,.04);
  border: 1px solid rgba(11,18,32,.06);
}

.sticky{
  position: sticky;
  top: 16px;
}

.micro{
  margin-top: 12px;
  font-size: 12px;
  color: rgba(11,18,32,.6);
}

/* =========================================================
   LIBRARY PAGE (Links Only — No PDF viewers)
   ========================================================= */

/* If you use hero--with-image on library pages, this keeps the cover contained. */
.hero-media--library{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  max-width: 460px;
  margin-left:auto;
}

/* Library grid */
.library-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 20px;
  margin-top: 24px;
}

.library-card{
  display:flex;
  flex-direction: column;
  gap: 16px;
}

/* Cover frame (never chopped) */
.library-cover{
  border-radius: 18px;
  border: 1px solid rgba(11,18,32,.08);
  background: rgba(11,18,32,.02);
  padding: 14px;
  box-shadow: 0 10px 24px rgba(11,18,32,.06);
}

.library-cover img{
  width:100%;
  height:auto;
  object-fit: contain;
  border-radius: 14px;
  background:#fff;
  border: 1px solid rgba(11,18,32,.08);
}

/* Meta */
.library-title{
  margin: 0 0 6px;
  font-size: 18px;
}

.library-subtitle{
  margin: 0;
  color: rgba(11,18,32,.72);
}

.library-meta .micro{
  margin-top: 10px;
}

/* CTA slab */
.library-cta{ margin-top: 36px; }
.library-cta-title{ margin: 0 0 8px; }
.library-cta-subtitle{ margin: 0; color: rgba(11,18,32,.72); }

/* =========================================================
   CONTACT PAGE (Land Function)
   ========================================================= */

.hero--contact .hero-grid{ align-items: center; }

.hero-media--contact{
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Contact allows taller contain image */
.hero--contact .hero-image.hero-image--contain{ max-height: 620px; }

/* =========================================================
   COURSES PAGE (Land Function)
   Works with page-courses.php markup from our build
   ========================================================= */

/* Notice blocks shown above forms */
.lf-notice{
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(11,18,32,.12);
  background: rgba(255,255,255,.90);
  font-weight: 800;
}

.lf-notice--success{
  border-color: rgba(16,185,129,.35);
  box-shadow: 0 10px 24px rgba(16,185,129,.08);
}

.lf-notice--error{
  border-color: rgba(239,68,68,.35);
  box-shadow: 0 10px 24px rgba(239,68,68,.08);
}

/* Forms: used by Contact + Courses */
.lf-form label{
  display:block;
  font-weight: 800;
  font-size: 13px;
  margin: 0 0 6px;
  color: rgba(11,18,32,.78);
}

.lf-form input,
.lf-form select,
.lf-form textarea{
  width: 100%;
  border: 1px solid rgba(11,18,32,.14);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.lf-form textarea{
  resize: vertical;
  min-height: 160px;
}

.lf-form input:focus,
.lf-form select:focus,
.lf-form textarea:focus{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.lf-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.lf-field{ margin-bottom: 14px; }

/* Locked buttons (spans styled like disabled) */
.btn.is-disabled,
.btn[aria-disabled="true"]{
  opacity: .65;
  cursor: not-allowed;
  pointer-events: none;
}

/* Make spans in card-actions line up like buttons */
.card-actions .btn{
  align-self: flex-start;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer{
  background: var(--nav2);
  color: rgba(255,255,255,.75);
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-list{
  list-style:none;
  display:flex;
  gap: 16px;
  margin:0;
  padding:0;
}

.footer-list a{
  color: rgba(255,255,255,.85);
  text-decoration:none;
}

.footer-list a:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px){
  .grid-3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-2{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .two-col{ grid-template-columns: 1fr; }
  .sticky{ position: static; }

  .library-grid{ grid-template-columns: 1fr; }

  .hero-media--library{
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-image.hero-image--contain{ max-height: 420px; }
  .lf-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 860px){
  .hero--with-image .hero-grid{ grid-template-columns: 1fr; }
  .hero-image{ height: 260px; } /* homepage hero crop stays intact */
  .hero-image--about{ max-width: 320px; max-height: 420px; }
}

@media (max-width: 680px){
  .header-inner{ flex-direction: column; align-items:flex-start; }
  .grid-3{ grid-template-columns: 1fr; }
}
.hero-image--cover {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.hero--standard .hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1025px) {
  .hero--standard .hero-media {
    padding-left: 1rem;
  }
@media (max-width: 767px) {
  .hero--standard {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .hero--standard .hero-grid {
    gap: 20px;
  }

  .hero--standard .hero-media {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero--standard .hero-image--cover {
    width: 100%;
    height: auto;
    display: block;
  }

  .page-section--documents .resource-grid {
    gap: 28px;
  }

  .resource-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .resource-cover {
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 8px;
    display: block;
  }

  .resource-actions {
    margin-top: 4px;
  }

  .resource-actions .btn {
    display: inline-block;
  }
}
.hero--with-image .hero-grid{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:40px;
  align-items:center;
}

.hero--with-image .hero-media{
  display:flex;
  justify-content:center;
}

.hero--with-image .hero-image{
  width:100%;
  max-width:520px;
  height:auto;
  display:block;
  border-radius:10px;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
}

.hero--with-image .hero-media a{
  display:block;
}

@media (max-width: 900px){
  .hero--with-image .hero-grid{
    grid-template-columns:1fr;
  }

  .hero--with-image .hero-media{
    order:2;
  }

  .hero--with-image .hero-copy{
    order:1;
  }
}
.hero-media{
  margin-top: 28px;
}

.hero-image{
  width: 100%;
  max-width: 680px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

@media (max-width: 767px){
  .hero-image{
    max-width: 100%;
    border-radius: 16px;
  }

  .hero{
    padding-bottom: 36px;
  }
}