/* ABOUTME: Site-specific styles layered on Pico CSS. */
/* ABOUTME: Overrides Pico's design tokens to the mockup palette/fonts, then adds the few layout grids Pico doesn't provide. */

:root {
  --forest-green: #2d5016;
  --deep-charcoal: #2c2c2c;
  --warm-cream: #f8f7f5;
  --taupe: #706b63; /* darkened from #8b8680 to meet WCAG AA (~5:1) on the cream background */
  --rule: rgba(45, 80, 22, 0.12);

  /* Re-skin Pico with the mockup palette + fonts. */
  --pico-font-family-sans-serif: 'Jost', system-ui, sans-serif;
  --pico-font-weight: 300;
  --pico-line-height: 1.75;
  --pico-background-color: var(--warm-cream);
  --pico-color: var(--deep-charcoal);
  --pico-muted-color: var(--taupe);
  --pico-h1-color: var(--deep-charcoal);
  --pico-h2-color: var(--deep-charcoal);
  --pico-h3-color: var(--deep-charcoal);
  --pico-primary-underline: transparent;
  --pico-border-radius: 6px;
}

/* Pico defines its primary palette under :root:not([data-theme=dark]); match that
   specificity so the forest-green takes over its default azure on buttons/links. */
:root:not([data-theme="dark"]) {
  --pico-primary: var(--forest-green);
  --pico-primary-background: var(--forest-green);
  --pico-primary-hover-background: var(--deep-charcoal);
  --pico-primary-border: var(--forest-green);
  --pico-primary-hover-border: var(--deep-charcoal);
  --pico-primary-hover: var(--deep-charcoal);
}

/* Serif display face for headings + wordmark — Pico has no single heading-font token. */
h1, h2, h3, .nav-logo, .contact-block h3 {
  font-family: 'Crimson Text', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.3px;
}

/* Small uppercase eyebrow used above section titles. */
.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest-green);
  margin-bottom: 1rem;
}

/* NAV — sticky, blurred. Pico styles the links; we own the bar. */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 245, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
/* Header breaks out of Pico's centered container to span the full viewport. */
.nav-bar .container { max-width: none; }
/* Mobile-first: wordmark left, hamburger right. Desktop switches to an inline row. */
.nav-bar .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}
.nav-logo { font-size: 1.05rem; text-decoration: none; color: var(--deep-charcoal); }
.nav-logo span { color: var(--forest-green); }

/* HAMBURGER (mobile) — a <details> disclosure; summary is the button. */
.nav-menu { margin: 0; }
.nav-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.5rem -0.5rem -0.5rem 0; /* enlarge tap target without shifting layout */
  cursor: pointer;
  color: var(--deep-charcoal);
}
.nav-toggle::-webkit-details-marker { display: none; } /* hide default triangle (WebKit) */
.nav-toggle::marker { content: ""; }                   /* hide default triangle (others) */
.nav-toggle::after { display: none; }                  /* hide Pico's accordion chevron */
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
/* Morph bars into an X while the menu is open. */
.nav-menu[open] .nav-toggle__bars { background: transparent; }
.nav-menu[open] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-menu[open] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--forest-green); outline-offset: 3px; border-radius: 3px; }

/* Open menu drops as a full-width panel below the sticky bar. */
.nav-menu nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 100;
  background: var(--warm-cream);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
  padding: 1.25rem 1rem 1.75rem;
}
.nav-links { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.25rem; width: 100%; list-style: none; margin: 0; padding: 0; }
/* In the mobile panel, let the Shop Online submenu flow inline rather than
   float as an absolute popover. */
.nav-menu nav .nav-links details.dropdown ul {
  position: static;
  margin: 0.6rem 0 0;
  padding: 0;
  border: none;
  box-shadow: none;
  text-align: center;
}
.nav-links a {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--forest-green); }

/* "Shop Online" nav item — Pico's <details class="dropdown"> pattern, restyled
   to match the rest of the nav links (they're plain <a>s; this is a summary). */
.nav-links details.dropdown { margin: 0; }
/* Pico wraps a bare <summary> in a select-style box; strip it so "Shop Online"
   reads as a plain nav link like the others (the caret ::after stays). */
.nav-links details.dropdown summary {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe);
  border: none;
  background: none;
  padding: 0;
}
.nav-links details.dropdown summary:hover { color: var(--forest-green); }
.nav-links details.dropdown summary:focus { box-shadow: none; }
.nav-links details.dropdown ul { right: 0; min-width: 140px; font-size: 0.78rem; }

/* Keyboard focus — Pico's default outline is suppressed by the color overrides
   above, so restore a visible focus ring for nav links and the dropdown. */
