/* ──────────────────────────────────────────────────────────────
   Haus Vajbz theme layer.

   Loaded AFTER tokens.css, fonts.css and hv/fonts.css. It does not add a
   second token vocabulary: it re-points the semantic tokens every component
   already reads (--bg, --surface, --text, --line, --red, --radius…) under
   html[data-theme="hv"], so a component written against tokens.css renders
   in the Haus Vajbz system unchanged.

   Values come from the brand deck (helper/hausvajbz, slides 9/11/120/121):

     Haus Red        #B51F2A   headlines, tags, CTAs, active states
     Deep Red        #7E111B   hover, layered depth, dividers on red
     Off-white       #FAEFDE   page canvas  ("never pure white")
     Warm off-white  #F3EFE6   panels
     Ink Black       #0D0D0D   body text, dark bands
     Graphite        #1F2222 / #303033   metadata, structural lines

   Geometry: square. Every radius is 0 and every shadow is none — the deck
   uses rules, not boxes, and the only circle in the system is the vinyl.
   ────────────────────────────────────────────────────────────── */

[data-theme='hv'] {
  /* brand primitives */
  --ink:        #0D0D0D;
  --ink-2:      #1F2222;
  --ink-3:      #303033;
  --paper:      #FAEFDE;
  --paper-2:    #F3EFE6;
  --paper-3:    #EFE2CC;   /* recessed cream — derived, one step under --paper */
  --red:        #B51F2A;
  --red-bright: #7E111B;   /* semantic role is "hover"; the deck hovers DARKER */
  --red-deep:   #7E111B;
  --rule:       #303033;

  /* geometry */
  --radius:      0;
  --radius-lg:   0;
  --radius-xl:   0;
  --radius-pill: 0;
  --shadow-card: none;
  --shadow-ink:  none;
  --shadow-accent: none;

  /* type roles (fonts.css declares the faces) */
  --font-hero:      'Archivo', Impact, 'Arial Black', sans-serif;
  --font-condensed: 'Archivo', 'Arial Narrow', sans-serif;
  --font-ui:        'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-sub:       'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono:      'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  --measure: 1200px;
}

/* per-surface literals that tokens.css hardcodes for the default palette */
[data-theme='hv'],
[data-theme='hv'] [data-surface='paper'] {
  --text-dim:      #303033;
  --text-muted:    #4A4A4C;
  --text-tertiary: #6B6B6E;
  --line:          #D9CDB8;   /* quiet rule on cream */
  --line-strong:   #0D0D0D;   /* control outlines: ink, not grey */
  --border-hover:  #0D0D0D;
}
[data-theme='hv'] [data-surface='ink'] {
  --text-dim:      #C9BFAE;
  --text-muted:    #A89F90;
  --text-tertiary: #8E8676;
  --line:          #303033;
  --line-strong:   #FAEFDE;
  --border-hover:  #FAEFDE;
}
/* third surface the deck uses constantly: a solid Haus Red band */
[data-theme='hv'] [data-surface='red'] {
  --bg:            var(--red);
  --surface:       var(--red-deep);
  --surface-2:     #9B1A24;
  --text:          var(--paper);
  --text-dim:      #F1D9D3;
  --text-muted:    #E8C6BE;
  --text-tertiary: #DDB0A6;
  --line:          rgba(250, 239, 222, 0.28);
  --line-strong:   var(--paper);
  --border-hover:  var(--paper);
  --shadow:        none;
  --text-primary:   var(--text);
  --text-secondary: var(--text-dim);
  --border:         var(--line);
  --surface-3:      var(--surface-2);
}

/* ── Base ─────────────────────────────────────────────────────── */
[data-theme='hv'] body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
[data-theme='hv'] *, [data-theme='hv'] *::before, [data-theme='hv'] *::after { box-sizing: border-box; }
[data-theme='hv'] img, [data-theme='hv'] picture { display: block; max-width: 100%; }
[data-theme='hv'] a:where(:not(.hv-btn)) { color: inherit; }   /* buttons keep their own colour */
[data-theme='hv'] :where(button) { font: inherit; color: inherit; }   /* :where keeps this reset below .hv-btn / .hv-tag in specificity */
[data-theme='hv'] [hidden] { display: none !important; }              /* the hidden attribute must beat display: flex/grid on lists and rows */
[data-theme='hv'] h1, [data-theme='hv'] h2, [data-theme='hv'] h3 { margin: 0; }

