/* Dirishani — plain version (milestone 2). Phone first; wider layouts below. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colours (DIRISHANI.md, sections 2 and 8). Do not add others. */
  --navy: #1E2A44;
  --ivory: #FBF6F1;
  --copper: #B5764A;
  --copper-light: #E0AE84;
  --blush: #FBF1EE;

  /* Tints of navy on ivory, for quieter text and lines. */
  --ink-soft: color-mix(in srgb, var(--navy) 72%, var(--ivory));  /* body-size text, passes AA */
  --line-strong: color-mix(in srgb, var(--navy) 55%, var(--ivory)); /* form borders, 3:1 */
  --line: color-mix(in srgb, var(--navy) 14%, var(--ivory));        /* hairlines */

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 1rem;
  --gap: 0.75rem;
  --radius: 3px;

  /* Glass: see-through brand colours with a frosted blur (owner's choice, 2026-11-28). */
  --glass: color-mix(in srgb, var(--ivory) 66%, transparent);
  --glass-strong: color-mix(in srgb, var(--ivory) 84%, transparent);
  --glass-dark: color-mix(in srgb, var(--navy) 58%, transparent);
  --glass-edge: color-mix(in srgb, var(--blush) 75%, transparent);
  --glass-edge-dark: color-mix(in srgb, var(--blush) 22%, transparent);
  --glass-shadow: 0 12px 32px color-mix(in srgb, var(--navy) 14%, transparent);
  --glass-blur: blur(16px) saturate(150%);
  --radius-glass: 1.1rem;
  --header-h: 4rem;
  --footer-h: 3.25rem;
}

/* --- Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

/* Elements that site.js reveals stay hidden until it does, whatever their display style. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; }

p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

main:focus { outline: none; }

:where(ul[role="list"]) { list-style: none; margin: 0; padding: 0; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: var(--blush);
  border-radius: var(--radius);
}
.skip-link:focus { top: 0.5rem; }

/* Small spaced capitals, as in the tagline. */
.label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

.empty { color: var(--ink-soft); padding-block: 1rem 2rem; }

/* --- Buttons --------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.4rem;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: var(--blush);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: color-mix(in srgb, var(--navy) 88%, var(--ivory)); }
.button:focus-visible { outline-color: var(--navy); }

.button--quiet { background: transparent; color: var(--navy); }
.button--quiet:hover { background: var(--blush); }

.button--small { min-height: 2.25rem; padding-inline: 1rem; font-size: 0.7rem; }

/* --- Header and footer ----------------------------------------------------- */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.site-header__logo { display: block; line-height: 0; flex-shrink: 0; }
.site-header__logo img { height: 2.25rem; width: auto; }

/* Phones: a tighter menu so the camera icon and three links fit at 360px. */
.site-nav { display: flex; gap: 0.1rem; margin-left: auto; }
.site-nav a {
  padding: 0.6rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--copper); text-decoration-thickness: 2px; }

/* A page is at least one screen tall, with the footer at the bottom of the screen. So a
   short page never scrolls; only a page with more than a screenful (a full gallery) does. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { flex: 1 0 auto; }

/* The footer: one slim frosted bar, the same on every page. */
.site-footer {
  flex: none;
  margin-top: 1.5rem;
  border-top: 1px solid var(--glass-edge);
  font-size: 0.85rem;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: var(--footer-h);
}
.site-footer__small { display: none; margin: 0; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; }
.site-footer__links a { padding: 0.75rem 0.4rem; font-size: 0.8rem; font-weight: 500; text-decoration: none; }
@media (min-width: 36rem) {
  .site-footer__links { gap: 0.25rem; }
  .site-footer__links a { padding-inline: 0.5rem; font-size: 0.85rem; }
}
.site-footer__links a:hover { text-decoration: underline; }

/* --- Home ------------------------------------------------------------------ */

.hero { padding-block: 1.5rem 3rem; text-align: center; }
.hero__logo { margin: 0 auto 1.5rem; max-width: 22rem; line-height: 0; }
.hero__logo img { width: 100%; height: auto; }
.hero__intro { max-width: 30rem; margin: 0 auto 1.75rem; color: var(--ink-soft); }

