/* Gotta Have It Consignments — demo marketing site
   Hand-written CSS, no build step, no framework. */

/* Self-hosted variable fonts (SIL OFL — licenses in assets/fonts/), latin subset only.
   Libre Baskerville: headings — Baskerville-style serif that echoes the "Gotta Have It!" logo wordmark.
   Figtree: body/UI — friendly, highly legible sans. */
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/libre-baskerville-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/fonts/figtree-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --red: #c8102e;
  --red-dark: #9c0c23;
  --gold: #f0c419;
  --mustard: #b98a00;
  --gold-dark: #d9ad0f;
  --ink: #221a1c;
  --ink-soft: #5a4e50;
  --paper: #fdfaf6;
  --paper-dim: #f3ece4;
  --line: #e7dcd2;
  --radius: 10px;
  --wrap: 1120px;
  --shadow: 0 10px 30px -14px rgba(34, 26, 28, 0.35);
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Libre Baskerville", Baskerville, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
/* iPhone/iPad: follow the device's text size setting (Settings > Display & Brightness > Text Size).
   Safari ignores it unless the root font is -apple-system-body; everything is sized in rem, so the
   whole page scales with it. Default size there is 17px, which matches the body size below.
   (-webkit-touch-callout limits this to iOS; on macOS Safari -apple-system-body is a tiny 13px.)
   Android Chrome already applies the system font size on its own. */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html { font: -apple-system-body; }
  html body { font-size: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.65rem, 1.25rem + 1.55vw, 2.45rem); }
h3 { font-size: 1.1rem; letter-spacing: 0; }
p { margin: 0 0 1em; color: var(--ink-soft); text-wrap: pretty; }
strong { color: var(--ink); font-weight: 700; }
.nowrap { white-space: nowrap; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 200;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid transparent;
  max-width: 100%;
  overflow-wrap: anywhere; /* long email addresses wrap instead of overflowing on large text */
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover { background: var(--red-dark); }
.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--ink);
}
.btn-outline:hover { background: var(--paper-dim); }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

/* Store news bar (marquee). Static text without JS / with reduced motion;
   news.js adds .is-scrolling and a pause button. */
.news-bar {
  background: var(--gold);
  color: var(--ink);
  border-bottom: 1px solid var(--gold-dark);
  font-size: 1.0625rem;
  font-weight: 600;
}
.news-bar[hidden] { display: none; }
.news-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding-block: 0.55rem;
}
.news-label {
  flex: none;
  background: var(--red);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}
.news-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.news-group {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  line-height: 1.4;
}
.news-bar.is-scrolling .news-viewport {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 1.5rem, #000 calc(100% - 1.5rem), transparent);
  mask-image: linear-gradient(to right, transparent, #000 1.5rem, #000 calc(100% - 1.5rem), transparent);
}
.news-bar.is-scrolling .news-track {
  display: flex;
  width: max-content;
  animation: news-scroll var(--news-duration, 30s) linear infinite;
}
.news-bar.is-scrolling .news-group {
  flex: none;
  flex-wrap: nowrap;
  gap: 0;
  white-space: nowrap;
}
.news-bar.is-scrolling .news-group li {
  padding-inline-end: 3rem;
}
.news-bar.is-scrolling .news-group li::before {
  content: "\2605"; /* star separator */
  color: var(--red);
  margin-inline-end: 0.75rem;
}
/* Pause: tap/click toggles .is-paused (news.js), keyboard focus pauses, and a mouse hover pauses.
   Hover is limited to real mice so a tap on a phone doesn't leave it stuck paused. */
.news-bar.is-paused .news-track,
.news-viewport:focus .news-track { animation-play-state: paused; }
@media (hover: hover) {
  .news-viewport:hover .news-track { animation-play-state: paused; }
}
.news-bar.is-scrolling .news-viewport { cursor: default; }
.news-viewport:focus { outline: none; }
.news-viewport:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
@keyframes news-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Consignor news bar: same marquee, red instead of gold */
.news-bar--consignor {
  background: var(--red);
  color: #fff;
  border-bottom-color: var(--red-dark);
}
.news-bar--consignor .news-label {
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
}
.news-bar--consignor .news-label:hover { background: var(--gold-dark); }
.news-bar--consignor.is-scrolling .news-group li::before { color: var(--gold); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 0.6rem;
}
.brand-logo {
  height: 56px;
  width: auto;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-inline-start: auto;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--red); }