.hv-wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Type roles ───────────────────────────────────────────────── */
.hv-display {
  font-family: var(--font-hero);
  font-weight: 900;
  font-stretch: 100%;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
/* two-tone headline: wrap the accent word(s) in <em> */
.hv-display em { font-style: normal; color: var(--red); }
[data-surface='red'] .hv-display em { color: var(--ink); }

.hv-sub {
  font-family: var(--font-sub);
  font-weight: 600;
  line-height: 1.2;
}
.hv-mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hv-body { font-family: var(--font-ui); font-size: 0.95rem; line-height: 1.55; }

/* ── Tag: the red block label ─────────────────────────────────── */
.hv-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.42em 0.6em 0.36em;
  background: var(--red);
  color: var(--paper);
  white-space: nowrap;
}
.hv-tag--ink   { background: var(--ink);   color: var(--paper); }
.hv-tag--paper { background: var(--paper); color: var(--ink); }
.hv-tag--line  { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px currentColor; }

/* ── Photo grain ──────────────────────────────────────────────── */
/* The deck's image treatment: flash, grain, tight crop. A positioned
   frame gets the concrete grain multiplied over its photo — subtle, never
   a gradient wash. The host element must be position: relative. */
.hv-grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url("../../images/texture/concrete-grain.f8904e94ae5e.webp") center / 320px repeat;  /* explicit path: Chrome resolves var() urls against the consuming sheet */
  opacity: 0.18; mix-blend-mode: multiply;
}

/* ── Rules ────────────────────────────────────────────────────── */
.hv-rule        { border: 0; border-top: 1px solid var(--line); margin: 0; }
.hv-rule--strong{ border-top-width: 2px; border-top-color: var(--text); }

/* ── Ruled list (the deck's list style: no bullets, a rule under each) ── */
.hv-list { list-style: none; margin: 0; padding: 0; }
.hv-list > li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.hv-list > li:first-child { border-top: 1px solid var(--line); }

/* ── Buttons ──────────────────────────────────────────────────── */
.hv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  border: 2px solid var(--red);
  background: var(--red);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.hv-btn:hover, .hv-btn:focus-visible { background: var(--red-deep); border-color: var(--red-deep); outline: none; }
