/* Northstar Icelandic Horse Farm — memorial site
   Brand colors carried over from the original site. */
:root {
  --navy: #2E3192;
  --navy-deep: #171849;
  --navy-ink: #1F2160;
  --orange: #FF9933;
  --orange-text: #A85400;   /* orange that passes contrast on light backgrounds */
  --paper: #FBF8F3;
  --paper-2: #F2EDE4;
  --line: #E2DACB;
  --ink: #2A2A33;
  --muted: #5F5F6E;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 68rem;
  --text: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--navy); text-underline-offset: 0.18em; }
a:hover { color: var(--orange-text); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy-deep);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--navy-deep); color: #fff; padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange-text);
  margin: 0 0 0.75rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--navy-deep) url("../images/herd-field.jpg") center 60% / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(23,24,73,0.80) 0%, rgba(23,24,73,0.55) 45%, rgba(23,24,73,0.88) 100%);
}
.hero .wrap {
  min-height: min(88vh, 46rem);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding-top: 3rem; padding-bottom: 3rem;
}
.hero-logo {
  width: 170px;
  height: auto;
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) { .hero-logo { width: 220px; padding: 18px; border-radius: 22px; } }
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 1.3rem + 3.6vw, 3.6rem);
  margin-bottom: 0.25em;
}
.hero .years {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  color: #FFD6AD;
  margin: 0 0 1.25rem;
  letter-spacing: 0.04em;
}
.hero .dedication {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.3rem);
  max-width: 34rem;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.2;
}
.btn-primary { background: var(--orange); color: var(--navy-deep); }
.btn-primary:hover { background: #FFAD5C; color: var(--navy-deep); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255,255,255,0.7); }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* ---------- Notice + horse contacts (top of page) ---------- */
.notice {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 3rem 0;
}
.notice-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .notice-grid { grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: start; } }
.notice h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }

.contacts { display: grid; gap: 1rem; }
.contact-card .btn { color: #fff; }
.contact-card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  background: var(--paper);
}
.contact-card h3 { font-size: 1.15rem; margin-bottom: 0.15em; }
.contact-card .role { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.75em; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card a { overflow-wrap: anywhere; font-weight: 600; }
.small { font-size: 0.92rem; color: var(--muted); }

/* ---------- General sections ---------- */
section { scroll-margin-top: 1rem; }
.section { padding: 4rem 0; }
@media (min-width: 900px) { .section { padding: 5.5rem 0; } }
.section.alt { background: var(--paper-2); }

.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; }
  .split.flip > :first-child { order: 2; }
}
.prose { max-width: var(--text); }

.photo { margin: 0; }
.photo img { border-radius: 10px; box-shadow: 0 8px 28px rgba(23,24,73,0.16); width: 100%; }
.photo figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; }
/* Lanny's photo is a scan of a print, so keep it at a modest size where it stays sharp,
   and give it a light mat like a framed photo. */
.photo.portrait { max-width: 28rem; justify-self: center; width: 100%; }
.photo.portrait img { border: 10px solid #fff; border-radius: 4px; }
/* On phones, show Lanny's photo before his story instead of after it. */
@media (max-width: 899px) { .split > .photo.portrait { order: -1; } }
.photo.portrait figcaption { text-align: center; font-style: italic; font-family: var(--serif); font-size: 1rem; }

.facts {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: grid; gap: 0.6rem 1.5rem;
  border-top: 1px solid var(--line); padding-top: 1.25rem;
}
@media (min-width: 560px) { .facts { grid-template-columns: auto 1fr; } }
.facts dt { font-weight: 600; color: var(--navy-deep); }
.facts dd { margin: 0 0 0.4rem; }
@media (min-width: 560px) { .facts dd { margin: 0; } }

/* ---------- Legacy cards ---------- */
.legacy-intro { max-width: var(--text); margin-bottom: 2.5rem; }
.cards { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem 1.4rem 1.2rem;
}
.card .star { color: var(--orange); font-size: 1.1rem; display: block; margin-bottom: 0.4rem; }
.card p { margin-bottom: 0; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2.5rem;
}
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; width: 100%; }
/* Feature photo: full width on phones, a 2x2 block beside the other four on desktop. */
.gallery .feature { grid-column: span 2; }
@media (min-width: 900px) {
  .gallery .feature { grid-row: span 2; aspect-ratio: auto; height: 100%; }
}

/* ---------- Kolskeggur ---------- */
.stallion { background: var(--navy-deep); color: #E9E9F4; }
.stallion h2, .stallion h3 { color: #fff; }
.stallion .eyebrow { color: #FFC285; }
.stallion a { color: #FFC285; }
.stallion .photo img { box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
.stallion .photo figcaption { color: #B9BAD6; }
.stallion .facts { border-color: rgba(255,255,255,0.18); }
.stallion .facts dt { color: #FFD6AD; }
.stallion blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--orange);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: #fff;
}

/* ---------- Memories ---------- */
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.memories-intro { max-width: var(--text); margin-bottom: 2.5rem; }
.memories { columns: 1; column-gap: 1.25rem; }
@media (min-width: 760px) { .memories { columns: 2; } }
@media (min-width: 1100px) { .memories { columns: 3; } }
/* While there's only one memory, show it as a single centered card instead of one column of three. */
.memories:has(> .memory:only-child) { columns: 1; max-width: 40rem; margin: 0 auto; }
.memory {
  break-inside: avoid;
  margin: 0 0 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 10px;
  overflow: hidden;
}
.memory img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.memory blockquote {
  margin: 0;
  padding: 1.2rem 1.3rem 0.4rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink);
}
.memory blockquote p { margin-bottom: 0.8em; }
.memory figcaption { padding: 0 1.3rem 1.1rem; font-size: 0.95rem; color: var(--muted); }
.memory figcaption strong { color: var(--navy-deep); }
.memory .photo-note { display: block; margin-top: 0.4rem; font-size: 0.85rem; font-style: italic; }

/* ---------- Thank you ---------- */
.thanks { text-align: center; }
.thanks .prose { margin: 0 auto; }
.thanks .sign {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--navy-deep);
}
.divider { color: var(--orange); font-size: 1.4rem; letter-spacing: 0.6em; margin: 0 0 1.25rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #12133A;
  color: #C9CAE0;
  padding: 2.5rem 0 2rem;
  font-size: 0.95rem;
}
.site-footer a { color: #FFC285; }
.disclaimer {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
  max-width: 48rem;
}
.disclaimer strong { color: #fff; }
.disclaimer p:last-child { margin-bottom: 0; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; color: #9C9DBD; }
.footer-meta p { margin: 0; }