.section { padding-block: 1.5rem; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.section__more { font-size: 0.85rem; white-space: nowrap; }
.section-title { font-size: 1.4rem; margin-bottom: 1.25rem; }

/* Categories */
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.category-card { display: block; text-decoration: none; }
.category-card__frame {
  display: block;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.category-card__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.category-card__name { display: block; font-weight: 600; }
.category-card__count { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.category-card:hover .category-card__name { text-decoration: underline; }

/* Templates: a plain grid that fits the screen (no sideways scrolling). */
.template-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem var(--gap);
}
.template-card__frame {
  display: block;
  aspect-ratio: 4 / 5;
  margin-bottom: 0.6rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blush);
}
.template-card__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.template-card__title { font-size: 1rem; }
.template-card__meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.6rem; }

/* --- Photo grid (gallery, home, related) ----------------------------------- */

.photo-grid { columns: 2; column-gap: var(--gap); }
.photo-grid > li { break-inside: avoid; margin-bottom: var(--gap); }

.photo-card { display: block; text-decoration: none; }
.photo-card__frame { display: block; line-height: 0; border-radius: var(--radius); overflow: hidden; }
.photo-card img { display: block; width: 100%; height: auto; }
/* A few photos never make a page scroll: a very tall photo's tile is cropped so a row fits
   the window (the whole photo is on its own page). Only more photos than fit scroll. */
.photo-card img {
  max-height: max(14rem, calc(100vh - var(--header-h) - var(--footer-h) - 16rem));
  max-height: max(14rem, calc(100dvh - var(--header-h) - var(--footer-h) - 16rem));
  object-fit: cover;
}
.photo-card__title {
  display: block;
  padding-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.photo-card:hover .photo-card__title { text-decoration: underline; }

/* --- Gallery --------------------------------------------------------------- */

.page-head { padding-block: 1.5rem 1.25rem; }
.page-head .label { margin-bottom: 0.75rem; color: var(--ink-soft); }
.page-title { font-size: 1.75rem; margin-bottom: 0.5rem; }
.page-intro { color: var(--ink-soft); max-width: 36rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.filters a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
}
.filters a:hover { background: var(--blush); }
.filters a[aria-current] { background: var(--navy); border-color: var(--navy); color: var(--blush); }

.filters + .filters { margin-top: 0.75rem; }
.filters__label {
  align-self: center;
  margin-right: 0.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.clear-filters { margin: 1rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }

/* Search: one field and a button, full width on a phone. */
.search { display: flex; gap: 0.5rem; margin-top: 1.25rem; max-width: 34rem; }
.search input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ivory);
  color: var(--navy);
  font: inherit;
}
.search input::placeholder { color: var(--ink-soft); }

.subhead {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.section__head + .subhead { margin-top: 0; }

.story { max-width: 40rem; margin-top: 0.75rem; font-size: 1.05rem; }
.story p { margin-bottom: 0.75em; }

.category-card__blank {
  display: block;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  background: var(--blush);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-block: 2rem 0;
}
.pagination__status { font-size: 0.85rem; color: var(--ink-soft); }

.not-found { padding-block: 4rem; }

/* --- Photo page ------------------------------------------------------------ */

.photo-view { margin: 0 0 1.5rem; }
.photo-view img {
  display: block;
  margin-inline: auto;
  /* Fit the screen width and 80% of its height, without the page jumping. */
  width: min(100%, calc(80vh * var(--w, 3) / var(--h, 2)));
  height: auto;
}

.photo-info { display: grid; gap: 1rem; }
.photo-info__description { font-size: 1.05rem; }

.photo-facts { display: grid; gap: 0.4rem; margin: 1.25rem 0 0; font-size: 0.9rem; }
.photo-facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; }
.photo-facts dt { color: var(--ink-soft); }
.photo-facts dd { margin: 0; }

.download { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); align-self: start; }
.download .label { margin-bottom: 1rem; }
.download__list { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; }
.download__button { width: 100%; justify-content: space-between; border-radius: var(--radius); }
.download__size { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: none; opacity: 0.85; }
.licence { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }

.download__subhead { margin: 1.25rem 0 0.75rem; }

/* --- Photo of the week ----------------------------------------------------- */

.week { padding-block: 0 1.5rem; }
.week__image { display: block; line-height: 0; }
.week__image img {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: cover;
  border-radius: var(--radius);
}
.week__text { padding-top: 0.75rem; max-width: 40rem; }
.week__title { margin: 0 0 0.35rem; font-weight: 600; }
.week__title a { text-decoration: none; }
.week__title a:hover { text-decoration: underline; }
.week__place { font-weight: 400; color: var(--ink-soft); }
.week__caption { margin: 0; color: var(--ink-soft); }