.nav-links a:focus-visible,
.nav-links details.dropdown summary:focus-visible {
  outline: 2px solid var(--forest-green);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Sections share a top rule, like the mockup. */
main > section { padding-block: 5rem; border-top: 1px solid var(--rule); }
/* Offset anchor jumps so the target heading clears the sticky header. */
main > section { scroll-margin-top: 5.5rem; }
@media (min-width: 769px) { main > section { scroll-margin-top: 4.5rem; } }
main > section:first-child { border-top: none; }
/* Hero sits directly under the header; trim its top padding so the headline
   isn't pushed down — most noticeable under the taller mobile header. */
#home { padding-top: 2rem; }
@media (min-width: 769px) { #home { padding-top: 3rem; } }

/* HERO — mobile-first: single column, image on top. Two-column added at the desktop breakpoint. */
.hero { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 3.8rem); line-height: 1.15; margin-bottom: 1.5rem; }
.hero p { color: var(--taupe); }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
/* Outside <nav>, Pico's dropdown defaults to a full-width block (built for
   select-style menus); pull it back to a compact button matching the primary CTA. */
.hero-ctas .cta-shop-online { display: inline-block; width: auto; margin: 0; }
.hero-ctas .cta-shop-online summary { display: inline-block; width: auto; }
.hero-ctas .cta-shop-online ul { right: auto; left: 0; min-width: 160px; }
.hero-media {
  order: -1;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #d4c5b0 0%, #b8a87a 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media span { font-family: 'Crimson Text', serif; font-style: italic; color: rgba(255,255,255,0.5); }

/* ABOUT — cap the prose measure for readability; left edge stays aligned with
   the other sections (not centered), so only the line length shortens. */
#about h2,
#about p { max-width: 68ch; }
/* headshot sits above the bio paragraph on mobile, floats beside it at the desktop breakpoint. */
.headshot {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--forest-green);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* GALLERY — responsive card grid; each tile links to its detail page. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}
.gallery-item { display: block; text-decoration: none; color: inherit; }
/* The image card; the caption sits below it, outside this framed box. */
.gallery-item__frame {
  display: block;
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover .gallery-item__frame { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,0.12); }
/* contain (not cover) so tall pieces like the lamp aren't clipped; the white
   tile lets the product shots' own white backgrounds blend into a clean grid. */
.gallery-item img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 1rem; }
.gallery-item__placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: #999; font-size: 0.85rem; text-align: center; padding: 1rem;
}
/* Caption below the image card: piece title and medium/year. */
.gallery-item__caption { display: block; padding-top: 0.85rem; }
.gallery-item__title {
  display: block;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1.05rem;
  color: var(--deep-charcoal);
}
.gallery-item__meta { display: block; font-size: 0.8rem; color: var(--taupe); margin-top: 0.1rem; }
.gallery-item:hover .gallery-item__title { color: var(--forest-green); }
.gallery-item__ext { font-size: 0.85em; }
.gallery-item__sold {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: var(--deep-charcoal); color: var(--warm-cream);
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: 3px;
}

/* CONTACT — dark, full-bleed band that doubles as the footer. Light text; brighter green links for AA contrast. */
.contact { background: var(--deep-charcoal); color: rgba(248,247,245,0.92); padding-block: 5rem; }
.contact h2, .contact h3 { color: rgba(248,247,245,0.96); }
.contact .section-label { color: #9fc46a; }
.contact p, .contact address { color: rgba(248,247,245,0.82); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 3rem; margin-top: 2.5rem; }
.contact a { color: #a8d472; }
.contact a:hover { color: #c4e89a; }
.contact address { font-style: normal; }
/* Pico paints tables with --pico-background-color; force transparent on the dark band. */
.hours, .hours tr, .hours td { background: transparent; width: 100%; }
.hours td { padding: 0.4rem 0; border-bottom: 1px solid rgba(248,247,245,0.18); color: rgba(248,247,245,0.85); }
.hours td:first-child { padding-right: 2rem; }
.hours td:last-child { white-space: nowrap; text-align: right; }
.social-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* Copyright sign-off at the bottom of the contact/footer band. */
.contact__signoff {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(248,247,245,0.15);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(248,247,245,0.6);
}

/* DETAIL PAGE */
.lot-detail { max-width: 700px; }
.lot-detail__img { border-radius: 6px; margin-block: 1.5rem; }
.backlink { font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }

/* Desktop layer — mobile-first base above is progressively enhanced here. */
@media (min-width: 769px) {
  .nav-bar .container { padding-inline: 2.5rem; }
  .nav-logo { font-size: 1.1rem; }
  /* No hamburger on desktop: hide the toggle and force the links inline,
     regardless of the <details> open state. */
  .nav-toggle { display: none; }
  .nav-menu::details-content { content-visibility: visible; } /* Chromium's details wrapper */
  .nav-menu nav {
    display: block;
    position: static;
    background: none;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .nav-links { flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 2rem; }
  .nav-links li { flex-shrink: 0; }
  .nav-links a { font-size: 0.75rem; }
  .nav-links details.dropdown summary { font-size: 0.75rem; }
  /* Restore the desktop popover for the Shop Online submenu. */
  .nav-menu nav .nav-links details.dropdown ul {
    position: absolute;
    right: 0;
    margin: 0;
    text-align: left;
  }
  .hero { grid-template-columns: 1fr 1fr; gap: 4rem; min-height: 80vh; }
  .hero-media { order: 0; }
  .headshot { float: left; width: 160px; height: 160px; margin: 0 2rem 1rem 0; }
}
