/* ============================================================
   imprexi template — style.css
   Public-site tokens live in content/theme/client-vars.css
   (inlined by header.php for zero-latency first paint).
   Admin UI tokens live in the :root block below so every
   client gets them from the shared core stylesheet.
   ============================================================ */

/* ---------- Century Gothic — self-hosted brand font ----------
   TTF files shipped with the template at /assets/century-gothic/.
   WOFF2 variants (25-40 KB each) reduce payload ~3× vs TTF;
   convert with: pyftsubset centurygothic.ttf --flavor=woff2
   Until converted, the TTF fallback is used — valid in all browsers.
   Licensing note: files sourced from online-fonts.com (not Monotype
   authorised). Risk accepted; upgrade to Monotype web licence if traffic grows.
   Only Imprexi overrides --font-sans/--font-display in client-vars.css.
   BornGreat and future clients are unaffected until they opt in.
   ----------------------------------------------------------- */
@font-face {
  font-family: 'Century Gothic';
  src: url('/assets/century-gothic/centurygothic.woff2') format('woff2'),
       url('/assets/century-gothic/centurygothic.ttf')   format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Century Gothic';
  src: url('/assets/century-gothic/centurygothic_bold.woff2') format('woff2'),
       url('/assets/century-gothic/centurygothic_bold.ttf')   format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Admin design-system tokens ----------
   Variable names are intentionally distinct from the public-site
   --color-* / --font-sans namespace in client-vars.css so the two
   systems coexist without collision.  Client accent overrides go
   in content/theme/client-vars.css (see Section 3, design handoff).
   ------------------------------------------------------------ */
:root {
  /* ─── Type ─── */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-ui:      'Geist', system-ui, -apple-system, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SF Mono', monospace;

  /* ─── Palette (warm neutral) ─── */
  --bg:         oklch(0.985 0.006 75);
  --surface:    oklch(0.995 0.004 75);
  --surface-2:  oklch(0.96  0.008 75);
  --surface-3:  oklch(0.93  0.009 75);
  --border:     oklch(0.90  0.008 75);
  --border-2:   oklch(0.84  0.008 75);
  --ink:        oklch(0.20  0.012 80);
  --ink-2:      oklch(0.34  0.011 80);
  --muted:      oklch(0.55  0.010 80);
  --muted-2:    oklch(0.70  0.008 80);

  /* ─── Accent — default cobalt; overridden per client in client-vars.css ─── */
  --accent:      oklch(0.45 0.10 250);
  --accent-2:    oklch(0.38 0.11 250);
  --accent-tint: oklch(0.96 0.025 250);

  /* ─── Semantic ─── */
  --positive:      oklch(0.55 0.10 150);
  --positive-tint: oklch(0.96 0.025 150);
  --warning:       oklch(0.62 0.10 60);
  --warning-tint:  oklch(0.96 0.030 75);
  --danger:        oklch(0.55 0.13 25);
  --danger-tint:   oklch(0.96 0.025 25);

  /* ─── Density-driven spacing (--s scales everything; default = 1) ─── */
  --s: 1;
  --space-1: calc(4px * var(--s));   --space-2: calc(8px * var(--s));
  --space-3: calc(12px * var(--s));  --space-4: calc(16px * var(--s));
  --space-5: calc(20px * var(--s));  --space-6: calc(24px * var(--s));
  --space-8: calc(32px * var(--s));  --space-10: calc(40px * var(--s));
  --space-12: calc(48px * var(--s)); --space-16: calc(64px * var(--s));

  --radius-sm: 4px;  --radius: 6px;  --radius-lg: 10px;  --radius-xl: 14px;
  --row-h:      calc(36px * var(--s));
  --topbar-h:   calc(56px * var(--s));
  --sidebar-w:  244px;
  --sidebar-w-collapsed: 60px;

  --shadow-sm: 0 1px 2px rgba(20,18,15,0.04);
  --shadow:    0 4px 16px rgba(20,18,15,0.06), 0 1px 2px rgba(20,18,15,0.04);

  /* Transition timings are intentionally omitted here.
     The public-site CSS uses the pattern `var(--t-fast) var(--ease)` with
     bare-duration values from client-vars.css.  The new admin format bakes
     easing into the value (e.g. 120ms cubic-bezier…), so putting both in
     the same :root would concatenate two easing functions — invalid CSS.
     Admin-specific timings are declared in admin-sidebar.php / admin.css
     (Step 3) where they are never combined with var(--ease). */
}

/* ─── Dark-mode palette — applied when JS sets data-theme="dark" on <html> ─── */
[data-theme="dark"] {
  --bg:         oklch(0.18 0.008 80);
  --surface:    oklch(0.21 0.009 80);
  --surface-2:  oklch(0.24 0.010 80);
  --surface-3:  oklch(0.28 0.011 80);
  --border:     oklch(0.30 0.010 80);
  --border-2:   oklch(0.38 0.011 80);
  --ink:        oklch(0.96 0.006 75);
  --ink-2:      oklch(0.86 0.007 75);
  --muted:      oklch(0.68 0.009 75);
  --muted-2:    oklch(0.55 0.010 75);
  --accent-tint: oklch(0.28 0.040 250);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
/* Inline SVG icons from core/partials/icons.php — size via em so they scale
   with the surrounding text; vertical-align nudge centres them on the cap line. */
.icon {
  display: inline-block; flex-shrink: 0;
  width: 1em; height: 1em;
  vertical-align: -0.125em;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-primary);
  font-weight: 500;
}
h1 { font-size: clamp(var(--fs-xl), 6vw, var(--fs-3xl)); }
h2 { font-size: clamp(var(--fs-lg), 4vw, var(--fs-2xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p, li { max-width: 60ch; }
small, .small { font-size: var(--fs-sm); color: var(--color-ink-muted); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-px);
}
/* Increased from 10vw to 12vw for more breathing room (PDF item 1) */
.section { padding-block: clamp(var(--space-16), 12vw, var(--space-32)); }
.stack > * + * { margin-top: var(--space-8); }
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 4.5rem; position: relative;
}
.site-logo {
  font-family: var(--font-display); font-size: var(--fs-lg);
  display: flex; align-items: center;
}
.site-logo img { height: 2.5rem; width: auto; object-fit: contain; }

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  background: none; border: none; cursor: pointer;
  color: var(--color-ink); border-radius: var(--radius);
  transition: background var(--t-fast); flex-shrink: 0;
  font-size: 1.4rem; line-height: 1;
}
/* Prevent the icon span from intercepting clicks meant for the button */
.nav-toggle .nav-icon { pointer-events: none; display: block; line-height: 1; }
.nav-toggle:hover { background: var(--color-surface-2); }

/* Desktop only — mutually exclusive with the mobile ≤768px block below */
@media (min-width: 769px) {
  .site-nav { display: flex; gap: var(--space-6); }
}
.site-nav a {
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.4rem; height: 1px;
  background: var(--color-primary); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-med) var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Mobile nav (≤ 768 px) ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 4.5rem;
    left: -1rem; right: -1rem;       /* bleed past container padding */
    background: var(--color-surface);
    border-bottom: 2px solid var(--color-line);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9;
    padding: var(--space-3) var(--space-4) var(--space-4);
  }
  .site-nav.is-open { display: flex; }

  /* Generous tap targets */
  .site-nav a {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    font-size: var(--fs-md);
    text-transform: none;
    letter-spacing: 0;
    display: block;
  }
  .site-nav a:hover { background: var(--color-surface-2); }
  .site-nav a[aria-current="page"] {
    background: var(--color-surface-2);
    font-weight: 600; color: var(--color-primary);
  }
  .site-nav a::after { display: none; }
}