.feature-head { padding-bottom: 1rem; }
.feature-body { max-width: 44rem; }
.feature-place { color: var(--ink-soft); font-size: 0.9rem; }
.week-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.week-nav__all { font-size: 0.85rem; }

/* --- Save, credit, share, licence -------------------------------------------- */

.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1.25rem 0 0; font-size: 0.85rem; }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.photo-actions .save-row { margin: 0; }
.photo-actions:not(:has(> :not([hidden]))) { display: none; } /* nothing to show without JavaScript */
.credit { margin: 0; font-size: 0.8rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.credit__text { color: var(--navy); }
.photo-more { display: none; margin: 0; font-size: 0.9rem; }
.button[aria-pressed="true"] { background: var(--navy); color: var(--blush); }

.saved-toggle { margin-top: 0.4rem; }
.saved-toggle[aria-pressed="false"] { opacity: 0.75; }

.share { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.share__label { margin: 0 0 0.5rem; font-weight: 600; }
.share__link { margin: 0 0 0.75rem; font-size: 0.8rem; color: var(--ink-soft); overflow-wrap: anywhere; }

.licence-page { max-width: 44rem; }
.licence-page__heading { margin: 1.75rem 0 0.5rem; font-size: 1.1rem; }
.licence-list { padding-left: 1.25rem; }
.licence-list li { margin-bottom: 0.4rem; }
.licence-list--yes li::marker { content: "✓  "; }
.licence-list--no li::marker { content: "✗  "; }

/* --- Wallpapers ------------------------------------------------------------ */

.hint { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--ink-soft); max-width: 36rem; }

.wallpaper-grid { display: grid; gap: 1.5rem var(--gap); }
.wallpaper-grid--tall,
.wallpaper-grid--square { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wallpaper-grid--wide { grid-template-columns: minmax(0, 1fr); }

.wallpaper-card__image { display: block; line-height: 0; border-radius: var(--radius); overflow: hidden; }
.wallpaper-card__image img { width: 100%; height: auto; }
.wallpaper-card__title { margin: 0.5rem 0 0.25rem; font-size: 0.85rem; font-weight: 500; }
.wallpaper-card__downloads { display: grid; gap: 0.15rem; font-size: 0.85rem; }
.wallpaper-card__downloads a { font-weight: 600; }
.wallpaper-card__size { display: block; font-size: 0.75rem; color: var(--ink-soft); }

.wallpaper-licence { margin-top: 2rem; max-width: 36rem; }

.link-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }

/* --- Services: frosted glass over drifting light ------------------------------ */
/* White and blue like the rest of the site (owner's choice, 2026-11-29; the copper
   version was "a lot"): the usual light page, with soft navy circles behind light
   frosted glass. The circles drift slowly and, through site.js, follow the pointer or
   a finger; under "reduce motion" they stay still. Laptops show what we build and the
   form side by side on one screen. Phones show what we build first; "Tell us what you
   need" swaps in the form (#enquiry, so no JavaScript is needed). */

.page-services {
  --svc-glass: color-mix(in srgb, var(--ivory) 66%, transparent);
  --svc-glass-strong: color-mix(in srgb, var(--ivory) 76%, transparent);
  --svc-edge: color-mix(in srgb, var(--blush) 92%, transparent);
  --svc-shadow: inset 0 1px 0 color-mix(in srgb, var(--blush) 90%, transparent),
    0 1.25rem 3rem color-mix(in srgb, var(--navy) 16%, transparent);
  --svc-blur: blur(22px) saturate(150%);
  --svc-ink: color-mix(in srgb, var(--navy) 85%, var(--ivory)); /* body text: stays clear over the circles */
}

/* The circles: an outer layer follows the pointer, the inner one drifts and is blurred. */
.bubbles {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  --mx: 0;
  --my: 0;
}
.bubble {
  position: absolute;
  aspect-ratio: 1;
  transform: translate(calc(var(--mx) * var(--depth)), calc(var(--my) * var(--depth)));
}
.bubble > span { display: block; width: 100%; height: 100%; border-radius: 50%; filter: blur(14px); }
.bubble--a { left: -18%; top: 24%; width: 70vw; --depth: 30px; }
.bubble--b { left: 56%; top: 60%; width: 56vw; --depth: 22px; }
.bubble--c { left: 66%; top: 11%; width: 31vw; --depth: 46px; }
.bubble--a > span {
  background: linear-gradient(140deg, color-mix(in srgb, var(--navy) 42%, transparent), color-mix(in srgb, var(--navy) 78%, transparent));
}
.bubble--b > span {
  background: linear-gradient(140deg, var(--blush), color-mix(in srgb, var(--navy) 58%, transparent));
}
.bubble--c > span {
  background: linear-gradient(140deg, color-mix(in srgb, var(--navy) 26%, transparent), color-mix(in srgb, var(--navy) 52%, transparent));
}
/* A soft blue glow that follows the pointer; the glass blurs it as it passes behind. */
.bubble-glow {
  position: absolute;
  left: -7.5rem;
  top: -7.5rem;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--navy) 38%, transparent), transparent 68%);
  filter: blur(12px);
  opacity: 0;
  transform: translate(var(--px, 50vw), var(--py, 50vh));
}
.bubbles.is-active .bubble-glow { opacity: 1; }

