/* Shared, explicit colour choices for the website and event shop. */
html[data-theme="light"] {
  color-scheme: only light;
  --paper: #f8f6f2;
  --white: #fff;
  --ink: #302d29;
  --muted: #67615a;
  --gold: #aa9173;
  --red: #943344;
  --line: #ded7cd;
  --theme-surface: #fffdf9;
  --theme-hover: #eee8df;
  --theme-border: #b8a58e;
}

html[data-theme="dark"] {
  color-scheme: only dark;
  --paper: #201f1c;
  --white: #292723;
  --ink: #f4f0e8;
  --muted: #c4bcb1;
  --gold: #c8ad88;
  --red: #e8acb8;
  --line: #4b463e;
  --theme-surface: #292723;
  --theme-hover: #37332c;
  --theme-border: #8f806c;
}

html[data-theme], html[data-theme] body {
  background-color: var(--paper);
  color: var(--ink);
}

/* Keep the colour choice visible, including beside the mobile menu or basket. */
.theme-control {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 94px;
  width: 94px;
  min-width: 0;
  height: 44px;
  margin: 0;
  border: 1px solid var(--theme-border, #b8a58e);
  border-radius: 2px;
  background: var(--theme-surface, #fffdf9);
  color: var(--ink);
}
.theme-control > svg {
  position: absolute;
  left: 8px;
  top: 13px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  pointer-events: none;
}
.theme-control select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding: 0 3px 0 28px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: 500 12px/1.5 var(--body);
  cursor: pointer;
}
.theme-control option { background: var(--theme-surface, #fffdf9); color: var(--ink); }
.theme-control:hover { background: var(--theme-hover, #eee8df); }
.header .header-inner { gap: 18px; }
.shop-header .header-inner nav { gap: 16px; }
html[data-theme] .basket-trigger > .basket-label {
  display: inline;
  min-width: 0;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

/* Explicit surfaces prevent a light card from inheriting pale dark-mode text. */
html[data-theme="dark"] .skip-link,
html[data-theme="dark"] .brief-form,
html[data-theme="dark"] .project-choice,
html[data-theme="dark"] .service-assurance,
html[data-theme="dark"] .service-film-links > button,
html[data-theme="dark"] .enquiry-form,
html[data-theme="dark"] .basket-bar {
  background: var(--theme-surface);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .project-choice:hover,
html[data-theme="dark"] .nav-contact:hover,
html[data-theme="dark"] .service-select:hover,
html[data-theme="dark"] .service-film-links > button:hover,
html[data-theme="dark"] .basket-trigger:hover,
html[data-theme="dark"] .dialog-close:hover,
html[data-theme="dark"] .film-player-navigation button:hover,
html[data-theme="dark"] .dialog-bottom button:hover {
  background: var(--theme-hover);
}
html[data-theme="dark"] .service-select[aria-pressed="true"] {
  background: #3b302f;
  border-left-color: var(--red);
}
html[data-theme="dark"] .nav-contact,
html[data-theme="dark"] .basket-trigger,
html[data-theme="dark"] .film-player-navigation button,
html[data-theme="dark"] .dialog-bottom button,
html[data-theme="dark"] .dialog-close {
  border-color: var(--theme-border);
}
html[data-theme="dark"] .direct-contact a,
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .plain-button {
  border-bottom-color: var(--gold);
}
html[data-theme="dark"] .text-link:hover { border-bottom-color: var(--red); }
html[data-theme="dark"] .enquiry-preview { border-color: var(--line); }

/* Gold metadata remains legible on the charcoal surface. */
html[data-theme="dark"] .stage-number,
html[data-theme="dark"] .project-choice > .number,
html[data-theme="dark"] .project-choice > .choice-arrow,
html[data-theme="dark"] .service-no,
html[data-theme="dark"] .service-tags span,
html[data-theme="dark"] .service-select .service-number,
html[data-theme="dark"] .service-select > span:last-child,
html[data-theme="dark"] .journey span,
html[data-theme="dark"] .product-bottom > span,
html[data-theme="dark"] .basket-line-price {
  color: var(--gold);
}
html[data-theme="dark"] .service-toggle::before,
html[data-theme="dark"] .service-toggle::after,
html[data-theme="dark"] .service-capabilities li::before { background: var(--gold); }
html[data-theme="dark"] .stage-link:hover { border-bottom-color: var(--gold); }
html[data-theme="dark"] .search-label svg { stroke: var(--muted); }

/* Primary action fills have their own foreground rather than inheriting ink. */
html[data-theme="dark"] .primary-button,
html[data-theme="dark"] .journey-controls .primary-button:disabled:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #201f1c;
}
html[data-theme="dark"] .primary-button:hover { background: #ddc39e; border-color: #ddc39e; color: #201f1c; }
html[data-theme="dark"] .button { background: var(--red); border-color: var(--red); color: #201f1c; }
html[data-theme="dark"] .button:hover { background: #f0c5cf; border-color: #f0c5cf; color: #201f1c; }
html[data-theme="dark"] .button.secondary { background: transparent; border-color: var(--theme-border); color: var(--ink); }
html[data-theme="dark"] .button.secondary:hover { background: var(--theme-hover); border-color: var(--gold); }
html[data-theme="dark"] .basket-trigger > span { background: var(--red); color: #201f1c; }
html[data-theme="dark"] ::selection { background: var(--red); color: #201f1c; }

/* Photos retain their original colours; only their surrounding UI changes. */
html[data-theme="dark"] .portfolio-card.portrait .portfolio-image,
html[data-theme="dark"] .service-hero > button,
html[data-theme="dark"] .service-gallery-item img,
html[data-theme="dark"] .service-film-links img,
html[data-theme="dark"] .service-image-dialog figure > img,
html[data-theme="dark"] .service-video-content video,
html[data-theme="dark"] .product-image-button,
html[data-theme="dark"] .product-visual,
html[data-theme="dark"] .product-detail-image { background: #302d28; }
html[data-theme="dark"] .preview-toggle,
html[data-theme="dark"] .card-action,
html[data-theme="dark"] .service-hero > button::after,
html[data-theme="dark"] .image-arrow {
  background: #292723f5;
  border-color: var(--theme-border);
  color: var(--ink);
}
html[data-theme="dark"] .preview-toggle:hover { background: var(--theme-hover); }
html[data-theme="dark"] .product-image-button:hover .image-arrow { background: var(--red); border-color: var(--red); color: #201f1c; }

/* Native fields and menus follow the selected scheme on both pages. */
html[data-theme="dark"] .brief-form label { color: var(--ink); }
html[data-theme="dark"] .brief-form input,
html[data-theme="dark"] .brief-form select,
html[data-theme="dark"] .brief-form textarea { border-bottom-color: var(--theme-border); }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .mobile-service-picker select {
  background: #24221f;
  border-color: var(--theme-border);
  color: var(--ink);
}
html[data-theme="dark"] .brief-form input::placeholder,
html[data-theme="dark"] .brief-form textarea::placeholder,
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder,
html[data-theme="dark"] .search-label input::placeholder { color: #b0a89b; opacity: 1; }
html[data-theme="dark"] .brief-form select option,
html[data-theme="dark"] .mobile-service-picker option,
html[data-theme="dark"] .field option { background: #292723; color: var(--ink); }
html[data-theme="dark"] .notice { background: #3c3225; border-left-color: var(--gold); color: var(--ink); }
html[data-theme="dark"] .toast { background: #e4d4bd; color: #201f1c; box-shadow: 0 6px 30px #0005; }
html[data-theme="dark"] .basket-bar { box-shadow: 0 8px 30px #0006; }
html[data-theme="dark"] dialog { border-color: var(--theme-border); box-shadow: 0 20px 90px #0006; }
html[data-theme="dark"] dialog::backdrop { background: #100f0ddb; }
html[data-theme="dark"] :is(a, button, summary, input, textarea, select):focus-visible,
html[data-theme="dark"] .service-panel-head h3:focus-visible { outline-color: var(--gold); }

@media (max-width: 1100px) {
  .header .nav-contact { display: none; }
}
@media (max-width: 1050px) {
  .header .desktop-nav { display: none; }
  .header .menu-toggle { display: block; }
}
@media (max-width: 640px) {
  .header .header-inner { gap: 10px; }
  .shop-header .header-inner { gap: 10px; }
  .shop-header .brand { gap: 6px; }
  .shop-header .brand img { width: 30px; height: 28px; }
  .shop-header .brand > span { font-size: 16px; letter-spacing: 1px; }
  .shop-header .brand small { display: none; }
  .shop-header .header-inner nav { gap: 7px; }
  .shop-header .theme-control { flex-basis: 70px; width: 70px; }
  .shop-header .theme-control > svg { display: none; }
  .shop-header .theme-control select { padding-left: 6px; font-size: 12px; }
  .shop-header .basket-trigger { gap: 5px; padding-inline: 7px; }
}
@media (max-width: 380px) {
  .header .header-inner { gap: 8px; }
  .header .brand { gap: 6px; }
  .header .brand > span { font-size: 16px; letter-spacing: 1px; }
  .header .theme-control { flex-basis: 82px; width: 82px; }
  .header .theme-control > svg { left: 6px; width: 14px; }
  .header .theme-control select { padding-left: 23px; padding-right: 0; }
  .shop-header .header-inner { gap: 7px; }
  .shop-header .brand img { width: 26px; }
  .shop-header .brand > span { font-size: 15px; letter-spacing: .7px; }
  .shop-header .header-inner nav { gap: 5px; }
  .shop-header .basket-trigger { font-size: 10px; padding-inline: 6px; }
}
