/* ==========================================================================
   designbyruss.co.uk — main stylesheet
   --------------------------------------------------------------------------
   1. Settings (colours, fonts, spacing) — change the look here
   2. Base
   3. Layout helpers
   4. Header & navigation
   5. Buttons
   6. Hero
   7. Sections & cards
   8. Work grid
   9. Process steps
   10. Forms
   11. Footer
   12. Utilities & motion
   Mobile-first: base styles are for phones, @media blocks add larger screens.
   ========================================================================== */

/* Web font: free Helvetica-style lookalike, hosted on this site (see fonts/README-fonts.txt).
   Used only when Helvetica itself isn't installed on the visitor's device. */
@font-face {
  font-family: "DBR Heros";
  src: url("../fonts/dbr-heros-regular.woff2") format("woff2");
  font-weight: 100 599; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DBR Heros";
  src: url("../fonts/dbr-heros-bold.woff2") format("woff2");
  font-weight: 600 900; font-style: normal; font-display: swap;
}

/* 1. SETTINGS ------------------------------------------------------------- */
:root {
  /* Colours — swap --accent for your logo colour once we have it */
  --bg:          #1a1d21;   /* page background (dark charcoal) */
  --bg-raised:   #23272c;   /* cards, header */
  --bg-sunken:   #141619;   /* alternate sections */
  --line:        #313a44;   /* borders, grid lines */
  --line-strong: #46525e;
  --text:        #e7eaed;   /* main text */
  --text-muted:  #9aa5af;   /* secondary text */
  --accent:      #6eb2cd;   /* blueprint teal: the logo blue, slightly brighter and more saturated */
  --accent-ink:  #0e1113;      /* text on top of accent */
  --grid:        rgba(120, 170, 210, 0.07); /* blueprint grid lines */

  /* Type */
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Helvetica Neue", Helvetica, "DBR Heros", Arial, sans-serif;   /* headings only */
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;

  /* Sizing */
  --max-width: 1200px;
  --gutter: 1.25rem;
  --radius: 4px;
  --header-h: 64px;
}

/* 2. BASE ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

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

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }

h1, h2, h3, h4, .lead { font-family: var(--font-head); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }

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

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

/* 3. LAYOUT HELPERS ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.section--sunken { background: var(--bg-sunken); }

/* Small monospace label above headings, e.g. "01 / SERVICES" */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.lead { font-size: 1.2rem; font-weight: 300; color: var(--text-muted); max-width: 40em; }

.section-head { max-width: 46rem; margin-bottom: 2.5rem; }

/* Blueprint grid background — add class="blueprint" to any block */
.blueprint {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(rgba(120,170,210,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,170,210,0.035) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}

/* 4. HEADER & NAVIGATION -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(26, 29, 33, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text); text-decoration: none;
  font-weight: 600; letter-spacing: 0.02em;
}
.logo img { height: 26px; width: auto; }
@media (min-width: 800px) { .logo img { height: 30px; } }
.logo span b { color: var(--accent); font-weight: 600; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

.site-nav {
  display: none;
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0.5rem var(--gutter) 1rem; }
.site-nav a {
  display: block; padding: 0.8rem 0;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav .nav-cta { border: 0; margin-top: 0.8rem; }
.site-nav a.btn { color: var(--accent-ink); padding: 0.8rem 1.2rem; border-bottom: 1px solid var(--accent); justify-content: center; }
.site-nav a.btn:hover { color: var(--accent); }

@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block; position: static;
    background: none; border: 0;
  }
  .site-nav ul { display: flex; align-items: center; gap: 2rem; padding: 0; }
  .site-nav a { padding: 0.3rem 0; border: 0; font-size: 0.95rem; }
  .site-nav a:hover { color: var(--accent); }
  .site-nav .nav-cta { margin: 0; }
  .site-nav a.btn { padding: 0.5rem 1rem; border: 1px solid var(--accent); }
  .site-nav a.btn:hover { color: var(--accent); }
}

/* 5. BUTTONS -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-family: var(--font-head); font-weight: 500; font-size: 0.98rem;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: transparent; color: var(--accent); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--small { padding: 0.5rem 1rem; font-size: 0.9rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* 6. HERO ----------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
}
.hero h1 { max-width: 14em; line-height: 1.04; }
.hero h1 em { font-style: normal; color: var(--accent); }

/* Dimension-line decoration under hero heading */
.dim-line {
  position: relative;
  max-width: 28rem; height: 1px;
  margin: 2rem 0 1.6rem;
  background: var(--line-strong);
}
.dim-line::before, .dim-line::after {
  content: ""; position: absolute; top: -6px;
  width: 1px; height: 13px; background: var(--line-strong);
}
.dim-line::before { left: 0; }
.dim-line::after  { right: 0; }
.dim-line span {
  position: absolute; left: 50%; top: -0.75rem; transform: translateX(-50%);
  padding: 0 0.6rem; background: var(--bg);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--text-muted); white-space: nowrap;
}