/* ---------- Hero (ATO-inspired centered CTA) ---------- */
.hero {
  min-height: 80vh;
  display: grid; place-items: center;
  text-align: center;
  padding-inline: var(--container-px);
  /* background-image injected inline by PHP when hero_bg_image is configured */
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero h1 { max-width: 18ch; margin-inline: auto; }
.hero p  { max-width: 44ch; margin-inline: auto; color: var(--color-ink-muted); }
/* Dark scrim over background photos — keeps text readable without touching colour tokens */
.hero.has-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
/* Lift the content stack and booking widget above the scrim */
.hero.has-bg > .stack,
.hero.has-bg > .hero-booking { position: relative; z-index: 1; }
.hero.has-bg > .stack { color: #fff; }
.hero.has-bg h1,
.hero.has-bg p { color: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-size: var(--fs-sm); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn-primary { background: var(--color-primary); color: var(--color-surface); }
.btn-primary:hover { background: var(--color-accent); color: var(--color-primary); }
.btn-ghost { border: 1px solid var(--color-primary); color: var(--color-primary); }
.btn-ghost:hover { background: var(--color-primary); color: var(--color-surface); }
/* Larger padding variant used for CTA strip buttons */
.btn-lg { padding: var(--space-4) var(--space-10); font-size: var(--fs-base); }

/* Hero button variants — colours controlled via Settings → Theme */
.hero-btn-primary {
  background: var(--hero-btn-primary-bg);
  color:      var(--hero-btn-primary-text);
  border:     1px solid var(--hero-btn-primary-border);
}
.hero-btn-primary:hover {
  background:   var(--hero-btn-primary-hover-bg);
  color:        var(--hero-btn-primary-hover-text);
  border-color: var(--hero-btn-primary-hover-border);
}
.hero-btn-ghost {
  background: var(--hero-btn-ghost-bg);
  color:      var(--hero-btn-ghost-text);
  border:     2px solid var(--hero-btn-ghost-border);
}
.hero-btn-ghost:hover {
  background:   var(--hero-btn-ghost-hover-bg);
  color:        var(--hero-btn-ghost-hover-text);
  border-color: var(--hero-btn-ghost-hover-border);
}

/* ---------- Hero booking widget ---------- */
/*
 * Rendered inside .hero.has-booking when hero_booking_widget = 1.
 * The card sits below the hero text, spans the full container width,
 * and adapts from a 5-column row on desktop to a stacked layout on mobile.
 */
.hero.has-booking {
  /* Extra bottom padding to make room for the card */
  padding-bottom: clamp(var(--space-10), 6vw, var(--space-16));
}

.hero-booking {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  margin-top: var(--space-10);
  padding-inline: var(--space-4);
}

.hero-booking-form {
  display: grid;
  /* 2 date fields (wider) + 2 small selects + actions column (stacked buttons) */
  grid-template-columns: 1.4fr 1.4fr 0.8fr 0.8fr auto;
  gap: var(--space-3);
  align-items: end;
  background: #fff;
  border-radius: var(--radius-2);
  padding: var(--space-5) var(--space-6);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
}

.hero-booking-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.hero-booking-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-ink-muted);
  white-space: nowrap;
}

.hero-booking-input {
  width: 100%;
  padding: var(--space-3) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-1);
  font-size: 0.9rem;
  color: var(--color-ink);
  background: var(--color-surface);
  line-height: 1.4;
}

