/* ===========================================================================
   buylineart.com — early collection
   Shared stylesheet for the storefront and the legal pages.

   Design tokens are copied from the main app's assets/variables.css so this
   site and buylineart.com stay the same product to look at.
   =========================================================================== */

/* Inter, self-hosted. Google's CDN would send every visitor's IP address to
   Google on page load, which is a data transfer we would then have to justify
   and disclose. Serving it ourselves means the page makes no third-party
   request at all. One variable file covers every weight. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter.woff2') format('woff2');
}

:root {
  --color-primary: #001f3f;
  --color-primary-hover: #003d7a;

  --color-paid: #f5b400;
  --color-paid-dark: #b8922a;

  --color-success: #28a745;
  --color-success-bg: #d1fae5;

  --color-text: #333;
  --color-text-secondary: #666;
  --color-text-muted: #888;

  --color-border: #e0e0e0;
  --color-border-light: #ddd;

  --color-bg: #fafafa;
  --color-bg-subtle: #f8f9fa;
  --color-bg-hover: #f5f5f5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

body.modal-open { overflow: hidden; }

/* Placeholders the operator still has to fill in. Deliberately loud — an
   unfilled legal detail must not be able to slip quietly into production. */
.todo {
  background: #fff3cd;
  border-bottom: 2px dotted var(--color-paid-dark);
  padding: 0 4px;
  font-weight: 600;
  color: #6b5200;
}

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.header-section {
  max-width: 720px;
  margin: 20px auto;
  padding: 32px;
  text-align: center;
  position: sticky;
  top: 20px;
  background: white;
  z-index: 100;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

h1 {
  margin: 0 0 14px 0;
  color: var(--color-primary);
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
}
.h1-prefix { font-weight: 400; }

.header-tagline {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

/* The certificate rule from the app's Licenses page. */
.cert-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 18px auto;
  max-width: 220px;
}
.cert-rule-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
}
.cert-rule-diamond {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--color-paid);
  flex: 0 0 auto;
}

.header-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.header-badge svg { width: 13px; height: 13px; color: var(--color-paid-dark); }

/* The header sticks to the top of the viewport, so its height is taken out of
   the artwork for the whole scroll. On a phone the full version costs roughly
   a third of the screen, which is why almost all of it is dropped below 640px
   in favour of the single compact line. */
.header-tagline--compact { display: none; }

@media (max-width: 640px) {
  .header-section {
    margin: 12px 14px;
    padding: 18px 20px;
    top: 12px;
    border-radius: 18px;
  }
  h1 { font-size: 21px; margin-bottom: 8px; }
  .h1-prefix { display: none; }

  .header-tagline { display: none; }
  .header-tagline--compact {
    display: block;
    font-size: 12.5px;
    line-height: 1.5;
  }

  .cert-rule,
  .header-badges { display: none; }

  .gallery-section { padding: 12px 14px 40px; }
  .waitlist-section { margin: 0 14px 40px; padding: 26px 20px; border-radius: 18px; }
  .site-footer { padding: 28px 20px; }
}

/* ---------------------------------------------------------------------------
   Gallery
   --------------------------------------------------------------------------- */
.gallery-section {
  padding: 20px 30px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.mosaic { column-count: 4; column-gap: 20px; }
@media (max-width: 1200px) { .mosaic { column-count: 3; } }
@media (max-width: 820px)  { .mosaic { column-count: 2; } }
@media (max-width: 520px)  { .mosaic { column-count: 1; } }

.image-card {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: white;
  margin-bottom: 20px;
  break-inside: avoid;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.4s ease;
}
.image-card:hover {
  /* The springy overshoot belongs to the hover lift alone. */
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}
.image-card:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }

/* The card is a <button>, so its inner <span>s need to be told to be blocks. */
.image-wrapper {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}
.image-wrapper svg,
.image-wrapper img { width: 100%; height: auto; display: block; }

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 28px 16px 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.image-card:hover .image-overlay,
.image-card:focus-visible .image-overlay { opacity: 1; }

.image-title { display: block; color: white; font-size: 16px; font-weight: 600; margin: 0 0 4px 0; }
.image-price { display: block; color: white; font-size: 14px; margin: 0; font-weight: 500; }

/* Paid marker — the price tag, in the app's antique gold. */
.paid-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.paid-badge svg { width: 16px; height: 16px; color: var(--color-paid); }

/* ---------------------------------------------------------------------------
   Waitlist
   --------------------------------------------------------------------------- */
