/* ============================================
   LONE HOOF — style.css v5
   ============================================ */

:root {
  --bg: #ffffff;
  --surface: #f5f5f3;
  --border: #e0ddd8;
  --text: #1a1a1a;
  --text-dim: #888480;
  --text-bright: #000000;
  --accent: #4FD4C7;
  --accent-dark: #2aada0;
  --font-logo: 'Archivo Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Courier New', Courier, monospace;
  --header-h: 148px; /* fallback; JS measures actual */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

.grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1000;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* =====================
   HEADER
   ===================== */
header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 3rem;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
}

.logo-lone, .logo-hoof {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.22em;
  line-height: 1;
  display: block;
}
.logo-lone { color: var(--accent); }
.logo-hoof { color: var(--text-bright); }

.header-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 14px;
}
.header-socials a {
  display: flex; align-items: center;
  transition: opacity 0.2s;
}
.header-socials a:hover { opacity: 0.7; }
.header-socials img { width: 22px; height: 22px; object-fit: contain; display: block; }

.header-nav { display: flex; gap: 2rem; }
.header-nav a {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.2s;
}
.header-nav a:hover, .header-nav a.active { color: var(--text-bright); }

.menu-toggle {
  display: none;
  position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%);
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
  width: 30px; height: 30px;
}
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text-dim); transition: all 0.25s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =====================
   MOBILE NAV
   ===================== */
.mobile-nav {
  display: none;
  position: fixed; top: var(--header-h); left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--border);
  z-index: 190;
  flex-direction: column; padding: 1.5rem 2rem 2rem; gap: 1.2rem;
  transform: translateY(-110%); opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.mobile-nav.open { transform: translateY(0); opacity: 1; }
.mobile-nav a { font-family: var(--font-body); font-size: 1rem; text-decoration: none; color: var(--text-dim); }
.mobile-nav a.active, .mobile-nav a:hover { color: var(--text-bright); }
.mobile-social { display: flex; gap: 1.5rem; margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.mobile-social a { font-size: 0.8rem; color: var(--text-dim) !important; text-decoration: none; }

/* =====================
   MAIN
   ===================== */
main { padding-top: var(--header-h); min-height: 100vh; }

/* =====================
   ART GRID
   ===================== */
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3rem 2.5rem;
  padding: 3rem 2.5rem 5rem;
  max-width: 1320px;
  margin: 0 auto;
}

.art-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Fixed-height box; image shrinks to fit, never cropped */
.art-img-wrap {
  width: 100%;
  height: 320px;
  background: var(--bg);
  margin-bottom: 0.85rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.art-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.45s ease;
}

.art-item:hover .art-img-wrap img { transform: scale(1.03); }

/* Magnifier icon appears on hover */
.art-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 10px; right: 10px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.85)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='22' y2='22'/%3E%3C/svg%3E")
    center/16px no-repeat;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.art-item:hover .art-img-wrap::after { opacity: 1; }

.art-info { display: flex; flex-direction: column; gap: 0.5rem; }

