/* @author Stephen Gwalter
 *
 * Doorman base stylesheet.
 *
 * Every colour, font and corner radius here comes from a CSS custom property
 * that the tenant's branding record sets inline in the page head. Nothing in
 * this file hard-codes a brand colour, which is what lets one stylesheet serve
 * every customer — change the six values in the branding editor and the whole
 * site changes with it.
 */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: .5px;
  line-height: 1.05;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(34px, 6vw, 58px); }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: 20px; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 620px; }

/* --- header ------------------------------------------------------------- */

.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.site-head .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-head .brand img { height: 40px; width: auto; }
.site-head .brand .name {
  font-family: var(--font-head); font-size: 26px; letter-spacing: .5px;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-head nav { display: flex; gap: 18px; align-items: center; }
.site-head nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.site-head nav a:hover { color: var(--ink); text-decoration: none; }

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border: 0; border-radius: calc(var(--radius) * .7);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
}
.btn-2 { background: var(--accent-2); color: #06121a; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }

/* --- cards and surfaces ------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: var(--radius);
  padding: 22px;
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny  { font-size: 12.5px; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.pill {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.pill-2 { background: color-mix(in srgb, var(--accent-2) 18%, transparent); color: var(--accent-2); }
.pill-off { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--muted); }

/* --- hero --------------------------------------------------------------- */

.hero { padding: 64px 0 44px; text-align: center; }
.hero .tagline { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); max-width: 620px; margin: 0 auto 26px; }
.hero-img {
  border-radius: var(--radius); overflow: hidden; margin-bottom: 30px;
  aspect-ratio: 21 / 9; object-fit: cover; width: 100%;
}

/* --- event list --------------------------------------------------------- */

.event-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.event-card .thumb { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.event-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-card .when { color: var(--accent-2); font-weight: 600; font-size: 14px; }
.event-card .venue { color: var(--muted); font-size: 14px; }
.event-card .foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.event-card .from { font-size: 14px; color: var(--muted); }
.event-card .from b { color: var(--ink); font-size: 18px; }

/* --- forms -------------------------------------------------------------- */

label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=search], input[type=date], input[type=datetime-local], input[type=url],
select, textarea {
  width: 100%; padding: 12px 14px;
  border-radius: calc(var(--radius) * .55);
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  background: color-mix(in srgb, var(--bg) 60%, var(--surface));
  color: var(--ink);
  font-family: var(--font-body); font-size: 16px;   /* 16px stops iOS zooming on focus */
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.field { margin-bottom: 16px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.err { color: #ff6b6b; font-size: 14px; margin-top: 6px; }
.notice {
  padding: 14px 16px; border-radius: calc(var(--radius) * .6);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  margin-bottom: 18px;
}
.notice.bad { background: color-mix(in srgb, #ff6b6b 14%, transparent); border-color: color-mix(in srgb, #ff6b6b 40%, transparent); }
.notice.good { background: color-mix(in srgb, var(--accent-2) 14%, transparent); border-color: color-mix(in srgb, var(--accent-2) 35%, transparent); }

/* --- tables ------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th, table.data td { padding: 11px 12px; text-align: left; white-space: nowrap; }
table.data th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
table.data tbody tr { border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
table.data td.wrap-cell { white-space: normal; }

/* --- footer ------------------------------------------------------------- */

.site-foot {
  margin-top: 60px; padding: 30px 20px 40px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--muted); font-size: 14px; text-align: center;
}
.site-foot .powered { margin-top: 10px; font-size: 12.5px; opacity: .75; }

/* --- print -------------------------------------------------------------- */

@media print {
  .site-head, .site-foot, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border-color: #ccc; background: #fff; }
}
