/* ==========================================================================
   Design system — BlackcapX Homes.

   Palette taken from the rendered blackcapx.com (all five pages agree):
     #0a0a0a base · #161616 / #1e1e1e surfaces · #cc2222 brand red
     white headings · #aaa / #888 / #555 muted greys · radii 8 / 16 / 50px

   Glass treatment follows the reference pen: a translucent white fill over a
   dark, coloured backdrop, a 1px light border, a top inset highlight, a soft
   specular sheen, and blur + saturate.

   Dark only, deliberately. The brand site has no light mode, and glass over a
   light background loses the effect entirely.

   Everything brandable is a custom property in :root. Nothing below :root
   hardcodes a brand colour.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* ---- brand ---- */
  --brand-primary: #cc2222;        /* the X in the logo; primary CTA fill */
  --brand-primary-hot: #e12b2b;    /* hover */
  --brand-primary-ink: #ffffff;    /* 5.5:1 on the red — safe for labels */
  --brand-accent: #ff6b6b;         /* accent TEXT only: 7.1:1 on the base.
                                      #cc2222 is 3.6:1 and must never carry
                                      small copy. */
  --brand-glow: rgba(204, 34, 34, 0.34);

  /* ---- base surfaces ---- */
  --bg: #0a0a0a;
  --surface-1: #161616;
  --surface-2: #1e1e1e;

  /* ---- glass ---- */
  --glass-bg: rgba(255, 255, 255, 0.072);
  --glass-bg-strong: rgba(255, 255, 255, 0.11);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-hi: rgba(255, 255, 255, 0.30);
  --glass-blur: 24px;
  --glass-sat: 140%;
  --glass-sheen: rgba(255, 255, 255, 0.13);
  --glass-shadow: 0 24px 64px rgba(0, 0, 0, 0.55),
                  inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --glass-shadow-hi: 0 30px 78px rgba(0, 0, 0, 0.62),
                     inset 0 1px 0 rgba(255, 255, 255, 0.24);

  /* ---- ink ---- */
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.72);
  --ink-3: rgba(255, 255, 255, 0.50);
  --hairline: rgba(255, 255, 255, 0.12);

  --ok: #3ddc9a;
  --warn: #e8b04b;
  --bad: #ff6b6b;

  /* ---- shape + type ---- */
  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                  "Segoe UI", Roboto, system-ui, sans-serif;

  /* ---- layout ---- */
  --page: 640px;
  --gap: 16px;
  --pad: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ---------------------------------------------------------------- reset -- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
  padding-top: var(--safe-t);
}

/* The backdrop the glass refracts. Fixed, so it never scrolls. Brand red at
   two lightnesses over near-black — the blobs are what make blur read as
   glass rather than as flat grey. */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(38% 32% at 14% 12%, rgba(204, 34, 34, 0.42), transparent 68%),
    radial-gradient(34% 30% at 88% 24%, rgba(225, 43, 43, 0.24), transparent 70%),
    radial-gradient(52% 42% at 52% 104%, rgba(150, 26, 26, 0.26), transparent 72%),
    linear-gradient(158deg, #16110f 0%, var(--bg) 62%);
  pointer-events: none;
}

/* A faint vignette keeps the red from washing the page out. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(125% 95% at 50% 0%, transparent 52%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.021em;
  line-height: 1.18;
  margin: 0 0 0.4em;
  font-weight: 640;
  color: var(--ink);
}
h1 { font-size: clamp(1.55rem, 5.2vw, 2.1rem); }
h2 { font-size: clamp(1.16rem, 3.6vw, 1.4rem); }
h3 { font-size: 1.02rem; font-weight: 620; }
p  { margin: 0 0 0.85em; color: var(--ink-2); }
a  { color: var(--brand-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); font-weight: 650; }

/* Uppercase eyebrow, straight from the reference. */
.overline {
  margin: 0 0 10px;
  color: var(--brand-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------- layout -- */

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--gap) var(--gap) calc(112px + var(--safe-b));
}
.page--wide { max-width: 1180px; }

