:root {
  --ink: #1f1f24;
  --muted: #62616b;
  --line: #e6e2dd;
  --paper: #fffdf8;
  --soft: #f5f2ec;
  --black: #111115;
  --magenta: #e91663;
  --teal: #00a7a7;
  --amber: #f2a900;
  --red: #e3342f;
  --coffee: #5f4b3b;
  --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 {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-brand,
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: 0;
}

.site-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  background: conic-gradient(from 40deg, var(--magenta), var(--amber), var(--teal), #5c4cc7, var(--magenta));
  border: 3px solid var(--black);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
}

.site-nav,
.admin-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a,
.admin-nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

.site-nav a:hover,
.admin-nav a:hover {
  background: var(--soft);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.78fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(50px, 8vw, 92px) clamp(18px, 4vw, 54px) 130px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(110deg, rgba(17, 17, 21, 0.95), rgba(17, 17, 21, 0.72)),
    repeating-linear-gradient(135deg, rgba(233, 22, 99, 0.28) 0 18px, rgba(0, 167, 167, 0.2) 18px 36px, rgba(242, 169, 0, 0.22) 36px 54px),
    #17171d;
}

.hero-has-photo {
  background:
    linear-gradient(110deg, rgba(17, 17, 21, 0.96), rgba(17, 17, 21, 0.64)),
    var(--hero-photo) center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 86px;
  background: var(--paper);
  clip-path: polygon(0 44%, 12% 58%, 28% 32%, 44% 60%, 64% 28%, 82% 54%, 100% 34%, 100% 100%, 0 100%);
}

.hero-copy,
.hero-showcase,
.hero-logos {
  position: relative;
  z-index: 1;
}

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

.hero .eyebrow {
  color: var(--amber);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 980px;
  font-size: clamp(2.35rem, 6vw, 5.35rem);
}

.hero-text {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.02rem, 2vw, 1.26rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--magenta);
  color: white;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.text-link:hover {
  filter: brightness(0.94);
}

.button-light {
  color: var(--black);
  background: white;
}

.button-muted {
  color: var(--ink);
  background: var(--soft);
}

.hero-showcase {
  align-self: stretch;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.hero-showcase img,
.flavor-board {
  width: min(520px, 100%);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 4px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 16px 16px 0 rgba(242, 169, 0, 0.9), -16px -16px 0 rgba(0, 167, 167, 0.72);
}

.flavor-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
  background: #fff;
}

.flavor-board span {
  display: grid;
  place-items: center;
  min-height: 140px;
  color: var(--black);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  font-weight: 950;
  font-size: 1.25rem;
}

.flavor-board span:nth-child(1) { background: var(--magenta); color: white; }
.flavor-board span:nth-child(2) { background: var(--amber); }
.flavor-board span:nth-child(3) { background: var(--teal); color: white; }
.flavor-board span:nth-child(4) { background: #f8efe1; }

.hero-logos {
  position: absolute;
  left: clamp(18px, 4vw, 54px);
  right: clamp(18px, 4vw, 54px);
  bottom: 42px;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.hero-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  color: white;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-logo span:last-child {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
  background: white;
  border-radius: var(--radius);
  padding: 4px;
}

.logo-fallback {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 950;
}

.section {
  padding: clamp(54px, 8vw, 98px) clamp(18px, 4vw, 54px);
}

.section-alt {
  background: var(--soft);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.carousel-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.promo-track,
.promo-grid {
  display: grid;
  gap: 16px;
}

.promo-track {
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 380px);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding: 4px 4px 18px;
}

.promo-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.promo-card,
.business-card,
.empty-public,
.admin-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.promo-card {
  overflow: hidden;
  scroll-snap-align: start;
}

.promo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--soft);
}

.promo-copy {
  padding: 16px;
}

.promo-copy p,
.business-category {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.promo-copy h3 {
  font-size: 1.25rem;
  line-height: 1.18;
}

.promo-copy a {
  display: inline-block;
  margin-top: 14px;
  color: var(--magenta);
  font-weight: 850;
}

.empty-public {
  padding: 34px;
  border-left: 6px solid var(--teal);
}

.empty-public p,
.business-card p,
.brand-hero p {
  color: var(--muted);
  line-height: 1.6;
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.business-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 18px;
  border-top: 6px solid var(--accent);
}

.business-logo-wrap {
  display: grid;
  width: 100%;
  height: 110px;
  place-items: center;
  margin-bottom: 16px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.business-logo {
  max-width: 88%;
  max-height: 84px;
  object-fit: contain;
}

.business-logo.logo-fallback {
  width: 76px;
  height: 76px;
  border-radius: 50%;
}

.business-logo.large {
  width: min(260px, 82vw);
  max-height: 180px;
}

.business-card h3 {
  font-size: 1.55rem;
}

.business-card .text-link {
  width: fit-content;
  margin-top: auto;
  background: var(--accent);
}

.brand-hero {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 54px);
  align-items: center;
  padding: clamp(56px, 8vw, 98px) clamp(18px, 4vw, 54px);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 18%, white), #fffdf8 62%);
  border-bottom: 1px solid var(--line);
}

.brand-hero-logo {
  display: grid;
  min-height: 220px;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  border-top: 7px solid var(--accent);
  border-radius: var(--radius);
}

.brand-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 4vw, 54px);
  color: white;
  background: var(--black);
}

.site-footer a {
  color: white;
  font-weight: 800;
}

.admin-body {
  background: #f7f7f4;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: white;
  border-bottom: 1px solid var(--line);
}

.admin-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 70px;
}

.admin-page-heading {
  margin-bottom: 20px;
}

.admin-page-heading h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.notice {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-weight: 750;
}

.notice-success { background: #e8f7ef; color: #145c31; }
.notice-error { background: #fdecec; color: #8e1d1d; }
.notice-info { background: #edf5ff; color: #234c7a; }

.admin-grid,
.stats-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-card,
.admin-panel {
  padding: 18px;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 950;
}

.admin-card p,
.admin-panel p,
.form-help {
  color: var(--muted);
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  font: inherit;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.check-row input {
  width: auto;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.logo-preview,
.ad-preview {
  display: grid;
  min-height: 122px;
  place-items: center;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.logo-preview img {
  max-height: 96px;
  object-fit: contain;
}

.ad-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.login-shell,
.install-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    repeating-linear-gradient(135deg, rgba(233, 22, 99, 0.12) 0 22px, rgba(0, 167, 167, 0.12) 22px 44px, rgba(242, 169, 0, 0.12) 44px 66px),
    var(--paper);
}

.login-card,
.install-card {
  width: min(760px, 100%);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 24px 80px rgba(20, 20, 24, 0.12);
}

.login-card h1,
.install-card h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

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

  .hero {
    min-height: auto;
    padding-bottom: 190px;
  }

  .hero-showcase {
    min-height: 280px;
  }

  .hero-logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-topbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .section-heading,
  .carousel-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header,
  .site-footer,
  .section-heading {
    display: flex;
  }

  .site-nav a,
  .admin-nav a {
    padding-inline: 8px;
  }

  .hero {
    padding-top: 38px;
    padding-bottom: 250px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-logos {
    grid-template-columns: 1fr;
  }

  .carousel-shell {
    display: block;
  }

  .icon-button {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