.page-services main { display: flex; flex-direction: column; }
.services-page { flex: 1; display: flex; flex-direction: column; padding-block: 1.25rem 1rem; }
.services-page__intro { flex: 1; display: flex; flex-direction: column; gap: 1rem; }

/* A frosted haze with soft edges behind the heading, so the words stand out. */
.services-hero { position: relative; isolation: isolate; display: grid; gap: 0.5rem; }
.services-hero::before {
  content: "";
  position: absolute;
  inset: -1.4rem calc(-1 * var(--gutter));
  z-index: -1;
  background: color-mix(in srgb, var(--ivory) 58%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent),
    linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent),
    linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  mask-composite: intersect;
}
.services-hero .label { color: var(--svc-ink); }
.services-hero__title {
  font-size: 1.6rem;
  text-shadow: 0 1px 16px color-mix(in srgb, var(--ivory) 90%, transparent);
}
.services-hero__intro {
  margin: 0;
  font-size: 0.9rem;
  color: var(--svc-ink);
  text-shadow: 0 1px 16px color-mix(in srgb, var(--ivory) 90%, transparent);
}
/* Short phones: the heading and the three services are enough. */
@media (max-height: 40rem) and (max-width: 63.99rem) {
  .services-hero__intro { display: none; }
}

/* Phones: one glass panel with the three services as rows. */
.service-cards {
  margin: 0;
  padding: 0.25rem 1rem;
  border: 1px solid var(--svc-edge);
  border-radius: 1.25rem;
  background: var(--svc-glass);
  -webkit-backdrop-filter: var(--svc-blur);
  backdrop-filter: var(--svc-blur);
  box-shadow: var(--svc-shadow);
}
.service-card {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  column-gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
}
.service-card:last-child { border-bottom: 0; }
.service-card__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--svc-edge);
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--blush) 75%, transparent);
  color: var(--navy);
}
.service-card__title { font-size: 0.95rem; }
.service-card__text { margin: 0.1rem 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--svc-ink); }

.services-page__cta { margin-top: auto; width: 100%; min-height: 3rem; }

/* The form, on slightly stronger frosted glass. */
.enquiry-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem 1rem 1.25rem;
  border: 1px solid var(--svc-edge);
  border-radius: 1.4rem;
  background: var(--svc-glass-strong);
  -webkit-backdrop-filter: var(--svc-blur);
  backdrop-filter: var(--svc-blur);
  box-shadow: var(--svc-shadow);
}
.enquiry-card__back { justify-self: start; padding-block: 0.25rem; font-size: 0.85rem; font-weight: 500; }
.enquiry-card__title { font-size: 1.4rem; }
.enquiry-card .form { gap: 0.8rem; }
.enquiry-card .form label { font-size: 0.85rem; }
.enquiry-card .form input,
.enquiry-card .form textarea {
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--ivory) 82%, transparent);
}
.enquiry-card .form textarea { min-height: 6.5rem; height: 6.5rem; resize: none; }
.enquiry-card .form__errors,
.enquiry-card .notice { margin: 0; }
.enquiry-card .form button { justify-self: stretch; min-height: 3rem; font-weight: 600; }