.hv-btn--outline { background: transparent; color: var(--red); }
.hv-btn--outline:hover, .hv-btn--outline:focus-visible { background: var(--red); color: var(--paper); border-color: var(--red); }
.hv-btn--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hv-btn--ink:hover { background: var(--ink-2); border-color: var(--ink-2); }
.hv-btn--paper { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.hv-btn--paper:hover { background: var(--paper-3); border-color: var(--paper-3); }
.hv-btn--quiet { background: transparent; border-color: var(--line-strong); color: var(--text); }
.hv-btn--quiet:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.hv-btn:disabled, .hv-btn[aria-disabled='true'] {
  background: transparent; border-color: var(--line); color: var(--text-muted);
  cursor: not-allowed;
}
.hv-btn__amount { margin-left: auto; font-family: var(--font-sub); font-variant-numeric: tabular-nums; }

/* square icon button (back / close) */
.hv-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 2px solid var(--text); background: transparent; color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hv-icon-btn:hover { background: var(--text); color: var(--bg); }
.hv-icon-btn svg { width: 18px; height: 18px; }

/* ── Stepper (quantity) ───────────────────────────────────────── */
.hv-stepper {
  display: inline-flex; align-items: stretch;
  border: 2px solid var(--text);
  height: 52px;
}
.hv-stepper button {
  width: 52px; border: 0; background: transparent; color: var(--text);
  font-family: var(--font-sub); font-weight: 600; font-size: 1.4rem; line-height: 1;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hv-stepper button:hover:not(:disabled) { background: var(--text); color: var(--bg); }
.hv-stepper button:disabled { color: var(--text-muted); cursor: not-allowed; }
.hv-stepper output {
  min-width: 3ch; padding-inline: 0.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sub); font-weight: 700; font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  border-inline: 2px solid var(--text);
}

/* ── Inputs ───────────────────────────────────────────────────── */
.hv-input {
  width: 100%; min-height: 52px; padding: 0.8rem 1rem;
  border: 2px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-family: var(--font-ui); font-size: 1rem;
}
.hv-input:focus { outline: none; border-color: var(--red); }
.hv-input::placeholder { color: var(--text-muted); }

/* ── Event card (.hvc, markup in newDisign/_event_card.html) ──────
   Shared by the home rail and the browse grid: square photo, title over
   a rule, mono meta, → at the bottom. Width comes from the container. */
.hvc { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.hvc__media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--ink); }
.hvc__media img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) saturate(0.95); transition: transform var(--dur) var(--ease); }
.hvc:hover .hvc__media img { transform: scale(1.03); }
.hvc__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--paper); font-size: clamp(1.1rem, 5vw, 1.6rem); padding: 0.5rem; text-align: center; }
.hvc__tag { position: absolute; top: 0; left: 0; z-index: 1; }
.hvc__body { display: flex; flex-direction: column; gap: 0.4rem; padding-top: 0.7rem; flex: 1; }
.hvc__name {
  font-size: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--dur) var(--ease);
}
.hvc:hover .hvc__name { color: var(--red); }
.hvc__meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; }
.hvc__meta span + span::before { content: '·'; margin-right: 0.6rem; }
.hvc__foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding-top: 0.2rem; }
.hvc__price { font-size: 1rem; font-variant-numeric: tabular-nums; }
.hvc__price small { font-family: var(--font-mono); font-weight: 500; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.hvc__arrow { font-family: var(--font-mono); font-size: 1.1rem; line-height: 1; transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }
.hvc:hover .hvc__arrow { transform: translateX(4px); color: var(--red); }

/* ── Form primitives: label, field, square check/radio, error ──── */
.hv-field { display: grid; gap: 0.4rem; }
.hv-label { display: block; }
.hv-field__error { display: none; padding: 0.55rem 0.8rem; background: var(--red); color: var(--paper); font-size: 0.85rem; }
.hv-field__error.is-visible { display: block; }
/* checkbox + radio share one square: 2px ink border, red fill when checked,
   a paper mark drawn with inset shadows (no radius, no svg, no images) */
.hv-check { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; }
.hv-check input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 20px; height: 20px; border: 2px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hv-check input::before { content: ''; width: 8px; height: 8px; background: var(--paper); transform: scale(0); transition: transform var(--dur) var(--ease); }
.hv-check input:checked { background: var(--red); border-color: var(--red); }
.hv-check input:checked::before { transform: scale(1); }
.hv-check input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.hv-check > span { flex: 1; }
.hv-check a { color: var(--red); text-decoration: none; font-weight: 600; }
.hv-check a:hover { text-decoration: underline; }

/* ── Compact event row (.nu, markup in newDisign/home.html "Next up") ──
   thumb | copy | buy on a red (or any) surface; the result page reuses it
   for the "your event" row. Width from the container. */
.nu {
  display: grid; grid-template-columns: 96px 1fr; grid-template-areas: 'thumb body' 'buy buy';
  gap: 0 0.9rem; text-decoration: none;
  background: var(--bg); color: var(--text);
}
.nu__thumb { grid-area: thumb; position: relative; aspect-ratio: 1; overflow: hidden; background: var(--ink); }
.nu__thumb img, .nu__thumb picture { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) saturate(0.95); }
.nu__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--paper); font-size: 1.4rem; }
.nu__body { grid-area: body; display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; padding: 0.6rem 0.9rem 0.6rem 0; min-width: 0; }
.nu__body .hv-tag { align-self: flex-start; }
.nu__title { font-size: clamp(1.15rem, 5.2vw, 1.6rem); }
.nu__meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.7rem; }
.nu__meta span + span::before { content: '·'; margin-right: 0.7rem; }
.nu__buy {
  grid-area: buy; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--line); padding: 0.7rem var(--gutter) 0.8rem;
}
.nu__price { font-size: 1.15rem; line-height: 1; font-variant-numeric: tabular-nums; }
.nu__price small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.3rem; }
.nu__cta { width: auto; min-height: 44px; padding-block: 0.7rem; flex: none; }
.nu:hover .nu__cta { background: var(--paper-3); border-color: var(--paper-3); }
@media (min-width: 768px) {
  .nu { grid-template-columns: 140px 1fr auto; grid-template-areas: 'thumb body buy'; }
  .nu__buy { border-top: 0; border-left: 1px solid var(--line); flex-direction: column; align-items: flex-end; justify-content: center; padding: 0.8rem 1.2rem; gap: 0.7rem; }
  .nu__price { text-align: right; }
  .nu__title { font-size: clamp(1.4rem, 2.6vw, 2rem); }
}
@media (min-width: 1100px) {
  .nu__title { font-size: 2.1rem; }
}

/* ── Top bar + footer used by every /newDisign page ───────────── */
.hv-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 60px;
  border-bottom: 2px solid var(--text);
}
.hv-wordmark {
  font-family: var(--font-hero); font-weight: 900; text-transform: uppercase;
  font-size: 1.25rem; line-height: 1; letter-spacing: -0.01em; text-decoration: none;
}
.hv-wordmark em { font-style: normal; color: var(--red); }

