/* The public website's styles. Colours and fonts come from the platform's
   tokens (templates/styles/tokens.css, built from devtools/colours.py), so the
   website and platform change together. Never hard-code a colour here.

   Layout rules (Ben, 2026-10-14): every page at most 1200px wide and centred,
   nothing stretched to the screen edge, nothing overlapping, one spacing scale.
   Works from 375px (phone) up. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The footer sits at the foot of the screen even on a short page (Contact). */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
main { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }

/* One width for everything: the top bar's contents, the page and the footer. */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* The faint compass behind the page, as on the platform (templates/_page_texture.html). */
.page-texture { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1;
                pointer-events: none; background: var(--texture) center / cover no-repeat;
                /* Light mode: the website shows the picture at 60% of the platform's Design page strength, as the
                   pages here have more open text over it. Dark mode uses the Design page value as it is. */
                opacity: calc(var(--texture-strength, .07) * .6); }
html[data-theme="dark"] .page-texture { opacity: var(--texture-strength, .06); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .page-texture { opacity: var(--texture-strength, .06); } }
html[data-theme="dark"] .page-texture { filter: invert(1); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .page-texture { filter: invert(1); } }

/* Type: Anton for headings (one weight, condensed, so a touch larger), Epilogue for everything else. */
h1, h2, h3 { font: 400 1em/1.15 var(--font-display); letter-spacing: .01em; margin: 0 0 12px; color: var(--text); }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); text-transform: uppercase; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); text-transform: capitalize; }  /* Each Word Capitalised */
h3 { font-size: 1.2rem; }
p { margin: 0 0 14px; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Buttons: the platform's. */
/* Inline-flex so the label is centred in the button's full height (min 44px), not sat near the top. */
.button, button { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-text); border: 0;
                  border-radius: 8px; padding: 11px 18px; font: 600 15px/1.2 var(--font); cursor: pointer;
                  text-decoration: none; min-height: 44px; }
.button:hover, button:hover { background: var(--accent-hover); }
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--text); padding: 10px 17px; }
.button.secondary:hover { background: var(--sidebar-hover); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Cards and sections share one spacing scale: 12px inside, 24px between (40px on desktop). */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card > :last-child { margin-bottom: 0; }
/* Sections 24px apart on every page; the first close under the top bar; the footer brings its own gap. */
main > section { margin: 24px 0; }
main > section:first-child { margin-top: 16px; }
main > section:last-of-type { margin-bottom: 0; }  /* last-of-type: Home has a script after its last section */

/* Top bar: cream, like the platform's, the logo left and the pages right. */
.site-top { background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--line);
            position: sticky; top: 0; z-index: 10; }
