/* Digital Footprint — dfootprint.co.uk
   Mobile-first, no framework. Minimalist, calm, no visual hype. */

:root {
  --color-bg: #faf8f4;
  --color-bg-raised: #f2efe8;
  --color-ink: #23261f;
  --color-ink-soft: #565a4e;
  --color-accent: #35594a;
  --color-accent-dark: #24402f;
  --color-border: #ddd8cb;
  --color-callout-bg: #eef1e6;
  --color-white: #ffffff;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --max-width: 780px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1.0625rem;
}

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

a {
  color: var(--color-accent-dark);
}

a:hover,
a:focus {
  color: var(--color-accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--color-ink);
  margin: 0 0 var(--space-2);
}

h1 {
  font-size: 1.9rem;
}

@media (min-width: 760px) {
  h1 {
    font-size: 2.6rem;
  }
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1.25rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: relative;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--color-ink);
  letter-spacing: 0.01em;
}

.wordmark span {
  color: var(--color-accent);
}

.nav-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-ink);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus {
  border-color: var(--color-accent-dark);
  color: var(--color-accent-dark);
}

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 20;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0s linear 0.3s;
}

.site-nav.is-open {
  max-height: 26rem;
  opacity: 1;
  visibility: visible;
  transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0s linear 0s;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.site-nav a {
  display: block;
  padding: 0.6rem 0.2rem;
  text-decoration: none;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav a[aria-current="page"] {
  color: var(--color-accent-dark);
  font-weight: 600;
}

@media (min-width: 760px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    border: none;
    background: none;
    max-height: none;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    transition: none;
  }

  .site-nav ul {
    flex-direction: row;
    gap: var(--space-2);
    padding: 0;
  }

  .site-nav a {
    padding: 0;
    border-bottom: none;
    font-size: 0.95rem;
  }
}

/* Main sections — full-width bands with alternating tint for visual rhythm */
main {
  padding: 0;
}

.band {
  padding: var(--space-4) 0;
}

.band--light {
  background: var(--color-bg);
}

.band--tint {
  background: var(--color-callout-bg);
}

.band-hero {
  padding: var(--space-4) 0 var(--space-3);
}

/* Spacing between plain content sub-sections nested inside a band (e.g. legal pages) */
.band .container > section + section {
  margin-top: var(--space-4);
}

@media (min-width: 760px) {
  .band {
    padding: var(--space-5) 0;
  }

  .band-hero {
    padding: 5.5rem 0 4rem;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--color-ink-soft);
  margin-bottom: var(--space-1);
}

.lede {
  font-size: 1.15rem;
  color: var(--color-ink-soft);
}

/* Buttons and links */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--color-accent-dark);
  color: var(--color-white);
  border: 1px solid var(--color-accent-dark);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(36, 64, 47, 0.22);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent-dark);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--color-accent-dark);
  color: var(--color-accent-dark);
  box-shadow: 0 2px 8px rgba(35, 38, 31, 0.08);
}

.text-link {
  color: var(--color-accent-dark);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

@media (min-width: 500px) {
  .cta-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.cta-row--home .btn-primary {
  order: -1;
}

.next-step p {
  margin-bottom: var(--space-2);
}

/* Callout (no AI needed) */
.callout {
  background: var(--color-callout-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-3);
  border-radius: 4px;
}

.callout h2,
.callout h3 {
  margin-bottom: var(--space-1);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Numbered process steps (not bullet lists) */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: var(--space-3);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--color-accent-dark);
  color: var(--color-white);
  font-family: var(--font-serif);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 {
  margin-bottom: 0.25rem;
}

/* Profile / fit blocks */
.profile-block {
  margin-bottom: var(--space-4);
}

.profile-block:last-child {
  margin-bottom: 0;
}

.profile-block h2 {
  color: var(--color-accent-dark);
}

/* Cards for resources list */
.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.resource-list li:first-child {
  border-top: 1px solid var(--color-border);
}

.resource-list h3 {
  margin-bottom: 0.25rem;
}

.resource-meta {
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}

.empty-state {
  background: var(--color-bg-raised);
  border: 1px dashed var(--color-border);
  border-radius: 4px;
  padding: var(--space-3);
  color: var(--color-ink-soft);
}

/* Article template */
.article-header {
  margin-bottom: var(--space-4);
}

.article-body h2 {
  margin-top: var(--space-4);
}

.article-body blockquote {
  margin: var(--space-3) 0;
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-raised);
  font-style: italic;
  color: var(--color-ink-soft);
}

/* Forms */
.form-field {
  margin-bottom: var(--space-3);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  margin-top: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-white);
  color: var(--color-ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.consent-field input[type="checkbox"] {
  margin-top: 0.3rem;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
}

.consent-field label {
  font-weight: normal;
  margin-bottom: 0;
}

.form-submit {
  border: none;
  cursor: pointer;
  font: inherit;
}

.form-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.form-status {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
  background: var(--color-callout-bg);
  border: 1px solid var(--color-border);
  color: var(--color-ink);
}

.form-status--error {
  background: var(--color-bg-raised);
}

/* Pricing statement */
.price-statement {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--space-3);
  margin: var(--space-3) 0;
}

.price-statement .amount {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-accent-dark);
  display: block;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) 0;
  color: var(--color-ink-soft);
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.footer-nav a {
  color: var(--color-ink-soft);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-accent-dark);
}

.footer-legal ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-2);
}

@media (min-width: 700px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Fade-in-on-scroll — class is added by JS, so content stays visible if JS never runs */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Scroll-scrubbed hero — used by trade-automation landing pages.
   Falls back to a plain gradient (no image/video required) until real
   assets are dropped in, and again whenever prefers-reduced-motion is set
   or the asset fails to load — see assets/js/scroll-hero.js. */
.scroll-hero {
  position: relative;
  height: 220vh;
}

.scroll-hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  background: linear-gradient(160deg, var(--color-accent-dark), var(--color-accent) 65%, var(--color-ink) 130%);
}

.scroll-hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  padding: 0 var(--space-2);
  text-align: center;
}

.scroll-hero-content .eyebrow {
  color: rgba(255, 255, 255, 0.75);
}

.scroll-hero-content h1 {
  color: var(--color-white);
}

.scroll-hero-content p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

/* The frame holds the workshop video, contained and centered rather than
   stretched full-bleed across the viewport — sized to match the source
   footage's own aspect ratio per breakpoint (portrait on mobile, landscape
   on desktop — see the two <source media="..."> in the markup) so
   object-fit: cover never needs to crop out most of the shot the way a
   full-bleed box forced onto mismatched footage did before. The poster
   attribute shows natively before any JS runs, so there's no separate
   loading/fade-in state to manage — same reasoning as why a missing/failed
   asset just quietly falls back to the plain gradient behind it. */
.scroll-hero-frame {
  position: relative;
  width: min(85vw, 380px);
  aspect-ratio: 9 / 16;
  max-height: 55vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.scroll-hero-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 760px) {
  .scroll-hero-frame {
    width: min(70vw, 640px);
    aspect-ratio: 16 / 9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hero {
    height: auto;
  }

  .scroll-hero-sticky {
    position: static;
    height: auto;
    min-height: 70vh;
    padding: var(--space-5) 0;
  }
}