.hero-booking-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--color-primary);
}

/* Actions column: two buttons stacked vertically */
.hero-booking-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hero-booking-btn {
  white-space: nowrap;
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-1);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: center;
}

.hero-booking-btn:hover {
  background: oklch(from var(--color-primary) calc(l - 0.06) c h);
  border-color: oklch(from var(--color-primary) calc(l - 0.06) c h);
}

/* Ghost variant — outlined, transparent fill */
.hero-booking-btn--ghost {
  background: transparent;
  color: var(--color-primary);
}

.hero-booking-btn--ghost:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Tablet — 2 columns, actions span full width */
@media (max-width: 860px) {
  .hero-booking-form {
    grid-template-columns: 1fr 1fr;
  }
  .hero-booking-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .hero-booking-actions .hero-booking-btn {
    flex: 1;
  }
}

/* Mobile — single column */
@media (max-width: 480px) {
  .hero-booking {
    padding-inline: var(--space-2);
  }
  .hero-booking-form {
    grid-template-columns: 1fr;
    padding: var(--space-4);
  }
  .hero-booking-actions {
    flex-direction: column;
  }
}

/* ---------- Blog post body ---------- */
/* Override the global p,li max-width:60ch — post columns should fill the container */
.post-body p,
.post-body li { max-width: none; }
/* Images fill the column; never overflow */
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin-block: var(--space-6); display: block; }
.post-body h2, .post-body h3, .post-body h4 { margin-top: var(--space-8); margin-bottom: var(--space-3); }
.post-body p { margin-bottom: var(--space-4); line-height: var(--lh-body); }
.post-body ul, .post-body ol { padding-left: 1.4em; margin-block: var(--space-4); }
.post-body li { margin-bottom: var(--space-2); }
.post-body a { color: var(--color-accent); text-decoration: underline; }
.post-body a:hover { color: var(--color-primary); }
.post-body blockquote { border-left: 3px solid var(--color-accent); padding-left: var(--space-4);
                         color: var(--color-ink-muted); margin-block: var(--space-6); font-style: italic; }
.post-body table { width: 100%; border-collapse: collapse; margin-block: var(--space-6); font-size: var(--fs-sm); }
.post-body th, .post-body td { padding: var(--space-3); border: 1px solid var(--color-line); text-align: left; }
.post-body th { background: var(--color-surface-2); font-weight: 600; }
.post-body strong, .post-body b { color: var(--color-primary); }

/* ---------- Portfolio grid (Building-Practice-inspired) ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-4); }
/* Homepage preview: smaller landscape cards so they don't dominate the page */
.portfolio-grid--preview { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.portfolio-grid--preview .portfolio-card { aspect-ratio: 3 / 2; }
.portfolio-card { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--color-surface-2); }
.portfolio-card img, .portfolio-card picture { width: 100%; height: 100%; }
.portfolio-card img { object-fit: cover; transition: transform var(--t-med) var(--ease); }
.portfolio-card:hover img { transform: scale(1.03); }
.portfolio-card .caption {
  position: absolute; inset: auto 0 0 0;
  padding: var(--space-6);
  color: var(--color-surface);
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
}

/* ---------- Footer (Studio-Contra-inspired) ---------- */
.site-footer {
  background: var(--color-primary);
  color: var(--color-surface);
  padding-block: var(--space-16) var(--space-8);
}
.site-footer .container { display: grid; gap: var(--space-8); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer h4 { color: var(--color-surface); font-family: var(--font-sans); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-3); }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: var(--space-2); }
.site-footer a { color: color-mix(in srgb, var(--color-surface) 75%, transparent); }
.site-footer a:hover { color: var(--color-surface); }
.site-footer .copyright { grid-column: 1 / -1; border-top: 1px solid color-mix(in srgb, var(--color-surface) 12%, transparent); padding-top: var(--space-6); font-size: var(--fs-xs); color: color-mix(in srgb, var(--color-surface) 55%, transparent); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center; }

