/* ==========================================================================
   Nelson's Used Racking & Shelving — design system
   Industrial / trade: confident navy, safety-amber accent, structural rhythm.
   Mobile-first, fast, no external dependencies (system font stack).
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Brand — deep engineered navy + a refined safety amber */
  --navy-950: #0a1826;
  --navy-900: #0d2033;
  --navy-800: #123049;
  --navy-700: #1b4262;
  --amber-600: #d9760c;
  --amber-500: #f2911b;   /* primary accent */
  --amber-400: #f7ab45;

  /* Neutrals */
  --ink: #17222e;
  --slate-700: #37485a;
  --slate-500: #5d6f80;
  --slate-400: #8598a7;
  --line: #dbe4ec;
  --line-strong: #c4d0da;
  --paper: #f3f6f9;
  --surface: #ffffff;

  /* Semantic */
  --bg: var(--surface);
  --text: var(--ink);
  --muted: var(--slate-500);
  --accent: var(--amber-500);
  --accent-ink: #3a2405;

  /* Type scale (fluid) */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.75rem, 1.50rem + 1.25vw, 2.6rem);
  --step-4:  clamp(2.1rem, 1.70rem + 2vw, 3.5rem);

  /* Space + shape */
  --container: 1160px;
  --gap: clamp(1rem, 0.7rem + 1.4vw, 1.75rem);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(13, 32, 51, 0.06), 0 2px 8px rgba(13, 32, 51, 0.05);
  --shadow-md: 0 6px 24px rgba(13, 32, 51, 0.10);
  --ring: 0 0 0 3px rgba(242, 145, 27, 0.45);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, "Helvetica Neue", sans-serif;
}

/* ---- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
/* Ensure [hidden] always wins, even over display:grid/flex containers. */
[hidden] { display: none !important; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
p { max-width: 68ch; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 5vw, 2rem); }
.section { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem); }
.section--paper { background: var(--paper); }
.section--navy { background: var(--navy-900); color: #eaf1f7; }
.section--navy h2 { color: #fff; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: var(--gap); }
.skip-link {
  position: absolute; left: 0.5rem; top: -3rem; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 0.6rem 1rem; border-radius: 8px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }

/* Eyebrow label with an amber tick — a small industrial signature */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--amber-600);
}
.section--navy .eyebrow { color: var(--amber-400); }
.eyebrow::before { content: ""; width: 1.6rem; height: 3px; background: currentColor; border-radius: 2px; }

.lede { font-size: var(--step-1); color: var(--muted); font-weight: 500; }
.section--navy .lede { color: #b9c9d6; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; line-height: 1; cursor: pointer;
  padding: 0.85rem 1.4rem; border-radius: 10px; border: 2px solid transparent;
  text-decoration: none; transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--amber { background: var(--amber-500); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn--amber:hover { background: var(--amber-400); }
.btn--navy { background: var(--navy-900); color: #fff; }
.btn--navy:hover { background: var(--navy-800); }
.btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy-800); background: #fff; }
.section--navy .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.35); }
.section--navy .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,0.06); }
.btn--lg { padding: 1rem 1.7rem; font-size: var(--step-0); }
.btn__arrow { font-size: 1.1em; transition: transform 0.15s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--navy-900); }
.brand__logo { height: 40px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand__tag { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-500); font-weight: 600; }

.nav__links { display: flex; align-items: center; gap: 0.35rem; list-style: none; padding: 0; }
.nav__links a {
  display: inline-block; text-decoration: none; color: var(--slate-700); font-weight: 600;
  padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 0.96rem;
}
.nav__links a:hover { background: var(--paper); color: var(--navy-900); }
.nav__links a[aria-current="page"] { color: var(--navy-900); background: var(--paper); }
.nav__cta { display: flex; align-items: center; gap: 0.6rem; }
.nav__phone { display: none; text-decoration: none; font-weight: 700; color: var(--navy-900); }
.nav__phone span { color: var(--slate-500); font-weight: 600; font-size: 0.75rem; display: block; }

