/* ============================================================
   Calibreco — minimal one-page site
   Palette: neutral ink + one indigo accent (from the profile deck)
   ============================================================ */

:root {
  --bg:        #fbfbfc;
  --surface:   #ffffff;
  --surface-2: #f4f5f7;
  --ink:       #10131a;
  --muted:     #5c6270;
  --line:      #e4e6ec;
  --accent:    #3b4fe0;
  --accent-ink:#ffffff;
  --ok:        #1a7f4b;
  --ok-soft:   #e8f5ee;
  --warn:      #9a6410;
  --shadow:    0 1px 2px rgba(16, 19, 26, .04), 0 8px 24px rgba(16, 19, 26, .05);

  --wrap: 1120px;
  --radius: 14px;
  --step: clamp(64px, 9vw, 116px);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-theme="dark"] {
  --bg:        #0b0e14;
  --surface:   #12161f;
  --surface-2: #161b26;
  --ink:       #e9eaee;
  --muted:     #969cab;
  --line:      #212734;
  --accent:    #8494ff;
  --accent-ink:#0b0e14;
  --ok:        #5cd39a;
  --ok-soft:   #10241a;
  --warn:      #d6a24a;
  --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }

/* Class rules that set `display` would otherwise beat the UA's [hidden] style. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Anchor jumps must clear the sticky header. */
section[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

/* No transition on the very first paint (theme is set inline in <head>). */
html[theme-init] body,
html[theme-init] * { transition: none !important; }

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 600; }
p { margin: 0; }

svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { left: 24px; }

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 72px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
/* The logo artwork sits on its own black field, so it keeps that field in
   both themes rather than being recoloured. */
.brand-mark {
  display: grid; place-items: center; flex: none;
  padding: 5px 9px;
  background: #000; border-radius: 10px;
}
.brand-mark img { height: 32px; width: auto; }
.brand-text { display: grid; }
.brand-name { font-weight: 600; letter-spacing: -.02em; font-size: 1.06rem; }
.brand-tag { white-space: nowrap; font-size: .72rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: .9rem;
  padding: 8px 12px; border-radius: 8px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav .nav-cta {
  color: var(--accent-ink); background: var(--accent);
  margin-left: 6px; font-weight: 500;
}
.nav .nav-cta:hover { color: var(--accent-ink); background: var(--accent); opacity: .88; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.menu-btn { display: none; }

#theme-toggle .i-moon { display: none; }
[data-theme="dark"] #theme-toggle .i-sun { display: none; }
[data-theme="dark"] #theme-toggle .i-moon { display: block; }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 7vw, 92px) 0 var(--step); }

.hero-grid {
  display: grid; gap: clamp(32px, 5vw, 64px);
  grid-template-columns: 1.05fr .95fr; align-items: center;
}

.eyebrow {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.35rem, 6vw, 3.9rem);
  letter-spacing: -.035em;
  margin-bottom: 22px;
}

.lede { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.09rem); max-width: 54ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 10px;
  text-decoration: none; font-size: .93rem; font-weight: 500;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), opacity .2s var(--ease), background-color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; margin: 44px 0 0;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.stats div { min-width: 0; }
.stats dt { font-size: 1.32rem; font-weight: 600; letter-spacing: -.02em; }
.stats dd { margin: 4px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.4; }

.hero-media {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--surface-2);
}
.hero-media img { width: 100%; height: clamp(320px, 46vw, 520px); object-fit: cover; }

/* ---------- Sections ---------- */

.section { padding: var(--step) 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }

.section-title {
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  max-width: 22ch;
  margin-bottom: 0;
}

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px); align-items: start;
}
.about-body { display: grid; gap: 16px; color: var(--muted); }
.about-body .muted { font-size: .88rem; }

