/* Shared ground rules for every version: reset, focus, skip links, the signposting header,
   the footer and the reduced-motion fallbacks. Colours come from tokens.css (DaylongUK/daylong-design);
   each version sets the --site-* properties to fit its own look. */

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

/* The page frame. On a wide screen the content keeps within 1440 px, centred, as on daylongdirect.co.uk
   and daylong.co.uk; colour, pictures and the header bar still run to the edges. It is a layout constant
   of this site, not a design token: tokens.css comes from daylong-design and keeps its own 1200 px. */
:root {
  --site-frame: 1440px;
}

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

body {
  margin: 0;
  font-family: var(--font-family-sans);
  font-size: var(--font-size-md);
  line-height: var(--font-line-height-md);
  color: var(--site-ink, var(--text-default));
  background: var(--site-ground, var(--color-neutral-white));
  overflow-x: clip;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-gap);
  box-shadow: 0 0 0 var(--focus-gap) var(--focus-inner);
}

.theme-dark :focus-visible {
  outline-color: var(--color-neutral-white);
  box-shadow: 0 0 0 var(--focus-gap) var(--color-navy-950);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip links */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: calc(var(--layer-tooltip) + 1);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--color-navy-900);
  color: var(--color-neutral-white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

/* The signposting header: the bar runs the full width, the logo and the buttons keep to the frame. */
.site-header {
  --gutter: clamp(16px, 3vw, 32px);
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--layer-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px max(var(--gutter), 50% - var(--site-frame) / 2 + var(--gutter));
  min-height: 64px;
  color: var(--site-header-ink, var(--color-navy-900));
  background: var(--site-header-ground, color-mix(in oklab, var(--color-neutral-white) 88%, transparent));
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--site-header-rule, color-mix(in oklab, var(--color-navy-900) 10%, transparent));
  font-family: Poppins, var(--font-family-sans);
}

.site-brand {
  display: inline-flex;
  flex: none;
  padding: 4px;
  margin-left: -4px;
  border-radius: var(--radius-sm);
}

.site-brand img {
  width: clamp(116px, 14vw, 156px);
  height: auto;
}

.brand-on-dark {
  display: none;
}

.theme-dark .brand-on-dark {
  display: block;
}

.theme-dark .brand-on-light {
  display: none;
}

.site-nav {
  display: flex;
  gap: 8px;
}

.site-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 14px 6px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  line-height: 1.2;
  transition: background-color var(--motion-duration-fast) var(--motion-easing-out), color var(--motion-duration-fast) var(--motion-easing-out);
}

/* Each website's own logo, in its white version, names the button. */
.site-nav-logo {
  flex: none;
  width: auto;
  height: 28px;
}

.site-nav-note {
  max-width: 15ch;
  font-size: 12px;
}

.site-nav-direct {
  background: var(--site-direct-ground, var(--color-navy-900));
  color: var(--site-direct-ink, var(--color-neutral-white));
}

.site-nav-direct:hover {
  background: var(--site-direct-hover, var(--color-navy-800));
}

.site-nav-shop {
  background: var(--site-shop-ground, var(--action-primary));
  color: var(--site-shop-ink, var(--color-neutral-white));
}

.site-nav-shop:hover {
  background: var(--site-shop-hover, var(--action-primary-hover));
}

.site-progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 3px;
  overflow: hidden;
}

.site-progress span {
  display: block;
  height: 100%;
  background: var(--site-progress, var(--color-orange-500));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

@media (max-width: 640px) {
  .site-header {
    min-height: 56px;
    padding-block: 6px;
    gap: 8px;
  }

  .site-nav-note {
    display: none;
  }

  .site-nav-link {
    padding: 6px 10px;
  }

  .site-nav-logo {
    height: 25px;
  }
}

@media (max-width: 380px) {
  .site-brand img {
    width: 96px;
  }

  .site-nav {
    gap: 6px;
  }

  .site-nav-link {
    padding: 4px 8px;
  }

  .site-nav-logo {
    height: 24px;
  }
}

@media (max-width: 340px) {
  .site-nav-logo {
    height: 21px;
  }
}

/* Footer */
.site-footer {
  background: var(--site-footer-ground, var(--color-navy-950));
  color: var(--site-footer-ink, var(--color-neutral-white));
  font-family: Poppins, var(--font-family-sans);
  font-size: var(--font-size-sm);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px 48px;
  max-width: var(--site-frame);
  margin: 0 auto;
  padding: 56px clamp(16px, 4vw, 48px) 40px;
}

.site-footer .brand-on-light {
  display: none;
}

.site-footer .brand-on-dark {
  display: block;
  width: 150px;
  margin-bottom: 14px;
}

.site-footer-brand p {
  max-width: 34ch;
  color: var(--color-sky-100);
}

.site-footer-nav {
  display: grid;
  gap: 14px;
  align-content: start;
}

.site-footer-nav a {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--color-neutral-white) 18%, transparent);
}

.site-footer-nav a:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-nav strong {
  font-size: var(--font-size-md);
}

.site-footer-nav span {
  color: var(--color-sky-100);
}

.site-footer-contact a {
  font-size: var(--font-size-lg);
  font-weight: 600;
  text-underline-offset: 3px;
}

.site-footer-contact p + p {
  color: var(--color-sky-100);
}

.site-footer-legal {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid color-mix(in oklab, var(--color-neutral-white) 18%, transparent);
  color: var(--color-sky-100);
  font-size: 13px;
  max-width: 110ch;
}

/* Quotes: straight quotes are typed in the copy; this adds nothing automatic. */
q {
  quotes: none;
}

/* Motion off: nothing moves, everything is visible. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