/* Footer "Follow" social icon row — colour/hover inherited from .site-footer a via currentColor */
.footer-social { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.footer-social a { display: inline-flex; }
.footer-social .icon { width: 20px; height: 20px; }
/* Agency attribution — hardcoded in core/partials/footer.php, not editable by clients. */
.ejitech-credit { color: inherit; opacity: .45; font-size: var(--fs-xs); text-decoration: none; white-space: nowrap; }
.ejitech-credit:hover { opacity: .75; }

/* ---------- Homepage custom HTML sections ---------- */
/* Wrapper for admin-authored HTML blocks on the public homepage.
   Increased padding per client feedback (PDF item 1: more spacing site-wide). */
.hp-section { padding-block: clamp(5rem, 12vw, 9rem); }
/* Faint brand-blue background band — applied to alternating card-grid sections
   (Why Choose = 3rd hp-section, Our Services = 4th hp-section).
   If section order changes, update these selectors to match. */
.hp-section:nth-of-type(3),
.hp-section:nth-of-type(4) { background: var(--color-surface-2); }
/* Reset the 60ch paragraph limit inside custom blocks — admins control their own layout. */
.hp-content p, .hp-content li { max-width: none; }
/* Client feedback item 4/7: consistent left-alignment throughout all HTML blocks. */
.hp-content,
.hp-content h1, .hp-content h2, .hp-content h3,
.hp-content p, .hp-content li { text-align: left; }
/* Sensible image defaults to prevent layout breaks. */
.hp-content img { max-width: 100%; height: auto; border-radius: var(--radius); }
/* Heading rhythm inside custom blocks. */
.hp-content h2 { margin-bottom: var(--space-4); }
.hp-content h3 { margin-bottom: var(--space-3); }
.hp-content h4 { margin-bottom: var(--space-2); }
/* Spacing between block-level children. */
.hp-content > * + * { margin-top: var(--space-6); }

/* ---------- Stats strip — proof-points below the hero ---------- */
/* Full-width dark band using the primary navy so it reads as a direct
   extension of the hero; green stat values create the high-contrast punch. */
.stats-strip {
  background: var(--color-primary);
  padding-block: var(--space-12);
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Dark scrim over background photo — keeps green numbers readable */
.stats-strip.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 130, 0.72);
  pointer-events: none;
}
/* Lift content above scrim */
.stats-strip.has-bg .container { position: relative; z-index: 1; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-8) var(--space-4);
  text-align: center;
}
.stat-item  { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}
.stat-label {
  font-size: var(--fs-sm);
  color: var(--color-on-primary-mute);
  max-width: 14ch;
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

/* ---------- Icon disc — client feedback item 3 ---------- */
/* Coloured circular ground for emoji/SVG icons in homepage card sections.
   Apply class="icon-disc icon-disc--blue" (or --green) to the icon wrapper element.
   Set in the HTML block via Admin → Homepage or via scripts/migrate-homepage-feedback.sql. */
.icon-disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-bottom: var(--space-3);
}
/* Blue disc — bold navy background for high contrast (PDF feedback item 3) */
.icon-disc--blue  {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
}
/* Green disc — bold green background; navy icon text passes contrast check */
.icon-disc--green {
  background: var(--color-accent);
  color: var(--color-primary);
  border: none;
}

/* ---------- Two-column homepage grid — collapses on mobile ---------- */
/* Applied to inline grid-template-columns:1fr 1fr wrappers in homepage HTML sections */
@media (max-width: 768px) {
  .hp-two-col { grid-template-columns: 1fr !important; }
  .hp-two-col > * { min-width: 0; }
}

/* ---------- Utilities ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Hero — display-font redesign ---------- */
/* Large display-font title; italic <em> carries the accent word */
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-ink-muted);
  font-weight: 500;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 14ch;
  margin-inline: auto;
  color: var(--color-ink);
}
/* Accent colour for the tagline line within the hero title */
.hero-title-accent { color: var(--color-primary); }
/* Hero heading style — set via Settings → Site Info → Hero Heading Style.
   Applies to both lines of the hero heading (site name + tagline). */
.hero-title--italic { font-style: italic; }
.hero-title--bold   { font-weight: 700; }
.hero-title--normal { font-style: normal; font-weight: 400; }
.hero-tagline  { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--color-ink-muted); max-width: 44ch; margin-inline: auto; line-height: 1.6; }
.hero-cta      { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

/* When has-bg is active the existing scrim/z-index rules already apply; tweak colours */
.hero.has-bg .hero-title  { color: #fff; }
.hero.has-bg .hero-title-accent { color: inherit; opacity: 0.88; }
.hero.has-bg .hero-tagline  { color: rgba(255,255,255,0.78); }

/* ---------- Portfolio grid — 3 col + 2-col feature every 5th ---------- */
/* 3-column fixed grid (collapses through auto-fit on mobile) */
.pub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }

.pub-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  display: block;
  text-decoration: none;
}
/* Feature card spans two columns with a landscape ratio */
.pub-card--feature { grid-column: span 2; aspect-ratio: 16 / 9; }