.hv-foot { background: var(--bg); color: var(--text); padding: 2.4rem 0 calc(1.6rem + env(safe-area-inset-bottom)); }
.hv-foot__mark { font-size: clamp(2.6rem, 12vw, 5rem); }
.hv-foot__strap { margin: 0.6rem 0 1.6rem; }
.hv-foot__list a { flex: 1; text-decoration: none; font-family: var(--font-sub); font-weight: 600; font-size: 1.05rem; }
.hv-foot__list a:hover { color: var(--red); }
.hv-foot__contact { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1.4rem 0 0; }
.hv-foot__contact a { text-decoration: none; }
.hv-foot__contact a:hover { color: var(--paper); }
/* card marks + 3-D Secure + acquirer: contractual, kept quiet under the body */
.hv-foot__pay { display: flex; flex-wrap: wrap; gap: 1.2rem 2.4rem; align-items: flex-end; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.hv-foot__pay-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.hv-foot__pay-group .hv-mono { width: 100%; font-size: 0.62rem; }
.hv-foot__pay img { height: 22px; width: auto; display: block; }
.hv-foot__pay a { display: block; }
.hv-foot__processor { height: 34px !important; padding: 4px 8px; background: var(--paper-2); }
.hv-foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.hv-foot__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.hv-foot__links a { text-decoration: none; }
.hv-foot__links a:hover { color: var(--red); }
@media (min-width: 768px) {
  .hv-foot__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); }
  .hv-foot__list > li:nth-child(2) { border-top: 1px solid var(--line); }
}

/* ── Forms: stack, page-level messages, "or" rule, Google button, reveal ──
   Shared by auth, profile, the transfer dialog and the picker's login modal
   so every form on the site reads the same: labelled fields, a red block
   for errors, an ink block for confirmations, rules instead of boxes. */
.hv-form { display: grid; gap: 0.9rem; }
.hv-form__msg { display: none; padding: 0.7rem 0.9rem; font-family: var(--font-ui); font-size: 0.9rem; line-height: 1.4; }
.hv-form__msg.is-visible { display: block; }
.hv-form__msg p { margin: 0; }
.hv-form__msg p + p { margin-top: 0.35rem; }
.hv-form__msg a { color: inherit; font-weight: 600; }
.hv-form__error { background: var(--red); color: var(--paper); }
.hv-form__ok { background: var(--text); color: var(--bg); }
.hv-form__or { display: flex; align-items: center; gap: 0.8rem; margin: 0.4rem 0; }
.hv-form__or::before, .hv-form__or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.hv-form__foot { margin: 0.8rem 0 0; text-align: center; font-size: 0.9rem; color: var(--text-dim); }
.hv-form__foot a { color: var(--red); font-weight: 600; text-decoration: none; }
.hv-form__foot a:hover { text-decoration: underline; }
.hv-form__hint { display: block; color: var(--text-muted); }
.hv-btn--google { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.hv-btn--google:hover, .hv-btn--google:focus-visible { background: var(--text); border-color: var(--text); color: var(--bg); }
.hv-btn--google svg { width: 18px; height: 18px; flex: none; }
/* password reveal: the input gets room on the right, the eye is a square icon button */
.hv-reveal { position: relative; }
.hv-reveal .hv-input { padding-right: 56px; }
.hv-reveal .hv-icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; }
.hv-reveal .hv-icon-btn:hover { background: transparent; color: var(--red); }
.hv-reveal .hv-icon-btn .i-off { display: none; }
.hv-reveal.is-shown .hv-icon-btn .i-on { display: none; }
.hv-reveal.is-shown .hv-icon-btn .i-off { display: block; }
.hv-input.is-invalid { border-color: var(--red); }

/* ── Modal sheet: bottom sheet on phones, centred square card from 640 ──
   Used by the transfer dialog (and the picker's login modal shares the
   same geometry in tickets.css). 4px red top rule, ink outline ≥640. */
.hv-modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: flex-end; justify-content: center; background: rgba(13, 13, 13, 0.72); }
.hv-modal.is-open { display: flex; }
.hv-modal__card { width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; background: var(--paper); color: var(--ink); padding: 1.4rem var(--gutter) calc(1.4rem + env(safe-area-inset-bottom)); border-top: 4px solid var(--red); }
.hv-modal__card[data-surface='ink'] { background: var(--ink); color: var(--paper); }
.hv-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.hv-modal__title { font-size: 1.9rem; }
.hv-modal__sub { margin: 0.5rem 0 1.1rem; color: var(--text-dim); font-size: 0.9rem; }
@media (min-width: 640px) {
  .hv-modal { align-items: center; padding: 1rem; }
  .hv-modal__card { border: 2px solid var(--line-strong); border-top-width: 4px; border-top-color: var(--red); }
}

/* ── Motion ───────────────────────────────────────────────────── */
@keyframes hv-spin { to { transform: rotate(360deg); } }   /* the home disk and the result page's vinyl */
/* the one entrance in the system: a line rises into place (home hero, result slab) */
@keyframes hv-rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  [data-theme='hv'] * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── Page shell (single base: templates/other/base.html) ─────────
   body is a flex column so .site-main can pin the footer to the bottom
   of short pages (404, payment error, unsubscribe). Legacy pages get the
   same from base.css; HV pages get it here. */
[data-theme='hv'] body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.site-main { flex: 1 1 auto; min-width: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
