:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --ink: #111313;
  --muted: #5c6462;
  --panel: #fffaf0;
  --panel-strong: #ffffff;
  --line: #d9d1c2;
  --gold: #d89232;
  --teal: #147b83;
  --teal-dark: #0e4f56;
  --rose: #b43f55;
  --green: #1f7a4e;
  --shadow: 0 18px 55px rgb(17 19 19 / 14%);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

body,
button,
input {
  font: inherit;
}

button,
input {
  color: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem max(1rem, calc((100vw - 1180px) / 2));
  background: rgb(243 240 232 / 88%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--gold);
}

.nav {
  gap: 0.35rem;
}

.nav a {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--panel);
  color: var(--ink);
}

main {
  display: grid;
  gap: 1rem;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(680px, calc(100vh - 74px));
  align-items: end;
  padding: clamp(1.25rem, 4vw, 3.5rem) max(1rem, calc((100vw - 1180px) / 2));
  overflow: hidden;
  color: white;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 82%) 0%, rgb(0 0 0 / 58%) 38%, rgb(0 0 0 / 12%) 100%),
    url("/assets/haggle-hero.png") center / cover;
}

.hero__content {
  max-width: 760px;
  padding-bottom: clamp(1rem, 6vh, 4rem);
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(4rem, 13vw, 9.5rem);
  line-height: 0.82;
}

.hero p:not(.eyebrow) {
  max-width: 58ch;
  margin-bottom: 1.5rem;
  color: rgb(255 255 255 / 86%);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.hero-link,
.deal-button,
.chat-form button,
.tier-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border: 0;
  border-radius: var(--radius);
  font-weight: 900;
  cursor: pointer;
}

.hero-link {
  padding: 0.8rem 1rem;
  background: var(--gold);
  color: #16110a;
  text-decoration: none;
}

.hero__deal {
  position: absolute;
  right: max(1rem, calc((100vw - 1180px) / 2));
  bottom: clamp(1rem, 4vw, 3rem);
  width: min(300px, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: var(--radius);
  background: rgb(17 19 19 / 72%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero__deal span,
.event-strip span {
  color: rgb(255 255 255 / 68%);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__deal strong {
  display: block;
  margin: 0.35rem 0;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 0.95;
}

.hero__deal p {
  margin: 0;
  color: rgb(255 255 255 / 74%);
}

.event-strip,
.ticket-section,
.negotiator {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.event-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: -1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.event-strip div {
  min-width: 0;
  padding: 1rem;
  background: var(--ink);
  color: white;
}

.event-strip strong {
  display: block;
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}

.ticket-section,
.negotiator {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 1rem;
}

.section-heading h2,
.negotiator h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tier-card {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.tier-card[data-selected="true"] {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgb(20 123 131 / 14%);
}

.tier-card__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.tier-card h3 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.tier-card strong {
  color: var(--rose);
  font-size: 1.6rem;
}

.tier-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tier-card ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink);
}

.tier-button {
  width: 100%;
  margin-top: 0.25rem;
  background: var(--teal);
  color: white;
}

.tier-card[data-selected="true"] .tier-button {
  background: var(--ink);
  color: var(--gold);
}

.negotiator {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  gap: 1rem;
  align-items: stretch;
}

.negotiator__intro,
.chat-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.negotiator__intro {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.negotiator__intro p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.deal-button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: var(--green);
  color: white;
}

.deal-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.accepted-panel {
  margin: 1rem 0 0;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: rgb(31 122 78 / 12%);
  color: var(--green);
  font-weight: 800;
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(280px, 1fr) auto;
  min-height: 520px;
  overflow: hidden;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  overflow-y: auto;
}

.chat-message {
  max-width: min(82%, 34rem);
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  line-height: 1.45;
}

.chat-message[data-role="agent"] {
  align-self: flex-start;
  background: #edf7f6;
  color: #10292b;
}

.chat-message[data-role="visitor"] {
  align-self: flex-end;
  background: var(--ink);
  color: white;
}

.chat-form {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.chat-form label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.chat-form__row {
  display: flex;
  gap: 0.6rem;
}

.chat-form input {
  min-width: 0;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.chat-form button {
  min-width: 5.5rem;
  padding: 0.7rem 1rem;
  background: var(--teal-dark);
  color: white;
}

input:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(216 146 50 / 42%);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
  }

  .hero {
    min-height: 720px;
    align-items: start;
  }

  .hero__deal {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    width: auto;
  }

  .event-strip,
  .tier-grid,
  .negotiator {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: 480px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .nav,
  .chat-form__row {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    text-align: center;
  }

  .hero {
    min-height: 680px;
  }

  .event-strip {
    margin-top: 0;
  }

  .chat-message {
    max-width: 94%;
  }
}