/* Phones: the form only when asked for (or after sending, which returns to #enquiry). */
@media (max-width: 63.99rem) {
  .services-page:has(#enquiry:target) .services-page__intro { display: none; }
  .enquiry-card:not(:target) { display: none; }
}

/* Laptops: what we build on the left, the form on the right, on one screen. */
@media (min-width: 64rem) {
  .bubble--a { left: 3%; top: 23%; width: 31vw; --depth: 46px; }
  .bubble--b { left: 74%; top: 50%; width: 24vw; --depth: 38px; }
  .bubble--c { left: 47%; top: 6%; width: 15vw; --depth: 72px; }

  .services-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 27.5rem;
    gap: 3.5rem;
    align-items: center;
    padding-block: 1.5rem;
  }
  .services-page__intro { flex: none; gap: 1.75rem; }
  .services-hero { justify-self: start; max-width: 37.5rem; gap: 0.75rem; }
  .services-hero::before { inset: -2.5rem -4rem; }
  .services-hero__title { font-size: 2.5rem; }
  .services-hero__intro { font-size: 1rem; }

  .service-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 0;
    border: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  .service-card,
  .service-card:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.25rem;
    border: 1px solid var(--svc-edge);
    border-radius: 1.25rem;
    background: var(--svc-glass);
    -webkit-backdrop-filter: var(--svc-blur);
    backdrop-filter: var(--svc-blur);
    box-shadow: var(--svc-shadow);
  }
  .service-card__text { font-size: 0.85rem; }

  .services-page__cta,
  .enquiry-card__back { display: none; }
  .enquiry-card { padding: 1.6rem 1.75rem 1.75rem; gap: 0.9rem; }
  .enquiry-card__title { font-size: 1.25rem; }
  .enquiry-card .form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.75rem; }
  .enquiry-card .form__field--message,
  .enquiry-card .form__errors,
  .enquiry-card .form button { grid-column: 1 / -1; }
}

/* No blur available, or less transparency asked for: solid ivory panels. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .page-services { --svc-glass: color-mix(in srgb, var(--ivory) 92%, transparent); --svc-glass-strong: color-mix(in srgb, var(--ivory) 95%, transparent); }
}
@media (prefers-reduced-transparency: reduce) {
  .page-services { --svc-glass: var(--ivory); --svc-glass-strong: var(--ivory); }
  .services-hero::before { background: var(--ivory); }
}

.form { display: grid; gap: 1.1rem; }
.form__field { display: grid; gap: 0.35rem; }
.form label { font-size: 0.9rem; font-weight: 500; }
.form input, .form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--ivory);
  color: var(--navy);
  font: inherit;
}
.form textarea { min-height: 9rem; resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline-offset: 1px; }
.form__field--error input, .form__field--error textarea { border-color: var(--navy); border-width: 2px; }
.form .errorlist { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; font-weight: 600; }
.form .errorlist li::before { content: "! "; }
.form__errors { padding: 0.75rem 1rem; border-left: 3px solid var(--navy); background: var(--blush); }
.form__errors p { margin: 0; }
.form button { justify-self: start; }

/* Honeypot: off screen for people, still in the page for bots. */
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--copper);
  background: var(--blush);
}

/* --- Wider screens --------------------------------------------------------- */

@media (min-width: 36rem) {
  .site-nav { gap: 0.5rem; }
  .site-nav a { padding-inline: 0.6rem; letter-spacing: 0.16em; }
}