.stack   { display: flex; flex-direction: column; gap: var(--gap); }
.row     { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--wrap    { flex-wrap: wrap; }
.grow    { flex: 1 1 auto; min-width: 0; }
.center  { text-align: center; }

/* ---------------------------------------------------------------- glass -- */

.glass {
  position: relative;
  background-color: var(--glass-bg);
  /* Specular sheen as a background layer rather than a pseudo-element, so no
     element needs overflow:hidden and nothing clips a focus ring. */
  background-image:
    radial-gradient(130% 78% at 10% -14%, var(--glass-sheen), transparent 58%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}
.card { padding: var(--pad); }
.card--tight { padding: 13px 14px; }

/* Only cards that are themselves links get the lift. */
a.glass {
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
a.glass:hover {
  border-color: var(--glass-border-hi);
  box-shadow: var(--glass-shadow-hi);
  transform: translateY(-3px);
  text-decoration: none;
}

/* Where backdrop-filter is unavailable, fall back to the brand's own solid
   surface rather than a washed-out translucent one. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background-color: var(--surface-1); background-image: none; }
}

/* -------------------------------------------------------------- topbar --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 0 0 var(--gap);
  background: rgba(10, 10, 10, 0.72);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border-bottom: 1px solid var(--hairline);
}
/* The full lockup carries a "HOMES / powered by" sub-line that stops resolving
   below ~40px, so the bar is sized to the logo rather than the reverse. */
.topbar__logo { height: 40px; width: auto; }
.topbar__name { font-weight: 640; letter-spacing: -0.01em; font-size: 0.98rem; }

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

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  font: inherit;
  font-weight: 650;
  font-size: 1.02rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .2s ease, background-color .2s ease,
              border-color .2s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.975); }
.btn:hover  { text-decoration: none; }
.btn:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 3px;
}

/* The brand CTA stays solid red — it is the one thing on the page that is not
   glass, which is exactly why it reads as the action. */
.btn--primary {
  background-color: var(--brand-primary);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 60%);
  color: var(--brand-primary-ink);
  box-shadow: 0 10px 30px var(--brand-glow),
              inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn--primary:hover { background-color: var(--brand-primary-hot); }

.btn--ghost {
  background-color: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px) saturate(var(--glass-sat));
  backdrop-filter: blur(14px) saturate(var(--glass-sat));
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn--ghost:hover { background-color: rgba(255, 255, 255, 0.18); }

.btn--quiet {
  background: transparent;
  color: var(--ink-2);
  min-height: 44px;
  font-weight: 550;
}
.btn--quiet:hover { color: var(--ink); }

.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Sticky action bar — the booking CTA stays in thumb reach. */
.actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  padding: 12px 14px calc(12px + var(--safe-b));
  background: rgba(10, 10, 10, 0.78);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border-top: 1px solid var(--hairline);
}
.actionbar__inner {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.field { display: block; margin-bottom: 14px; }
.field__label {
  display: block;
  font-size: 0.86rem;
  font-weight: 620;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: 0.005em;
}
.field__hint { font-size: 0.8rem; color: var(--ink-3); margin-top: 6px; }
.field__err  { font-size: 0.82rem; color: var(--bad); margin-top: 6px; font-weight: 550; }

/* Inputs are recessed glass: darker than the card they sit on, with the same
   light border and a top inset line. */
.input, .select, .textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  font: inherit;
  font-size: 16px;              /* 16px minimum stops iOS zoom-on-focus */
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: rgba(255, 255, 255, 0.34); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='.55' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}
.select option { background: var(--surface-2); color: var(--ink); }