.nav__toggle {
  display: inline-flex; flex-direction: column; gap: 4px; justify-content: center;
  width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line-strong);
  background: #fff; border-radius: 10px; cursor: pointer;
}
.nav__toggle span { height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav[data-open="true"] .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav[data-open="true"] .nav__toggle span:nth-child(2) { opacity: 0; }
.nav[data-open="true"] .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 0.75rem clamp(1rem, 5vw, 2rem) 1.25rem;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav[data-open="true"] .nav__links { display: flex; }
  .nav__links a { padding: 0.8rem 0.75rem; font-size: 1.05rem; }
}
@media (min-width: 861px) {
  .nav__toggle { display: none; }
  .nav__phone { display: block; text-align: right; }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(242,145,27,0.16), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: #eef4f9;
}
/* Faint engineered grid — evokes racking structure without being loud */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, black, transparent 85%);
  mask-image: linear-gradient(180deg, black, transparent 85%);
}
.hero__inner { position: relative; padding-block: clamp(3rem, 2rem + 7vw, 6.5rem); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .highlight { color: var(--amber-400); }
.hero__lede { margin-top: 1.25rem; max-width: 52ch; font-size: var(--step-1); color: #c3d2df; }
.hero__ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Dual-value split cards inside the hero */
.dual { margin-top: 2.75rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .dual { grid-template-columns: 1fr 1fr; } }
.dual__card {
  border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius);
  background: rgba(255,255,255,0.04); padding: 1.35rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.dual__card h2 { font-size: var(--step-1); color: #fff; }
.dual__card p { color: #b9c9d6; font-size: 0.98rem; margin: 0; }
.dual__card .btn { margin-top: 0.7rem; align-self: flex-start; }
.dual__tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-400); }

/* ---- Trust bar ----------------------------------------------------------- */
.trust { border-block: 1px solid var(--line); background: var(--surface); }
.trust__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); }
@media (min-width: 720px) { .trust__grid { grid-template-columns: repeat(4, 1fr); } }
.trust__item { background: var(--surface); padding: 1.4rem 1rem; text-align: center; }
.trust__num { font-size: var(--step-2); font-weight: 800; color: var(--navy-900); letter-spacing: -0.02em; }
.trust__num .unit { color: var(--amber-600); }
.trust__label { font-size: 0.86rem; color: var(--muted); font-weight: 600; margin-top: 0.15rem; }

