@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Instrument+Serif&display=swap");

:root {
  --fg: #1a1a1a;
  --fg-muted: #6b6b6b;
  --fg-faint: #999;
  --bg: #fafafa;
  --surface: #fff;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --accent: #1a1a1a;
  --accent-soft: #f5f5f5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

body {
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--fg);
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

a:hover {
  text-decoration-color: var(--fg);
}

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

*, *::before, *::after {
  min-width: 0;
}

/* ---- Page backdrop (disabled) ---- */
.page-backdrop {
  display: none;
}

/* ---- Layout shells ---- */
.page-shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 32px 24px;
  position: relative;
}

.private-shell {
  margin: 0 auto;
  max-width: 440px;
  min-height: 100vh;
  padding: 32px 20px;
  position: relative;
}

.private-main {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 64px);
}

.page-content {
  display: grid;
  gap: 32px;
}

/* ---- Shared card styles ---- */
.site-header,
.site-footer,
.hero-panel,
.info-strip,
.info-card,
.auction-card,
.form-panel,
.auth-card,
.live-panel,
.stat-card,
.comment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.site-header,
.site-footer,
.hero-panel,
.info-strip,
.form-panel,
.auth-card,
.live-panel,
.info-card {
  padding: 28px;
}

/* ---- Header ---- */
.site-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 32px;
}

.brand-lockup {
  max-width: 520px;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
}

.brand-mark strong,
.hero-panel h1,
.detail-hero h1,
.panel-intro h1,
.info-card h2,
.auth-card h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

