/*
 * kinexentry.com
 *
 * The public face of Kinex Entry: dark like the contestant app, copper where
 * the app is copper, and quiet enough that a store reviewer or a rodeo
 * secretary finds what they came for in one scroll.
 */

:root {
  --ink: #0e0d0c;
  --ink-2: #171514;
  --ink-3: #221f1c;
  --line: #2e2a26;
  --cream: #f6f1e7;
  --muted: #a2988a;
  --faint: #6f675d;
  --copper: #c4622b;
  --copper-soft: #2a1a10;
  --max: 1040px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 16px/1.55 Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--copper); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; margin-top: 1.6em; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
li { margin-bottom: .35em; }
code { background: var(--ink-3); padding: 1px 6px; border-radius: 6px; font-size: .92em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ── header ─────────────────────────────────────────────────────────── */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
}
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); }
.logo:hover { text-decoration: none; }
.logo img { width: 34px; height: 34px; display: block; }
.logo .words { display: flex; flex-direction: column; line-height: 1; }
.logo .name { font-size: 17px; font-weight: 800; letter-spacing: .06em; }
.logo .sub {
  font-size: 9.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); margin-top: 3px;
}
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--muted); font-size: 14px; font-weight: 600; }
nav a:hover, nav a[aria-current] { color: var(--cream); text-decoration: none; }

/* ── hero ───────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 40px; }
.hero .lede { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); max-width: 640px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 10px; font-weight: 700; font-size: 15px;
  border: 1px solid var(--line); color: var(--cream); background: var(--ink-2);
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--copper); border-color: var(--copper); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.note { font-size: 13px; color: var(--faint); margin-top: 10px; }

/* ── panels ─────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.panel {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.panel h3 { margin-top: 0; }
.panel p { color: var(--muted); margin-bottom: .6em; }
.panel ul { color: var(--muted); margin: 0; }
.label {
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--copper); margin-bottom: 8px;
}

/* ── long-form pages ────────────────────────────────────────────────── */
.prose { max-width: 720px; padding: 40px 0 60px; }
.prose p, .prose li { color: #d9d2c6; }
.prose h2 { font-size: 22px; }
.prose .meta { color: var(--faint); font-size: 14px; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }
.callout {
  background: var(--copper-soft); border: 1px solid #4a2b18; border-radius: var(--radius);
  padding: 16px 18px; margin: 1.2em 0;
}

/* ── footer ─────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line); margin-top: 60px; padding: 30px 0 40px;
  color: var(--faint); font-size: 14px;
}
footer .cols { display: flex; flex-wrap: wrap; gap: 28px 60px; justify-content: space-between; }
footer .col { min-width: 200px; }
footer .col strong { color: var(--muted); display: block; margin-bottom: 6px; font-weight: 700; }
footer a { color: var(--muted); }
footer .fine { margin-top: 24px; font-size: 12.5px; }

@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  /* The header on a phone: the logo on its own line, the four pages as a row of
     pills, and the two copper doors side by side under them. */
  .top { flex-wrap: wrap; row-gap: 14px; padding: 14px 0; }
  nav { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  nav a:not(.navbtn) {
    text-align: center; padding: 9px 4px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--ink-2); font-size: 13px; color: var(--muted);
  }
  nav a:not(.navbtn)[aria-current] { border-color: var(--copper); color: var(--cream); background: var(--copper-soft); }
  /* Create An Account and Sign In: one fixed height, so the two doors match exactly. */
  .top nav a.navbtn, .top nav .navmenu summary.navbtn {
    display: flex; align-items: center; justify-content: center; box-sizing: border-box;
    height: 46px; padding: 0 10px; margin: 0; font-size: 14px; line-height: 1; border-radius: 8px; width: 100%;
  }
  nav a.navbtn { grid-column: 1 / 3; }
  nav .navmenu { grid-column: 3 / 5; display: block; }
  nav .navmenu .menu { left: auto; right: 0; min-width: 100%; }
}