.hero-image {
  margin-top: 3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-media { margin-top: 3rem; }
.hero-media .hero-image { margin-top: 0; }
@media (min-width: 1000px) { .hero-media { margin-top: 0; } }
.hero-caption { margin: 0.6rem 0 0; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.05em; color: var(--text-muted); }

@media (min-width: 1000px) {
  .hero { padding: 7rem 0 5rem; }
  .hero-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 3.5rem; align-items: center; }
  .hero-image { margin-top: 0; aspect-ratio: 4 / 3; }
  .hero-media .hero-image { margin-top: 0; }
}

/* Page header for inner pages (smaller than home hero) */
.page-hero { padding: 4.5rem 0 3.5rem; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: 18em; }

/* About page intro with portrait */
.about-hero { display: grid; gap: 2rem; align-items: center; }
.about-portrait { margin: 0; max-width: 360px; }
.about-portrait img { border: 1px solid var(--line); border-radius: var(--radius); }
.about-portrait figcaption { margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; color: var(--text-muted); }
/* About page image carousel (six examples of work) */
.carousel .car-track { display: grid; }
.carousel .car-slide { grid-area: 1 / 1; margin: 0; }
.carousel .car-slide + .car-slide { display: none; }            /* without JavaScript, show the first image only */
.js .carousel .car-slide { display: block; opacity: 0; visibility: hidden; transition: opacity 0.7s ease, visibility 0s linear 0.7s; }
.js .carousel .car-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.7s ease; }
.car-controls { display: none; align-items: center; gap: 0.6rem; margin-top: 0.8rem; }
.js .car-controls { display: flex; }
.car-btn { background: none; border: 1px solid var(--line-strong); color: var(--text-muted); border-radius: var(--radius); width: 2rem; height: 2rem; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.car-btn:hover, .car-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.car-dots { display: flex; gap: 0.45rem; }
.car-dots button { width: 0.55rem; height: 0.55rem; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; }
.car-dots button[aria-current="true"] { background: var(--accent); border-color: var(--accent); }
.car-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .js .carousel .car-slide, .js .carousel .car-slide.is-active { transition: none; } }
@media (min-width: 900px) { .about-hero { grid-template-columns: 1fr 320px; gap: 4rem; } }

/* 7. SECTIONS & CARDS ----------------------------------------------------- */
.cards {
  display: grid; gap: 1px;
  grid-template-columns: 1fr;
  background: var(--line);          /* 1px gaps show as grid lines */
  border: 1px solid var(--line);
}
@media (min-width: 640px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } }
.strengths { margin-top: 1.5rem; }
.strengths h3 { color: var(--accent); font-size: 1rem; }