.pub-card img, .pub-card picture { width: 100%; height: 100%; }
.pub-card img { object-fit: cover; transition: transform var(--t-med) var(--ease); }
.pub-card:hover img { transform: scale(1.03); }

.pub-card-caption {
  position: absolute; inset: auto 0 0 0;
  padding: var(--space-6);
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.12) 60%, transparent);
}
.pub-card-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.pub-card-sub   { font-size: 12px; margin-top: 4px; opacity: 0.78; }

/* Homepage preview grid — 1 big card left + 2 small cards stacked right.
   Two equal columns; big card spans both rows so its height = 2 small cards + gap. */
.pub-grid--preview {
  grid-template-columns: 1fr 1fr;
}
/* Small right-side cards: 25/12 ratio = 5/3 height reduced by another 20% */
.pub-grid--preview .pub-card {
  aspect-ratio: 25 / 12;
}
/* Big left card: spans both rows — no fixed aspect-ratio, fills the grid area */
.pub-grid--preview .pub-card--main {
  grid-row: span 2;
  aspect-ratio: unset;
}

/* Responsive collapse */
@media (max-width: 900px) {
  .pub-grid { grid-template-columns: repeat(2, 1fr); }
  .pub-card--feature { grid-column: span 2; }
}
@media (max-width: 540px) {
  .pub-grid { grid-template-columns: 1fr; }
  .pub-card--feature { grid-column: span 1; aspect-ratio: 4 / 3; }
  /* On mobile stack all preview cards with consistent ratio */
  .pub-grid--preview .pub-card--main { grid-row: span 1; aspect-ratio: 4 / 3; }
}

/* ---------- Portfolio — Split layout (alternating text/image rows) ---------- */
.pub-split { display: flex; flex-direction: column; gap: var(--space-10); }
.pub-split-item {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  text-decoration: none;
  color: inherit;
}
.pub-split-item--reverse { flex-direction: row-reverse; }
.pub-split-body, .pub-split-media { flex: 1 1 50%; min-width: 0; }
.pub-split-body {
  padding: var(--space-8);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
}
.pub-split-title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 400; letter-spacing: -0.01em; margin-bottom: var(--space-2); }
.pub-split-sub  { color: var(--color-ink-muted); margin-bottom: var(--space-4); }
.pub-split-link { font-size: var(--fs-sm); font-weight: 500; }
.pub-split-media picture, .pub-split-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform var(--t-med) var(--ease);
}
.pub-split-item:hover .pub-split-media img { transform: scale(1.03); }
@media (max-width: 768px) {
  .pub-split-item, .pub-split-item--reverse { flex-direction: column; }
}

/* ---------- Portfolio — Kanban layout (masonry columns) ---------- */
.pub-kanban { column-count: 3; column-gap: var(--space-4); }
.pub-kanban-card {
  display: block;
  break-inside: avoid;
  margin-bottom: var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.pub-kanban-card picture, .pub-kanban-card img { display: block; width: 100%; }
.pub-kanban-card img { transition: transform var(--t-med) var(--ease); }
.pub-kanban-card:hover img { transform: scale(1.03); }
.pub-kanban-body { padding: var(--space-5); }
.pub-kanban-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 400; letter-spacing: -0.01em; margin-bottom: var(--space-1); }
.pub-kanban-sub   { font-size: var(--fs-sm); color: var(--color-ink-muted); }
@media (max-width: 900px) { .pub-kanban { column-count: 2; } }
@media (max-width: 540px) { .pub-kanban { column-count: 1; } }

/* ---------- Portfolio — List layout (compact rows) ---------- */
.pub-list { display: flex; flex-direction: column; }
.pub-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-line);
  text-decoration: none;
  color: inherit;
  transition: background var(--t-med) var(--ease);
}
.pub-list-item:first-child { border-top: 1px solid var(--color-line); }
.pub-list-item:hover { background: var(--color-surface-2); }
.pub-list-media { flex: 0 0 96px; }
.pub-list-media picture, .pub-list-media img {
  display: block; width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-lg);
}
.pub-list-body { flex: 1 1 auto; min-width: 0; }
.pub-list-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 400; letter-spacing: -0.01em; }
.pub-list-sub   { font-size: var(--fs-sm); color: var(--color-ink-muted); margin-top: var(--space-1); }
.pub-list-arrow { font-size: var(--fs-lg); color: var(--color-ink-muted); flex-shrink: 0; }
@media (max-width: 540px) { .pub-list-media { display: none; } }

/* ---------- Journal — 2-col blog grid ---------- */
.journal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8) var(--space-10); }
.journal-article { display: flex; flex-direction: column; gap: var(--space-3); }
.journal-date    { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-muted); font-weight: 500; }
.journal-title   { font-family: var(--font-display); font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
.journal-title a { color: var(--color-ink); text-decoration: none; }
.journal-title a:hover { color: var(--color-primary); }
.journal-excerpt { font-size: 14px; color: var(--color-ink-muted); line-height: 1.65; }
.journal-cover   { aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); width: 100%; display: block; margin-bottom: var(--space-1); }
.journal-read    { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-primary); text-decoration: none; }
.journal-read:hover { text-decoration: underline; }