/* ── photographs ─────────────────────────────────────────────────────── */
/*
 * A photo sits behind the hero and the "working a rodeo" band, darkened so
 * the type stays legible. The picture is set inline on the element as
 * --photo, so swapping in Kinex Entry's own shots is a one-attribute change.
 */
.hero.photo, .band {
  position: relative; isolation: isolate; border-radius: var(--radius);
  overflow: hidden; padding: 72px 28px 56px; margin-top: 8px;
}
.hero.photo::before, .band::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--photo) center / cover no-repeat;
}
.hero.photo::after, .band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14,13,12,.92) 0%, rgba(14,13,12,.78) 55%, rgba(14,13,12,.45) 100%),
    linear-gradient(180deg, rgba(14,13,12,.2), rgba(14,13,12,.75));
}
.hero.photo .lede { color: #d9d2c6; }
.band { margin-top: 48px; padding: 56px 28px; }
.band p { color: #d9d2c6 !important; }
@media (max-width: 640px) {
  .hero.photo, .band { padding: 48px 20px 40px; border-radius: 0; margin-left: -22px; margin-right: -22px; }
}

/* The two sign-in doors: copper boxes at the end of the nav. */
nav a.navbtn {
  display: inline-block; padding: 7px 14px; border-radius: 8px;
  background: var(--copper); color: #fff; font-weight: 700; line-height: 1;
}
nav a.navbtn:hover { color: #fff; filter: brightness(1.08); text-decoration: none; }
/* Sign In opens a small menu with the two doors. */
nav .navmenu { position: relative; }
nav .navmenu summary { list-style: none; cursor: pointer; font-size: 14px; }
nav .navmenu summary::-webkit-details-marker { display: none; }
nav .navmenu summary.navbtn { display: inline-block; padding: 7px 14px; border-radius: 8px; background: var(--copper); color: #fff; font-weight: 700; line-height: 1; }
nav .navmenu[open] summary.navbtn, nav .navmenu summary.navbtn:hover { filter: brightness(1.08); }
nav .navmenu .menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 300px;
  background: #1a1816; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
nav .navmenu .menu a { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 8px; color: var(--cream); }
nav .navmenu .menu a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
nav .navmenu .menu a strong { font-size: 14px; }
nav .navmenu .menu a span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) { nav .navmenu .menu { right: auto; left: 0; } }
nav { align-items: center; row-gap: 10px; }

/* ── Download Contestant App ─────────────────────────────────────────── */
.download { margin-top: 30px; }
.download .label { margin-bottom: 4px; }
.download .cta { margin-top: 10px; }

/* ── Contact Us ─────────────────────────────────────────────────────── */
.band .btn.primary { cursor: pointer; font: inherit; font-weight: 700; }
.contact {
  margin-top: 24px; max-width: 620px; display: grid; gap: 12px;
  background: rgba(14,13,12,.6); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 18px;
}
.contact[hidden] { display: none; }
.contact .contact-lede { margin: 0; font-size: 14.5px; }
.contact .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.contact label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.contact input, .contact textarea {
  font: inherit; font-size: 15px; color: var(--cream); background: var(--ink-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%;
}
.contact input:focus, .contact textarea:focus { outline: 2px solid var(--copper); outline-offset: 1px; border-color: var(--copper); }
.contact textarea { resize: vertical; }
.contact .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact .contact-status { font-size: 14px; color: #d9d2c6; align-self: center; }
@media (max-width: 640px) { .contact .fields { grid-template-columns: 1fr; } }

/* The phone number sits under Contact Us, on its own line. */
.band .callus { margin: 14px 0 0; font-size: 15px; color: #d9d2c6 !important; }
.band .callus a { font-weight: 700; }
/* On a phone the Sign In door fills its half of the row, like Create An Account. */
@media (max-width: 640px) {
  nav .navmenu summary.navbtn { display: block; width: 100%; text-align: center; padding: 12px 10px; font-size: 14px; }
}

/* ── Enter an event here: the chat in the corner ────────────────────── */
.kchat { position: fixed; right: 18px; bottom: 18px; z-index: 50; font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif; }
.kchat-bubble {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--copper); color: #fff; border: none; border-radius: 999px; padding: 14px 20px;
  font: 700 15px Inter, "Helvetica Neue", Helvetica, Arial, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.kchat-bubble:hover { filter: brightness(1.08); }
.kchat-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.kchat-panel {
  position: absolute; right: 0; bottom: 0; width: min(400px, calc(100vw - 36px)); height: min(640px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: #1a1816; color: var(--cream);
  border: 1px solid rgba(255,255,255,.12); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.kchat-panel[hidden] { display: none; }
.kchat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #141210; }
.kchat-head strong { display: block; font-size: 14px; } .kchat-head small { display: block; font-size: 11px; color: var(--muted); }
.kchat-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--copper); color: #fff; font: 800 16px/30px Inter, Arial, sans-serif; text-align: center; }
.kchat-close { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 8px; }
.kchat-log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.kchat-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-line; }
.kchat-msg.bot { background: #26221f; border-bottom-left-radius: 4px; align-self: flex-start; }
.kchat-msg.user { background: var(--copper); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.kchat-msg .warn { display: block; background: #3a2f12; border: 1px solid #8a6f1e; border-radius: 8px; padding: 6px 8px; margin-top: 6px; font-size: 13px; }
.kchat-msg .good { display: block; background: #16301f; border: 1px solid #2f6b40; border-radius: 8px; padding: 6px 8px; margin-top: 6px; font-size: 13px; }
.kchat-msg .bad { display: block; background: #3a1a16; border: 1px solid #8a3a2e; border-radius: 8px; padding: 6px 8px; margin-top: 6px; font-size: 13px; }
.kchat-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.kchat-chip { border: 1px solid var(--copper); color: var(--copper); background: transparent; border-radius: 999px; padding: 6px 12px; font: 600 13px Inter, Arial, sans-serif; cursor: pointer; }
.kchat-chip:hover, .kchat-chip.on { background: var(--copper); color: #fff; }
.kchat-tile { align-self: stretch; background: var(--copper); color: #fff; border: none; border-radius: 12px; padding: 13px 14px; font: 700 15px Inter, Arial, sans-serif; text-align: center; cursor: pointer; box-shadow: 0 4px 12px rgba(196,98,43,.35); }
.kchat-tile:hover { filter: brightness(1.08); }
.kchat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #141210; }
.kchat-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--cream); background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kchat-form input:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
.kchat-form button { font: 700 14px Inter, Arial, sans-serif; background: var(--copper); color: #fff; border: none; border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.kchat-form button:disabled, .kchat-form input:disabled { opacity: .5; cursor: default; }
/* Phones: the panel is the whole screen, laid out for a thumb and a keyboard. */
@media (max-width: 640px) {
  .kchat { right: 12px; bottom: 12px; }
  .kchat-panel {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto; max-height: none; border-radius: 0; border: none; box-sizing: border-box;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
  }
  .kchat-head { padding: 14px 16px; }
  .kchat-close { font-size: 28px; padding: 4px 10px; }
  .kchat-log { padding: 14px; gap: 12px; -webkit-overflow-scrolling: touch; }
  .kchat-msg { max-width: 92%; font-size: 15px; }
  .kchat-chip { padding: 9px 14px; font-size: 14px; }
  .kchat-tile { padding: 15px 16px; font-size: 16px; }
  .kchat-form { padding: 10px 12px; }
  .kchat-form input { font-size: 16px; padding: 12px 14px; } /* 16px keeps iOS from zooming the page when the field is tapped */
  .kchat-form button { padding: 12px 16px; font-size: 15px; }
  body.kchat-open { overflow: hidden; position: fixed; width: 100%; } /* position: fixed also stops iOS Safari scrolling the page under the keyboard */
}
