/* The World Hat Museum — homepage sections and secondary pages.
   The map itself is styled in styles.css and is not touched here. */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  background: var(--ink);
  color: var(--footer-ink);
  border-radius: 6px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

/* Shared section bits
   ------------------------------------------- */

.about,
.featured,
.contact {
  padding: 0 var(--page-pad) clamp(3rem, 6vw, 4.5rem);
}

.about h2,
.featured h2,
.contact h2 {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.65rem, 2.4vw, 2.05rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: #8a6528;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, gap 0.2s ease;
}

.text-link:hover,
.text-link:focus-visible {
  border-bottom-color: var(--gold-deep);
  gap: 0.65rem;
}

.inline-link {
  border-bottom: 1px solid var(--gold);
  transition: border-color 0.2s ease;
}

.inline-link:hover {
  border-bottom-color: var(--ink);
}

/* Placeholders (never real hats) */

.placeholder,
.hat-media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--ink-muted);
}

.placeholder-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  padding: 0 0.75rem;
}

.placeholder-icon {
  width: 2.4rem;
  height: 2.4rem;
  color: #b9b0a0;
}

/* About card
   ------------------------------------------- */

.about-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.25rem, 2.6vw, 2rem);
  background: #fdfcfa;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 36px rgba(60, 45, 20, 0.06);
}

.about-copy {
  padding: 0.5rem 0 0.5rem clamp(0rem, 1.5vw, 1rem);
}

.about-copy p {
  margin: 0 0 1rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.6;
}

.about-copy .about-note {
  font-size: 0.95rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
  margin-bottom: 1.4rem;
}

.about-media {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.about-media img,
.about-media .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder--photo {
  background: linear-gradient(160deg, #f3eee5 0%, #ebe4d7 100%);
  border: 1px dashed #d8cfbe;
  border-radius: 14px;
}

/* Featured hats strip
   ------------------------------------------- */

.section-head {
  margin-bottom: 1.4rem;
}

.section-sub {
  margin: 0;
  max-width: 38rem;
  color: var(--ink-muted);
  font-size: 1rem;
}

.featured-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.5rem);
}

.browse .featured-strip {
  margin-top: 1.5rem;
}

.hat-card figure {
  margin: 0;
}

.hat-card.is-filtered-out {
  display: none;
}

.hat-media {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  background: linear-gradient(165deg, #f4efe6 0%, #ece5d8 100%);
  border: 1px solid var(--line);
  overflow: hidden;
}

.hat-media--photo {
  padding: 0.6rem;
  background: radial-gradient(ellipse at 50% 42%, #fbf8f1 0%, #f1ebdf 78%);
}

.hat-media--photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 14px rgba(60, 45, 20, 0.16));
}

.hat-card--placeholder .hat-media {
  background: transparent;
  border: 1px dashed #d8cfbe;
}

.hat-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.8rem 0.15rem 0;
}

.hat-name {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink);
}

.hat-meta {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.hat-card--placeholder .hat-name,
.hat-card--placeholder .hat-meta {
  color: var(--ink-muted);
}

/* Contact
   ------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.contact-intro p {
  margin: 0;
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  max-width: 36rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fdfcfa;
  border: 1px solid var(--pill-border);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.field input:hover,
.field textarea:hover {
  border-color: #b8ae9b;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(201, 174, 114, 0.25);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.5rem 1.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--footer-ink);
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover:not(:disabled),
.button:focus-visible {
  background: var(--gold-deep);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.form-status.is-error {
  color: #8a3b2a;
}

.form-status.is-ok {
  color: #4d6a3a;
}

/* Footer refinements */

.footer-social a {
  align-items: flex-end;
}

/* Secondary pages (about.html)
   ------------------------------------------- */

.page {
  padding: clamp(1.5rem, 4vw, 3rem) var(--page-pad) clamp(3rem, 7vw, 5.5rem);
}

.page-article {
  max-width: 42rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6528;
}

.page-title {
  margin: 0 0 1.4rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.page-article p {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.65;
}

.page-article .lead {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink);
}

.page-article .page-note {
  padding: 0.9rem 1.1rem;
  background: #fdfcfa;
  border: 1px dashed #d8cfbe;
  border-radius: 12px;
  font-size: 0.98rem;
  color: var(--ink-muted);
}

/* Responsive
   ------------------------------------------- */

@media (max-width: 960px) {
  .featured-strip {
    grid-template-columns: repeat(3, minmax(13.5rem, 1fr));
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--page-pad);
    margin: 0 calc(-1 * var(--page-pad));
    padding: 0 var(--page-pad) 0.75rem;
    -webkit-overflow-scrolling: touch;
  }

  .browse .featured-strip {
    margin-top: 1.5rem;
  }

  .hat-card {
    scroll-snap-align: start;
  }
}

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

  .about-media {
    order: -1;
  }

  .about-copy {
    padding: 0.25rem 0.25rem 0.5rem;
  }
}

@media (max-width: 720px) {
  /* The map keeps its own size; just drop the tall empty strip under it. */
  .map-stage {
    min-height: 0;
  }

  .site-footer {
    gap: 1.5rem;
  }

  .footer-social a {
    align-items: flex-start;
  }
}

/* Region / country filter state (set from the zoomed map)
   ------------------------------------------- */

.hat-card.is-geo-hidden {
  display: none;
}

.geo-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  margin-top: 1.35rem;
}

.geo-status-text {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.geo-clear {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.08rem;
}

.geo-clear:hover,
.geo-clear:focus-visible {
  color: var(--ink);
  outline: none;
}

.geo-empty {
  margin: 1.5rem 0 0;
  padding: 1.6rem 1.4rem;
  background: #fdfcfa;
  border: 1px dashed #d8cfbe;
  border-radius: 12px;
  font-size: 1rem;
  color: var(--ink-muted);
  text-align: center;
}