.art-title {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.art-title em { color: var(--text-dim); font-style: italic; }

.art-shop-row { display: flex; align-items: center; gap: 1rem; }

.art-price { font-family: var(--font-body); font-size: 14px; font-weight: bold; color: var(--text-bright); }

.enquire-btn {
  display: inline-block;
  font-family: var(--font-body); font-size: 11px; letter-spacing: 0.08em;
  text-decoration: none; color: #fff; background: var(--text-bright);
  padding: 0.3rem 0.8rem; transition: background 0.2s;
}
.enquire-btn:hover { background: var(--accent-dark); }

/* Prevent grid click propagating to enquire button */
.enquire-btn { position: relative; z-index: 2; }

/* =====================
   DETAIL OVERLAY
   Full-screen detail view with image left, info right
   ===================== */
.detail-overlay {
  display: none;
  position: fixed; inset: 0;
  background: #fff;
  z-index: 300;
  overflow-y: auto;
}

.detail-overlay.active { display: block; }

.detail-inner {
  display: flex;
  min-height: 100vh;
  padding-top: var(--header-h);
}

/* Left panel — image */
.detail-img-panel {
  flex: 1 1 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem 3rem 3rem;
  position: relative;
  background: var(--bg);
  min-height: calc(100vh - var(--header-h));
}

.detail-img-panel img {
  max-width: 100%;
  max-height: calc(100vh - var(--header-h) - 6rem);
  width: auto; height: auto;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.detail-img-panel img.zoomed {
  cursor: zoom-out;
  transform: scale(1.6);
}

/* Magnify hint */
.detail-zoom-hint {
  position: absolute;
  bottom: 1.2rem; right: 1.5rem;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 6px;
}
.detail-zoom-hint svg { width: 14px; height: 14px; }

/* Right panel — info */
.detail-info-panel {
  flex: 0 0 500px;
  padding: 3rem 3rem 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--border);
}

.detail-title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: bold;
  color: var(--text-bright);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.detail-meta-row {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.detail-meta-row span {
  color: var(--text);
}

.detail-price {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: bold;
  color: var(--text-bright);
  margin-bottom: 1rem;
}

.detail-enquire {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: #fff;
  background: var(--text-bright);
  padding: 0.6rem 1.2rem;
  transition: background 0.2s;
  align-self: flex-start;
}
.detail-enquire:hover { background: var(--accent-dark); }

.detail-print-note {
  margin-top: 1.5rem;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* Nav arrows */
.detail-prev, .detail-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  font-size: 2.5rem; color: var(--text-dim);
  cursor: pointer; padding: 1rem 0.8rem;
  transition: color 0.2s;
  z-index: 310;
  line-height: 1;
}
.detail-prev { left: 0.5rem; }
.detail-next { right: 0.5rem; }
.detail-prev:hover, .detail-next:hover { color: var(--text-bright); }

/* Close button */
.detail-close {
  position: fixed; top: calc(var(--header-h) + 1rem); right: 1.5rem;
  background: none; border: none;
  font-size: 1.4rem; color: var(--text-dim);
  cursor: pointer; z-index: 310;
  transition: color 0.2s; line-height: 1;
}
.detail-close:hover { color: var(--text-bright); }

/* =====================
   PROSE PAGES
   ===================== */
.prose-main {
  max-width: 1320px; margin: 0 auto;
  padding: 4rem 2rem 5rem;
}
.prose-container { max-width: 680px; margin: 0 auto; }

/* WHO — top padding matches faq first question */
.who-prose {
  padding-top: 1.8rem;   /* same as faq-item padding-top */
}

.who-prose p {
  font-family: var(--font-body); font-size: 15px;
  line-height: 1.9; color: var(--text); margin-bottom: 1.4rem;
}
.who-prose a { color: var(--accent-dark); text-decoration: none; }
.who-prose a:hover { text-decoration: underline; }

.who-image { display: block; margin: 2.5rem auto 0; height: 90px; width: auto; }

/* FAQS */
.faq-container { display: flex; flex-direction: column; }

.faq-item { padding: 1.8rem 0; border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-item h2 {
  font-family: var(--font-body); font-size: 15px;
  font-weight: bold; color: var(--accent);
  margin-bottom: 0.6rem; line-height: 1.5;
}
.faq-item p { font-family: var(--font-body); font-size: 15px; color: #000; line-height: 1.8; }
.faq-item a { color: var(--accent-dark); text-decoration: none; }
.faq-item a:hover { text-decoration: underline; }

/* LEGAL */
.legal-prose h1 { font-family: var(--font-body); font-size: 18px; font-weight: bold; color: var(--text-bright); margin-bottom: 2rem; }
.legal-prose h2 { font-family: var(--font-body); font-size: 14px; font-weight: bold; color: var(--text-bright); margin: 2rem 0 0.6rem; text-transform: uppercase; letter-spacing: 0.04em; }
.legal-prose p { font-family: var(--font-body); font-size: 14px; color: var(--text); line-height: 1.85; margin-bottom: 1rem; }
.legal-prose ul { margin: 0.5rem 0 1rem 1.5rem; }
.legal-prose ul li { font-family: var(--font-body); font-size: 14px; color: var(--text); line-height: 1.8; margin-bottom: 0.4rem; }
.legal-prose a { color: var(--accent-dark); text-decoration: none; }
.legal-prose a:hover { text-decoration: underline; }
.legal-updated { margin-top: 3rem; font-size: 12px; color: var(--text-dim); font-style: italic; }

/* CONTACT */
.contact-title { font-family: var(--font-body); font-size: 18px; font-weight: bold; color: var(--text-bright); margin-bottom: 0.8rem; }
.contact-intro { font-family: var(--font-body); font-size: 15px; color: var(--text-dim); margin-bottom: 2.5rem; line-height: 1.8; }
.contact-intro a { color: var(--accent-dark); text-decoration: none; }
.contact-intro a:hover { text-decoration: underline; }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.4rem; }
.form-row label { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.08em; color: var(--text-dim); }
.form-row input, .form-row textarea { background: var(--surface); border: 1px solid var(--border); color: var(--text-bright); font-family: var(--font-body); font-size: 14px; padding: 0.65rem 0.85rem; outline: none; transition: border-color 0.2s; resize: vertical; width: 100%; }
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--text-dim); }
.form-row input:focus, .form-row textarea:focus { border-color: var(--accent); }
.submit-btn { font-family: var(--font-body); font-size: 13px; letter-spacing: 0.08em; color: #fff; background: var(--text-bright); border: none; padding: 0.65rem 1.5rem; cursor: pointer; transition: background 0.2s; margin-top: 0.5rem; }
.submit-btn:hover { background: var(--accent-dark); }
.form-note { margin-top: 0.8rem; font-size: 12px; color: var(--text-dim); font-style: italic; }

/* =====================
   FOOTER
   ===================== */
footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 2rem;
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem; text-align: center;
}
footer p { font-family: 'Courier New', Courier, monospace; font-size: 12px; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.8rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-family: 'Courier New', Courier, monospace; font-size: 12px; color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* =====================
   RESPONSIVE
   ===================== */
/* ── Tablet landscape / small desktop (≤1100px) ────────── */
@media (max-width: 1100px) {
  /* Info panel slightly narrower so image still has room */
  .detail-info-panel { flex: 0 0 380px; }
}

/* ── Tablet portrait (≤900px) ───────────────────────────── */
@media (max-width: 900px) {
  /* Stack detail overlay: image on top, info below */
  .detail-inner { flex-direction: column; overflow-y: auto; }
  .detail-img-panel {
    padding: 2rem 1.5rem 1rem;
    min-height: 45vw;
    max-height: 55vh;
  }
  .detail-info-panel {
    flex: none;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 1.5rem 1.5rem 5rem; /* bottom padding clears prev/next */
  }
  /* Move prev/next to bottom of screen on stacked layout */
  .detail-prev { left: 1rem; top: auto; bottom: 1rem; transform: none; font-size: 2rem; }
  .detail-next { right: 1rem; top: auto; bottom: 1rem; transform: none; font-size: 2rem; }
  /* Close button stays top-right but adjusts for header */
  .detail-close { top: calc(var(--header-h) + 0.5rem); right: 1rem; }
}

/* ── Mobile nav breakpoint (≤768px) ─────────────────────── */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .mobile-nav { display: flex; }

  .art-grid { grid-template-columns: repeat(2,1fr); gap: 2rem 1rem; padding: 2rem 1rem 4rem; }
  .art-img-wrap { height: 200px; }
  .prose-main { padding: 2.5rem 1.25rem 4rem; }
  footer { padding: 1.4rem 1rem; }

  /* Detail overlay full-screen on mobile */
  .detail-overlay { overflow-y: auto; }
  .detail-inner { min-height: auto; }
  .detail-img-panel { max-height: 45vh; min-height: auto; padding: 1.25rem 1rem 0.5rem; }
  .detail-info-panel { padding: 1.25rem 1rem 5rem; }
  .detail-title { font-size: 15px; }
  .detail-price { font-size: 17px; }
  .zoom-hint { display: none; } /* less relevant on touch */
}

/* ── Small mobile (≤480px) ───────────────────────────────── */
@media (max-width: 480px) {
  .logo-lone, .logo-hoof { font-size: 22px; }
  .art-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 0.75rem; padding: 1.5rem 0.75rem 3rem; }
  .art-img-wrap { height: 150px; }
  .art-shop-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .detail-img-panel { max-height: 40vh; }
  .header-socials img { width: 18px; height: 18px; }
}