.brand-mark strong {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-kicker,
.eyebrow {
  color: var(--fg-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-tagline,
.hero-text,
.detail-text,
.subtle-copy,
.photo-note {
  color: var(--fg-muted);
}

.brand-tagline {
  font-size: 0.88rem;
  margin: 4px 0 0;
}

/* ---- Nav ---- */
.site-nav,
.hero-actions,
.detail-tags,
.auction-card__actions,
.inline-actions,
.auth-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-nav form,
.inline-actions form,
.invite-card form {
  margin: 0;
}

.button_to {
  display: inline-flex;
  width: auto;
}

.button_to button {
  all: unset;
  background: inherit;
  border: inherit;
  border-radius: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: inherit;
  padding: inherit;
  width: 100%;
}

.nav-pill,
.tag {
  background: var(--accent-soft);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 500;
  gap: 6px;
  padding: 7px 12px;
  text-decoration: none;
  transition: background 0.15s;
}

.nav-pill:hover {
  background: var(--border);
}

.nav-pill--accent,
.status-pill--live {
  background: var(--fg);
  border-color: var(--fg);
  color: #fff;
}

.nav-pill--accent:hover {
  background: #333;
}

.nav-pill--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--fg);
}

.nav-pill--soft {
  background: var(--accent-soft);
  color: var(--fg-muted);
}

/* ---- Mobile menu toggle ---- */
.menu-toggle {
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 4px;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.menu-toggle__bar {
  background: var(--fg);
  border-radius: 1px;
  display: block;
  height: 2px;
  width: 18px;
}

/* ---- Flash ---- */
.flash-banner {
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 20px;
  padding: 12px 16px;
}

.flash-banner--notice {
  background: #f0faf6;
  border: 1px solid #d0eadf;
  color: #1a6b47;
}

.flash-banner--alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ---- Hero ---- */
.hero-panel,
.detail-hero {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
}

.hero-panel--compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.hero-panel h1,
.detail-hero h1,
.panel-intro h1,
.auth-card h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 8px 0 12px;
}

.info-card h2,
.panel-intro p,
.detail-copy p:first-child {
  margin-top: 0;
}

.info-card h2 {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.detail-headline,
.auction-card__headline {
  color: var(--fg-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* ---- Stats ---- */
.hero-stats,
.auction-grid,
.member-list,
.invite-list {
  display: grid;
  gap: 12px;
}

.hero-stats {
  align-self: center;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  padding: 20px;
}

.stat-value {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1;
}

.stat-label {
  color: var(--fg-muted);
  font-size: 0.82rem;
}

/* ---- Info strip ---- */
.info-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.92rem;
  gap: 16px;
  justify-content: space-between;
}

/* ---- Auction grid ---- */
.auction-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.auction-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auction-card .gallery-shell {
  flex-shrink: 0;
}

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

.auction-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 12px;
  padding: 20px;
}

.auction-card__actions {
  margin-top: auto;
}

.auction-card__status-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.auction-card__status-row .eyebrow {
  margin: 0;
}

.auction-metrics,
.section-heading,
.member-card,
.invite-card,
.comment-card header,
.live-panel__top {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.auction-card__title {
  text-decoration: none;
}

.auction-card__meta {
  color: var(--fg-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* ---- Status pills ---- */
.status-pill,
.countdown-chip {
  border-radius: 6px;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  white-space: nowrap;
}

.status-pill--upcoming {
  background: #f0f4ff;
  color: #3b5998;
}

.status-pill--ended {
  background: var(--accent-soft);
  color: var(--fg-muted);
}

.countdown-chip {
  background: var(--accent-soft);
  color: var(--fg-muted);
}

/* ---- Card display ---- */
.card-display {
  align-items: center;
  display: flex;
  gap: 14px;
}

.card-brand-logo {
  flex-shrink: 0;
  height: 36px;
  width: 54px;
}

.card-number {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
}

.card-label {
  color: var(--fg-muted);
  font-size: 0.82rem;
  margin: 2px 0 0;
}

/* ---- Metrics ---- */
.auction-metrics {
  align-items: stretch;
  gap: 8px;
}

.auction-metrics > div,
.stacked-facts > div {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
}

.stacked-facts {
  display: grid;
  gap: 10px;
}

.auction-metrics dt,
.stacked-facts dt {
  color: var(--fg-faint);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auction-metrics dd,
.stacked-facts dd {
  font-size: 1rem;
  font-weight: 600;
  margin: 4px 0 0;
}

/* ---- Disclaimer / warning ---- */
.auction-card__disclaimer,
.warning-copy {
  color: #b45309;
  font-size: 0.85rem;
  margin: 0;
}

/* ---- Bid highlight ---- */
.bid-highlight {
  display: grid;
  gap: 4px;
}

.bid-highlight strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1;
}

.split-copy,
.group-snapshot p,
.locked-profile p {
  margin: 0;
}

/* ---- Gallery ---- */
.gallery-shell {
  aspect-ratio: 4 / 3;
  background: var(--accent-soft);
  overflow: hidden;
  position: relative;
}

.gallery-shell--large {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
}

.gallery-track,
.gallery-slide {
  height: 100%;
}

.gallery-slide {
  display: none;
}

.gallery-slide.is-active {
  display: block;
}

.gallery-slide img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.gallery-button {
  background: rgba(0, 0, 0, 0.5);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  height: 36px;
  opacity: 0;
  position: absolute;
  top: calc(50% - 18px);
  transition: opacity 0.2s;
  width: 36px;
}

.gallery-shell:hover .gallery-button {
  opacity: 1;
}

.gallery-button--prev {
  left: 10px;
}

.gallery-button--next {
  right: 10px;
}

/* ---- Detail layout ---- */
.detail-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
}

.detail-main,
.detail-rail {
  display: grid;
  gap: 24px;
}

/* ---- Lists ---- */
.pill-list,
.plain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill-list li {
  background: var(--accent-soft);
  border-radius: 6px;
  font-size: 0.85rem;
  padding: 6px 12px;
}

/* ---- Forms ---- */
.stack-form,
.comment-form,
.bid-form {
  display: grid;
  gap: 16px;
}

.field-stack {
  display: grid;
  gap: 6px;
}

.field-stack label {
  font-size: 0.85rem;
  font-weight: 500;
}

.field-stack input,
.field-stack textarea {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font: inherit;
  padding: 10px 14px;
  transition: border-color 0.15s;
  width: 100%;
}

.field-stack input:focus,
.field-stack textarea:focus {
  border-color: var(--fg);
  outline: none;
}

/* ---- Locked / snapshot cards ---- */
.locked-profile,
.group-snapshot,
.error-card {
  background: var(--accent-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  padding: 14px;
}

/* ---- Buttons ---- */
.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  justify-content: center;
  padding: 10px 18px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.button--primary {
  background: var(--fg);
  color: #fff;
}

.button--primary:hover {
  background: #333;
}

.button--secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--fg);
}

.button--secondary:hover {
  background: var(--accent-soft);
}

.button--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--fg-muted);
}

.button--ghost:hover {
  background: var(--accent-soft);
}

.button--small {
  font-size: 0.82rem;
  padding: 7px 12px;
}

.button--accept {
  background: #059669;
  color: #fff;
}

.button--accept:hover {
  background: #047857;
}

.button--decline {
  background: #dc2626;
  color: #fff;
}

.button--decline:hover {
  background: #b91c1c;
}

.button--full {
  width: 100%;
}

.invite-actions {
  display: flex;
  gap: 12px;
}

.invite-actions .button_to button {
  all: unset;
  cursor: pointer;
  display: block;
}

/* ---- Members / invites / comments ---- */
.member-list,
.invite-list,
.comment-list {
  display: grid;
  gap: 10px;
}

.member-card {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 14px;
}

.invite-card,
.comment-card {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.invite-card--stacked {
  align-items: flex-start;
}

.comment-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
}

.comment-form {
  margin-bottom: 8px;
}

.comment-list {
  margin-top: 8px;
}

.comment-card p {
  margin-bottom: 0;
}

/* ---- Checkbox ---- */
.checkbox-row {
  align-items: center;
  display: flex;
  font-size: 0.92rem;
  gap: 8px;
}

/* ---- Auth links ---- */
.auth-links {
  justify-content: center;
  margin-top: 16px;
}

.auth-links a {
  color: var(--fg-muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.auth-links a:hover {
  color: var(--fg);
}

/* ---- Footer ---- */
.site-footer {
  color: var(--fg-faint);
  font-size: 0.85rem;
  margin-top: 32px;
  text-align: center;
}

/* ---- Winning badge ---- */
.winning-badge {
  background: linear-gradient(135deg, #34d399, #059669);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  padding: 12px 16px;
  text-align: center;
}

/* ---- Bid flash animation ---- */
@keyframes bid-flash {
  0%, 60% { background: #d4edda; color: #155724; }
  100% { background: transparent; color: inherit; }
}

.bid-flash {
  animation: bid-flash 8s ease-out;
  border-radius: var(--radius-sm);
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero-panel,
  .detail-hero,
  .detail-grid,
  .hero-panel--compact {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px;
  }

  .private-shell {
    padding: 16px;
  }

  .site-header,
  .hero-panel,
  .info-strip,
  .info-card,
  .auction-card,
  .form-panel,
  .auth-card,
  .live-panel {
    padding: 18px;
  }

  .brand-mark strong,
  .hero-panel h1,
  .detail-hero h1,
  .panel-intro h1,
  .auth-card h1 {
    font-size: 1.8rem;
  }

  .brand-tagline {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    gap: 6px;
    left: 16px;
    padding: 12px;
    position: absolute;
    right: 16px;
    top: 100%;
    z-index: 100;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-header {
    position: relative;
  }

  .nav-pill,
  .button,
  .button_to {
    width: 100%;
  }

  .auction-card__status-row,
  .auction-metrics,
  .section-heading,
  .member-card,
  .invite-card,
  .comment-card header,
  .live-panel__top {
    align-items: flex-start;
    flex-direction: column;
  }
}