/* ---- Generic cards ------------------------------------------------------- */
.cards { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none; color: var(--text);   /* cards may be links — no underline */
}
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card__media { aspect-ratio: 4 / 3; background: var(--paper); border-bottom: 1px solid var(--line); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.2rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card__body h3 { color: var(--navy-900); }
.card__body p { color: var(--muted); font-size: 0.96rem; margin: 0; }
.card__cta { margin-top: auto; font-weight: 700; color: var(--amber-600); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.card__cta:hover { text-decoration: underline; }

/* Feature row (icon + text) */
.features { grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { display: flex; gap: 0.9rem; }
.feature__icon {
  flex: none; width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center; background: rgba(242,145,27,0.12); color: var(--amber-600);
  border: 1px solid rgba(242,145,27,0.25); font-weight: 800;
}
.feature h3 { font-size: var(--step-0); color: var(--navy-900); margin-bottom: 0.15rem; }
.feature p { font-size: 0.94rem; color: var(--muted); margin: 0; }

/* Two-column intro */
.split { display: grid; gap: var(--gap); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .split { grid-template-columns: 1.05fr 0.95fr; } .split--rev > :first-child { order: 2; } }

/* ---- Placeholder media (clearly marked) ---------------------------------- */
.ph {
  position: relative; display: grid; place-items: center; text-align: center;
  background:
    repeating-linear-gradient(45deg, #eef2f6 0 14px, #e7edf2 14px 28px);
  color: var(--slate-500); aspect-ratio: 4 / 3; border-radius: var(--radius-sm);
}
.ph span { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: #fff; border: 1px solid var(--line-strong); padding: 0.35rem 0.6rem; border-radius: 6px; }

/* ---- Forms --------------------------------------------------------------- */
.form-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field--row { grid-template-columns: 1fr; }
@media (min-width: 620px) { .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; } }
.field label, .legend { font-weight: 700; color: var(--navy-900); font-size: 0.94rem; }
.field .hint { font-size: 0.82rem; color: var(--muted); }
.req { color: var(--amber-600); }
.input, .select, .textarea {
  font: inherit; width: 100%; padding: 0.75rem 0.85rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 10px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--amber-500); box-shadow: var(--ring); outline: none; }
.input:invalid:not(:placeholder-shown), .textarea:invalid:not(:placeholder-shown) { border-color: #c0392b; }

fieldset { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 1rem 1rem 1.1rem; display: grid; gap: 1.1rem; }
.legend { padding-inline: 0.3rem; }
.conditional[hidden] { display: none; }

/* Consent (GDPR) */
.consent { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--amber-600); }
.consent label { font-weight: 500; color: var(--slate-700); font-size: 0.9rem; }
.consent a { color: var(--amber-600); font-weight: 600; }

.form__error { color: #b0281a; font-size: 0.88rem; font-weight: 600; min-height: 1.2em; }
.form__note { font-size: 0.82rem; color: var(--muted); }

/* Success state */
.form-success { text-align: center; padding: clamp(1.5rem, 1rem + 3vw, 3rem); display: none; }
.form-success[data-show="true"] { display: block; }
.form-success .tick {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem;
  display: grid; place-items: center; background: rgba(242,145,27,0.14);
  border: 2px solid var(--amber-500); color: var(--amber-600); font-size: 2rem; font-weight: 800;
}
.form-success h3 { color: var(--navy-900); }

/* ---- Info / contact cards ------------------------------------------------ */
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); }
.info-card h3 { color: var(--navy-900); margin-bottom: 0.5rem; }
.info-card a { color: var(--amber-600); font-weight: 600; text-decoration: none; }
.info-card a:hover { text-decoration: underline; }
.w3w { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; }
.w3w .slashes { color: #e11f26; }

address { font-style: normal; color: var(--slate-700); line-height: 1.7; }

/* ---- Gallery ------------------------------------------------------------- */
.gallery-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.gallery-grid figcaption { font-size: 0.82rem; color: var(--muted); padding: 0.6rem 0.8rem; }

/* ---- Callout band -------------------------------------------------------- */
.band { background: linear-gradient(120deg, var(--navy-900), var(--navy-800)); color: #fff; border-radius: var(--radius); padding: clamp(1.5rem, 1rem + 3vw, 2.75rem); position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(242,145,27,0.35), transparent 70%); }
.band h2 { color: #fff; position: relative; }
.band p { color: #c3d2df; position: relative; }
.band__ctas { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.8rem; position: relative; }

/* ---- Prose (about, privacy) ---------------------------------------------- */
.prose { max-width: 74ch; }
.prose h2 { font-size: var(--step-2); margin-top: 2.25rem; color: var(--navy-900); }
.prose h3 { margin-top: 1.6rem; color: var(--navy-900); }
.prose p, .prose li { color: var(--slate-700); }
.prose ul, .prose ol { padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.prose a { color: var(--amber-600); font-weight: 600; }

/* TODO badge for placeholders */
.todo { display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #7a4a00; background: #ffe9c7; border: 1px solid #f4c778; padding: 0.12rem 0.45rem; border-radius: 5px; vertical-align: middle; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--navy-950); color: #b9c9d6; padding-block: clamp(2.5rem, 2rem + 3vw, 4rem); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.8rem; }
.site-footer a { color: #b9c9d6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.footer-brand p { font-size: 0.92rem; color: #91a5b5; margin-top: 0.6rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.85rem; color: #7f94a5; }
.footer-bottom a { color: #91a5b5; }

/* ---- Utilities ----------------------------------------------------------- */
.center { text-align: center; margin-inline: auto; }
.mt-2 { margin-top: 2rem; } .mt-1 { margin-top: 1rem; }
.maxw-prose { max-width: 60ch; }
.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; }
