/* Holly & Oak Yarn Co. — simple informational site */

:root {
  --color-bg: #faf8f5;
  --color-text: #2c2416;
  --color-accent: #4a6b3c;
  --color-accent-light: #6b8c5a;
  --color-muted: #6b6358;
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  border-bottom: 1px solid rgba(44, 36, 22, 0.1);
}

header h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  color: var(--color-text);
}

.tagline {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--color-muted);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(44, 36, 22, 0.08);
}

.main-nav a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

section {
  margin-bottom: 2.5rem;
}

section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
}

.hero {
  margin-bottom: 2.5rem;
}

.hero-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #e8e4de;
  min-height: 200px;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-image.hero-image-failed .hero-overlay {
  display: none;
}

.hero-image.hero-image-failed {
  cursor: default;
}

.hero-image[data-hero]:not(.hero-image-failed) {
  cursor: pointer;
}

.hero-image[data-hero] .hero-overlay a {
  cursor: pointer;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(to bottom, rgba(44, 36, 22, 0.25) 0%, rgba(44, 36, 22, 0.5) 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.hero-overlay > * {
  pointer-events: auto;
}

.hero-overlay-text {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 500;
  text-align: center;
  max-width: 20ch;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.35rem;
  background: #fff;
  color: var(--color-accent);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: var(--color-bg);
  color: var(--color-text);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.hero-cta-arrow {
  display: inline-block;
  transition: transform 0.25s;
}

.hero-cta:hover .hero-cta-arrow {
  transform: translateX(4px);
}

.placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.placeholder.visible {
  display: flex;
}

.placeholder code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

.about p {
  margin: 0 0 1rem;
  color: var(--color-text);
}

.about p:last-child {
  margin-bottom: 0;
}

.connect p {
  margin: 0;
  color: var(--color-text);
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(44, 36, 22, 0.08);
  transition: box-shadow 0.4s ease-out;
}

.contact-card.is-highlighted {
  animation: contact-highlight 1.2s ease-out;
}

@keyframes contact-highlight {
  0% { box-shadow: 0 2px 12px rgba(44, 36, 22, 0.08), 0 0 0 0 rgba(74, 107, 60, 0.4); }
  40% { box-shadow: 0 4px 20px rgba(44, 36, 22, 0.12), 0 0 0 12px rgba(74, 107, 60, 0.15); }
  100% { box-shadow: 0 2px 12px rgba(44, 36, 22, 0.08), 0 0 0 0 rgba(74, 107, 60, 0); }
}

.contact-card-image {
  border-radius: 8px;
  overflow: hidden;
}

.contact-card-image img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.contact-details {
  padding: 0.25rem 0;
}

.contact-details p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.contact-details p:last-child {
  margin-bottom: 0;
}

.contact-details a {
  color: var(--color-accent);
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .contact-card {
    grid-template-columns: 1fr;
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #e8e4de;
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item:focus-within,
.gallery-item:hover {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .placeholder {
  font-size: 0.8rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.links a:hover {
  background: var(--color-accent-light);
}

footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(44, 36, 22, 0.1);
  font-size: 0.9rem;
  color: var(--color-muted);
}

footer p {
  margin: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 36, 22, 0.9);
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.lightbox[hidden] {
  display: flex !important;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}


.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: #e8e4de;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 4px;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s, background 0.2s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-accent-light);
}