@media (min-width: 45rem) {
  :root { --gutter: 2rem; --gap: 1rem; }

  .site-header__inner { min-height: var(--header-h); }
  .site-header__logo img { height: 2.5rem; }
  .site-nav { gap: 1rem; }

  .hero { padding-block: 2.5rem 4rem; }
  .hero__logo { max-width: 26rem; }

  .photo-grid { columns: 3; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallpaper-grid--tall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallpaper-grid--square { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallpaper-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .page-title { font-size: 2.25rem; }

  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 64rem) {
  /* Laptops: pages use the width of the screen, with a modest margin. Reading text keeps
     its own comfortable line length (see .page-intro, .story and others). */
  :root { --gutter: 3rem; }
  .wrap { max-width: 100rem; }

  .photo-grid { columns: 4; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wallpaper-grid--tall { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .wallpaper-grid--square { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wallpaper-grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .template-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 100rem) {
  .photo-grid { columns: 5; }
}

/* --- Glass design ------------------------------------------------------------ */
/* Frosted, see-through panels in the brand colours. Real blur only on a few large
   surfaces (header, home card, bars), because blur is costly on low-end phones;
   repeated cards use a lighter, blur-free "glass" instead. */

body {
  background:
    radial-gradient(60rem 36rem at 105% -8%, color-mix(in srgb, var(--copper-light) 26%, transparent), transparent 62%),
    radial-gradient(48rem 40rem at -12% 24%, var(--blush), transparent 64%),
    radial-gradient(40rem 32rem at 85% 62%, color-mix(in srgb, var(--navy) 7%, transparent), transparent 60%),
    var(--ivory);
}

.glass,
.site-header,
.filter-bar,
.action-bar,
.site-footer {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.glass { border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); }
.glass--dark {
  background: var(--glass-dark);
  border-color: var(--glass-edge-dark);
  color: var(--blush);
}

/* No blur available, or the visitor asks for less transparency: solid colours instead. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .site-header, .filter-bar, .action-bar, .site-footer { background: var(--glass-strong); }
  .glass--dark { background: color-mix(in srgb, var(--navy) 90%, transparent); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .site-header, .filter-bar, .action-bar, .site-footer {
    background: var(--ivory);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .glass--dark { background: var(--navy); }
}

.skip-link { z-index: 50; }

/* The header stays at the top, frosted; photos slide underneath it. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--glass-edge);
}
.site-header__inner { min-height: var(--header-h); }

/* --- Home: one screen, a photograph behind frosted glass -------------------------- */
/* Exactly one screen tall, so it never scrolls: the header, the logo card, the photo of
   the week and the footer bar. Sizes and spaces follow the height of the window, so a
   short laptop window or a small phone still shows everything. Only a phone turned
   sideways (under 30rem tall) may scroll, rather than cut anything off. */

.page-home main { display: flex; flex-direction: column; }
.page-home--photo { background: var(--navy); }
.page-home .site-footer { margin-top: 0; }
@media (min-height: 30rem) {
  .page-home { height: 100vh; height: 100dvh; overflow: hidden; }
  .page-home main { flex: 1 1 auto; min-height: 0; }
}

.home-hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.6rem, 2vh, 1rem);
  padding: clamp(0.75rem, 4vh, 2.5rem) var(--gutter) clamp(0.75rem, 2vh, 1rem);
}
/* The photo fills the screen behind everything, softly blurred so the glass stands out
   (and enlarged a little, so the blurred edges stay off-screen), under a navy cover so
   that any photo of the week suits the card. */
.home-hero__photo {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  transform: scale(1.08);
}
.home-hero--photo::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--navy) 44%, transparent) 0%,
    color-mix(in srgb, var(--navy) 25%, transparent) 45%,
    color-mix(in srgb, var(--navy) 77%, transparent) 100%
  );
}
.home-hero__card {
  width: min(100%, 26rem);
  margin-block: auto; /* centred in the space above the photo credit */
  padding: clamp(1rem, 3vh, 1.4rem) 1.25rem clamp(1.1rem, 3.2vh, 1.6rem);
  border-radius: var(--radius-glass);
  text-align: center;
}
/* The logo shrinks on short screens, so everything still fits on one. */
.home-hero__card .hero__logo { width: min(14.5rem, 26vh); max-width: none; margin: 0 auto clamp(0.5rem, 1.5vh, 0.9rem); }
.home-hero__card .hero__intro { margin-bottom: clamp(0.75rem, 2vh, 1.25rem); color: var(--navy); font-size: 0.95rem; }
@media (max-height: 36rem) {
  .home-hero__caption { display: none; } /* short windows: the photo's name is enough */
}
.home-hero__credit {
  align-self: stretch;
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-glass);
  text-decoration: none;
}
.home-hero__credit .label { color: var(--copper-light); font-size: 0.62rem; }
.home-hero__title { font-size: 0.92rem; font-weight: 600; }
.home-hero__caption {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.8rem;
  opacity: 0.92;
}
.home-hero__credit:hover .home-hero__title { text-decoration: underline; }
.home-hero__credit:focus-visible { outline-color: var(--blush); }
.home-hero__empty { margin: 0; color: var(--ink-soft); }

/* --- Cards: names sit on the photo ------------------------------------------------ */

.category-card__frame,
.category-card__blank { position: relative; margin-bottom: 0; }
.category-card__chip {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  display: grid;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--glass-edge);
  border-radius: 0.7rem;
  background: var(--glass-strong); /* blur-free glass: there are many of these */
  line-height: 1.3;
}
.category-card__name { font-size: 0.9rem; }
.category-card__count { font-size: 0.75rem; }
.category-card__frame, .category-card__blank, .photo-card__frame,
.wallpaper-card__image, .template-card__frame { border-radius: 0.6rem; }

/* Photo titles appear on the photo when hovering with a mouse; phones show clean photos. */
.photo-card { position: relative; }
.photo-card__title {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--navy);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
}
@media (hover: hover) {
  .photo-card:hover .photo-card__title { opacity: 1; text-decoration: none; }
}
.photo-card:focus-visible .photo-card__title { opacity: 1; }

/* --- Gallery: one compact, frosted filter bar ---------------------------------------- */

.page-head--compact { padding-bottom: 0.75rem; }
.page-head--compact .page-intro { margin-bottom: 0; }
/* Stays in place (doesn't follow the page), and nothing in it scrolls sideways. */
.filter-bar {
  margin-bottom: 1rem;
  border-block: 1px solid var(--glass-edge);
}
.filter-bar__inner { display: grid; gap: 0.5rem; padding-block: 0.6rem; }
.filter-bar .search { margin: 0; max-width: none; }
.filter-bar .search input { min-height: 2.5rem; background: var(--glass-strong); }
.filter-bar .search .button { min-height: 2.5rem; }
.chip-row.filters { gap: 0.4rem; margin: 0; } /* chips wrap onto new lines */
.chip-row.filters a { min-height: 2rem; padding: 0.2rem 0.75rem; background: var(--glass-strong); font-size: 0.8rem; }
.chip-row.filters a[aria-current] { background: var(--navy); }
.filter-bar .clear-filters { margin: 0; }

/* --- Photo page: one clear Download, the rest folded away ------------------------------ */

.download.glass { border-radius: var(--radius-glass); }
.download__primary { width: 100%; justify-content: space-between; min-height: 3.1rem; border-radius: 0.7rem; }
.more-sizes { margin: 0.9rem 0 1.25rem; }
.more-sizes > summary { cursor: pointer; font-size: 0.9rem; font-weight: 500; }
.more-sizes[open] > summary { margin-bottom: 0.75rem; }
.more-sizes .download__list { margin-bottom: 0; }
.download__button { border-radius: 0.7rem; }

/* On a phone, Download and Save stay at the bottom of the screen. */
.action-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 25;
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--glass-edge);
}
.action-bar .button { flex: 1; }
.action-bar__size { font-size: 0.68rem; letter-spacing: 0.04em; text-transform: none; opacity: 0.85; }
.page-photo { padding-bottom: 4.5rem; }
.page-photo .save-row { display: none; }

@media (min-width: 45rem) {
  .home-hero__card { padding: clamp(1rem, 3.5vh, 2rem) 2rem clamp(1.1rem, 3.8vh, 2.25rem); }
  .home-hero__card .hero__logo { width: min(18rem, 26vh); }
  .home-hero__credit { align-self: flex-end; width: min(100%, 30rem); }
  .site-footer__inner { justify-content: space-between; }
  .site-footer__small { display: block; }
  .filter-bar__inner { grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); align-items: center; column-gap: 1rem; }
  .filter-bar__inner .search { grid-row: span 2; }
}

