/* Holmes Tech
 *
 * Colours: the values below are defaults. The live colours come from
 * Strapi > Site settings > Colours, served as /theme.css, which overrides
 * the matching variables here. Change colours there, not in this file.
 */
:root {
  /* Overridden by /theme.css */
  --blue: #3874ff;
  --yellow: #ffc338;
  --on-yellow: #0f172a;
  --hero-a: #3874ff;
  --hero-b: #3b61ec;
  --hero-fg: #ffffff;
  --services-bg: #ffffff;  --services-fg: #0f172a;
  --projects-bg: #faf9f6;  --projects-fg: #0f172a;
  --about-bg: #ffffff;     --about-fg: #0f172a;
  --book-bg: #faf9f6;      --book-fg: #0f172a;
  --footer-bg: #0f172a;    --footer-fg: #ffffff;
  --links-bg: #faf9f6;     --links-fg: #0f172a;

  /* Derived from the brand and button colours */
  --blue-dark: color-mix(in srgb, var(--blue) 85%, #000);
  --blue-deep: color-mix(in srgb, var(--blue) 62%, #000);
  --blue-tint: color-mix(in srgb, var(--blue) 12%, #fff);
  --yellow-hover: color-mix(in srgb, var(--yellow) 88%, #000);

  /* Fixed: white "surface" boxes (header, cards, form panel) */
  --ink: #0f172a;
  --ink-soft: #364151;
  --line: #d1dae5;
  --paper: #ffffff;

  --radius: 12px;
  --wrap: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 1.0625rem/1.65 var(--font); color: var(--ink); background: var(--paper); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--paper); padding: 8px 12px; }

/* Secondary text in a coloured section: a faded version of that section's text colour */
.lead, .services p, .about p, .book > div > p, .contact span, .muted, .copy, .links-head p, .bk-meta, .bk-desc p, .back {
  color: color-mix(in srgb, currentColor 72%, transparent);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 0 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-sm { min-height: 40px; padding: 0 1.1em; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-cta, .btn-cta:hover { color: var(--on-yellow); }
.btn-cta { background: var(--yellow); }
.btn-cta:hover { background: var(--yellow-hover); }
.btn-ghost, .btn-ghost:hover { color: inherit; border-color: color-mix(in srgb, currentColor 70%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.btn-line { border-color: var(--blue); color: var(--blue-dark); background: var(--paper); }
.btn-line:hover { background: var(--blue-tint); color: var(--blue-deep); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header (always white) */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand:hover { color: inherit; }
.logo { width: 28px; height: 38px; flex: none; }
.logo-lg { width: 56px; height: 76px; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.top nav a:not(.btn):hover { color: var(--blue); }
@media (max-width: 640px) { .top nav a:not(.btn) { display: none; } }

/* Hero */
.hero {
  color: var(--hero-fg); padding: clamp(56px, 10vw, 112px) 0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 26px, transparent 26px 64px),
    linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%);
}
.hero h1 { max-width: 18ch; }
.hero p { max-width: 58ch; font-size: 1.15rem; color: color-mix(in srgb, currentColor 92%, transparent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Sections: each takes its colours from the matching --<name>-bg / --<name>-fg */
.section { padding: clamp(56px, 8vw, 96px) 0; background: var(--bg); color: var(--fg); }
#services { --bg: var(--services-bg); --fg: var(--services-fg); }
#projects { --bg: var(--projects-bg); --fg: var(--projects-fg); }
#about    { --bg: var(--about-bg);    --fg: var(--about-fg); }
#book     { --bg: var(--book-bg);     --fg: var(--book-fg); }
.section .contact a { color: inherit; }
.lead { max-width: 60ch; }

.services { list-style: none; margin: 0; padding: 0; counter-reset: svc; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.services li {
  counter-increment: svc; display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 8px;
  padding: 24px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.services li::before { content: counter(svc, decimal-leading-zero); grid-row: span 2; color: var(--blue); font-weight: 800; font-size: 1.1rem; padding-top: .1em; }
.services h3 { margin: 0 0 .3em; }
.services p { margin: 0; max-width: 62ch; }

/* White cards keep dark text whatever the section colour */
.card, .panel, .quote, .link-card, .notice { color: var(--ink); }
.card p, .panel .hint, .panel .opt, .quote figcaption, .link-card p { color: var(--ink-soft); }

.projects { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--blue); box-shadow: 0 6px 24px color-mix(in srgb, var(--blue) 14%, transparent); }
.card p { flex: 1; }
.card-link { font-weight: 700; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* whole card clickable */
.tag { align-self: flex-start; margin-bottom: 12px; padding: 2px 10px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-deep); font-size: .8rem; font-weight: 700; }

.about { display: grid; gap: 40px; align-items: center; }
@media (min-width: 820px) { .about { grid-template-columns: 1.4fr 1fr; } }
.about p { max-width: 62ch; }
.quote { margin: 0; padding: 28px; border-left: 4px solid var(--yellow); background: var(--blue-tint); border-radius: 0 var(--radius) var(--radius) 0; }
.quote blockquote { margin: 0 0 .6em; font-size: 1.35rem; font-weight: 700; line-height: 1.35; }

/* Contact + booking */
.contact { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.contact span { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.book { display: grid; gap: 40px; }
@media (min-width: 900px) { .book { grid-template-columns: 1fr 1.3fr; align-items: start; } }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); }

.field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 6px; font-weight: 700; font-size: .95rem; padding: 0; }
.opt { font-weight: 400; }
.hint { margin: 6px 0 0; font-size: .9rem; }
.row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status { margin: 12px 0 0; min-height: 1.5em; font-weight: 600; }
.status.is-error { color: #b42318; }
.booking-off h3, .booking-online h3 { margin-bottom: .4em; }

/* Home page: list of bookable services */
.service-list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.service-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 700; text-decoration: none;
}
.service-list a:hover { border-color: var(--blue); background: var(--blue-tint); color: var(--ink); }
.service-list small { flex: none; color: var(--ink-soft); font-weight: 600; font-size: .9rem; }

/* Booking pages: /book, /book/{service}, /booking/{reference} */
.book-page { --bg: var(--book-bg); --fg: var(--book-fg); min-height: 70vh; padding-top: clamp(32px, 6vw, 64px); }
.bk h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.h3 { font-size: 1.2rem; }
.panel h2 { font-size: 1.35rem; }
.bk-narrow { max-width: 640px; }
.bk-step + .bk-step, .bk-change:not(:empty) { margin-top: 32px; }
/* Keep headings clear of the sticky header when a step scrolls into view */
.bk-step, .bk-change, .picker, .bk .panel, .bk h1, .bk h2, .bk-fallback { scroll-margin-top: 84px; }
.bk-change > h2 { margin-top: 8px; }
.bk-meta { font-weight: 600; margin-bottom: .6em; }
.bk-desc { max-width: 62ch; }
.back {
  display: inline-flex; margin: 0 0 16px; padding: 0; border: 0; background: none;
  font: 700 .95rem/1.4 var(--font); text-decoration: none; cursor: pointer;
}
.back:hover { color: inherit; text-decoration: underline; }

.service-cards { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.service-cards .h3 { margin-bottom: .4em; }
.card-meta { margin-bottom: 8px; color: var(--blue-deep); font-size: .9rem; font-weight: 700; }

.bk-grid { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 820px) { .bk-grid { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.bk-controls { display: grid; gap: 0 16px; }
@media (min-width: 520px) { .bk-controls:has(> :nth-child(2)) { grid-template-columns: 1fr 1.6fr; } }

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.cal-head h3 { margin: 0; font-size: 1.1rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink);
  font: 700 1.3rem/1 var(--font); cursor: pointer;
}
.icon-btn:not(:disabled):hover { border-color: var(--blue); color: var(--blue-dark); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { padding: 4px 0; text-align: center; color: var(--ink-soft); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1; min-height: 40px; padding: 0; border: 2px solid transparent; border-radius: 8px;
  background: none; color: color-mix(in srgb, var(--ink-soft) 55%, transparent); font: 600 1rem/1 var(--font);
}
.cal-day:not(:disabled) { background: var(--blue-tint); color: var(--blue-deep); font-weight: 800; cursor: pointer; }
.cal-day:not(:disabled):hover { border-color: var(--blue); }
.cal-day[aria-pressed="true"] { background: var(--blue); color: #fff; }
.cal-day.is-today { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.times-head { margin: 0 0 14px; font-size: 1.1rem; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.time-btn {
  min-height: 44px; border: 1px solid var(--blue); border-radius: 8px; background: var(--paper);
  color: var(--blue-dark); font: 700 1rem/1 var(--font); cursor: pointer;
}
.time-btn:hover { background: var(--blue); color: #fff; }
.times-body .hint { margin-top: 14px; }
.times-body .btn { margin-top: 12px; }

/* Loading placeholders */
.skeleton {
  border-color: transparent !important; color: transparent !important; border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%) 0 0 / 200% 100% !important;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.skel-time { display: block; min-height: 44px; }
.skel-line { height: 14px; margin: 10px 0; }
.skel-short { width: 40%; }
.skel-mid { width: 70%; }
.skel-title { height: 24px; width: 60%; margin: 12px 0 16px; }
.skel-block { height: 140px; }

/* Summary, notices, reference */
.summary { list-style: none; margin: 0 0 20px; padding: 16px 18px; display: grid; gap: 10px; border-radius: var(--radius); background: var(--blue-tint); color: var(--ink); }
.summary li { display: grid; grid-template-columns: 7rem 1fr; gap: 8px; }
.summary span { padding-top: .2em; color: var(--ink-soft); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.summary strong { font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 420px) { .summary li { grid-template-columns: 1fr; gap: 0; } }
.notice { margin: 0 0 20px; padding: 12px 16px; border-radius: 10px; background: #fff4e5; color: #7a4100; font-weight: 600; }
.notice.is-warn { background: #fff4e5; color: #7a4100; }
.notice.is-error { background: #fdecea; color: #b42318; }
.notice.is-ok { background: #e7f7ee; color: #116b3a; }
.picker-msg:empty { display: none; }
.picker-msg .notice { margin: 16px 0 0; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; }
.badge.is-ok { background: #e7f7ee; color: #116b3a; }
.badge.is-pending { background: #fff4e5; color: #7a4100; }
.badge.is-muted { background: #eef1f5; color: var(--ink-soft); }
.ref-box { margin: 0 0 16px; padding: 12px 16px; border: 1px dashed var(--line); border-radius: 10px; }
.ref-label { display: block; color: var(--ink-soft); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ref { font: 700 1.05rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.panel a:not(.btn) { overflow-wrap: anywhere; }

/* Radios and checkboxes in the booking form */
.choice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; font-weight: 400 !important; cursor: pointer; }
.choice input { flex: none; width: 20px; min-height: 0; height: 20px; margin: .2em 0 0; padding: 0; accent-color: var(--blue); }
.bk-turnstile:not(:empty) { margin-bottom: 18px; }
.bk-fallback { max-width: 640px; }

/* Footer */
.foot { background: var(--footer-bg); color: var(--footer-fg); padding: 56px 0 24px; }
.foot a { color: inherit; }
.foot .muted { margin-top: 12px; }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot-links { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.copy { margin-top: 40px; font-size: .875rem; }

/* /links page */
.links-page { background: var(--links-bg); color: var(--links-fg); }
.links-wrap { max-width: 520px; margin: 0 auto; padding: 40px 16px 24px; }
.links-head { text-align: center; margin-bottom: 28px; }
.links-head h1 { font-size: 1.8rem; margin: 12px 0 .3em; }
.quick { display: flex; justify-content: center; gap: 10px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.link-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.link-card.is-highlight { border: 2px solid var(--blue); }
.link-card h2 { font-size: 1.05rem; margin: 0 0 2px; }
.link-card p { margin: 0; font-size: .92rem; }
.link-card .btn { flex: none; }
.links-wrap .copy { text-align: center; }