@media (max-width: 640px) { .journal-grid { grid-template-columns: 1fr; } }

/* Category filter chips for blog index */
.cat-chip {
  display: inline-flex; align-items: center;
  padding: 3px 14px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-ink-muted);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.cat-chip:hover       { border-color: var(--color-primary); color: var(--color-primary); }
.cat-chip.is-active   { background: var(--color-primary); color: var(--color-surface); border-color: var(--color-primary); }

/* Pagination */
.pagination { display: flex; gap: var(--space-4); margin-top: var(--space-12); }

/* ---------- Dark contact section ---------- */
.contact-section {
  background: var(--color-primary);
  color: var(--color-surface);
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
}
.contact-section .container { max-width: 52rem; }
.contact-section h1 { color: var(--color-surface); }
.contact-section p  { color: color-mix(in srgb, var(--color-surface) 75%, transparent); max-width: 52ch; }

/* Recolour form fields on dark background */
.contact-section .form-field label { color: color-mix(in srgb, var(--color-surface) 85%, transparent); }
.contact-section .form-field input,
.contact-section .form-field textarea,
.contact-section .form-field select {
  background: color-mix(in srgb, var(--color-surface) 10%, transparent);
  border-color: color-mix(in srgb, var(--color-surface) 25%, transparent);
  color: var(--color-surface);
}
.contact-section .form-field input::placeholder,
.contact-section .form-field textarea::placeholder { color: color-mix(in srgb, var(--color-surface) 40%, transparent); }

/* Success / error notices on dark background */
.contact-success {
  background: color-mix(in srgb, var(--color-surface) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-surface) 22%, transparent);
  color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.contact-error {
  background: rgba(220,38,38,0.15);
  border: 1px solid rgba(220,38,38,0.35);
  color: #fca5a5;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

/* Section page-title pattern (shared across portfolio, blog, project pages) */
.page-header { padding-block: var(--space-16); }
.page-header-eyebrow { font-family: var(--font-sans); font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em; color: var(--color-ink-muted); font-weight: 500; margin-bottom: var(--space-2); }
.page-header-title   { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; color: var(--color-ink); }

/* ═══════════════════════════════════════ HOTEL VERTICAL ═══════════════════ */

/* ---------- Inner page banner — branded dark header for hotel pages ---------- */
/* Replaces the plain white section header on all hotel inner pages.            */
.page-banner {
  background: var(--color-primary);
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  position: relative;
}
.page-banner .page-header-eyebrow { color: rgba(255,255,255,0.65); }
.page-banner .page-header-title   { color: #fff; }
.page-banner p  { color: rgba(255,255,255,0.78); max-width: 52ch; }
.page-banner a  { color: rgba(255,255,255,0.9); text-decoration: underline; }

/* ---------- Accommodation page — room type grid ---------- */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}
.room-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  transition: box-shadow 0.2s;
}
.room-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.10); }

/* Cover image container — 16:9 aspect ratio */
.room-card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface-2);
}
.room-card-img img,
.room-card-img picture { width: 100%; height: 100%; display: block; }
.room-card-img img { object-fit: cover; }

/* Placeholder when no image uploaded */
.room-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
  background: var(--color-surface-2);
}

/* Price badge — bottom-left overlay */
.room-price-badge {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-3);
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}
.room-price-amount { color: #fff; font-size: 1rem; font-weight: 700; }
.room-price-unit   { color: rgba(255,255,255,0.65); font-size: 0.75rem; }

/* Card body */
.room-card-body { padding: var(--space-5); }
.room-card-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: var(--space-2);
}
.room-card-desc {
  font-size: 0.875rem;
  color: var(--color-ink-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

/* Room meta pills */
.room-card-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.room-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--color-ink-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: 99px;
  padding: 2px var(--space-3);
}
.room-meta-pill svg { flex-shrink: 0; }

/* CTA button on room card */
.room-card-cta {
  display: block;
  text-align: center;
  padding: var(--space-3) var(--space-5);
  font-size: 0.9rem;
}

/* ---------- Reservation page ---------- */
/* Two-column layout: form left, summary sidebar right */
.res-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-10);
  align-items: start;
  max-width: 900px;
}
.res-form { }

.res-section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-line);
}

