/* Madl Farms – public site styles. Colors follow the original theme. */
:root {
  --primary: #382e4f;
  --primary-hover: #4d4069;
  --deep: #2d2451;
  --base: #ebf1f3;
  --bg: #c7dae1;
  --line: #dcdfe5;
  --text: #261f38;
  --white: #fff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wide: 1180px;
  --read: 940px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--deep); margin: 0 0 .6em; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.center { text-align: center; }

/* header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.hdr { max-width: var(--wide); margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: 1.2rem; }
.brand img { width: 96px; }
#site-nav { flex: 1; }
#site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.5rem; }
#site-nav a { text-decoration: none; color: var(--primary); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; padding: .5rem 0; border-bottom: 2px solid transparent; display: inline-block; }
#site-nav a:hover, #site-nav a[aria-current="page"] { border-bottom-color: var(--primary); }
.hdr-phone { display: inline-flex; align-items: center; gap: .45rem; color: var(--primary); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.menu-btn { display: none; background: none; border: 0; padding: .6rem; margin-left: auto; cursor: pointer; }
.menu-btn i { display: block; width: 26px; height: 3px; background: var(--primary); margin: 5px 0; border-radius: 2px; }
@media (max-width: 1040px) {
  .menu-btn { display: block; order: 3; }
  .hdr-phone { margin-left: auto; order: 2; }
  .hdr-phone span { display: none; }
  .hdr { flex-wrap: wrap; }
  #site-nav { display: none; flex-basis: 100%; order: 4; }
  #site-nav.open { display: block; padding-bottom: .8rem; }
  #site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  #site-nav a { display: block; padding: .8rem .2rem; border-bottom: 1px solid var(--line); }
}

/* hero */
.hero { position: relative; min-height: 520px; display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden; background: var(--primary); }
.hero-home { min-height: min(78vh, 660px); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(56, 46, 79, .38); }
.hero-in { position: relative; z-index: 1; padding: 3rem 1.2rem; max-width: 900px; }
.hero h1 { color: #fff; font-weight: 400; font-size: clamp(2.2rem, 7vw, 4.6rem); letter-spacing: .06em; text-transform: uppercase; margin: .2em 0 .3em; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.hero-home h1 { border-top: 1px solid rgba(255,255,255,.7); border-bottom: 1px solid rgba(255,255,255,.7); padding: .15em 0; }
.kicker { text-transform: uppercase; letter-spacing: .32em; font-size: .85rem; margin: 0; font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.hero-sub { font-size: 1.1rem; margin: 0 0 1.4rem; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.pagehead { background: var(--primary); color: #fff; padding: 2.6rem 1rem; text-align: center; }
.pagehead h1 { color: #fff; font-weight: 400; margin: 0; font-size: clamp(1.8rem, 4.5vw, 3rem); letter-spacing: .04em; }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin: 1rem 0; }
.btn { display: inline-block; padding: .75rem 1.5rem; background: var(--primary); color: #fff !important; border: 2px solid var(--primary); border-radius: 4px; font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; text-decoration: none; line-height: 1.3; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.outline { background: transparent; color: var(--primary) !important; }
.btn.outline:hover { background: var(--primary); color: #fff !important; }
.hero .btn, .band .btn { background: #fff; color: var(--primary) !important; border-color: #fff; }
.hero .btn.outline, .band .btn.outline { background: transparent; color: #fff !important; }
.hero .btn:hover, .band .btn:hover { background: var(--base); color: var(--primary) !important; }

/* content */
.content { padding: 3.6rem 0 6.5rem; }
.content > * { width: min(100% - 2rem, var(--read)); margin-left: auto; margin-right: auto; }
.content > .cols, .content > .gallery, .content > .listing { width: min(100% - 2rem, var(--wide)); }
.content > .cards { width: min(100% - 3rem, 1120px); }
.content > .band { width: 100%; max-width: none; }
.narrow { max-width: 760px; margin: 0 auto; }
.content figure { margin: 0 0 1.2rem; }
.content > figure { margin-left: auto; margin-right: auto; text-align: center; }
.content > figure img { margin-left: auto; margin-right: auto; }
.content figure img { border-radius: 6px; margin: 0 auto; }
figcaption { font-size: .9rem; text-align: center; opacity: .8; padding-top: .4rem; }
.content ul, .content ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
blockquote { margin: 1.4rem 0; padding: .4rem 1.2rem; border-left: 4px solid var(--primary); font-family: var(--serif); font-size: 1.15rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 2.8rem; margin-bottom: 4rem; align-items: start; }
.col > *:last-child { margin-bottom: 0; }
.col > figure:first-child:has(+ h3.center) img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.col > figure:first-child:has(+ h3.center) img[src$="madlfarmslogo.png"], .col > figure:first-child img[src$="madlfarmslogo.png"] { width: 56px; aspect-ratio: auto; object-fit: contain; }
.col h3.center { margin-top: .4rem; }
/* the three value columns on the home page (logo icon + centered heading): plum panels (footer color at 30%) */
.cols:has(> .col > figure:first-child img[src$="madlfarmslogo.png"]) { align-items: stretch; gap: 1.8rem; }
.col:has(> figure:first-child img[src$="madlfarmslogo.png"]) { background: rgba(45, 36, 81, .3); border: 1px solid rgba(45, 36, 81, .25); border-radius: 12px; padding: 2rem 1.8rem 2.2rem; box-shadow: 0 3px 14px rgba(56,46,79,.10); }
.col:has(> figure:first-child img[src$="madlfarmslogo.png"]) figure { margin-bottom: .8rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 4rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; cursor: zoom-in; }
.listing { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2.2rem; align-items: center; background: #fff; padding: 1.6rem; border-radius: 10px; margin-bottom: 2.4rem; box-shadow: 0 1px 3px rgba(45,36,81,.12); }
.listing figure { margin: 0; }
.listing-body > *:last-child { margin-bottom: 0; }
@media (max-width: 700px) { .listing { grid-template-columns: 1fr; } }
.band { position: relative; min-height: 440px; display: grid; place-items: center; color: #fff; text-align: center; overflow: hidden; margin: 3rem 0 4.5rem; background: var(--primary); }
.band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; }
/* keep faces in view on the Xtreme Illusion banner (horse head and people sit in the upper part of the photo) */
.band-bg[src*="illusion-palomino-scaled"] { object-position: 40% 8%; }
.band::after { content: ""; position: absolute; inset: 0; background: rgba(56,46,79,.35); }
.band-inner { position: relative; z-index: 1; padding: 2rem 1.2rem; max-width: 800px; }
.band h1, .band h2 { color: #fff; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; font-size: clamp(1.8rem, 5vw, 3.2rem); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2.6rem 2.2rem; margin-bottom: 3rem; }
.card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 14px rgba(45,36,81,.10); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(45,36,81,.16); }
.card-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.card-body { padding: 1.4rem 1.6rem 1.9rem; }
.card-body h3 { font-size: 1.3rem; margin: .35em 0 .7em; line-height: 1.25; }
.card-body h3 a { text-decoration: none; }
.card-body p { margin: 0 0 .8em; font-size: .97rem; line-height: 1.7; }
.card-meta { font-size: .76rem !important; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.article-meta { text-align: center; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.back { margin-top: 2.5rem; text-align: center; }
/* intro line above a grid of cards: centered, with air around it */
.content > p:has(+ .cards) { text-align: center; font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.55rem); line-height: 1.5; max-width: 40rem; margin-bottom: 3.4rem; }
.content > p:has(+ .cards)::after { content: ""; display: block; width: 64px; height: 2px; background: var(--primary); opacity: .35; margin: 1.5rem auto 0; }
/* more room above headings that start a new section */
.content > * + h2 { margin-top: 3.4rem; }
.content > * + h3 { margin-top: 2.4rem; }
.content .btn { margin: 0 0 1rem; }

/* footer */
.site-footer { background: var(--deep); color: var(--line); padding: 3rem 1rem 1.4rem; font-size: .95rem; }
.ftr { max-width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2rem; }
.site-footer h3 { color: #fff; font-family: var(--sans); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer .btn { color: #fff !important; border-color: #fff; }
.copy { max-width: var(--wide); margin: 2rem auto 0; border-top: 1px solid rgba(255,255,255,.18); padding-top: 1.1rem; font-size: .82rem; opacity: .8; text-align: center; }

/* lightbox */
.lb { position: fixed; inset: 0; background: rgba(20,15,35,.92); z-index: 200; display: grid; place-items: center; padding: 1rem; cursor: zoom-out; }
.lb img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 4px; }
.lb button { position: absolute; top: .8rem; right: 1rem; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }
