/* EK Pixora Studio — the glass material and the interface built from it (DESIGN.md section 13, decision 35).
   Loaded after title-card.css on the public pages only; every rule is scoped to `.tc`, which the client galleries,
   owner pages and booking agreements do not carry.

   Glass here is an optical layer that sits above the photographs, never a replacement for them. One recipe,
   three thicknesses, two tones:

     tier 1  primary    the navigation bar and the menu sheet          thickest: most blur, strongest edge light
     tier 2  secondary  plates over photographs, the portfolio filter, the services sheet
     tier 3  subtle     small labels, chips and round controls          thinnest

     tone light   warm ivory tint, charcoal text   (over the ivory pages)
     tone dark    smoked teal-black tint, ivory text (over photographs and dark sections)

   Every glass surface is built from four layers:
     1. the tint                  background-color, see-through, so the shapes and colours behind stay recognisable
     2. the thickness             a vertical gradient: a little lighter at the top edge, a little heavier at the bottom
     3. the reflection (::before) a broad, soft highlight whose source can move (--lx, --ly), plus a faint diagonal band
     4. the rim (::after)         a 1px edge lit unevenly (brighter top-left, fading along the sides), masked to a ring
   plus backdrop-filter (blur and saturation) on the surface itself, and a soft ambient shadow underneath.

   The tint follows the photograph underneath: src/js/glass.js measures the brightness behind a surface and sets
   --g-alpha so text stays readable (WCAG AA) over bright skies or white clothing. Without the script the
   defaults below are already safe in the worst case (pure white behind dark glass, pure black behind light glass).
   No refraction filter is used: SVG displacement in backdrop-filter does not work in Safari on iPhone, and the
   brief rules out distorting text or controls. The thickness and rim layers give the impression of depth instead. */

/* The highlight position is animatable, so it can glide when the pointer moves. */
@property --lx { syntax: "<percentage>"; inherits: true; initial-value: 24%; }
@property --ly { syntax: "<percentage>"; inherits: true; initial-value: -20%; }
@property --sweep { syntax: "<percentage>"; inherits: true; initial-value: -40%; }
@property --glint { syntax: "<number>"; inherits: true; initial-value: 0; }

.tc {
  /* Corner radii: one small family, used consistently. Photographs keep square corners, like prints. */
  --r-1: 8px;     /* inputs' inner details, small marks */
  --r-2: 12px;    /* buttons, inputs, chips that hold text */
  --r-3: 18px;    /* plates, the filter bar, the lightbox caption */
  --r-4: 24px;    /* the navigation bar and the menu sheet */
  --r-round: 999px;   /* round controls only (the lightbox arrows, the motion switch) */

  /* Tints as "r g b" so the same colour can be used at any strength. */
  --g-ivory: 250 247 241;
  --g-clear: 252 251 249;   /* light glass: nearly neutral, as on an iPhone */
  --g-smoke: 14 19 20;      /* teal-black, the cinematic dark of the studio's palette */
  --g-white: 255 255 255;

  --header-h: 64px;

  /* Motion */
  --ease-glass: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-press: cubic-bezier(0.3, 0, 0.2, 1);
  --dur-press: 140ms;
  --dur-state: 320ms;
  --dur-surface: 480ms;
}

/* ---------- Tones (also used on the header, which changes tone as it passes over sections) ----------
   Clear glass, as on an iPhone: a light tint only, the scene behind dimmed (dark tone) or lifted (light tone)
   by the backdrop filter rather than veiled in grey, so photographs keep their colour and shapes through it.
   glass.js measures what is behind each surface and adds tint only where words would lose 4.5 : 1. Until it
   has run (or if it cannot), the denser defaults below are safe in the worst case. */
.tc .glass--light, .tc .tone-light, .tc .site-header[data-tone="light"] {
  --g-tint: var(--g-clear);
  --g-alpha: 0.6;           /* before glass.js: safe over anything */
  --g-bright: 1.04;         /* the scene behind is lifted a little, like light through a pane */
  --g-sat: 150%;
  --g-thick-top: 0.22;      /* lighter top of the thickness gradient */
  --g-thick-bottom: 0.03;   /* heavier bottom */
  --g-sheen: 0.42;          /* the soft reflection */
  --g-band: 0.09;           /* the faint fixed diagonal reflection */
  --g-sweep-a: 0.7;         /* the reflection that travels as the page moves */
  --g-sweep-shade: 0.07;    /* its faint darker fringes, which make a bright streak visible on light glass */
  --g-rim-sweep: 1;
  --g-glow: 0.30;           /* light caught inside the edges */
  --g-rim-a: 1;             /* rim: lit corner */
  --g-rim-b: 0.55;          /* rim: along the top */
  --g-rim-c: 0.14;          /* rim: the dim side */
  --g-rim-d: 0.62;          /* rim: the far corner catching light */
  --g-hair: 0.07;           /* a dark hairline so light glass still has an edge on the ivory page */
  --g-shade: 18 14 10;
  --g-text-shadow: 0 0 1px rgb(255 255 255 / 0.4);
  color: var(--charcoal);
}
.tc .glass--dark, .tc .tone-dark, .tc .site-header:not([data-tone="light"]) {
  --g-tint: var(--g-smoke);
  --g-alpha: 0.5;           /* before glass.js: safe even over pure white (with the dimming below) */
  --g-bright: 0.58;         /* the scene behind is dimmed like tinted glass, so less smoke is needed (decision 38) */
  --g-sat: 190%;
  --g-thick-top: 0.05;
  --g-thick-bottom: 0.04;
  --g-sheen: 0.1;
  --g-band: 0.04;
  --g-sweep-a: 0.06;        /* inside: only a faint wash, so light words keep their contrast */
  --g-rim-sweep: 0.95;      /* on the rim: the glint that runs along the edge as the page moves */
  --g-glow: 0.12;
  --g-rim-a: 0.8;
  --g-rim-b: 0.3;
  --g-rim-c: 0.06;
  --g-rim-d: 0.36;
  --g-hair: 0;
  --g-shade: 0 0 0;
  --g-text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
  color: var(--ivory);
}
/* Deep teal glass: the footer keeps the studio's teal, now as a pane over a photograph. */
.tc .glass--teal {
  --g-tint: 23 54 59;
  --g-alpha: 0.55;
  --g-bright: 0.6;
  --g-sat: 160%;
  --g-thick-top: 0.05;
  --g-thick-bottom: 0.08;
  --g-sheen: 0.1;
  --g-band: 0.04;
  --g-sweep-a: 0.06;
  --g-rim-sweep: 0.9;
  --g-glow: 0.1;
  --g-rim-a: 0.75;
  --g-rim-b: 0.28;
  --g-rim-c: 0.06;
  --g-rim-d: 0.34;
  --g-hair: 0;
  --g-shade: 0 0 0;
  --g-text-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
  color: var(--color-mist);
}

/* ---------- The material ---------- */
.tc .glass {
  position: relative;
  isolation: isolate;
  border-radius: var(--g-radius, var(--r-3));
  background-color: rgb(var(--g-tint, var(--g-ivory)) / var(--g-alpha, 0.6));
  background-image: linear-gradient(180deg, rgb(var(--g-white) / var(--g-thick-top, 0.22)) 0%, rgb(var(--g-white) / 0) 40%, rgb(0 0 0 / var(--g-thick-bottom, 0.03)) 100%);
  -webkit-backdrop-filter: blur(var(--g-blur, 16px)) saturate(var(--g-sat, 180%)) brightness(var(--g-bright, 1));
  backdrop-filter: blur(var(--g-blur, 16px)) saturate(var(--g-sat, 180%)) brightness(var(--g-bright, 1));
  box-shadow:
    inset 0 1px 0 0 rgb(var(--g-white) / var(--g-rim-b, 0.5)),
    inset 0 0 14px 0 rgb(var(--g-white) / var(--g-glow, 0.2)),
    inset 0 -1px 0 0 rgb(0 0 0 / 0.04),
    0 0 0 1px rgb(28 26 23 / var(--g-hair, 0.07)),
    var(--g-shadow, 0 14px 34px -18px rgb(var(--g-shade, 18 14 10) / 0.4), 0 2px 6px -3px rgb(var(--g-shade, 18 14 10) / 0.16));
  text-shadow: var(--g-text-shadow, none);
  --glint: 0;
  transition: background-color var(--dur-state) var(--ease-glass), color var(--dur-state) var(--ease-glass), --lx 700ms var(--ease-glass), --ly 700ms var(--ease-glass), --glint 520ms var(--ease-glass);
}
/* Under a pointer or a finger (glass.js adds .is-lit and the place, --px and --py): the edge lights up there. */
.tc .glass.is-lit { --glint: 1; }
/* 3. The reflections: a broad, soft light whose source can move (--lx, --ly), a faint fixed diagonal band, and a
   brighter streak (--sweep) that glass.js slides across each surface as it travels up or down the screen. */
.tc .glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgb(0 0 0 / 0) calc(var(--sweep) - 20%), rgb(0 0 0 / var(--g-sweep-shade, 0)) calc(var(--sweep) - 9%), rgb(var(--g-white) / var(--g-sweep-a, 0.3)) var(--sweep), rgb(0 0 0 / var(--g-sweep-shade, 0)) calc(var(--sweep) + 6%), rgb(0 0 0 / 0) calc(var(--sweep) + 15%)),
    radial-gradient(120% 95% at var(--lx) var(--ly), rgb(var(--g-white) / var(--g-sheen, 0.42)) 0%, rgb(var(--g-white) / 0) 58%),
    linear-gradient(112deg, rgb(var(--g-white) / 0) 46%, rgb(var(--g-white) / var(--g-band, 0.09)) 58%, rgb(var(--g-white) / 0) 72%);
}
/* 4. The rim: a 1px ring, lit unevenly, so the edge reads as the thickness of a pane catching light. */
.tc .glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background:
    radial-gradient(circle var(--glint-r, 170px) at var(--px, -600px) var(--py, -600px), rgb(var(--g-white) / var(--glint)) 0%, rgb(var(--g-white) / calc(var(--glint) * 0.35)) 45%, rgb(var(--g-white) / 0) 100%),
    linear-gradient(115deg, rgb(var(--g-white) / 0) calc(var(--sweep) - 12%), rgb(var(--g-white) / var(--g-rim-sweep, 1)) var(--sweep), rgb(var(--g-white) / 0) calc(var(--sweep) + 12%)),
    linear-gradient(var(--g-rim-angle, 150deg),
    rgb(var(--g-white) / var(--g-rim-a, 1)) 0%,
    rgb(var(--g-white) / var(--g-rim-b, 0.5)) 26%,
    rgb(var(--g-white) / var(--g-rim-c, 0.12)) 58%,
    rgb(var(--g-white) / var(--g-rim-d, 0.6)) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* While glass.js fits each surface (html.glass-fit), the dark slabs and plates drop the fixed dimming: the fit
   darkens each slab or plate on a photograph only as much as the part of the photograph behind its words needs, so over the darker parts
   of a photograph they are almost clear, and over a bright sky they are as dense as before (decision 38). */
.glass-fit .tc .glass--dark:is(.slab, .hero__plate, .services__sheet) { --g-bright: 0.94; }
/* Slabs and the opening plate: clear glass rather than frosted, so the photograph keeps its shapes behind them. */
.tc .glass--dark:is(.slab, .hero__plate) { --g-blur: 5px; }
.tc .glass--dark:is(.slab, .hero__plate)[data-backdrop="busy"] { --g-blur: 8px; }

/* Thicknesses: clearer than frosted glass, the blur just enough that what is behind loses its detail. */
.tc .glass--1 { --g-blur: 18px; --g-radius: var(--r-4);
  --g-shadow: 0 18px 44px -22px rgb(var(--g-shade, 18 14 10) / 0.45), 0 3px 10px -4px rgb(var(--g-shade, 18 14 10) / 0.14); }
.tc .glass--2 { --g-blur: 9px; --g-radius: var(--r-3); }
.tc .glass--3 { --g-blur: 10px; --g-radius: var(--r-2);
  --g-shadow: 0 8px 20px -12px rgb(var(--g-shade, 18 14 10) / 0.4), 0 1px 3px -1px rgb(var(--g-shade, 18 14 10) / 0.14); }

/* glass.js marks a busy backdrop: a little more blur so detail does not fight the words. */
.tc .glass[data-backdrop="busy"] { --g-blur: 14px; }
.tc .glass--1[data-backdrop="busy"] { --g-blur: 24px; }

/* Phones: a lighter blur is far cheaper to draw while scrolling, and looks the same at arm's length. */
@media (max-width: 639px) {
  .tc .glass--1 { --g-blur: 14px; }
  .tc .glass--2 { --g-blur: 8px; }
  .tc .glass--3 { --g-blur: 8px; }
  .tc .glass[data-backdrop="busy"] { --g-blur: 12px; }
  .tc .glass--1[data-backdrop="busy"] { --g-blur: 18px; }
}

/* Browsers without backdrop-filter, or visitors who ask for less transparency or more contrast:
   the same surfaces, nearly solid. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tc .glass, .tc .site-header__glass { --g-alpha: 0.94 !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .tc .glass { -webkit-backdrop-filter: none; backdrop-filter: none; --g-alpha: 0.96 !important; }
}
@media (prefers-contrast: more) {
  .tc .glass { --g-alpha: 0.95 !important; --g-hair: 0.3; }
}

/* ---------- Buttons ----------
   The primary button is the one solid, lit material: burnished copper with the same rim and reflection as the
   glass, so it belongs to the family but never depends on what is behind it for contrast. */
.tc .btn {
  position: relative;
  isolation: isolate;
  border-radius: var(--r-2);
  transition: background-color var(--dur-state) var(--ease-glass), color var(--dur-state) var(--ease-glass),
    border-color var(--dur-state) var(--ease-glass), box-shadow var(--dur-state) var(--ease-glass), transform var(--dur-press) var(--ease-press), --glint 520ms var(--ease-glass);
}
.tc .btn--primary {
  --lx: 30%; --ly: -40%;
  background-color: var(--copper);
  background-image: linear-gradient(180deg, var(--copper-hi) 0%, var(--copper) 55%, var(--copper-lo) 100%);
  color: var(--ivory);
  border: 0;
  box-shadow: inset 0 1px 0 0 rgb(255 226 196 / 0.45), inset 0 -1px 0 0 rgb(40 14 0 / 0.25),
    0 10px 24px -14px rgb(90 34 6 / 0.65), 0 2px 5px -2px rgb(60 24 4 / 0.3);
  text-shadow: 0 1px 0 rgb(60 22 0 / 0.25);
}
.tc .btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(90% 120% at var(--lx) var(--ly), rgb(255 236 214 / 0.38) 0%, rgb(255 236 214 / 0) 60%);
  transition: opacity var(--dur-state) var(--ease-glass);
  opacity: 0.8;
}
.tc .btn--primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgb(255 228 200 / 0.7), rgb(255 228 200 / 0.12) 40%, rgb(255 228 200 / 0) 60%, rgb(255 228 200 / 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@media (hover: hover) and (pointer: fine) {
  .tc .btn--primary:hover, .tc [data-surface="dark"] .btn--primary:hover {
    background-color: var(--copper-lo);
    background-image: linear-gradient(180deg, var(--copper) 0%, var(--copper-lo) 100%);
    color: var(--ivory);
    box-shadow: inset 0 1px 0 0 rgb(255 226 196 / 0.5), inset 0 -1px 0 0 rgb(40 14 0 / 0.25),
      0 14px 30px -14px rgb(90 34 6 / 0.7), 0 2px 6px -2px rgb(60 24 4 / 0.3);
  }
  .tc .btn--primary:hover::before { opacity: 1; }
}

/* Quiet buttons: a thin glass chip that takes the tone of where it sits. */
.tc .btn--outline, .tc .btn--glass {
  --g-radius: var(--r-2);
  border: 0;
  color: inherit;
}
.tc .btn--outline:not(.glass) {
  background: transparent;
  box-shadow: inset 0 0 0 1px currentColor;
}
@media (hover: hover) and (pointer: fine) {
  .tc .btn--outline:not(.glass):hover { background: var(--charcoal); color: var(--ivory); box-shadow: inset 0 0 0 1px var(--charcoal); }
  .tc [data-surface="dark"] .btn--outline:not(.glass):hover, .tc .tone-dark .btn--outline:not(.glass):hover { background: var(--ivory); color: var(--charcoal); box-shadow: inset 0 0 0 1px var(--ivory); }
  .tc .btn.glass:hover { --g-sheen: 0.75; }
  .tc .btn.glass.glass--dark:hover { --g-sheen: 0.3; }
}
/* Press: a small, quick give, on touch as well as with a mouse. */
.tc .btn:active, .tc .glass-press:active { transform: scale(0.97); }
.tc .btn:active { opacity: 1; }

/* ---------- Focus stays visible over glass and photographs: a ring with a contrasting halo ---------- */
.tc :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgb(var(--g-ivory) / 0.85);
}
.tc [data-surface="dark"] :focus-visible, .tc .tone-dark :focus-visible, .tc .glass--dark:focus-visible, .tc .glass--dark :focus-visible,
.tc .site-footer :focus-visible, .tc .lightbox :focus-visible {
  box-shadow: 0 0 0 5px rgb(var(--g-smoke) / 0.75);
}
.tc .btn:focus-visible { outline-offset: 3px; }

/* ---------- Navigation: a floating glass bar ----------
   At the top of a page the bar has no surface at all, so the opening photograph or page is left whole. Once the
   page moves, the glass fades in under the same words: nothing changes height or position. Its tone follows
   the section underneath (site.js sets data-surface): light glass over the ivory pages, smoked glass over
   photographs and dark sections. */
.tc .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  border: 0;
  transition: color var(--dur-state) var(--ease-glass);
}
.tc .site-header__glass {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  bottom: 0;
  left: max(10px, env(safe-area-inset-left, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  opacity: 0;
  transition: opacity var(--dur-surface) var(--ease-glass), background-color var(--dur-state) var(--ease-glass), --lx 900ms var(--ease-glass), --ly 900ms var(--ease-glass), --glint 520ms var(--ease-glass);
  pointer-events: none;
}
.tc .site-header.is-scrolled .site-header__glass, .tc .site-header[data-surface="photo"] .site-header__glass { opacity: 1; }
/* The Enquire and Menu chips sit on the bar's own glass: they must not tint and saturate it a second time. */
.tc .site-header .glass--3 { --g-sat: 110%; --g-bright: 1; --g-sheen: 0.3; }
.tc .site-header__inner { position: relative; z-index: 1; padding-top: 8px; }
.tc .site-header .wrap { padding-inline: max(var(--gutter), calc(env(safe-area-inset-left, 0px) + 22px)); }

/* The two versions of the camera mark: dark on light surfaces, light on photographs and dark ones. */
.tc .wordmark__mark--light { display: none; }
.tc .site-header:not([data-tone="light"]) .wordmark__mark--dark { display: none; }
.tc .site-header:not([data-tone="light"]) .wordmark__mark--light { display: block; }

/* Over a photograph with no glass yet, the words keep a soft shadow (the opening photograph also carries a
   gentle shade at its top edge; glass.js deepens it if the photograph is bright there). */
.tc .site-header[data-surface="photo"]:not(.is-scrolled):not([data-tone="light"]) .site-header__inner { text-shadow: 0 1px 3px rgb(0 0 0 / 0.35); }

.tc .site-nav a:not(.btn) { position: relative; }
.tc .site-header .btn--outline { min-height: 44px; padding-inline: 20px; }

.tc .menu-toggle {
  --g-radius: var(--r-2);
  border: 0;
  min-width: 76px;
  justify-content: center;
}

/* ---------- The menu sheet (phones and iPads) ----------
   A glass sheet that drops from the bar; the page behind is dimmed with plain colour (no full-page blur). */
.tc .menu-panel {
  inset: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) max(10px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(10px, env(safe-area-inset-left, 0px));
  background: rgb(6 10 11 / 0.5);
  color: var(--ivory);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tc .menu-sheet {
  --g-alpha: 0.5;   /* a sheet to read from: a little denser than the bar, the page behind a soft glow */
  --g-blur: 30px;
  --g-bright: 0.6;
  display: flex;
  flex-direction: column;
  min-height: min(100%, 640px);
  padding: 0 clamp(18px, 4vw, 32px) clamp(24px, 4vw, 40px);
  transform: translate3d(0, -10px, 0) scale(0.985);
  transform-origin: 50% 0;
  transition: transform var(--dur-surface) var(--ease-glass);
}
.tc .menu-panel.is-open .menu-sheet { transform: none; }
.tc .menu-panel__bar { height: 56px; }
.tc .menu-panel ul { margin: var(--space-5) 0 var(--space-6); gap: 0; }
.tc .menu-panel li { border-top: 1px solid rgb(246 242 234 / 0.14); }
.tc .menu-panel li:last-child { border-bottom: 1px solid rgb(246 242 234 / 0.14); }
.tc .menu-panel li a { padding: 10px 0; display: flex; align-items: center; min-height: 56px; }
.tc .menu-panel li a[aria-current="page"] { color: var(--color-saffron); font-style: italic; }
.tc .menu-panel .btn { align-self: stretch; }
.tc .menu-panel .menu-toggle { min-width: 76px; }

/* ---------- Floating enquiry button (phones and iPads, where the bar has no Enquire button) ---------- */
.tc .float-cta {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  min-height: 48px;
  padding-inline: 22px;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 14px, 0);
  transition: opacity var(--dur-state) var(--ease-glass), transform var(--dur-state) var(--ease-glass), visibility 0s linear var(--dur-state), background-color var(--dur-state);
}
.tc .float-cta.is-shown { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-state) var(--ease-glass), transform var(--dur-state) var(--ease-glass), visibility 0s; }
@media (min-width: 1100px) { .tc .float-cta { display: none; } }

/* ---------- Small glass chips used over photographs (labels, indexes) ---------- */
.tc .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 14px;
  font: 500 var(--t-small)/1 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Motion switch: a small glass toggle in the footer ---------- */
.tc .motion-switch {
  border-radius: var(--r-round);
  border: 0;
  padding-inline: 18px;
  color: var(--color-mist);
}
.tc .motion-switch[aria-pressed="true"] { --g-tint: 238 243 240; --g-alpha: 1; background-color: var(--color-mist); color: var(--color-ink); text-shadow: none; }

/* ---------- Reduced motion: surfaces appear without travelling; highlights stay where they are ---------- */
@media (prefers-reduced-motion: reduce) {
  .tc .glass, .tc .site-header__glass, .tc .btn--primary::before { transition-duration: 0.01ms !important; }
  .tc .menu-sheet, .tc .float-cta { transform: none !important; }
  .tc .btn:active, .tc .glass-press:active { transform: none; }
}
:root[data-motion="off"] .tc .menu-sheet, :root[data-motion="off"] .tc .float-cta { transform: none !important; }
:root[data-motion="off"] .tc .btn:active { transform: none; }

/* ---------- Portfolio: the filter as a glass bar, with a lens that slides to the chosen category ----------
   On wider screens the bar stays in reach under the navigation while the photographs pass beneath it. */
.tc .filters {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px;
  max-width: 100%;
  --g-radius: var(--r-3);
}
.tc .filters .filters__lens {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  --g-alpha: 0.92;
  --g-sheen: 0.7;
  --g-radius: var(--r-2);
  transition: transform 520ms var(--ease-glass), width 520ms var(--ease-glass), height 520ms var(--ease-glass), opacity var(--dur-state) linear;
}
.tc .filters .filters__lens.is-instant { transition: none; }
.tc .filter {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-2);
  color: var(--mist-text);
  transition: color var(--dur-state) var(--ease-glass);
}
.tc .filter[aria-pressed="true"] { color: var(--charcoal); border-bottom-color: transparent; }
/* Without the lens (no script yet), the chosen category is still marked. */
.tc .filters:not(:has(.filters__lens)) .filter[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 6px; }
@media (hover: hover) and (pointer: fine) { .tc .filter:not([aria-pressed="true"]):hover { color: var(--ivory); } }
@media (min-width: 820px) {
  .tc .filters-wrap { position: sticky; top: calc(var(--header-h, 64px) + 10px); z-index: 30; }
}
/* Phones: the four choices as a tidy two-by-two grid, each label free to take two lines. */
@media (max-width: 639px) {
  .tc .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .tc .filter { min-height: 52px; padding: 6px 12px; line-height: 1.3; letter-spacing: 0.12em; text-align: center; }
}

/* Portfolio photographs: on a mouse, a small glass mark shows that the photograph opens larger. */
.tc .tile .tile__mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  --g-radius: var(--r-round);
  --g-alpha: 0.55;
  color: var(--ivory);
  opacity: 0;
  transform: translate3d(0, 6px, 0) scale(0.96);
  transition: opacity var(--dur-state) var(--ease-glass), transform var(--dur-state) var(--ease-glass);
  pointer-events: none;
}
.tc .tile:focus-visible .tile__mark { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) { .tc .tile:hover .tile__mark { opacity: 1; transform: none; } }

/* ---------- The photo viewer: cinematic black, the photograph whole, the controls as smoked glass ---------- */
.tc .lightbox { background: var(--cine); color: var(--ivory); --focus: var(--color-saffron); font-family: var(--font-ui); }
.tc .lightbox::backdrop { background: var(--cine); }
.tc .lightbox[open] { animation: lb-open 320ms var(--ease-glass) both; }
@keyframes lb-open { from { opacity: 0; } }
.tc .lightbox__bar { padding: calc(env(safe-area-inset-top, 0px) + 10px) max(var(--gutter), env(safe-area-inset-right, 0px)) 10px max(var(--gutter), env(safe-area-inset-left, 0px)); }
.tc .lightbox__bar .wordmark { color: var(--ash); font-size: 0.8125rem; }
.tc .lightbox__stage { position: relative; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.tc .lightbox__stage > picture { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.tc .lightbox__stage img { animation: lb-in 380ms var(--ease-glass) both; }
.tc .lightbox__stage > picture.is-leaving { opacity: 0; transition: opacity 240ms linear; }
@keyframes lb-in { from { opacity: 0; transform: scale(0.985); } }
.tc .lightbox__foot { padding: 12px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 16px) max(var(--gutter), env(safe-area-inset-left, 0px)); }
.tc .lightbox__foot { flex-wrap: wrap; row-gap: 12px; }
.tc .lightbox__caption { font-size: var(--t-small); letter-spacing: 0.04em; color: var(--ash); }
@media (max-width: 639px) {
  .tc .lightbox__caption { flex: 1 1 100%; }
  .tc .lightbox__nav { flex: 1 1 100%; justify-content: space-between; }
}
.tc .lightbox__btn {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-2);
  color: var(--ivory);
  font: 500 var(--t-small)/1 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tc .lightbox__btn[disabled] { opacity: 0.38; cursor: default; }
@media (hover: hover) and (pointer: fine) { .tc .lightbox__btn:not([disabled]):hover { background-color: rgb(var(--g-smoke) / 0.4); color: var(--ivory); --g-sheen: 0.32; } }
@media (prefers-reduced-motion: reduce) { .tc .lightbox[open], .tc .lightbox__stage img { animation: none; } }
:root[data-motion="off"] .tc .lightbox[open], :root[data-motion="off"] .tc .lightbox__stage img { animation: none; }

/* ---------- Glass slabs on photographs (decision 36) ----------
   Like the plate on the opening of Home: a smoked-glass slab in the lower corner of a photograph with its
   category (or a number and a title). glass.js fits each slab's tint to the part of the photograph behind it. */
.tc .chapter__media, .tc .slab-host, .tc .work__grid > figure, .tc .opening__pics > figure { position: relative; }
.tc .slab--photo {
  position: absolute;
  left: clamp(10px, 1.4vw, 18px);
  bottom: clamp(10px, 1.4vw, 18px);
  z-index: 2;
  display: grid;
  gap: 4px;
  max-width: calc(100% - 2 * clamp(10px, 1.4vw, 18px));
  padding: 12px 18px 13px;
  pointer-events: none;
}
.tc .slab__label { font: 500 var(--t-small)/1.3 var(--font-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--pale-gold); }
.tc .slab__title { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: calc(clamp(1.15rem, 1rem + 0.5vw, 1.45rem) * var(--hs, 1)); line-height: 1.2; color: var(--ivory); }
.tc .slab--small { padding: 8px 14px 9px; --g-radius: var(--r-2); }
.tc .slab--small .slab__label { color: var(--ivory); letter-spacing: 0.16em; }
.tc .work__grid figcaption.slab--photo { margin: 0; }
.tc .tile .tile__slab { left: 12px; bottom: 12px; }
@media (max-width: 639px) {
  .tc .slab--photo { padding: 10px 14px 11px; }
  .tc .slab--small { padding: 7px 12px 8px; }
}

/* ---------- Glass frames around photographs (decision 37) ----------
   Every photograph (except the full-screen openings) sits in a pane of clear glass with lit edges, like a print
   held behind glass. The night backdrop behind the frames is already a soft wash, so the frames need no blur of
   their own: tint, edge light and the travelling glint do the work, at almost no cost to scrolling. */
.tc .glass.frame {
  --frame-pad: clamp(7px, 0.8vw, 12px);
  --g-radius: clamp(16px, 1.8vw, 24px);
  --g-alpha: 0.12;
  --g-thick-top: 0.16;
  --g-thick-bottom: 0.1;
  --g-sheen: 0.22;
  --g-band: 0.06;
  --g-glow: 0.2;
  --g-sweep-a: 0.2;
  --g-rim-a: 1;
  --g-rim-b: 0.5;
  --g-rim-c: 0.12;
  --g-rim-d: 0.55;
  --g-rim-sweep: 1;
  --glint-r: 300px;
  padding: var(--frame-pad);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.tc .frame > .ph, .tc .frame .tile, .tc .frame > .placeholder, .tc .frame > figure { border-radius: calc(var(--g-radius) - var(--frame-pad)); overflow: clip; }
.tc .frame > .slab--photo { left: calc(var(--frame-pad) + 10px); bottom: calc(var(--frame-pad) + 10px); }
.tc .frame.story-card { overflow: visible; }
.tc .frame.story-card .story-card__body { left: calc(var(--frame-pad) + 8px); right: calc(var(--frame-pad) + 8px); bottom: calc(var(--frame-pad) + 8px); }
.tc .rows > .frame .ph, .tc .rows > .frame .tile { height: 100%; }

/* Light on the glass over the photograph (decision 48; glass.js adds a .frame__glare to each frame, under its
   slab, holding two strips of reflected light and moves them by transform and opacity only):
   --body is the lamp's soft body, blended into the photograph (soft light), so it never lays a white haze over it;
   --edge is the lamp's fine bright edge with a fainter second line beside it (a pane reflects from its front and
   from its back), a touch warm like the page's golden light. Both taper toward their ends, lean like a
   reflection in a tilted pane, and are dark at rest. Words never sit under either. */
.tc .frame__glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; overflow: clip; }
.tc .frame > .frame__glare { inset: var(--frame-pad); border-radius: calc(var(--g-radius) - var(--frame-pad)); }
.tc .frame__spec {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 260%;
  translate: -50% -50%;
  transform: rotate(25deg);
  opacity: 0;
  -webkit-mask-image: linear-gradient(180deg, rgb(0 0 0 / 0) 3%, #000 40%, #000 60%, rgb(0 0 0 / 0) 97%);
  mask-image: linear-gradient(180deg, rgb(0 0 0 / 0) 3%, #000 40%, #000 60%, rgb(0 0 0 / 0) 97%);
}
.tc .frame__spec--body {
  width: 78%;
  background: linear-gradient(90deg, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 0.12) 22%, rgb(255 255 255 / 0.46) 44%,
    rgb(255 255 255 / 0.7) 50%, rgb(255 255 255 / 0.36) 56%, rgb(255 255 255 / 0.12) 76%, rgb(255 255 255 / 0) 100%);
  mix-blend-mode: soft-light;
}
/* the lamp as the glass shows it: a wide pane of light with clean edges, brighter along the side it leads with,
   and a narrow second pane beside it */
.tc .frame__spec--edge {
  --spec: color-mix(in srgb, var(--color-saffron) 10%, #fff);
  width: 52%;
  background: linear-gradient(90deg, rgb(255 255 255 / 0) 27%, color-mix(in srgb, var(--spec) 26%, transparent) 31%,
    color-mix(in srgb, var(--spec) 14%, transparent) 66%, rgb(255 255 255 / 0) 70%,
    rgb(255 255 255 / 0) 78%, color-mix(in srgb, var(--spec) 13%, transparent) 81%, color-mix(in srgb, var(--spec) 9%, transparent) 90%, rgb(255 255 255 / 0) 93%);
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: reduce) { .tc .frame__spec { display: none; } }
:root[data-motion="off"] .tc .frame__spec { display: none; }
/* and the glass border around the photograph brightens where the hand is */
.tc .glass.frame.is-lit { --g-sheen: 0.55; }
/* On a desktop pointer the whole frame tilts a little toward the hand (glass.js eases --tilt in and out). */
:root .tc .frame.is-tilting {
  transform: var(--tilt, none);
  transition: background-color var(--dur-state) var(--ease-glass), --lx 700ms var(--ease-glass), --ly 700ms var(--ease-glass), --glint 520ms var(--ease-glass);
}
.tc .block-pair .rows > .frame > .ph { height: 100%; }

/* ---------- Phones: less scrolling, more to play with (decision 37) ---------- */
@media (max-width: 639px) {
  /* Rows that swipe sideways: Selected work, the stories on Home and how it works. The next card peeks in. */
  .tc [data-carousel] {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding: 6px var(--gutter) 22px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tc [data-carousel]::-webkit-scrollbar { display: none; }
  .tc [data-carousel] > * { flex: 0 0 82%; scroll-snap-align: start; margin: 0 !important; grid-column: auto !important; }
  .tc .work__grid[data-carousel] .ph { aspect-ratio: 4 / 5 !important; }
  .tc .story-list[data-carousel] > * { flex-basis: 84%; }
  .tc .steps[data-carousel] > li {
    flex-basis: 74%;
    padding: 20px 20px 22px;
    border: 1px solid rgb(246 242 234 / 0.18);
    border-radius: var(--r-3);
    background: linear-gradient(160deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.03) 60%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
  }
  /* A swipe hint under each row: a short glass track with a light that shows where you are. */
  .tc .swipe-hint { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
  .tc .swipe-hint i { width: 6px; height: 6px; border-radius: 50%; background: rgb(246 242 234 / 0.28); transition: background-color 300ms, width 300ms var(--ease-glass); }
  .tc .swipe-hint i.is-on { width: 18px; border-radius: 3px; background: var(--color-saffron); }

  /* The two opening photographs lie slightly turned, like prints set down on a table. */
  .home .opening__a { rotate: -2.5deg; }
  .home .opening__b { rotate: 3.5deg; }

  /* Portfolio: a two-column wall instead of one long column. It is a grid, not CSS columns: Safari on iPhone
     paints parts of the glass frames inside columns in the wrong place (empty frames below a category, over the
     next one). Each photo spans as many small rows (1/48 of the wall's width) as its shape needs (--rs, written
     by the build), and the grid places each photo, in order, in the first free place, like a photo wall. */
  .tc .portfolio-group .rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: calc((100cqw - 10px) / 48);
    gap: 0 10px;
  }
  .tc .portfolio-group { container-type: inline-size; }   /* 100cqw above: the width of the wall */
  .tc .portfolio-group .rows > li { grid-row: span var(--rs, 31); aspect-ratio: auto; height: auto; margin: 0 0 10px; }
  .js-motion .tc .portfolio-group .rows > .frame { transform: none; transition: none; }   /* no rising in the wall */
  .tc .portfolio-group .rows .tile__slab { display: none; }
  .tc .portfolio-group .glass.frame { --frame-pad: 5px; --g-radius: 14px; }
  /* With layout E (wide band) the wall keeps its category's name above it, as with every other layout. */
  .tc .portfolio-group.lay--e > .rows { order: 2; }

  /* Frames rise and settle as they arrive. */
  .js-motion .tc .frame { transition: transform 700ms var(--ease-glass); }
  .js-motion .tc .frame:not(.is-in) { transform: translate3d(0, 22px, 0) scale(0.94); }
  .js-motion .tc [data-carousel] > .frame:not(.is-in) { transform: scale(0.92); }
}
@media (min-width: 640px) { .tc .swipe-hint { display: none; } }

/* ---------- Stories that slide sideways (decision 40) ----------
   One row on every screen size. The card in the middle is full size; the ones beside it are smaller and quieter
   (glass.js sets --flow-s and --flow-o from each card's distance to the middle, transform and opacity only). */
.tc .flow { position: relative; display: grid; gap: clamp(14px, 2vw, 24px); }
.tc .story-list--flow {
  --flow-w: clamp(234px, 27vw, 396px);   /* 10% smaller than at first (the studio asked, 3 November 2026) */
  position: relative;
  display: flex !important;
  flex-wrap: nowrap;
  gap: clamp(12px, 2vw, 28px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-inline: calc(-1 * var(--gutter));
  /* percentages here are of the section's text width, so add the gutter the row reaches out by */
  padding: 10px max(var(--gutter), calc(50% + var(--gutter) - var(--flow-w) / 2)) 14px;
  grid-template-columns: none !important;
}
.tc .story-list--flow::-webkit-scrollbar { display: none; }
.tc .story-list--flow > li {
  flex: 0 0 var(--flow-w);
  margin: 0 !important;
  scroll-snap-align: center;
  transform: scale(var(--flow-s, 1));
  opacity: var(--flow-o, 1);
  transform-origin: 50% 60%;
}
.tc .story-list--flow > li > .story-card { height: auto; }
/* A compact text slab on the sliding story cards, low on the photograph, so it does not cover faces (the studio
   asked, 3 November 2026; decision 43): a one-line category, a smaller title, and the count and link on one line. */
.tc .story-list--flow .frame.story-card .story-card__body {
  left: calc(var(--frame-pad) + 6px); right: calc(var(--frame-pad) + 6px); bottom: calc(var(--frame-pad) + 6px);
  gap: 2px; padding: 8px 12px 8px;
}
.tc .story-list--flow .story-card__body .label {
  max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 0.625rem; letter-spacing: 0.14em;
}
.tc .story-list--flow .story-card__title { font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.35rem); line-height: 1.15; }
.tc .story-list--flow .story-card__meta { flex-wrap: nowrap; gap: 8px; font-size: 0.6875rem; }
.tc .story-list--flow .story-card__more { font-size: 0.625rem; letter-spacing: 0.12em; }
@media (max-width: 639px) { .tc .story-list--flow { --flow-w: 61vw; gap: 10px; } }
.tc .flow__nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.tc .flow__btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%;
  color: var(--ivory);
  cursor: pointer;
}
.tc .flow__btn:focus-visible { outline: 2px solid var(--color-saffron); outline-offset: 3px; }
.tc .flow__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; max-width: 60vw; }
.tc .flow__dots button {
  width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.tc .flow__dots button::before {
  content: ""; width: 6px; height: 6px; border-radius: 3px; background: rgb(246 242 234 / 0.32);
  transition: width 300ms var(--ease-glass), background-color 300ms;
}
.tc .flow__dots button[aria-current="true"]::before { width: 18px; background: var(--color-saffron); }
.tc .flow__dots button:focus-visible { outline: 2px solid var(--color-saffron); outline-offset: 1px; border-radius: 6px; }
/* Layout C on the Stories page: three at a time, all the same size. The row keeps the width of the page (layout C
   centres a section's first piece, which made the row as wide as all its stories on a phone). */
.lay--c .story-list--flow { --flow-w: clamp(216px, 25.2vw, 342px); }
.tc .lay--c > .flow { justify-items: stretch; }
@media (min-width: 640px) {
  .tc .lay--c .story-list--flow { padding-inline: var(--gutter); }
  .tc .lay--c .story-list--flow > li { --flow-s: 1 !important; --flow-o: 1 !important; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .tc .story-list--flow { scroll-behavior: auto; } }
@media (prefers-reduced-motion: reduce) {
  .tc .frame { transform: none !important; transition: none !important; }
  .home .opening__a, .home .opening__b { rotate: none; }
}
:root[data-motion="off"] .tc .frame { transform: none !important; transition: none !important; }
