/* Udder Love mint, reveal and Barn — matches the live udder.love homepage.
   Reuses /style.css + /style-v2.css (fonts, header, fence, #udderMintOffer).
   The homepage hero rules live in the homepage HTML, so the needed ones are
   repeated here. Mint logic, IDs and closed-sale behaviour are unchanged. */

/* ---- homepage hero tokens (from https://udder.love/ #udderHomeStyles + style-v2) ---- */
.mint-page, .barn-page { color: inherit; }
html:has(body.mint-page) { background: #143e2e; }
html:has(body.barn-page) { background: #faf6e8; }
.mint-page { background: #143e2e; color: #fff; }
.barn-page { background: #faf6e8; color: #153d2c; }
body.mint-page, body.barn-page { min-height: 100vh; display: flex; flex-direction: column; }
body.mint-page > main, body.barn-page > main { flex: 1 0 auto; }
.udder-home { color: inherit; text-decoration: none; cursor: pointer; }
.udder-home:hover { opacity: .85; }

header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
header > small { display: none !important; }
.mint-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  font-weight: 700;
}
.mint-nav a { color: #e9fff5; text-decoration: none; }
.mint-nav a:hover { color: #c1ef8f; }
header #connect {
  background: #b7efc8;
  color: #12352a;
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}
header #connect:hover { filter: brightness(1.04); }

.uh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 35px;
  align-items: center;
  padding: 75px max(5%, 28px);
  background: linear-gradient(135deg, #143e2e, #23674a);
  color: #fff;
  min-height: 480px;
  position: relative;
  padding-bottom: 100px !important;
  overflow: hidden;
}

/* fence posts + two rails — same as style-v2.css .uh-hero::after */
.uh-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 52px;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, #5a3318 0 11px, transparent 11px 46px),
    linear-gradient(transparent 10px, #8b5a2b 10px 16px, transparent 16px 28px, #6b3f1f 28px 34px, transparent 34px),
    linear-gradient(#3b8362, #2a5a42);
  box-shadow: 0 -8px 16px #143e2e55;
  z-index: 1;
}
.uh-eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 800;
  color: #b9f38a;
  text-transform: uppercase;
}
.uh-hero h1, .mint-page h1, .barn-hero h1 {
  font-family: inherit;
  font-size: clamp(42px, 6vw, 85px);
  line-height: 1.05;
  margin: 24px 0;
  letter-spacing: -2px;
  color: #fff;
  font-weight: 800;
  overflow-wrap: break-word;
}
.uh-copy, .caption, .lead, .card, #udderMintOffer { overflow-wrap: break-word; }
.uh-hero h1 em, .uh-footer em, .barn-hero h1 em { color: #c1ef8f; font-style: italic; }
.uh-copy p, .uh-copy .lead {
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.7;
  max-width: 610px;
  color: #e1eee3;
  margin: 0 0 1em;
}
.uh-image, .uh-copy, .portrait { position: relative; min-width: 0; max-width: 100%; }
.uh-image img, .portrait > img {
  width: 100%;
  max-width: 100%;
  border-radius: 25px;
  object-fit: cover;
  display: block;
  background: #0f2a20;
}
.portrait { margin: 0; padding-top: 58px; }
.portrait > img { aspect-ratio: 3/4; object-position: center 20%; box-shadow: 0 18px 50px #0006; }
.sign {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  z-index: 2;
  width: min(78%, 360px);
  min-width: 0;
  max-width: calc(100% - 12px);
  text-align: center;
  background: linear-gradient(180deg, #6d4524, #4d2f17);
  border: 3px solid #d9ad52;
  border-radius: 12px;
  padding: 12px 18px 10px;
  color: #fff4e0;
  box-shadow: 0 10px 24px #000b, inset 0 0 0 2px #00000040;
  font-weight: 800;
  letter-spacing: .02em;
}
.sign::before, .sign::after {
  content: "";
  position: absolute;
  top: -30px;
  width: 3px;
  height: 32px;
  background: linear-gradient(#f1d28a, #d9ad52);
}
.sign::before { left: 22%; }
.sign::after { right: 22%; }
.sign b {
  display: block;
  font-size: clamp(24px, 3.4vw, 34px);
  color: #f1d28a;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .04em;
  line-height: 1.05;
}
.sign small {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #f6e6c6;
  margin-top: 2px;
}
.caption { color: #d5ead8; font-size: 14px; margin: 10px 4px 0; }

/* JS overwrites #salePill className to "pill" / "pill open" — keep the homepage status look */
.pill, #udderMintOffer .umo-status {
  display: inline-block;
  background: #c1ef8f;
  color: #173a29;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 4px 0 8px;
  border: 0;
}
.pill.open { background: #bcf286; color: #173a29; }
#udderMintOffer .small, #left { display: inline-block; margin-left: 8px; color: #e1eee3; font-size: 13px; }
#priceNote { font-size: 14px; margin: 8px 0 0; color: #e1eee3; }

/* form + facts on the green hero */
.card, .mint-form {
  margin-top: 22px;
  padding: 20px 22px;
  background: #ffffff16;
  border: 1px solid #ffffff40;
  border-radius: 16px;
  max-width: 520px;
  box-shadow: none;
}
.card h2, #help h2 {
  font-family: inherit;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.3px;
  margin: 0 0 10px;
}
label.f { display: block; font-weight: 700; margin: 4px 0 6px; color: #e1eee3; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
input[type=text] {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid #ffffff50;
  background: #0f2a2080;
  color: #fff;
  font: 600 15px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.barn-page input[type=text] {
  background: #ffffff18;
  color: #fff;
}
input[type=text].ok { border-color: #bcf286; }
input[type=text].bad { border-color: #ff8f7a; }
.hint { font-size: 13px; color: #d5ead8; margin: 6px 0 0; min-height: 1.3em; }
.hint.bad { color: #ff8f7a; }
.hint.ok { color: #c1ef8f; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 12px;
  font-size: 14.5px;
  color: #e1eee3;
  border-radius: 10px;
  padding: 4px;
}
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: #bcf286; }
.check a, .card a, .f a, .small a, #lastOrder a, #help a { color: #c1ef8f; }

button, .btn, .gold, .ghost {
  appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  font: 800 16px system-ui, -apple-system, sans-serif;
  padding: 13px 20px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  letter-spacing: .01em;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.gold, .btn.gold, button.gold {
  background: #bcf286;
  color: #173a29;
  box-shadow: none;
}
.gold:hover, .btn.gold:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #173d2c22; filter: none; }
.gold:disabled, button.gold:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}
.ghost, .btn.ghost, .uh-outline {
  background: transparent;
  border: 1px solid #b9dcbd;
  color: #fff;
}
.small { font-size: 13px; color: #d5ead8; }
.err { color: #ff8f7a; font-weight: 700; min-height: 1.4em; margin: 10px 0 0; }
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 26px;
  max-width: 610px;
}
.facts div {
  background: #ffffff16;
  border: 1px solid #ffffff30;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14.5px;
  color: #e1eee3;
}
.facts b { display: block; color: #c1ef8f; margin-bottom: 2px; }

/* checkout modal */
.modal {
  position: fixed;
  inset: 0;
  background: #123c2ccc;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal.on { display: flex; }
.modal .box {
  background: #173d2c;
  color: #e1eee3;
  border: 1px solid #ffffff40;
  border-radius: 18px;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 18px;
}
.modal .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: #fff; }
#helioMount { min-height: 420px; }

/* reveal */
.reveal-hero { grid-template-columns: minmax(0, 1fr); }
.reveal-copy { max-width: 1100px; width: 100%; }
.stage {
  position: relative;
  width: 100%;
  max-width: none;
  line-height: normal;
  border-radius: 25px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  margin-top: 8px;
  box-shadow: 0 18px 50px #0006;
}
.stage > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0000 55%, #000a);
  pointer-events: none;
}
.cow {
  position: absolute;
  left: 70%;
  top: 32%;
  width: 13%;
  transform: translate(-50%, 0) scale(.35);
  opacity: 0;
  z-index: 3;
  filter: drop-shadow(0 12px 18px #000c);
  transition: none;
}
.cow img { width: 100%; border-radius: 12px; }
.stage.trot .cow { animation: trot 3.6s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes trot {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.35); }
  12% { opacity: 1; }
  35% { transform: translate(-50%, 8%) scale(.6) rotate(-2deg); }
  50% { transform: translate(-80%, 10%) scale(.9) rotate(2deg); }
  70% { transform: translate(-180%, 6%) scale(1.6) rotate(-1deg); }
  100% { opacity: 1; transform: translate(-240%, -8%) scale(2.35) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .stage.trot .cow { animation: none; opacity: 1; transform: translate(-240%, -8%) scale(2.35); }
  button:hover, .gold:hover { transform: none; }
}
.status {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  padding: 16px 20px;
  color: #fff;
  font-weight: 700;
  font-size: clamp(15px, 1.8vw, 20px);
  text-shadow: 0 2px 8px #000;
}
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; padding: 0; list-style: none; }
.steps li {
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff16;
  color: #d5ead8;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #ffffff30;
}
.steps li.on { background: #bcf286; color: #173a29; border-color: #bcf286; }
.steps li.done { background: #2a5a42; color: #dff5c9; border-color: #2a5a42; }
.namecard { text-align: center; margin: 20px auto 0; max-width: 560px; }
.namecard h2 { font-size: clamp(30px, 4vw, 46px); color: #c1ef8f; margin: 0 0 8px; }
#help { max-width: 640px; }

/* barn */
.barn-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
.barn-form { margin-top: 18px; max-width: 640px; }
.barn-form input[type=text] { flex: 1 1 260px; }
.barn-body {
  max-width: 1250px;
  margin: 0 auto;
  padding: 36px 25px 60px;
  color: #153d2c;
}
.barn-page .barn-body .small, .barn-page #summary { color: #526758; }
.barn-page .barn-body .err { color: #a33b2b; }
.herd { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; margin-top: 20px; }
.stall {
  background: #fff;
  border: 1px solid #dfe7d8;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 24px #153d2c0a, 0 1px 0 #f0e6c8;
}
.stall img { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #d6ecf0; }
.stall .ph {
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: #e0f5d1;
}
.stall div.t { padding: 14px 16px; }
.stall h3 { margin: 0; font-family: inherit; color: #153d2c; font-size: 22px; font-weight: 800; }
.stall small { color: #526758; }
.stall.pending { border-style: dashed; }

footer.f {
  border-top: 0;
  margin-top: 0;
  padding: 28px 20px;
  text-align: center;
  background: #123c2c;
  color: #d5ead8;
  font-size: 13px;
}
footer.f a { color: #c1ef8f; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

a:focus-visible, button:focus-visible, input:focus-visible, label:focus-within {
  outline: 3px solid #b9ef72;
  outline-offset: 2px;
}

@media (max-width: 850px) {
  .uh-hero, .mint-hero, .barn-hero, .reveal-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 45px 22px;
    padding-bottom: 80px !important;
  }
  .uh-hero h1 { letter-spacing: -1px; font-size: clamp(36px, 11vw, 56px); }
  .portrait { order: -1; padding-top: 52px; }
  .portrait > img { max-height: min(52vh, 420px); width: 100%; }
  .card, #udderMintOffer, .facts { max-width: none; }
}
@media (max-width: 700px) {
  .mint-nav { display: none; }
  header #connect { padding: 9px; }
}
@media (max-width: 550px) {
  .uh-hero h1 { letter-spacing: -1px; }
  .facts { grid-template-columns: 1fr; }
}