.waitlist-section {
  max-width: 720px;
  margin: 0 auto 60px;
  padding: 32px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  text-align: center;
}
.waitlist-section h2 { font-size: 22px; color: var(--color-primary); margin-bottom: 8px; }
.waitlist-section p {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.waitlist-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; flex-wrap: wrap; }
.waitlist-form input[type="email"] {
  flex: 1 1 220px;
  height: 48px;
  padding: 0 20px;
  border: 2px solid var(--color-border);
  border-radius: 50px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}
.waitlist-form input[type="email"]:focus { border-color: var(--color-primary); }
.waitlist-hp { position: absolute; left: -9999px; }
.waitlist-error {
  margin: 14px auto 0;
  max-width: 460px;
  font-size: 13px;
  line-height: 1.55;
  color: #b42318;
  background: #fff5f5;
  border: 1px solid #ffc0c0;
  border-radius: 10px;
  padding: 10px 14px;
}
.waitlist-error[hidden] { display: none; }
.waitlist-error a { color: #b42318; }

.waitlist-consent {
  font-size: 11.5px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 14px auto 0;
  max-width: 460px;
}
.waitlist-consent a { color: var(--color-text-secondary); }

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.bl-button {
  padding: 12px 24px;
  border: 2px solid var(--color-primary);
  background: white;
  font-family: inherit;
  font-size: 16px;
  color: var(--color-primary);
  cursor: pointer;
  outline: none;
  border-radius: 50px;
  transition: all 0.2s ease;
  font-weight: 500;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.bl-button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.bl-button:active { transform: scale(0.98); }

.bl-button--solid { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.bl-button--solid:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }

.bl-button[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* ---------------------------------------------------------------------------
   Modal
   --------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-root[hidden] { display: none; }
.modal-root.is-open .modal-overlay { opacity: 1; }

.modal-container {
  background: white;
  border-radius: 16px;
  max-width: 960px;
  max-height: 90vh;
  width: 95%;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 8px)) scale(0.97);
  opacity: 0;
  overflow: hidden;
  z-index: 10002;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.modal-root.is-open .modal-container { transform: translate(-50%, -50%) scale(1); opacity: 1; }
@media (min-width: 768px) { .modal-container { flex-direction: row; width: 90%; } }
@media (min-width: 1024px) { .modal-container { width: 85%; } }

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  background: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  color: var(--color-text);
}
.close-button:hover { background: var(--color-bg-hover); transform: scale(1.1); }

.image-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  padding: 40px;
  position: relative;
  /* The info column's content drives the modal height; a tall portrait must
     not push the row taller. */
  overflow: hidden;
  min-height: 0;
}
.modal-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}
.modal-image-container svg,
.modal-image-container img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.info-section {
  flex: 0 0 400px;
  padding: 24px;
  overflow-y: auto;
  background: white;
  position: relative;
}
@media (max-width: 767px) {
  .image-section { padding: 24px; flex: 0 0 34vh; }
  .info-section { flex: 1 1 auto; }
}

.step-content[hidden] { display: none; }

.modal-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px 0;
  /* Clear of the close button, which floats over this column. */
  padding-right: 44px;
  color: var(--color-primary);
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.2;
}
.modal-artist { font-size: 13px; color: var(--color-text-muted); margin-bottom: 24px; }

.info-group { margin-bottom: 24px; }
.info-group h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  margin: 0 0 12px 0;
}
.info-text { font-size: 14px; line-height: 1.6; color: var(--color-text-secondary); }

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 500; color: var(--color-text-secondary); flex: 0 0 auto; }
.detail-value { color: #1a1a1a; text-align: right; }

.format-pills { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.format-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--color-primary);
}

.license-value { display: inline-flex; align-items: center; gap: 6px; }
.license-info-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--color-border-light);
  background: white;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.license-info-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