.card {
  background: var(--bg-raised);
  padding: 2rem 1.6rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p  { font-family: var(--font-head); font-weight: 350; color: var(--text-muted); margin: 0; font-size: 0.98rem; }
.card .num {
  display: block; margin-bottom: 1.2rem;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.1em;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; }
.card-top .num { margin-bottom: 0; }
.card-icon { width: 40px; height: 40px; color: var(--accent); opacity: 0.85; flex: none; }
.card a.more {
  display: inline-block; margin-top: 1rem;
  font-size: 0.92rem; text-decoration: none;
}

/* Two-column text + image block (services, about) */
.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split--reverse > :first-child { order: 2; }
}
.split figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* Two images in one figure, e.g. concept sketch and finished result */
.split .figure-pair { display: grid; gap: 1px; background: var(--line); }
.figure-pair div { position: relative; background: #fff; }
.figure-pair span {
  position: absolute; left: 0.6rem; bottom: 0.6rem;
  padding: 0.25rem 0.55rem; border-radius: var(--radius);
  background: rgba(26,29,33,0.85); color: var(--text);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
}

.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.ticks li { position: relative; padding-left: 1.6rem; margin-bottom: 0.55rem; color: var(--text-muted); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 0.7rem; height: 1px; background: var(--accent);
}

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.2rem 0 0; }
.tags li {
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--text-muted);
}

/* 8. WORK GRID ------------------------------------------------------------ */
.work-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }

.work-item {
  margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-raised);
}
.work-item img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; transition: transform 0.5s; }
.work-item:hover img { transform: scale(1.03); }
.work-item figcaption { padding: 0.9rem 1rem; border-top: 1px solid var(--line); }
.work-item figcaption strong { display: block; font-weight: 600; }
.work-item figcaption span {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
}

/* 9. PROCESS STEPS -------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.steps li { border-top: 1px solid var(--line-strong); padding-top: 1.2rem; counter-increment: step; }
.steps li::before {
  content: "0" counter(step);
  display: block; margin-bottom: 0.6rem;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent);
}
.steps h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.steps p { color: var(--text-muted); font-size: 0.96rem; margin: 0; }

/* Experience timeline (About page) */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; display: grid; gap: 0.2rem; padding: 0 0 1.6rem 1.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 0.45rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-sunken); border: 1px solid var(--accent);
}
.timeline .tl-break::before { background: var(--accent); }
.timeline .when { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--accent); padding-top: 0.2rem; }
.timeline h3 { font-size: 1.05rem; margin: 0 0 0.15rem; }
.timeline p { margin: 0; color: var(--text-muted); font-size: 0.96rem; max-width: 42rem; }
.timeline .tl-source { display: inline-block; margin-top: 0.35rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.timeline .tl-links { display: flex; flex-wrap: wrap; column-gap: 1.2rem; }
.timeline .tl-source:hover, .timeline .tl-source:focus-visible { color: var(--accent); }
@media (min-width: 700px) { .timeline li { grid-template-columns: 9rem 1fr; gap: 1.5rem; } }

/* Track record strip (Home page) */
.track { padding: 2.2rem 0; border-top: 1px solid var(--line); }
.track p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }
.track .names { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; list-style: none; padding: 0; margin: 0.8rem 0 0; color: var(--text); font-weight: 600; letter-spacing: 0.01em; }

/* Call-to-action band */
.cta-band { text-align: center; }
.cta-band .lead { margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; }

/* 10. FORMS --------------------------------------------------------------- */
.form { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; } }

.field label { display: block; margin-bottom: 0.35rem; font-size: 0.92rem; color: var(--text-muted); }
.field .opt { font-size: 0.8rem; color: #8d98a3; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--bg-sunken);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); font: inherit;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }

/* Honeypot field — hidden from people, bots fill it in */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: 0.88rem; color: var(--text-muted); margin: 0; }

.notice {
  padding: 1rem 1.2rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); margin-bottom: 1.5rem;
}
.notice--ok  { border-color: #4f9d69; background: rgba(79,157,105,0.1); }
.notice--err { border-color: #c2554d; background: rgba(194,85,77,0.1); }
.notice[hidden] { display: none; }

.contact-aside { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.contact-aside h3 { font-size: 1rem; }
.contact-aside p { color: var(--text-muted); font-size: 0.96rem; }

/* 11. FOOTER -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  font-size: 0.92rem; color: var(--text-muted);
}
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 {
  margin: 0 0 0.8rem; font-family: var(--font-mono); font-weight: 400;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-base {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  font-size: 0.84rem;
}

/* 12. UTILITIES & MOTION -------------------------------------------------- */
.muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }

/* Fade-up on scroll (added by main.js). Content is visible if JS is off. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .work-item img { transition: none; }
}
