:root {
  --accent: #305cde;        /* royal blue — menu panel, hover overlay, highlights */
  --accent-ink: #ffffff;    /* text on the accent colour */
  --bg: #ffffff;
  --ink: #141414;
  --muted: #6b6b6b;
  --sidebar: 64px;
  --gap: 0px;              /* space between pictures */
  --font: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 28px 0; background: var(--bg); z-index: 30;
}
.brand {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-weight: 800; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.menu-btn {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .18em;
}
.menu-btn .label { writing-mode: vertical-rl; transform: rotate(180deg); }
.burger { display: grid; gap: 3px; }
.burger i { display: block; width: 14px; height: 2px; background: currentColor; }
.sidebar-spacer { height: 19px; }

/* ---------- Slide-out menu ---------- */
.menu {
  position: fixed; top: 0; bottom: 0; left: var(--sidebar); width: min(420px, calc(100vw - var(--sidebar)));
  background: var(--accent); color: var(--accent-ink); z-index: 25;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 24px; transform: translateX(-100%); visibility: hidden;
  transition: transform .45s cubic-bezier(.7,0,.2,1), visibility 0s linear .45s;
}
body.menu-open .menu { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.7,0,.2,1); }
.menu-close { position: absolute; top: 26px; right: 30px; font-size: 30px; line-height: 1; }
.menu nav { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.menu nav a { font-size: 26px; font-weight: 700; text-decoration: none; }
.menu nav a:hover, .menu nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.socials { display: flex; gap: 18px; margin-top: 56px; }
.socials a { display: grid; place-items: center; width: 26px; height: 26px; }
.socials svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu small { position: absolute; bottom: 22px; font-size: 12px; }
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .4s; }
body.menu-open .scrim { opacity: 1; pointer-events: auto; }

/* ---------- Main ---------- */
main { margin-left: var(--sidebar); min-height: 100vh; overflow-x: clip; }

/* Gallery: three columns taken straight from GALLERY/COLUMN_A, _B, _C */
.gallery { display: flex; gap: var(--gap); align-items: flex-start; }
.col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.tile { position: relative; display: block; overflow: hidden; background: #eee; cursor: zoom-in; }
.tile img { width: 100%; }
.tile figcaption {
  position: absolute; inset: 0; padding: 16px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  background: rgba(48, 92, 222, .85);   /* --accent at 85% */
  color: var(--accent-ink); font-weight: 700; font-size: 20px; line-height: 1.4;
  opacity: 0; transition: opacity .2s linear;
}
.tile figcaption::before {
  content: ""; display: block; width: 11px; height: 4px; border-radius: 2px; background: currentColor; margin-bottom: 8px;
}
.tile figcaption span { display: block; font-weight: 400; font-size: 14px; opacity: .9; }
.tile:hover figcaption, .tile:focus-visible figcaption { opacity: 1; }
@media (hover: none) { .tile figcaption { display: none; } }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- Text pages ---------- */
.page { max-width: 880px; padding: 96px 56px; }
.page h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1; margin: 0 0 32px; font-weight: 800; letter-spacing: -.02em; }
.page h2 { font-size: 14px; letter-spacing: .16em; text-transform: uppercase; margin: 48px 0 14px; color: var(--muted); }
.page p { font-size: 18px; line-height: 1.65; margin: 0 0 16px; }
.lede { font-size: 22px !important; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; gap: 24px; padding: 14px 0; border-top: 1px solid #e6e6e6; font-size: 17px; }
.list li b { min-width: 120px; }
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.about-grid img { width: 100%; height: auto; background: #eee; }
.btn {
  display: inline-block; margin-top: 12px; padding: 16px 28px; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; text-decoration: none; font-size: 17px;
}
.btn:hover { background: var(--ink); color: #fff; }
.big-mail { font-size: clamp(22px, 4vw, 40px); font-weight: 800; word-break: break-word; }
.big-phone { font-size: clamp(20px, 3vw, 30px); font-weight: 700; text-decoration: none; }
.big-phone:hover, .big-mail:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(12,12,12,.96);
  display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity .3s; }
/* The frame is sized to the fitted image and acts as a mask: zoom/drag happens inside it */
.lb-frame { position: relative; overflow: hidden; background: #1c1c1c; touch-action: none; cursor: zoom-in; }
.lb-frame.zoomed { cursor: grab; }
.lb-frame.dragging { cursor: grabbing; }
.lb-frame img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none;
  transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-drag: none;
}
.lb-frame.animate img { transition: transform .25s ease; }
.lb-hint { position: absolute; top: 24px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.55); font-size: 13px; pointer-events: none; }
.lb-caption { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; font-weight: 700; }
.lb-caption span { font-weight: 400; opacity: .7; margin-left: 10px; }
.lb-btn { position: absolute; color: #fff; font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; opacity: .8; }
.lb-btn:hover { opacity: 1; color: var(--accent); }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
body.no-scroll { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .page { padding: 64px 32px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid img { max-width: 280px; }
}
@media (max-width: 640px) {
  :root { --sidebar: 0px; }
  .sidebar {
    inset: 0 0 auto 0; width: auto; height: 58px; flex-direction: row; padding: 0 18px;
    border-bottom: 1px solid #eee;
  }
  .brand, .menu-btn .label { writing-mode: horizontal-tb; transform: none; }
  .brand { font-size: 18px; }
  .menu-btn { flex-direction: row-reverse; }
  .sidebar-spacer { display: none; }
  main { padding-top: 58px; }
  .menu { left: 0; width: 100vw; top: 58px; }
  .lb-hint { display: none; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
  .lb-caption { bottom: 70px; }
  .page { padding: 48px 20px; }
  .list li { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Loading screen ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader-anim { width: 140px; height: 140px; }
html.is-loading { overflow: hidden; }