.price-line { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.price-amount { font-size: 26px; font-weight: 700; color: var(--color-primary); }
.price-note { font-size: 12px; color: var(--color-text-muted); }

.action-buttons { display: flex; flex-direction: column; gap: 10px; }
.action-buttons .bl-button { width: 100%; }

/* Step 2 — license review. The whole step has to fit a laptop viewport without
   the reader hunting for the checkout button, so the spacing is tighter than
   step 1 and the action row is pinned to the bottom of the column. */
.step-title { font-size: 20px; font-weight: 700; color: var(--color-primary); margin-bottom: 4px; padding-right: 44px; }
.step-subtitle { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 18px; }

#step2 .info-group { margin-bottom: 18px; }
#step2 .info-group h3 { margin-bottom: 8px; }

.license-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.license-item { display: flex; gap: 10px; align-items: flex-start; }
.license-item svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; }
.license-item--allow svg { color: var(--color-success); }
.license-item--limit svg { color: var(--color-text-muted); }
.license-item-title { display: block; font-size: 13.5px; font-weight: 600; color: #1a1a1a; }
.license-item-desc { display: block; font-size: 12.5px; line-height: 1.45; color: var(--color-text-secondary); margin-top: 1px; }

.license-notice {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.license-notice a { color: var(--color-text-secondary); }

.agree-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--color-text-secondary);
  line-height: 1.45;
  cursor: pointer;
}
.agree-row input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--color-primary); flex: 0 0 auto; }
.agree-row a { color: var(--color-primary); }

/* Pinned so the button is reachable whatever the viewport does. */
.step-actions {
  position: sticky;
  bottom: -24px;
  background: white;
  padding: 12px 0 24px;
  margin-top: 12px;
}
.step-actions::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 18px;
  background: linear-gradient(to top, white, rgba(255, 255, 255, 0));
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Mini dialog — the waitlist confirmation. Same shell as the purchase dialog,
   but a single narrow column rather than the image/info pair.
   --------------------------------------------------------------------------- */
.modal-container--mini {
  max-width: 440px;
  width: 92%;
  max-height: none;
}
@media (min-width: 768px) {
  .modal-container--mini { flex-direction: column; width: 92%; }
}
@media (min-width: 1024px) {
  .modal-container--mini { width: 92%; }
}

.mini-body { padding: 44px 34px 34px; text-align: center; }

.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--color-success-bg, #d1fae5);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon svg { width: 28px; height: 28px; }

.mini-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.mini-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--color-text-secondary);
}
.mini-text strong { color: #1a1a1a; word-break: break-all; }

.mini-fineprint {
  font-size: 12px;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin-bottom: 22px;
}
.mini-fineprint a { color: var(--color-text-secondary); }

.mini-done { width: 100%; }

.back-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  justify-content: center;
}
.back-link:hover { color: var(--color-primary); }

/* ---------------------------------------------------------------------------
   Site footer — a plain white band carrying the legal links. As a German
   trader the Impressum has to be reachable from every page, so this footer is
   repeated verbatim on all of them.
   --------------------------------------------------------------------------- */
.site-footer {
  background: white;
  border-top: 1px solid var(--color-border);
  padding: 40px 30px;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: baseline;
  justify-content: space-between;
}
.footer-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}
.footer-brand span { display: block; font-size: 12px; font-weight: 400; color: var(--color-text-muted); margin-top: 4px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a {
  font-size: 13px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--color-primary); text-decoration: underline; }

.footer-legal {
  max-width: 1000px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------------
   Legal pages
   --------------------------------------------------------------------------- */
.legal-main { max-width: 800px; margin: 0 auto; padding: 24px 24px 60px; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0 20px;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
}
.legal-back:hover { color: var(--color-primary); }

.legal-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 48px;
}
@media (max-width: 600px) { .legal-card { padding: 28px 22px; } }

.legal-card h1 { text-align: center; font-size: 30px; margin-bottom: 10px; }
.legal-updated { text-align: center; font-size: 13px; color: var(--color-text-muted); }

.legal-card h2 {
  font-size: 18px;
  color: var(--color-primary);
  margin: 36px 0 12px;
  font-weight: 700;
}
.legal-card h3 {
  font-size: 15px;
  color: var(--color-primary);
  margin: 22px 0 8px;
  font-weight: 600;
}
.legal-card p,
.legal-card li {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--color-text);
}
.legal-card p { margin-bottom: 14px; }
.legal-card ul, .legal-card ol { margin: 0 0 16px 22px; }
.legal-card li { margin-bottom: 8px; }
.legal-card a { color: var(--color-primary); }
.legal-card strong { color: #1a1a1a; }

.legal-intro {
  font-size: 15px;
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.legal-box {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 18px 0;
}
.legal-box p:last-child { margin-bottom: 0; }

.legal-box--flag {
  background: #fff8e6;
  border-color: #ffe08a;
}

.legal-contact {
  font-size: 14.5px;
  line-height: 1.9;
  margin-bottom: 14px;
}

table.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  font-size: 13.5px;
}
table.legal-table th,
table.legal-table td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}
table.legal-table th { background: var(--color-bg-subtle); font-weight: 600; color: var(--color-primary); }
.table-scroll { overflow-x: auto; }

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