:root {
  --ink: #0b0b0b;
  --muted: #6d6d69;
  --paper: #fff;
  --white: #fff;
  --surface: #f6f6f3;
  --line: #e8e8e4;
  --accent: #b30000; /* Ford-inspired red, used sparingly */
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Chamfered-corner shape language (from the OPT2 exploration) --
     angled cuts instead of pill/round corners. Two sizes: --cut for
     buttons/inputs/thumbnails, --cut-lg for bigger surfaces like the
     modal and cards. */
  --cut: 12px;
  --cut-lg: 20px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  /* Safety net: nothing on the page should ever push it wider than the
     viewport. The real fix for the known cause (the horizontally-
     scrolling bid history) is the min-width: 0 on .placement-info below,
     but this keeps any future overflow from dragging the whole page
     sideways instead of just the element that caused it. */
  overflow-x: hidden;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

a {
  color: inherit;
}

h1, h2, h3 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.nav-cta {
  text-decoration: none;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 0;
  text-align: center;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(48px, 9vw, 108px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero-title span {
  display: block;
}

.hero-sub {
  margin: 26px auto 0;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.progress-block {
  max-width: 640px;
  margin: 48px auto 0;
  text-align: left;
}

.progress-numbers {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.progress-raised {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.progress-target {
  font-size: 13px;
  color: var(--muted);
}

.progress-bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ends-row {
  display: inline-flex;
  gap: 6px;
}

.ends-label {
  color: var(--muted);
}

#countdown {
  color: var(--ink);
  font-weight: 700;
}

.hero-art {
  margin: 56px 0 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  max-width: 1400px;
  max-height: 560px;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.hero-diagram {
  width: min(100%, 980px);
  height: auto;
  color: var(--line);
  padding: 28px 0;
}

.hero-zone {
  fill: var(--ink);
  fill-opacity: 0.08;
  stroke: none;
}

.hero-cta-wrap {
  margin: 40px 0 96px;
  display: flex;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  padding: 15px 24px;
  border: none;
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- Auction section ---------- */

.auction {
  padding: 88px 0 96px;
}

.section-title {
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-top: 8px;
}

.section-sub {
  margin-top: 18px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}

.placement-list {
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

.loading-row,
.error-row {
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}

.placement-row {
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}

.placement-main {
  display: grid;
  grid-template-columns: 168px 1fr auto;
  gap: 20px;
  align-items: center;
}

.placement-art {
  width: 168px;
  height: 110px;
  color: var(--line);
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  overflow: hidden;
  background: var(--surface);
}

.placement-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placement-art .zone-fill {
  fill: var(--ink);
  fill-opacity: 0.92;
  stroke: none;
}

.placement-info {
  /* Grid/flex items size to their content's natural width by default,
     and .history-scroll's horizontally-scrolling row of bids has a very
     wide natural width. Without this, that width leaks out into the
     grid column and pushes the whole page into horizontal scroll --
     this is what actually keeps the scrolling contained to the history
     strip itself. */
  min-width: 0;
}

.placement-info .placement-number {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.placement-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.placement-tagline {
  margin-top: 3px;
  font-size: 14px;
  color: var(--muted);
}

.placement-visibility {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.placement-visibility strong {
  color: var(--ink);
  font-weight: 700;
}

.placement-holder {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.holder-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.holder-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.holder-badge span {
  font-size: 12px;
  font-weight: 800;
}

.holder-text {
  line-height: 1.25;
}

.holder-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
}

.holder-name {
  font-size: 13px;
  font-weight: 700;
}

.holder-name a,
.history-name a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}

.holder-name a:hover,
.history-name a:hover {
  text-decoration-color: var(--ink);
}

.placement-price {
  text-align: right;
  min-width: 170px;
}

.price-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.price-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.price-bids {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.bid-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  background: var(--paper);
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.bid-btn:hover {
  background: var(--ink);
  color: var(--white);
}

.bid-btn .btn-tag {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.bid-btn:hover .btn-tag {
  color: var(--white);
}

.bid-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.bid-history {
  margin-top: 20px;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}

.history-head {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.history-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  /* Let this strip take the horizontal swipe on mobile instead of
     handing it up to the page once you hit either end. */
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.history-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 14px 8px 8px;
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.history-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.history-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-name {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.history-domain {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.history-amount {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.history-empty {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Why sponsor ---------- */

.why {
  padding: 88px 0 100px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.why-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.why-item {
  background: var(--paper);
  border: 1px solid var(--line);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  padding: 26px 26px 28px;
}

.why-icon {
  width: 30px;
  height: 30px;
  color: var(--ink);
  display: block;
}

.why-item h3 {
  margin-top: 14px;
  font-size: 19px;
  font-weight: 800;
}

.why-item p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- How it works ---------- */

.how {
  padding: 88px 0 100px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.how-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.how-icon-wrap {
  aspect-ratio: 200 / 160;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  clip-path: polygon(var(--cut-lg) 0, 100% 0, 100% calc(100% - var(--cut-lg)), calc(100% - var(--cut-lg)) 100%, 0 100%, 0 var(--cut-lg));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.how-icon {
  width: 62%;
  height: 62%;
  color: var(--ink);
}

.how-number {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.how-step h3 {
  margin-top: 14px;
  font-size: 19px;
  font-weight: 800;
}

.how-step p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px 0 48px;
}

.site-footer p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer a {
  text-decoration: underline;
  font-weight: 600;
}

.photo-credit {
  margin-top: 6px;
  font-size: 11.5px;
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 50;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--paper);
  border-radius: 0;
  clip-path: polygon(var(--cut-lg) 0, 100% 0, 100% calc(100% - var(--cut-lg)), calc(100% - var(--cut-lg)) 100%, 0 100%, 0 var(--cut-lg));
  padding: 52px;
  margin: auto;
}

.modal-close {
  position: absolute;
  top: -56px;
  right: 0;
  width: 56px;
  height: 56px;
  border-radius: 0;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  border: none;
  background: rgba(11, 11, 11, 0.06);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(11, 11, 11, 0.12);
}

.modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-title {
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-top: 10px;
}

.modal-sub {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
}

.bid-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  clip-path: polygon(var(--cut-lg) 0, 100% 0, 100% calc(100% - var(--cut-lg)), calc(100% - var(--cut-lg)) 100%, 0 100%, 0 var(--cut-lg));
  padding: 20px 22px;
}

.bid-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.bid-summary-row .current-tag {
  text-transform: none;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.bid-amount-row {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
}

.bid-amount-row .amount-sign {
  font-size: clamp(32px, 6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--muted);
  margin-right: 2px;
}

.bid-amount-input {
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: clamp(32px, 6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
}

.bid-amount-hint {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.bid-amount-hint strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

#bid-form,
.verify-step {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* `display: flex` above beats the UA [hidden] rule since an ID selector
   wins on specificity -- restore it explicitly so toggling .hidden via JS
   actually hides these two. */
#bid-form[hidden],
.verify-step[hidden] {
  display: none;
}

.code-input {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  align-self: center;
}

.link-btn:hover {
  color: var(--ink);
}

.link-btn:disabled {
  cursor: default;
  opacity: 0.6;
  text-decoration: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  padding: 16px;
  outline: none;
}

.field input::placeholder {
  color: #b7b6b0;
}

.field input:focus {
  border-color: var(--ink);
}

.field-hint {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--muted);
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}

.agree-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
  position: relative;
}

.agree-row input[type="checkbox"]:checked {
  background: var(--ink);
  border-color: var(--ink);
}

.agree-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

.agree-row a {
  text-decoration: underline;
  font-weight: 700;
}

.form-error {
  font-size: 13px;
  color: var(--accent);
}

.form-error[hidden] {
  display: none;
}

.form-note {
  margin-top: 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Terms page ---------- */

.terms-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--line);
}

.terms-body {
  padding: 56px 0 96px;
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 48px;
}

.terms-block h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.terms-block p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

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

@media (max-width: 720px) {
  .header-row {
    height: 64px;
  }

  .wordmark {
    font-size: 11.5px;
  }

  .nav {
    gap: 12px;
  }

  .nav-link {
    font-size: 12.5px;
  }

  .nav-cta {
    font-size: 12px;
    padding: 9px 14px;
  }

  .hero {
    padding-top: 56px;
  }

  .placement-main {
    grid-template-columns: 1fr;
  }

  .placement-art {
    width: 100%;
    height: auto;
    aspect-ratio: 600 / 260;
  }

  .placement-price {
    text-align: left;
    margin-top: 6px;
  }

  .why-grid,
  .how-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .terms-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .modal {
    padding: 32px 24px;
  }

  .modal-close {
    top: -52px;
  }
}
