/* =====================================================================
   Greymeadows Farm — custom styles (Tailwind handles utilities)
   Palette from the logo: indigo #282360, grey #8c8787, farm gold #b2a965
   ===================================================================== */
:root {
    --brand: #282360;
    --brand-600: #352f7d;
    --gold: #b2a965;
    --gold-light: #d6cf98;
    --gold-dark: #6f6830;
    --frost: #f4f4f8;
    --night: #121029;
    --night-800: #1a1838;
    --night-700: #24214a;
    --text: #5f5c5c;
    --header-h: 76px;
    --a11y-scale: 1;
    --ease: cubic-bezier(.22, .8, .24, 1);
}
html { font-size: calc(100% * var(--a11y-scale)); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html body { line-height: 1.65; overflow-x: hidden; }

html h1, html h2, html h3, html h4, .font-display { font-family: Cinzel, Georgia, serif; font-weight: 600; letter-spacing: .01em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--gold); color: var(--brand); font-weight: 600; padding: .75rem 1.1rem; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 1rem; }

/* ---------------- Buttons & links ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; font-weight: 600; font-size: .95rem; line-height: 1; padding: .85rem 1.35rem; border-radius: 999px; border: 2px solid transparent; transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease); white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 1rem 1.6rem; font-size: 1rem; }
.btn-gold { background: var(--gold); color: var(--brand); }
.btn-gold:hover { background: var(--gold-light); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-600); }
.btn-ghost { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--brand); }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.dark .btn-brand { background: var(--gold); color: var(--brand); }
.dark .btn-brand:hover { background: var(--gold-light); }
.dark .btn-outline { border-color: var(--gold-light); color: var(--gold-light); }
.dark .btn-outline:hover { background: var(--gold-light); color: var(--brand); }

.text-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.text-link:hover { text-decoration-color: currentColor; }
.dark .text-link { color: var(--gold-light); }

/* ---------------- Header ---------------- */
.site-header { position: fixed; inset: 0 0 auto; height: var(--header-h); z-index: 50; color: var(--brand); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(40,35,96,.08); transition: background-color .35s, box-shadow .35s, color .35s; }
.site-header[data-overlay="true"]:not(.is-scrolled):not(.menu-open) { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.dark .site-header { background: rgba(18,16,41,.92); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.site-logo { display: block; position: relative; height: 50px; }
.site-logo img { height: 50px; width: auto; transition: opacity .3s; }
.site-logo .logo-white { position: absolute; inset: 0; opacity: 0; }
.site-header[data-overlay="true"]:not(.is-scrolled):not(.menu-open) .logo-white, .dark .site-logo .logo-white { opacity: 1; }
.site-header[data-overlay="true"]:not(.is-scrolled):not(.menu-open) .logo-ink, .dark .site-logo .logo-ink { opacity: 0; }
@media (max-width: 640px) { .site-logo, .site-logo img { height: 42px; } }

.nav-link { display: inline-flex; align-items: center; gap: .25rem; padding: .6rem .9rem; border-radius: 999px; font-weight: 500; font-size: .98rem; position: relative; }
.nav-link::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .3rem; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-link:hover::after, .nav-link.is-active::after, .nav-link[aria-expanded="true"]::after { transform: scaleX(1); }
.dd-chev { transition: transform .25s; }
.nav-dd { position: relative; }
.nav-dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px; padding: .5rem; border-radius: 16px; background: #fff; color: var(--brand); box-shadow: 0 18px 50px rgba(40,35,96,.18); opacity: 0; visibility: hidden; transform: translateY(6px) rotateX(-8deg); transform-origin: top; transition: opacity .25s, transform .3s var(--ease), visibility .25s; }
.dark .nav-dd-menu { background: var(--night-700); color: #fff; }
.nav-dd.is-open .nav-dd-menu { opacity: 1; visibility: visible; transform: none; }
.nav-dd.is-open .dd-chev { transform: rotate(180deg); }
.nav-dd-menu a { display: block; padding: .65rem .9rem; border-radius: 10px; font-weight: 500; }
.nav-dd-menu a:hover, .nav-dd-menu a[aria-current="page"] { background: var(--frost); }
.dark .nav-dd-menu a:hover, .dark .nav-dd-menu a[aria-current="page"] { background: rgba(255,255,255,.08); }
.header-phone { align-items: center; gap: .45rem; font-weight: 500; font-size: .95rem; }

.menu-toggle { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 999px; }
.menu-toggle .icon-close, .menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }
.mobile-menu { position: absolute; top: var(--header-h); left: 0; right: 0; max-height: calc(100svh - var(--header-h)); overflow-y: auto; background: #fff; color: var(--brand); padding: 1rem 1.25rem 2rem; box-shadow: 0 20px 40px rgba(0,0,0,.12); }
.dark .mobile-menu { background: var(--night-800); color: #fff; }
.mobile-menu a { display: block; padding: .8rem .25rem; font-size: 1.1rem; font-weight: 500; border-bottom: 1px solid rgba(40,35,96,.08); }
.mobile-menu ul ul a { padding-left: 1rem; }
.mobile-group { font-family: Cinzel, serif; font-size: .9rem; color: var(--gold-dark); padding: 1rem .25rem .25rem; }
.dark .mobile-group { color: var(--gold); }

/* ---------------- Shared hero bits ---------------- */
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.hero-arc { position: absolute; pointer-events: none; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-arc 2.6s .4s var(--ease) forwards; }
@keyframes draw-arc { to { stroke-dashoffset: 0; } }

/* ---------------- Home hero (always fits one screen) ---------------- */
.home-hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; display: flex; flex-direction: column; color: #fff; overflow: hidden; isolation: isolate; background: var(--brand); }
.hero-slides { position: absolute; inset: 0; z-index: -1; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.is-active { opacity: 1; animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.home-hero .hero-overlay { z-index: -1; }
.hero-inner { flex: 1; display: flex; align-items: center; padding-top: var(--header-h); }
.hero-kicker { display: inline-flex; align-items: center; gap: .45rem; font-size: .92rem; color: var(--gold-light); }
.hero-title { font-size: clamp(1.75rem, 3.4vw, 2.9rem); line-height: 1.15; color: #fff; margin-top: .9rem; }
.hero-title span { display: block; font-size: .5em; letter-spacing: .08em; color: var(--gold-light); margin-top: .7rem; }
.hero-lead { font-size: clamp(1rem, 1.3vw, 1.15rem); margin-top: 1.1rem; color: rgba(255,255,255,.92); max-width: 34rem; }
.hero-emblem { position: absolute; right: -4%; top: 50%; width: min(46vw, 560px); opacity: .13; transform: translateY(-50%); animation: emblem-sway 14s ease-in-out infinite; pointer-events: none; z-index: 0; }
@keyframes emblem-sway { 0%,100% { transform: translateY(-50%) perspective(900px) rotateY(-14deg); } 50% { transform: translateY(-52%) perspective(900px) rotateY(12deg); } }
.hero-arc-home { right: 2%; top: 50%; width: min(48vw, 600px); transform: translateY(-50%); opacity: .7; z-index: 0; }
.hero-ribbons { position: relative; z-index: 1; padding-bottom: clamp(1rem, 3vh, 2rem); }
.ribbon { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-radius: 14px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.14); font-size: .92rem; line-height: 1.35; }
.ribbon strong { font-family: Cinzel, serif; font-size: 1.15rem; margin-right: .25rem; color: #fff; }
.ribbon-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.ribbon-blue { background: #2b4fb3; } .ribbon-red { background: #a3242c; } .ribbon-gold { background: var(--gold); color: var(--brand); }
.hero-dots { position: absolute; right: clamp(1.25rem, 3vw, 2.5rem); top: calc(var(--header-h) + 1.5rem); display: flex; align-items: center; gap: .5rem; z-index: 2; }
.hero-dot { width: 10px; height: 10px; border-radius: 99px; background: rgba(255,255,255,.45); transition: width .3s, background-color .3s; }
.hero-dot.is-active { width: 28px; background: var(--gold); }
.hero-pause { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); margin-left: .25rem; }
.hero-pause[aria-pressed="true"] { background: var(--gold); color: var(--brand); border-color: var(--gold); }
[data-load] { opacity: 0; transform: translateY(16px); animation: rise .9s var(--ease) forwards; }
[data-load="1"] { animation-delay: .15s; } [data-load="2"] { animation-delay: .3s; } [data-load="3"] { animation-delay: .45s; } [data-load="4"] { animation-delay: .6s; } [data-load="5"] { animation-delay: .8s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (max-height: 640px) { .hero-ribbons { display: none; } }
@media (max-width: 639px) { .hero-ribbons .ribbon:not(:first-child) { display: none; } .hero-emblem { width: 80vw; right: -25%; } .hero-arc-home { display: none; } .hero-dots { top: auto; bottom: 1rem; right: 1rem; } }

/* ---------------- Inner page hero ---------------- */
.page-hero { position: relative; min-height: clamp(320px, 46vh, 460px); display: flex; align-items: flex-end; padding: calc(var(--header-h) + 2.5rem) 0 3rem; color: #fff; overflow: hidden; isolation: isolate; background: var(--brand); }
.page-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; z-index: -2; }
.page-hero .hero-overlay { z-index: -1; }
.page-hero-emblem { position: absolute; right: 4%; bottom: -12%; width: min(38vw, 420px); opacity: .1; z-index: -1; }
.page-hero .hero-arc { right: -60px; bottom: -120px; width: 420px; opacity: .55; z-index: -1; }
.page-title { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; color: #fff; margin-top: .75rem; max-width: 22ch; animation: rise .8s .1s var(--ease) both; }
.page-intro { margin-top: .9rem; max-width: 40rem; color: rgba(255,255,255,.92); font-size: 1.05rem; animation: rise .8s .25s var(--ease) both; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .88rem; color: rgba(255,255,255,.85); }
.crumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--gold-light); }
.crumbs a:hover { text-decoration: underline; }

/* ---------------- Sections & type ---------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-title { font-size: clamp(1.5rem, 2.5vw, 2.1rem); line-height: 1.2; color: var(--brand); }
.dark .section-title, .dark .card-title { color: #fff; }
.lead { font-size: 1.15rem; color: var(--brand); line-height: 1.6; }
.dark .lead { color: #e8e7f3; }
.card-title { font-family: Cinzel, serif; font-weight: 600; font-size: 1.05rem; line-height: 1.3; color: var(--brand); }

.fact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem 1.5rem; }
.fact-list-stack { grid-template-columns: 1fr; }
.fact-list li { display: flex; align-items: center; gap: .85rem; }
.fact-list svg { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--frost); color: var(--brand); }
.dark .fact-list svg { background: rgba(255,255,255,.07); color: var(--gold); }
.fact-list strong { color: var(--brand); font-weight: 600; }
.dark .fact-list strong { color: #fff; }

/* ---------------- Photos: full image, never cropped ---------------- */
.photo-frame { position: relative; overflow: hidden; background: #e4e3f1; }
.dark .photo-frame { background: var(--night-700); }
.photo-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(24px) saturate(1.1); transform: scale(1.2); opacity: .75; }
.photo-main { position: relative; width: 100%; height: 100%; object-fit: contain; }

/* ---------------- Cards ---------------- */
.horse-card { display: flex; flex-direction: column; width: 100%; background: #fff; border: 1px solid rgba(40,35,96,.08); border-radius: 22px 22px 22px 6px; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.horse-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(40,35,96,.35); }
.dark .horse-card { background: var(--night-700); border-color: rgba(255,255,255,.06); }
.card-chip { position: absolute; left: .75rem; top: .75rem; padding: .3rem .7rem; border-radius: 999px; background: rgba(0,0,0,.5); color: #fff; font-size: .8rem; font-weight: 600; }
.card-chip-gold { background: var(--gold); color: var(--brand); }
.pedigree-line { display: flex; gap: .45rem; font-style: italic; font-size: .9rem; line-height: 1.45; color: #6b6868; }
.dark .pedigree-line { color: #b5b3c7; }

.path-tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 26px 26px 26px 6px; overflow: hidden; isolation: isolate; }
.path-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.path-tile .hero-overlay { z-index: -1; }
.path-tile:hover img { transform: scale(1.05); }
.path-text { position: absolute; inset: auto 0 0; padding: 1.6rem; display: flex; flex-direction: column; }
.path-go { position: absolute; right: 1.4rem; bottom: 1.6rem; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--brand); transition: transform .35s var(--ease); }
.path-tile:hover .path-go { transform: translateX(4px); }
@media (min-width: 768px) and (max-width: 1023px) { .path-tile { aspect-ratio: 3 / 4; } }

/* Marquee of horses bred */
.bred-band { background: var(--brand); padding: 3rem 0; overflow: hidden; }
.dark .bred-band { background: var(--night-700); }
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 140s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: Cinzel, serif; font-size: clamp(1.1rem, 2vw, 1.5rem); color: rgba(255,255,255,.82); white-space: nowrap; padding: 0 1.4rem; display: inline-flex; align-items: center; gap: 2.8rem; }
.marquee-track span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-left: 1.4rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- Broodmare flip cards (light 3D) ---------------- */
.flip { position: relative; aspect-ratio: 3 / 4; perspective: 1400px; }
.flip-inner { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
@media (hover: hover) { .flip:hover .flip-inner { transform: rotateY(180deg); } }
.flip-face { position: absolute; inset: 0; border-radius: 22px 22px 22px 6px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flip-front .photo-frame { border-radius: inherit; }
.flip-back { transform: rotateY(180deg); background: #fff; border: 1px solid rgba(40,35,96,.12); padding: 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
.dark .flip-back { background: var(--night-700); border-color: rgba(255,255,255,.08); }
.flip-cap { position: absolute; inset: auto 0 0; padding: 1rem 1.1rem; background: rgba(0,0,0,.5); }
.flip-btn { position: absolute; top: .7rem; right: .7rem; z-index: 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--brand); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.flip-btn[aria-pressed="true"] { background: var(--gold); }
.mare-type-card { height: 100%; background: var(--brand); padding: 1.4rem; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.dark .mare-type-card { background: #2b2766; }
.mare-emblem { position: absolute; top: 8%; left: 50%; width: 62%; transform: translateX(-50%); opacity: .2; }
.pedigree-dl { display: grid; gap: .55rem; font-size: .9rem; }
.pedigree-dl dt { font-size: .76rem; color: var(--gold-dark); font-weight: 600; }
.dark .pedigree-dl dt { color: var(--gold); }
.pedigree-dl dd { color: var(--brand); line-height: 1.35; }
.dark .pedigree-dl dd { color: #fff; }

/* Filters */
.filter-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid rgba(40,35,96,.2); color: var(--brand); font-weight: 500; font-size: .92rem; transition: background-color .2s, color .2s, border-color .2s; }
.pill:hover { border-color: var(--brand); }
.pill.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill-n { font-size: .78rem; opacity: .75; }
.dark .pill { color: #fff; border-color: rgba(255,255,255,.25); }
.dark .pill.is-active { background: var(--gold); border-color: var(--gold); color: var(--brand); }
[data-filter-list] > li.is-hidden, .sold-card.is-hidden { display: none; }

/* Young stock by year */
.year-rail { display: grid; gap: 2.5rem; }
.year-block { display: grid; gap: 1rem; }
@media (min-width: 768px) { .year-block { grid-template-columns: 8rem 1fr; gap: 2rem; } .year-label { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; } }
.year-label { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--gold-dark); line-height: 1; border-top: 2px solid var(--gold); padding-top: .8rem; }
.dark .year-label { color: var(--gold); }
.young-card { position: relative; background: #fff; border-radius: 18px 18px 18px 4px; padding: 1.25rem 1.25rem 1.1rem; border: 1px solid rgba(40,35,96,.08); }
.dark .young-card { background: var(--night-700); border-color: rgba(255,255,255,.06); }
.young-icon { position: absolute; right: 1rem; top: 1rem; color: var(--gold); }
.young-card h4 { padding-right: 1.8rem; }

/* Sold */
.sold-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.25rem; }
.sold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.sold-card { background: #fff; border: 1px solid rgba(40,35,96,.08); border-radius: 18px 18px 18px 4px; overflow: hidden; }
.dark .sold-card { background: var(--night-700); border-color: rgba(255,255,255,.06); }
.sold-card-text { border-top: 3px solid var(--gold); }
.mini-dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed rgba(40,35,96,.15); font-size: .82rem; }
.mini-dl div { display: contents; }
.mini-dl dt { color: #6b6868; } .dark .mini-dl dt { color: #a9a7bc; }
.mini-dl dd { color: var(--brand); font-weight: 500; } .dark .mini-dl dd { color: #fff; }

/* Mare profile */
.profile-dl { display: grid; border-top: 1px solid rgba(40,35,96,.12); }
.profile-dl div { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid rgba(40,35,96,.12); }
.dark .profile-dl, .dark .profile-dl div { border-color: rgba(255,255,255,.1); }
.profile-dl dt { color: #6b6868; font-size: .92rem; } .dark .profile-dl dt { color: #a9a7bc; }
.profile-dl dd { color: var(--brand); font-weight: 600; } .dark .profile-dl dd { color: #fff; }
.offspring-line { position: relative; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .offspring-line { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .offspring-line { grid-template-columns: repeat(3, 1fr); } }
.offspring-line li { display: grid; grid-template-columns: 4rem 1fr; gap: .9rem; }
.off-year { font-family: Cinzel, serif; color: var(--gold-dark); font-weight: 600; padding-top: 1rem; border-top: 2px solid var(--gold); align-self: start; }
.dark .off-year { color: var(--gold); }
.off-card { background: #fff; border-radius: 16px 16px 16px 4px; padding: 1.1rem; border: 1px solid rgba(40,35,96,.08); }
.dark .off-card { background: var(--night-700); border-color: rgba(255,255,255,.06); }
.status { flex: none; font-size: .74rem; font-weight: 600; padding: .25rem .6rem; border-radius: 99px; }
.status-sold { background: var(--frost); color: var(--brand); }
.status-sale { background: var(--gold); color: var(--brand); }
.dark .status-sold { background: rgba(255,255,255,.1); color: #fff; }
.mare-nav { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.25rem; border-radius: 16px; border: 1px solid rgba(40,35,96,.12); min-width: 0; flex: 1; max-width: 22rem; transition: border-color .2s; }
.mare-nav:hover { border-color: var(--brand); }
.dark .mare-nav { border-color: rgba(255,255,255,.12); }
.mare-nav.text-right { align-items: flex-end; margin-left: auto; }

/* Stallion offspring panel */
.get-panel { position: relative; overflow: hidden; background: var(--brand); border-radius: 28px 28px 28px 6px; padding: 2rem; }
.dark .get-panel { background: #2b2766; }
.get-emblem { position: absolute; right: -50px; top: -30px; width: 260px; opacity: .1; pointer-events: none; }
.get-list { display: grid; gap: .75rem; position: relative; }
.get-list li { display: grid; grid-template-columns: 3.5rem 1fr; gap: .75rem; padding-bottom: .75rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.get-year { font-family: Cinzel, serif; color: var(--gold-light); font-weight: 600; }

/* ---------------- Forms ---------------- */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label, .field .label { font-weight: 600; color: var(--brand); font-size: .95rem; }
.dark .field label, .dark .field .label { color: #fff; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: #26243f; background: #fff; border: 1.5px solid rgba(40,35,96,.22); border-radius: 12px; padding: .8rem 1rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(178,169,101,.45); }
.dark .field input, .dark .field select, .dark .field textarea { background: var(--night-700); color: #fff; border-color: rgba(255,255,255,.18); }
.field [aria-invalid="true"] { border-color: #b42318; }
.field-err { color: #b42318; font-size: .88rem; font-weight: 500; }
.dark .field-err { color: #ff9c92; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1.25rem; padding: 1rem 1.2rem; border-radius: 14px; font-weight: 500; }
.form-status.is-success { background: #e8f6ee; color: #1d5a36; }
.form-status.is-error { background: #fdecea; color: #8a1c13; }
.visit-card { background: var(--brand); border-radius: 28px 28px 28px 6px; padding: 2rem; }
.dark .visit-card { background: var(--night-700); }
.map-wrap { border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--frost); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------------- Footer ---------------- */
.footer-title { font-family: Cinzel, serif; font-size: 1rem; color: #fff; margin-bottom: 1rem; }
.footer-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.social-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); transition: background-color .25s, color .25s; }
.social-btn:hover { background: var(--gold); color: var(--brand); border-color: var(--gold); }

/* ---------------- Floating controls + accessibility panel ---------------- */
.float-controls { position: fixed; left: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.float-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--brand); box-shadow: 0 10px 28px rgba(18,16,41,.25); transition: transform .25s var(--ease); }
.float-btn:hover { transform: scale(1.06); }
.float-btn-main { width: 56px; height: 56px; background: var(--brand); color: #fff; }
.dark .float-btn { background: var(--night-700); color: var(--gold-light); }
.dark .float-btn-main { background: var(--gold); color: var(--brand); }
.theme-sun, .dark .theme-moon { display: none; }
.dark .theme-sun { display: block; }
.a11y-panel { position: fixed; left: 18px; bottom: 140px; z-index: 61; width: min(330px, calc(100vw - 36px)); background: #fff; color: #333; border-radius: 22px; padding: 1.25rem; box-shadow: 0 24px 60px rgba(18,16,41,.3); }
.dark .a11y-panel { background: var(--night-800); color: #ddd; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .8rem; border-radius: 14px; background: var(--frost); }
.dark .a11y-row { background: rgba(255,255,255,.06); }
.a11y-step, .a11y-close { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--brand); border: 1px solid rgba(40,35,96,.18); }
.dark .a11y-step, .dark .a11y-close { background: var(--night-700); color: #fff; border-color: rgba(255,255,255,.15); }
.a11y-opt { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left; padding: .75rem .8rem; border-radius: 14px; border: 1.5px solid rgba(40,35,96,.15); font-size: .9rem; font-weight: 500; color: var(--brand); }
.dark .a11y-opt { color: #fff; border-color: rgba(255,255,255,.15); }
.a11y-opt[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.dark .a11y-opt[aria-pressed="true"] { background: var(--gold); color: var(--brand); border-color: var(--gold); }
.a11y-reset { margin-top: .9rem; display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.dark .a11y-reset { color: var(--gold-light); }

/* Accessibility modes */
html.a11y-contrast body { color: #000; background: #fff; }
html.a11y-contrast .hero-overlay { background: rgba(0,0,0,.72); }
html.a11y-contrast .pedigree-line, html.a11y-contrast .mini-dl dt, html.a11y-contrast .profile-dl dt { color: #000; }
html.a11y-contrast .section-title, html.a11y-contrast .card-title { color: #000; }
html.a11y-contrast.dark body { color: #fff; background: #000; }
html.a11y-contrast.dark .section-title, html.a11y-contrast.dark .card-title, html.a11y-contrast.dark .pedigree-line { color: #fff; }
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }
html.a11y-links a:not(.btn) { background: rgba(178,169,101,.28); }
html.a11y-readable body, html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3, html.a11y-readable h4, html.a11y-readable .font-display, html.a11y-readable .card-title, html.a11y-readable .marquee-track span { font-family: Verdana, Tahoma, Arial, sans-serif !important; letter-spacing: .01em; }
html.a11y-spacing body { line-height: 1.95 !important; letter-spacing: .05em; word-spacing: .14em; }
html.a11y-spacing p { margin-bottom: 1em; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-still [data-load], html.a11y-still .reveal { opacity: 1 !important; transform: none !important; }
html.a11y-still .hero-arc { stroke-dashoffset: 0; }

/* ---------------- Scroll reveal (JS only) ---------------- */
html:not(.no-js) .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html:not(.no-js) .reveal.is-in { opacity: 1; transform: none; }

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    [data-load], html:not(.no-js) .reveal { opacity: 1 !important; transform: none !important; }
    .hero-arc { stroke-dashoffset: 0; }
    .marquee-track { animation: none; }
}
@media print { .site-header, .float-controls, .a11y-panel, .hero-dots { display: none !important; } }