/* Native date/time pickers ship a dark glyph that disappears on a dark field. */
.input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.55;
  cursor: pointer;
}
.input::-webkit-calendar-picker-indicator:hover { opacity: 0.9; }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.07);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(204, 34, 34, 0.26),
              inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* Large tappable radio / checkbox rows, as glass chips. */
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  margin-bottom: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}
.choice:hover { background-color: rgba(255, 255, 255, 0.085); }
.choice:has(input:checked) {
  border-color: var(--brand-primary);
  background-color: rgba(204, 34, 34, 0.13);
  box-shadow: 0 0 0 3px rgba(204, 34, 34, 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.choice input {
  width: 21px; height: 21px;
  accent-color: var(--brand-primary);
  flex: none;
}
.choice__text { font-size: 0.97rem; color: var(--ink); }

/* --------------------------------------------------------------- pieces -- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.79rem;
  font-weight: 620;
  background-color: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill--ok   { color: var(--ok);   border-color: color-mix(in srgb, var(--ok) 42%, transparent); }
.pill--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 42%, transparent); }
.pill--bad  { color: var(--bad);  border-color: color-mix(in srgb, var(--bad) 42%, transparent); }

.price {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 2.3rem);
  font-weight: 680;
  letter-spacing: -0.028em;
  line-height: 1;
  color: var(--ink);
}
.price small { font-size: 0.44em; font-weight: 550; color: var(--ink-3); letter-spacing: 0; }

.specs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 0.93rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 550; color: var(--ink); }

.muted { color: var(--ink-3); }
.small { font-size: 0.85rem; }
.hr { height: 1px; background: var(--hairline); border: 0; margin: 16px 0; }

/* Horizontal photo gallery — swipes on touch, scrolls in its own box. */
.gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img {
  flex: none;
  width: 86%;
  max-width: 460px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  scroll-snap-align: center;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}
.gallery img:only-child { width: 100%; }

/* Progress dots for the multi-step booking flow. */
.steps { display: flex; gap: 6px; align-items: center; margin-bottom: 14px; }
.steps__dot {
  height: 5px; flex: 1;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
}
.steps__dot--on   { background: var(--brand-primary); box-shadow: 0 0 12px var(--brand-glow); }
.steps__dot--done { background: color-mix(in srgb, var(--brand-primary) 55%, transparent); }

details.disclose > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 620;
  font-size: 0.93rem;
  color: var(--ink-2);
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::after { content: "＋"; color: var(--ink-3); font-weight: 400; }
details.disclose[open] > summary::after { content: "－"; }

.notice {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: var(--ink-2);
}
.notice--info {
  border-color: rgba(204, 34, 34, 0.42);
  background-color: rgba(204, 34, 34, 0.10);
}
.notice--warn {
  border-color: color-mix(in srgb, var(--warn) 46%, transparent);
  background-color: color-mix(in srgb, var(--warn) 10%, transparent);
}

.footer {
  margin-top: 28px;
  padding: 18px 4px;
  font-size: 0.79rem;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.6;
}
.footer__eho { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.footer__eho svg { width: 17px; height: 17px; opacity: .7; }
.footer a { padding-block: 9px; }

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

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; white-space: nowrap; }
.table th {
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  font-weight: 640;
  padding: 9px 12px;
  border-bottom: 1px solid var(--hairline);
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--hairline); color: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.035); }

/* ----------------------------------------------------------- tap targets - */

/* Buttons already clear 44px. Standalone links get a real box; links inside a
   sentence get vertical padding so their hit area clears the 24px minimum
   without disturbing how the line wraps. */
.topbar a { min-height: 44px; display: inline-flex; align-items: center; }
p a, li a, dd a, .small a, .notice a { padding-block: 5px; }

/* ------------------------------------------------------------ responsive - */

@media (min-width: 760px) {
  :root { --pad: 24px; --gap: 20px; }
  .page { padding-top: 24px; padding-bottom: 40px; }
  /* The CTA joins the flow on desktop instead of pinning to the viewport. */
  .actionbar {
    position: static;
    background-color: var(--glass-bg);
    background-image:
      radial-gradient(130% 78% at 10% -14%, var(--glass-sheen), transparent 58%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    margin-top: var(--gap);
    padding: 14px;
  }
  .gallery img { width: 62%; }
  .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* The printable sign is ink on paper — strip the glass and the dark ground. */
@media print {
  html, body { background: #fff; color: #000; }
  body::before, body::after, .actionbar, .topbar { display: none; }
  .glass {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff !important;
    background-image: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  h1, h2, h3, .price, .kv dd, strong { color: #000; }
  p, .muted, .small { color: #333; }
}