.site-nav a.nav-nu:hover { color: var(--mustard); }

.nav-toggle-input { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 28px;
  cursor: pointer;
  margin-inline-start: auto;
}
.nav-toggle span {
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Anchor links land just below the sticky header (header is ~76px tall) */
section[id],
#consignor-login { scroll-margin-top: 4.8rem; }

/* Hero */
.hero {
  /* TEMP: Unsplash placeholder photo (free license) until Jim sends real store photography — see HTML comment above the hero section. */
  background:
    linear-gradient(160deg, rgba(34, 26, 28, 0.55) 0%, rgba(34, 26, 28, 0.75) 100%),
    url("https://images.unsplash.com/photo-1492138645880-160f6a5136fa?auto=format&fit=crop&w=1920&q=70") center / cover no-repeat;
  color: #fff;
  padding-block: clamp(3rem, 6vw, 6rem);
}
.hero .btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.hero .btn-primary:hover { background: var(--gold-dark); }
.hero-inner { max-width: 720px; }
.hero h1 {
  font-size: clamp(2rem, 1.45rem + 3.25vw, 3.85rem);
  hyphens: auto; /* safety net: a long word on a phone with large text breaks instead of overflowing */
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
}
.hero-sub {
  color: #fbe3e3;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.hero .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.hero .btn-outline:hover { background: rgba(255,255,255,0.12); }

/* Sections */
section { padding-block: clamp(3rem, 5vw, 4.5rem); }
.section-lede {
  max-width: 60ch;
  font-size: 1.125rem;
}

/* Locations */
.locations {
  background: var(--paper);
  border-top: 6px solid var(--red);
}
.locations h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 0.6rem;
  background: var(--red);
  border-radius: 2px;
}
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.locations-email {
  text-align: center;
  margin: 2rem auto 0;
  max-width: 46ch;
}
.locations-email a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}
.locations-email a:hover { text-decoration: underline; }
.location-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.location-photo {
  aspect-ratio: 16 / 10;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--paper-dim);
  border-bottom: 1px solid var(--line);
}
.location-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.location-body h3 { margin-bottom: 0.35em; }
.location-addr {
  margin-bottom: 0;
  min-height: 3.2em; /* exactly two lines, so hours boxes line up across cards */
}
.location-addr a { text-decoration: none; }
.location-addr a:hover { text-decoration: underline; }
.location-hours {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0.5rem 0 0.85rem;
  padding: 0.6rem 0.75rem;
  background: var(--paper-dim);
  border-radius: 8px;
}
.hours-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 700;
}
.hours-line {
  font-weight: 700;
  font-size: 0.95rem;
}
.location-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 2.6rem; /* same height with or without a login button */
  margin-top: auto;
  padding-top: 0.5rem;
}
.location-link {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  color: var(--red);
}
.location-link:hover { text-decoration: underline; }
.location-login {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 2px solid var(--red);
  border-radius: 999px;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.location-login:hover {
  background: var(--red);
  color: #fff;
}

/* Carry / tags */
.carry { background: var(--paper-dim); }
.photo-disclaimer { font-size: 0.95rem; color: var(--ink-soft); max-width: 62ch; margin-top: 0.5rem; }
.photo-disclaimer a { color: var(--red); font-weight: 600; }
.carry-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.carry-grid li {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-dim);
  box-shadow: var(--shadow);
}
.carry-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carry-grid span {
  position: absolute;
  inset: auto 0 0;
  padding: 2.5rem 0.9rem 0.8rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(to top, rgba(34, 26, 28, 0.82), rgba(34, 26, 28, 0));
}