.res-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.res-field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.res-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.res-field input,
.res-field select,
.res-field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-surface);
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.res-field input:focus,
.res-field select:focus,
.res-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14,28,122,0.08);
}
.res-field textarea { resize: vertical; }
.req { color: var(--color-danger, #e81c24); margin-left: 2px; }
.res-disclaimer {
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  line-height: 1.55;
  margin-top: var(--space-4);
  text-align: center;
}

/* Booking summary sidebar */
.res-summary-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: sticky;
  top: var(--space-10);
}
.res-summary-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: var(--space-5);
  color: var(--color-ink);
}
.res-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 0.875rem;
  margin-bottom: var(--space-3);
}
.res-summary-label { color: var(--color-ink-muted); flex-shrink: 0; }
.res-summary-val   { color: var(--color-ink); text-align: right; word-break: break-word; }
.res-summary-divider { border: none; border-top: 1px solid var(--color-line); margin: var(--space-4) 0; }
.res-summary-total { font-weight: 600; font-size: 1rem; }
.res-summary-note  { font-size: 0.73rem; color: var(--color-ink-muted); margin-top: var(--space-4); line-height: 1.5; }

/* Submit button inside the sticky sidebar (desktop only) */
.res-sidebar-submit {
  width: 100%;
  margin-top: var(--space-5);
  font-size: 0.95rem;
  padding: var(--space-3) var(--space-4);
}

/* Fixed bottom bar shown on mobile instead of the sidebar button */
.res-mobile-bar {
  display: none; /* hidden by default; shown via media query below */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-ink);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  box-shadow: 0 -4px 20px rgba(0,0,0,.18);
}

.res-mobile-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.res-mobile-bar-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.55);
}

.res-mobile-bar-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.res-mobile-bar-btn {
  white-space: nowrap;
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background .15s;
  flex-shrink: 0;
}

/* Booking success state */
.booking-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-accent, #2dc22d);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  color: #fff;
}
.booking-ref-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-10);
}
.booking-ref-label  { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-muted); }
.booking-ref-number { font-family: var(--font-display); font-size: 2rem; letter-spacing: 0.04em; color: var(--color-primary); }
.booking-ref-hint   { font-size: 0.8rem; color: var(--color-ink-muted); }

/* Desktop: sidebar button visible, mobile bar hidden */
@media (min-width: 769px) {
  .res-mobile-bar { display: none !important; }
}

/* Mobile: stack layout, hide sidebar submit, show fixed bottom bar */
@media (max-width: 768px) {
  .res-layout { grid-template-columns: 1fr; gap: var(--space-8); }
  .res-summary { order: -1; }  /* summary card appears above form */
  .res-summary-card { position: static; }
  .res-sidebar-submit { display: none; }  /* button moves to fixed bar */
  .res-mobile-bar { display: flex; }     /* show the fixed bottom bar */
  .res-row { grid-template-columns: 1fr; gap: 0; }
  .room-grid { grid-template-columns: 1fr; }
  /* Prevent last form field from sitting behind the fixed bar */
  main { padding-bottom: 80px; }
}

/* ---------- Reservation step indicator ---------- */
.res-steps {
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-line);
  padding-block: var(--space-4);
}
.res-steps-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 480px;
}
.res-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}
.res-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--color-line);
  color: var(--color-ink-muted);
  background: var(--color-surface);
}
.res-step--active .res-step-num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.res-step--done .res-step-num {
  background: oklch(0.92 0.06 148);
  border-color: transparent;
  color: var(--color-primary);
}
.res-step--active .res-step-label { color: var(--color-ink); }
.res-step--done   .res-step-label { color: var(--color-primary); }
.res-step--pending .res-step-label { color: var(--color-ink-muted); }
.res-step-connector {
  flex: 1;
  height: 1px;
  background: var(--color-line);
  margin-inline: var(--space-2);
  min-width: 24px;
}

/* ---------- Room type radio cards on reservation page ---------- */
.rtype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.rtype-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--color-surface);
  position: relative;
}
.rtype-card input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.rtype-card:hover:not(.is-unavailable) {
  border-color: var(--color-primary-300, #3D8C4F);
  box-shadow: 0 2px 12px rgba(26,92,39,0.10);
}
.rtype-card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,92,39,0.12);
}
.rtype-card.is-unavailable {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.rtype-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.rtype-card-placeholder {
  width: 100%;
  height: 140px;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
}
.rtype-card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.rtype-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.rtype-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-ink);
  line-height: 1.3;
}
.rtype-card-desc {
  font-size: 0.82rem;
  color: var(--color-ink-muted);
  line-height: 1.5;
  margin: 0;
}
.rtype-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: 0.8rem;
  color: var(--color-ink-muted);
  border-top: 1px solid var(--color-line);
}
.rtype-card-price {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.9rem;
}
.rtype-card-price small {
  font-weight: 400;
  color: var(--color-ink-muted);
  font-size: 0.78rem;
}