@media (min-width: 64rem) {
  .action-bar { display: none; }
  .page-photo { padding-bottom: 0; }
  .page-photo .save-row { display: flex; }

  /* Laptops: the whole photo page fits one screen. The photo sits in a card that fits it
     exactly (as tall as the room between header and footer allows, never wider than the
     room beside the details), with a compact column of details and Download beside it.
     A tall photo makes the pair narrower; a wide one fills the width. */
  .photo-page {
    container-type: inline-size;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    max-width: 100rem;
    margin-inline: auto;
    padding: 1rem var(--gutter) 0;
  }
  .photo-view { flex: none; margin: 0; }
  .photo-view img {
    width: min(100cqi - 30rem, calc((100vh - var(--header-h) - var(--footer-h) - 2.5rem) * var(--w, 3) / var(--h, 2)));
    width: min(100cqi - 30rem, calc((100dvh - var(--header-h) - var(--footer-h) - 2.5rem) * var(--w, 3) / var(--h, 2)));
    border-radius: 0.9rem;
    box-shadow: var(--glass-shadow);
  }
  .photo-page .photo-info {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    width: 27rem;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .photo-page .page-title { margin-bottom: 0.35rem; }
  .photo-page .photo-info__description { margin-bottom: 0.6rem; }
  /* Place, date and theme on one or two lines rather than a tall list. */
  .photo-page .photo-facts { display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; margin: 0; font-size: 0.85rem; }
  .photo-page .photo-facts div { display: flex; gap: 0.4rem; }
  .photo-page .download { padding: 1rem 1.1rem; }
  .photo-page .download .label { margin-bottom: 0.75rem; }
  .photo-page .more-sizes { margin: 0.6rem 0 0.7rem; }
  .photo-more { display: block; }
  .related { display: none; } /* phones only; laptops get "More photos from…" beside the photo */
}

/* --- Motion ----------------------------------------------------------------- */
/* Gentle, and only for visitors who haven't asked their device to reduce motion.
   Only opacity and transform move. Without support or JavaScript, pages simply show. */

@media (prefers-reduced-motion: no-preference) {
  /* Moving between pages: the photo you tapped grows into its page (Chrome, Edge,
     Safari); other browsers change page as usual. */
  @view-transition { navigation: auto; }
  ::view-transition-group(*) {
    animation-duration: 0.3s;
    animation-timing-function: cubic-bezier(0.2, 0.75, 0.25, 1);
  }

  /* Changing page: the old page fades away and the new one rises softly into place,
     while the frosted header stays where it is. */
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: page-out 0.18s ease-in both; }
  ::view-transition-new(root) { animation: page-in 0.34s cubic-bezier(0.2, 0.75, 0.25, 1) 0.08s both; }
  @keyframes page-out { to { opacity: 0; transform: translateY(-0.4rem); } }
  @keyframes page-in { from { opacity: 0; transform: translateY(0.75rem); } }

  /* Photos fade in over their colour as they arrive (site.js marks the ones still loading). */
  img[data-fade] { transition: opacity 0.35s ease-out; }
  img[data-fade].is-loading { opacity: 0; }

  /* Pressing a button, link, chip or photo: it gives a little under the finger. */
  .button, .filters a, .site-nav a, .site-footer__links a, .home-hero__credit {
    transition: transform 0.12s ease-out, background-color 0.2s ease-out;
  }
  .photo-card__frame, .category-card__frame { transition: transform 0.15s ease-out; }

  /* Cards lift a little under a mouse; titles slide into view. */
  @media (hover: hover) {
    .photo-card__frame, .category-card__frame, .wallpaper-card__image {
      transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
    }
    .photo-card:hover .photo-card__frame,
    .category-card:hover .category-card__frame,
    .wallpaper-card__image:hover {
      transform: translateY(-3px);
      box-shadow: var(--glass-shadow);
    }
    .photo-card__title { transform: translateY(4px); transition: opacity 0.2s, transform 0.2s; }
    .photo-card:hover .photo-card__title { transform: none; }
  }

  .button:active, .filters a:active, .site-nav a:active, .site-footer__links a:active { transform: scale(0.96); }

  /* Services: the glowing circles drift slowly, each on its own path and pace, and
     glide after the pointer (site.js); a soft light follows it more closely. */
  .bubble { transition: transform 0.9s cubic-bezier(0.2, 0.75, 0.25, 1); }
  .bubble-glow { transition: transform 0.35s cubic-bezier(0.2, 0.75, 0.25, 1), opacity 0.5s ease-out; }
  .bubble > span { will-change: transform; }
  .bubble--a > span { animation: drift-a 16s ease-in-out infinite alternate; }
  .bubble--b > span { animation: drift-b 20s ease-in-out infinite alternate; }
  .bubble--c > span { animation: drift-c 12s ease-in-out infinite alternate; }
  @keyframes drift-a { 50% { transform: translate(14%, -10%) scale(1.08); } 100% { transform: translate(6%, 8%) scale(0.94); } }
  @keyframes drift-b { 50% { transform: translate(-18%, -14%) scale(1.1); } 100% { transform: translate(-5%, 8%) scale(0.96); } }
  @keyframes drift-c { 50% { transform: translate(-25%, 25%) scale(1.15); } 100% { transform: translate(30%, 8%) scale(0.9); } }
  .home-hero__credit:active { transform: scale(0.985); }
  .photo-card:active .photo-card__frame,
  .category-card:active .category-card__frame { transform: scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .bubble { transform: none; transition: none; } /* the circles stay put */
  .bubble-glow { display: none; }
}