/* Recent finds — sideways-scrolling photo strip (CSS only) */
.finds { margin-top: 3rem; }
.finds h3 { font-size: 1.35rem; margin-bottom: 0.25em; }
.finds-note { font-size: 0.95rem; margin-bottom: 1rem; }
.finds-strip {
  list-style: none;
  margin: 0;
  padding: 0 0 0.85rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(140px, 17vw, 200px);
  gap: 0.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-soft) var(--line);
  cursor: grab;
}
/* Keep the scrollbar visible on macOS, where overlay scrollbars hide it */
.finds-strip::-webkit-scrollbar { height: 8px; }
.finds-strip::-webkit-scrollbar-track { background: var(--line); border-radius: 4px; }
.finds-strip::-webkit-scrollbar-thumb { background: var(--ink-soft); border-radius: 4px; }
.finds-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.finds-strip.is-dragging img { pointer-events: none; }
.finds-carousel { position: relative; }
.finds-btn {
  position: absolute;
  top: calc(50% - 0.45rem); /* centre on the photos, not the scrollbar below them */
  transform: translateY(-50%);
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
  font: 700 1.15rem/1 var(--font);
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.12s ease, color 0.12s ease;
}
.finds-btn[hidden] { display: none; }
.finds-prev { left: 0.5rem; }
.finds-next { right: 0.5rem; }
.finds-btn:hover { background: var(--ink); color: #fff; }
.finds-btn:disabled { opacity: 0; pointer-events: none; }
.finds-strip li {
  scroll-snap-align: start;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}
.finds-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Nu Furniture */
.nu {
  background: var(--ink);
  color: var(--paper-dim);
}
.nu h2 { color: #fff; }
.nu p { color: #d9ccc4; }
.nu strong { color: #fff; }
.nu-inner {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 3rem;
  align-items: center;
}
.nu-logo {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  margin-bottom: 1.25rem;
}
.nu-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.nu .btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.nu .btn-primary:hover { background: var(--gold-dark); }
.nu .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.nu .btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.nu-gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.nu-gallery li {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #3a2f31;
}
.nu-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sell with us */
.sell-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}
.sell-logins {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sell-logins h3 { margin-bottom: 0.25rem; }
.sell-actions { margin-top: 1.5rem; }
.consignor-news {
  margin-top: 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.consignor-news[hidden] { display: none; }
.consignor-news h3 { margin-bottom: 0.5rem; }
.consignor-news ul { margin: 0; padding-left: 1.2rem; }
.consignor-news li + li { margin-top: 0.4rem; }

/* Contact */
.contact { background: var(--paper-dim); }
.contact-inner { text-align: center; }
.contact p { margin-inline: auto; max-width: 50ch; }

/* Footer */
.site-footer {
  background: var(--red);
  color: #fff;
}
.site-footer p { color: #fde8ea; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  padding-block: 3rem;
}
.footer-brand img { height: 48px; width: auto; }
.footer-col h3 {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.6em;
}
.footer-col a { color: #fff; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-block: 1.25rem;
  font-size: 0.85rem;
  color: #fde8ea;
}
.footer-bottom p { margin: 0; }

/* Responsive nav — hamburger below 1080px (the nav is too long to fit beside the logo) */
@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.5rem;
    gap: 0.85rem;
    display: none;
  }
  .nav-toggle-input:checked ~ .site-nav {
    display: flex;
  }
}

@media (max-width: 780px) {
  .sell-inner { grid-template-columns: 1fr; }
  .nu-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .carry-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  /* Phones: "Store News" -> "News", "Consignor News" -> "Consignor" to leave room for the message */
  .news-label-extra { display: none; }
  .news-inner { gap: 0.5rem; }
  .news-label { letter-spacing: 0.04em; padding-inline: 0.6rem; }
}

@media (max-width: 500px) {
  .footer-inner { grid-template-columns: 1fr; }
  .carry-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