.site-top .bar { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
/* The logo is drawn in the text colour, so it suits light and dark and any Design page choice. */
.logo { display: block; width: 180px; height: 42px; background: var(--header-text);
        -webkit-mask: var(--logo) left center / contain no-repeat; mask: var(--logo) left center / contain no-repeat; }
.logo.mark { width: 72px; height: 34px; background: var(--text); }  /* footer: the mountain mark alone */
/* The tagline beside the logo (left off narrow phones, where the bar has no room). */
.site-top .tagline { margin: 0 0 0 4px; font: 400 15px/1.3 var(--font-display); text-transform: uppercase; letter-spacing: .05em;
                     color: var(--header-text); }
@media (max-width: 760px) { .site-top .tagline { display: none; } }
/* Desktop: three columns, logo | tagline centred on the page | menu. */
@media (min-width: 761px) {
  /* Narrower screens: the logo and menu take what they need and the tagline centres between them. */
  .site-top .bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
  .site-top .tagline { margin: 0; text-align: center; }
  .site-top nav { justify-self: end; flex-wrap: nowrap; }
}
/* Wide screens: equal side columns, so the tagline is centred on the page itself. */
@media (min-width: 1040px) { .site-top .bar { grid-template-columns: 1fr auto 1fr; } }
.site-top nav { margin-left: auto; display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; font-size: 15px; }
.site-top nav a { color: var(--header-text); text-decoration: none; padding: 6px 0; }
.site-top nav a:hover, .site-top nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.site-top nav a.linkedin { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
                           border: 1.5px solid currentColor; border-radius: 6px; font-weight: 700; font-size: 14px; padding: 0; }
.site-top nav a.linkedin:hover { text-decoration: none; background: var(--sidebar-hover); }
.site-top nav a.sign-in { color: var(--accent-text); padding: 9px 16px; min-height: 0; }
.site-top nav a.sign-in:hover { text-decoration: none; }
/* Development-only light/dark switch (website/views.py theme_toggle). */
.site-top .theme-toggle { background: none; color: var(--header-text); border: 1px solid var(--line); border-radius: 8px;
                          width: 32px; min-height: 32px; padding: 0; font-size: 18px; }
@media (max-width: 600px) {
  .site-top .bar { gap: 8px 14px; }
  .logo { width: 150px; height: 36px; }
  .site-top nav { gap: 4px 14px; font-size: 14px; width: 100%; margin-left: 0; justify-content: space-between; }
  .site-top nav a.sign-in { padding: 8px 12px; }
}

/* Home: the hero. Text left, the testimonials carousel right on desktop; stacked on a phone
   (the compass picture is the page background, so there's no hero photo). */
.hero { display: grid; gap: 24px; align-items: center; }
@media (min-width: 800px) { .hero { grid-template-columns: 1.1fr 1fr; gap: 24px 48px; } }
.hero > h1 { grid-column: 1 / -1; margin: 0; }  /* the title runs across the page above both columns */
.hero-quotes { background: color-mix(in srgb, var(--surface) 80%, transparent); text-align: center; }  /* slightly see-through over the compass */
.hero-quotes h2 { font-size: 1.3rem; margin-bottom: 10px; }
/* Slides stacked in one grid cell: the tallest sets the height, so the card never jumps as quotes change.
   Each quote is centred in the card, left to right and top to bottom. */
.hero-quotes .slides { display: grid; }
.hero-quotes .slide { grid-area: 1 / 1; margin: 0; padding: 0 8px; border: 0; border-radius: 0; background: none;
                      justify-content: center; visibility: hidden; opacity: 0;
                      /* Cross-fade: the old quote fades out over .7s (hidden only once faded) while the new one fades in. */
                      transition: opacity .7s ease, visibility 0s linear .7s; }
.hero-quotes .slide.is-current { visibility: visible; opacity: 1; transition: opacity .7s ease, visibility 0s; }
.hero-quotes .slide p { font-size: 14.5px; font-style: italic; margin-bottom: 10px; }
.hero-quotes .slide footer { margin-top: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-quotes .controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.hero-quotes .arrow { background: none; color: var(--text); border: 1px solid var(--line); border-radius: 8px; width: 40px; min-height: 40px;
                      padding: 0; font-size: 22px; line-height: 1; }
.hero-quotes .arrow:hover { background: var(--sidebar-hover); }
.hero-quotes .dots { display: flex; gap: 8px; }
.hero-quotes .dots button { width: 12px; height: 12px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--text);
                            background: transparent; }
.hero-quotes .dots button[aria-selected="true"] { background: var(--text); }
@media (prefers-reduced-motion: reduce) { .hero-quotes .slide { transition: none; } }

/* Home: client logos as supplied (no recolouring), on a pale strip in light and dark mode, scrolling
   slowly to the left without end: the set is repeated four times and the track slides by one set. */
.clients h2, .quotes-page h2 { text-align: center; }
.logos { overflow: hidden; margin: 0; padding: 18px 0; background: var(--logo-strip-bg); border: 1px solid var(--line);
         border-radius: 12px; }
.logo-track { display: flex; width: max-content; animation: logos-scroll 40s linear infinite; }
.logo-track ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex: none; }
.logo-track li { display: flex; align-items: center; justify-content: center; width: 220px; padding: 0 30px; }
.logo-track img { max-height: 56px; width: auto; max-width: 100%; }
@keyframes logos-scroll { from { transform: translateX(0); } to { transform: translateX(-25%); } }
.logos:hover .logo-track { animation-play-state: paused; }
@media (max-width: 600px) { .logo-track li { width: 170px; padding: 0 20px; } .logo-track img { max-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .logo-track { animation: none; } }
.quotes { display: grid; gap: 16px; }
@media (min-width: 800px) { .quotes { grid-template-columns: 1fr 1fr; gap: 24px; } }
blockquote { margin: 0; padding: 20px 20px 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
             border-left: 4px solid var(--sidebar-marker); display: flex; flex-direction: column; }
blockquote p { margin: 0 0 12px; font-size: 15.5px; }
blockquote footer { margin-top: auto; color: var(--muted); font-size: 14px; font-weight: 600; }

/* Two cards side by side (Home's Services and Who are we). */
.two-up { display: grid; gap: 16px; }
@media (min-width: 800px) { .two-up { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* Page intros (Services, About): title and a short lead, not stretched across the full width. */
.intro { max-width: 760px; }
/* Services: the cards close under the intro. */
main > .intro { margin-bottom: 0; }
main > .services { margin-top: 16px; }

/* Services: a grid of cards with a photo on top. */
.services { display: grid; gap: 16px; }
@media (min-width: 640px) { .services { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (min-width: 1000px) { .services { grid-template-columns: 1fr 1fr 1fr; } }
.services .card img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
/* Card text a size smaller and justified (hyphenated where needed), chosen by Ben 2026-10-14. */
.services .card p { font-size: 15px; text-align: justify; hyphens: auto; }
.cta { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }

/* About: the photo top right with the shaped crop from the original site (a quarter-circle cut from its
   bottom-left corner), the text alongside and running on beneath it. Stacked on a phone. */
.about { display: grid; gap: 0; }
/* Phone: the title tucks up into the photo's cut-away corner, overlapping its bottom edge a little. */
@media (max-width: 799px) { .about-text { margin-top: -40px; } }
.about-photo { margin: 0; width: min(300px, 70%); justify-self: end; }  /* phone: against the right edge, like desktop */
@media (min-width: 800px) {
  .about { display: block; }
  .about-photo { float: right; width: 300px; margin: 0 0 24px 40px; }
}
.about-photo img { aspect-ratio: 1 / 1; object-fit: cover; object-position: center 30%; border-bottom-left-radius: 100%; }
.about-text { max-width: 900px; }
.about-text h2 { margin-top: 28px; }
.about::after { content: ""; display: block; clear: both; }

/* About: "What people say" as a strip of photo-backed quote cards that drifts slowly left (script on the
   page), can be swiped or scrolled, and has arrows to step a card at a time. The set is repeated so it
   never runs out. The scrollbar is hidden; the arrows and swiping do its job. */
.quote-strip { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.quote-strip::-webkit-scrollbar { display: none; }
.quote-track { display: flex; width: max-content; }
.quote-track ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; flex: none; }
.quote-card { flex: none; width: 560px; min-height: 320px; margin-right: 24px; display: flex; align-items: center; padding: 28px;
              border-radius: 12px; background: var(--photo) center / cover no-repeat; border: 1px solid var(--line); }
/* The cream panel sits mid-card, sized to its quote (at least 170px tall): the quote at the top, who said it bottom right. */
.quote-card blockquote { flex: 1; min-height: 170px; display: flex; flex-direction: column; margin: 0; padding: 18px 22px; border: 0; border-radius: 10px;
                         background: color-mix(in srgb, var(--header-bg) 92%, transparent); }
.quote-card blockquote p { font-size: 14px; font-style: italic; margin: 0 0 10px; }
.quote-card blockquote footer { margin-top: auto; text-align: right; color: var(--muted); font-size: 13px; font-weight: 600; }
.strip-controls { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.strip-controls .arrow { background: none; color: var(--text); border: 1px solid var(--line); border-radius: 8px; width: 44px; min-height: 44px;
                         padding: 0; font-size: 24px; line-height: 1; }
.strip-controls .arrow:hover { background: var(--sidebar-hover); }
@media (max-width: 600px) { .quote-card { width: 300px; min-height: 0; padding: 16px; margin-right: 16px; } }

/* Contact: intro top left; the form's boxes and the photo side by side, the photo exactly as tall as the
   boxes (first label to the bottom of the message box); Send underneath. The form itself is "display:
   contents" so its two parts sit in the grid. Photo hidden on a phone. */
.contact { display: grid; gap: 0 48px; align-items: start; }
.contact form { display: contents; }
@media (min-width: 800px) {
  .contact { grid-template-columns: 3fr 2fr; grid-template-areas: "intro ." "fields photo" "send ."; }
  .contact-intro { grid-area: intro; }
  .contact-fields { grid-area: fields; }
  .contact-send { grid-area: send; }
  .contact-image { grid-area: photo; align-self: stretch; position: relative; margin: 0; }
  .contact.sent .contact-image { min-height: 240px; }
  /* Absolutely placed, so the photo takes the row's height from the boxes rather than setting it. */
  .contact-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
                       border: 1px solid var(--line); }
}
.contact-fields .field.last { margin-bottom: 0; }
.contact-fields textarea { display: block; }  /* no stray line-gap under the box, so the photo ends level with it */
.contact-send { margin: 14px 0 0; }
@media (max-width: 799px) { .contact-image { display: none; } }
form .field { margin: 0 0 14px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 500px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 600; margin-bottom: 4px; }
label .req { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], textarea { width: 100%; padding: 10px 12px; font: 16px/1.4 var(--font); border: 1px solid var(--line);
                                                border-radius: 8px; background: var(--surface); color: var(--text); }
textarea { resize: vertical; min-height: 140px; }
ul.errorlist { color: var(--err-text); margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
/* The honeypot box: off screen for people, present for scripts. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 14px; border-radius: 8px; }
.notice.ok { background: var(--ok-bg); color: var(--ok-text); }

/* Footer: logo on the left, the registered office right-aligned on the right (one row on
   desktop, stacked on a phone). */
.site-foot { border-top: 1px solid var(--line); background: var(--header-bg); color: var(--text); padding: 10px 0; margin-top: 32px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; }
.foot-left { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.foot-right { text-align: right; }
.site-foot address { font-style: normal; font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.site-foot .foot-right p { font-size: 12px; }
.site-foot p { margin: 0; }
.site-foot .foot-links { font-size: 12px; margin-top: 4px; }
.site-foot .foot-links a { color: var(--muted); }
@media (max-width: 760px) { .foot-right { text-align: left; } }

/* Legal text pages (the privacy notice): a readable column, headings as on the other pages, small
   definition cards for each kind of data, and tables that scroll sideways on a phone instead of
   overflowing the page. */
.legal { max-width: 860px; }
.legal h2 { margin-top: 28px; }
.legal h3 { margin: 0 0 6px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 4px; }
.legal .cards { display: grid; gap: 12px; margin-bottom: 14px; }
.legal .cards .card { padding: 14px 16px; }
.legal .cards .card p { margin-bottom: 8px; }
.legal .facts { margin: 0; font-size: 14px; color: var(--muted); }
.legal .facts strong { color: var(--text); font-weight: 600; }
.legal .table-scroll { overflow-x: auto; margin-bottom: 14px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--line); }
.legal th { font-weight: 600; background: var(--header-bg); }
.legal .updated { color: var(--muted); font-size: 14px; }