/* Availability badges */
.rtype-avail-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2em 0.55em;
  border-radius: var(--radius-1, 4px);
  white-space: nowrap;
  flex-shrink: 0;
}
.rtype-avail-ok   { background: oklch(0.93 0.05 148); color: #1A5C27; }
.rtype-avail-low  { background: oklch(0.95 0.08 65);  color: #7a4000; }
.rtype-avail-full { background: #fee2e2; color: #991b1b; }

/* Responsive reservation page */
@media (max-width: 600px) {
  .rtype-grid { grid-template-columns: 1fr; }
  .res-steps-list { max-width: 100%; }
  .res-step-label { display: none; }
  .res-step--active .res-step-label { display: inline; }
}

/* ---------- Reservation payment step (/reservation?pay=1) ---------- */

/* Summary box on the payment step — shows booking ref, dates, total */
.res-pay-summary {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.res-pay-summary-head {
  background: var(--color-surface-2);
  padding: var(--space-3) var(--space-5);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-ink-muted);
  border-bottom: 1px solid var(--color-line);
}

.res-pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-line);
}

.res-pay-row:last-child { border-bottom: none; }

.res-pay-row span:first-child { color: var(--color-ink-muted); }

.res-pay-row--total {
  background: var(--color-surface-2);
  font-weight: 700;
  font-size: 1rem;
}

.res-pay-row--total strong {
  color: var(--color-primary);
  font-size: 1.15rem;
}

/* ---------- Availability results page (/availability) ---------- */

/* Banner: extends page-banner with a sticky search bar below */
.avail-banner { padding-bottom: 0; }

/* Search bar floats below the banner heading on a white shelf */
.avail-search-bar {
  margin-top: var(--space-8);
  background: #fff;
  border-radius: var(--radius-2) var(--radius-2) 0 0;
  padding: var(--space-5) var(--space-6);
  box-shadow: 0 -4px 24px rgba(0,0,0,.08);
  width: 100%;
}

.avail-search-form {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 0.6fr 0.6fr auto;
  gap: var(--space-3);
  align-items: end;
  max-width: 900px;
  margin: 0 auto;
}

.avail-search-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avail-search-field label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-ink-muted);
}

.avail-search-field input,
.avail-search-field select {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-1);
  font-size: 0.9rem;
  color: var(--color-ink);
  background: var(--color-surface);
}

.avail-search-field input:focus,
.avail-search-field select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.avail-search-btn {
  white-space: nowrap;
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-1);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.avail-search-btn:hover {
  background: oklch(from var(--color-primary) calc(l - 0.06) c h);
}

/* Results grid — horizontal cards (image left, body right) */
.avail-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.avail-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-2);
  overflow: hidden;
  background: #fff;
  transition: box-shadow .15s;
}

.avail-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
}

.avail-card--unavailable {
  opacity: .65;
}

.avail-card-img {
  position: relative;
  overflow: hidden;
}

.avail-card-img picture,
.avail-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avail-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
}

/* Availability badge overlaid on image */
.avail-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25em 0.65em;
  border-radius: 999px;
  letter-spacing: .03em;
}

.avail-badge--ok   { background: oklch(0.93 0.05 148); color: #1A5C27; }
.avail-badge--low  { background: oklch(0.95 0.08 65);  color: #7a4000; }
.avail-badge--full { background: #fee2e2; color: #991b1b; }

/* Card body */
.avail-card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.avail-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.avail-card-name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1.2;
}

.avail-card-price {
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.avail-price-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.avail-price-unit {
  font-size: 0.8rem;
  color: var(--color-ink-muted);
  display: block;
}

.avail-card-desc {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  line-height: 1.65;
  margin: 0;
}

.avail-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.avail-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  background: var(--color-surface-2);
  border-radius: 999px;
  padding: 0.2em 0.7em;
}

.avail-meta-total {
  color: var(--color-primary);
  background: oklch(0.97 0.02 var(--color-primary-hue, 250));
  font-weight: 600;
}

.avail-card-cta {
  align-self: flex-start;
  margin-top: var(--space-2);
}

.avail-card-cta-disabled {
  align-self: flex-start;
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  font-style: italic;
}

/* Responsive */
@media (max-width: 860px) {
  .avail-search-form {
    grid-template-columns: 1fr 1fr;
  }
  .avail-search-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .avail-card {
    grid-template-columns: 1fr;
  }
  .avail-card-img {
    height: 220px;
  }
  .avail-search-form {
    grid-template-columns: 1fr;
  }
  .avail-search-bar {
    padding: var(--space-4);
  }
}

/* ---------- Admin media library ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-3);
}
.media-card {
  position: relative;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-surface-2);
  transition: box-shadow .12s, border-color .12s;
}
.media-card:hover { border-color: var(--color-primary); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.media-card-img img { width: 100%; height: 100px; object-fit: cover; display: block; }
.media-no-prev { width:100%;height:100px;display:flex;align-items:center;justify-content:center;
                 color:var(--color-ink-muted);font-size:1.5rem;background:var(--color-surface-2); }
.media-card-footer { display:flex;justify-content:space-between;align-items:center;
                     padding:4px 6px;font-size:11px;background:var(--color-surface); }
.media-card-name { overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-ink); }
.media-card-ext  { color:var(--color-ink-muted);flex-shrink:0;margin-left:4px; }
.media-card-del  { position:absolute;top:4px;right:4px; }
.media-del-btn {
  background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%;
  width: 20px; height: 20px; line-height: 1; font-size: 13px; cursor: pointer;
  display: none; align-items: center; justify-content: center; padding: 0;
}
.media-card:hover .media-del-btn { display: flex; }

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