.pillars {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; margin-top: clamp(44px, 6vw, 72px);
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.pillar { background: var(--bg); padding: clamp(24px, 3vw, 34px); }
.pillar h3 { font-size: 1.02rem; margin-bottom: 10px; }
.pillar h3::before {
  content: ""; display: block; width: 22px; height: 2px;
  background: var(--accent); margin-bottom: 16px; border-radius: 2px;
}
.pillar p { color: var(--muted); font-size: .93rem; }

/* ---------- Service cards ---------- */

.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; margin-top: clamp(36px, 5vw, 56px);
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { margin: 0; background: var(--surface-2); }
.card-media img { width: 100%; height: 210px; object-fit: cover; }
.card-body { padding: 22px 22px 26px; }
.card-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card-body p { color: var(--muted); font-size: .93rem; }

/* ---------- Capabilities table ---------- */

.table-scroll {
  margin-top: clamp(36px, 5vw, 56px);
  overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.spec-table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .94rem; }
.spec-table thead th {
  text-align: left; font-weight: 500; font-size: .74rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.spec-table tbody th, .spec-table tbody td {
  text-align: left; padding: 18px 22px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table tbody th { font-weight: 500; white-space: nowrap; }
.spec-table tbody td { color: var(--muted); }
.spec-table tbody td:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Industries ---------- */

.industries {
  list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.industries li { background: var(--surface); padding: clamp(20px, 2.4vw, 28px); }
.industries h3 { font-size: .97rem; margin-bottom: 6px; }
.industries p { color: var(--muted); font-size: .87rem; line-height: 1.55; }

/* ---------- Customer logos ---------- */

.logos {
  list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px; align-items: center;
}
.logos li {
  display: grid; place-items: center;
  padding: 26px 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.logo {
  width: auto; max-width: 100%;
  height: 46px; object-fit: contain;
  opacity: .6;
  transition: opacity .2s var(--ease);
}
/* The logos are single-colour ink artwork — inverting flips them to light. */
[data-theme="dark"] .logo { filter: invert(1); opacity: .7; }
.logos li:hover .logo { opacity: 1; }

/* ---------- Contact ---------- */

.contact {
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 64px); align-items: start;
}
.contact .lede { margin-top: 18px; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.contact-list li { background: var(--bg); padding: 20px 24px; display: grid; gap: 2px; }
.contact-label {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.contact-list a { text-decoration: none; font-size: 1.02rem; width: fit-content; }
.contact-list a:hover { color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 12px 20px;
  align-items: center; justify-content: space-between;
  color: var(--muted); font-size: .85rem;
}
.footer-logo {
  height: 54px; width: auto;
  padding: 6px 10px; background: #000; border-radius: 10px;
}
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media img { height: clamp(240px, 52vw, 360px); }
  .about-grid { grid-template-columns: 1fr; }
  .section-title { max-width: none; }
  .pillars,
  .cards { grid-template-columns: 1fr; }
  .industries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .brand-tag { display: none; }

  .nav {
    position: fixed; inset: 72px 0 auto; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px 24px 22px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .stats { grid-template-columns: 1fr; gap: 14px; }
  .stats div { display: flex; align-items: baseline; gap: 10px; }
  .stats dd { margin: 0; }
  .industries { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { flex: 1 1 auto; }
}

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

/* ---------- Footer credit ---------- */

.credit { color: var(--muted); }
.credit-name { color: var(--ink); font-weight: 500; }

@media (max-width: 640px) {
  .footer-inner { justify-content: flex-start; gap: 10px; }
  .footer-inner > * { flex: 1 1 100%; }
  .footer-inner a,
  .footer-logo { flex: 0 0 auto; }
  .footer-logo { height: 46px; }
}


/* ============================================================
   Booking
   ============================================================ */

.booking-head {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px); align-items: end;
}

.svc-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px; margin-top: clamp(36px, 5vw, 56px);
}

.svc {
  display: flex; flex-direction: column;
  padding: clamp(22px, 2.6vw, 30px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.svc:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }

.svc-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.svc-top h3 { font-size: 1.06rem; margin-right: auto; }

.chip {
  flex: none;
  font-size: .7rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; white-space: nowrap;
}

.svc > p { color: var(--muted); font-size: .93rem; }

.week {
  list-style: none; margin: 20px 0 22px; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
}
.week li {
  text-align: center; padding: 8px 4px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); line-height: 1.3;
}
.week .day { display: block; font-size: .74rem; font-weight: 500; }
.week .state { display: block; font-size: .68rem; color: var(--ok); }
.week li.is-booked .state { color: var(--warn); }
.week li.is-booked { background: var(--surface-2); }

.svc .btn { margin-top: auto; }

.week-note {
  margin-top: 26px; color: var(--muted); font-size: .85rem;
}
.week-note a { color: var(--accent); text-decoration: none; }
.week-note a:hover { text-decoration: underline; }

/* ---------- Booking dialog ---------- */

.modal {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 20px;
}
.modal-veil {
  position: absolute; inset: 0;
  background: rgba(8, 10, 16, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  width: min(680px, 100%); max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(8, 10, 16, .35);
  overflow: hidden;
  animation: modal-in .22s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }

.modal-head {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 1.02rem; margin-right: auto; }
#modal-service { color: var(--accent); }

.modal-x {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.modal-x:hover { color: var(--ink); background: var(--surface-2); }

.modal-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  padding: 22px; overflow-y: auto;
}

.field { display: grid; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label {
  font-size: .74rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
}
.field .opt { text-transform: none; letter-spacing: 0; opacity: .8; }

.field input,
.field select,
.field textarea {
  width: 100%; font: inherit; font-size: .94rem; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 76px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .7; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.err { font-size: .78rem; color: #c2410c; min-height: 0; }
[data-theme="dark"] .err { color: #f0895f; }
.field.is-bad input,
.field.is-bad select { border-color: #c2410c; }
[data-theme="dark"] .field.is-bad input,
[data-theme="dark"] .field.is-bad select { border-color: #f0895f; }

.modal-foot {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end;
  margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line);
}

/* ---------- Booking confirmation ---------- */

.modal-done { padding: 34px 26px 26px; text-align: center; overflow-y: auto; }
.done-mark {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin: 0 auto 18px;
  border-radius: 14px; background: var(--ok-soft); color: var(--ok);
}
.done-mark svg { stroke-width: 2.4; }
.modal-done h3 { font-size: 1.16rem; margin-bottom: 10px; }
.modal-done > p { color: var(--muted); font-size: .93rem; max-width: 46ch; margin-inline: auto; }

.done-summary {
  margin: 24px 0 0; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.done-summary > div {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.done-summary > div:last-child { border-bottom: 0; }
.done-summary dt { color: var(--muted); }
.done-summary dd { margin: 0; font-weight: 500; text-align: right; }

.done-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 24px;
}
.link-btn {
  margin-top: 14px; padding: 6px 10px;
  background: none; border: 0; border-radius: 8px;
  color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

body.is-locked { overflow: hidden; }

@media (max-width: 860px) {
  .booking-head { grid-template-columns: 1fr; align-items: start; }
  .svc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .modal { padding: 0; place-items: stretch; }
  .modal-card {
    width: 100%; max-height: 100vh; height: 100%;
    border: 0; border-radius: 0;
  }
  .modal-body { grid-template-columns: 1fr; }
  .modal-foot { justify-content: stretch; }
  .modal-foot .btn { flex: 1 1 auto; }
  .svc-top { flex-wrap: wrap; }
  .week { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .week .day { font-size: .68rem; }
  .week .state { font-size: .6rem; }
}