/* =====================
   DETAIL OVERLAY — secondary image & notes
   ===================== */
.detail-img2-wrap {
  width: 100%;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-img2-wrap img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.detail-notes {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
  white-space: pre-line;  /* preserves \n line breaks */
}

/* Print info link in detail panel */
.detail-print-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--accent-dark);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.detail-print-link:hover { text-decoration: underline; }

/* =====================
   HOW TO BUY PAGE
   ===================== */
.htb-title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: bold;
  color: var(--text-bright);
  margin-bottom: 0.8rem;
  letter-spacing: 0.04em;
}

.htb-intro {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 3rem;
  line-height: 1.8;
}

.htb-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 3.5rem;
}

.htb-step {
  display: flex;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
}

.htb-step:first-child { border-top: 1px solid var(--border); }

.htb-step-num {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: bold;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  padding-top: 3px;
}

.htb-step-body h2 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: bold;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.htb-step-body p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
}

.htb-step-body a { color: var(--accent-dark); text-decoration: none; }
.htb-step-body a:hover { text-decoration: underline; }

.htb-print-section {
  padding-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.htb-print-section h2 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: bold;
  color: var(--text-bright);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.htb-print-section p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 1rem;
}

.htb-specs {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.htb-spec-row {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.htb-spec-row:last-child { border-bottom: none; }

.htb-spec-label {
  color: var(--text-dim);
  flex-shrink: 0;
  width: 70px;
}

.htb-cta {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dim);
  padding-top: 1rem;
}
.htb-cta a { color: var(--accent-dark); text-decoration: none; }
.htb-cta a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .htb-step { gap: 1rem; }
  .htb-step-num { font-size: 18px; }
  .htb-spec-row { flex-direction: column; gap: 0.2rem; }
  .htb-spec-label { width: auto; }
}

/* =====================
   CONTACT — inline email display
   ===================== */
.contact-email {
  display: inline;
}
.contact-email-link {
  font-family: var(--font-body);
  color: var(--accent-dark);
  text-decoration: none;
}
.contact-email-link:hover {
  text-decoration: underline;
}
