/* ============================================
   Custom Properties, Reset & Base Styles
   D Farquharson Contracts Ltd
   ============================================ */

:root {
  /* Brand Colours — from DFC logo */
  --color-primary:       #163070;   /* deep navy (D & C letterforms) */
  --color-primary-dark:  #0e1f4a;   /* darkened navy for footer/dark sections */
  --color-primary-light: #1e4494;   /* lighter navy for hover states */
  --color-silver:        #8899b8;   /* metallic silver (F letterform) */
  --color-accent:        #c8941a;   /* amber — warms the palette, echoes Constructionline badge */
  --color-accent-dark:   #a87a14;
  --color-accent-muted:  rgba(200, 148, 26, 0.35); /* accent at low opacity for borders */
  --color-success:       #2a7a4b;   /* form sent confirmation */

  /* Neutral Palette */
  --color-bg:            #ffffff;
  --color-surface:       #f4f6f9;
  --color-surface-2:     #e8ecf2;
  --color-text:          #1a1a2a;
  --color-text-muted:    #5c6a7e;
  --color-border:        #dce3ed;

  /* Typography */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Source Sans 3', sans-serif;

  /* Type scale — 1.25 ratio */
  --text-xs:   0.75rem;    /*  12px */
  --text-sm:   0.875rem;   /*  14px */
  --text-base: 1rem;       /*  16px */
  --text-md:   1.125rem;   /*  18px */
  --text-lg:   1.25rem;    /*  20px */
  --text-xl:   1.5rem;     /*  24px */
  --text-2xl:  2rem;       /*  32px */
  --text-3xl:  2.5rem;     /*  40px */
  --text-4xl:  3.5rem;     /*  56px */

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max:     1280px;
  --container-padding: 1.5rem;

  /* Borders */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(14, 31, 74, 0.08);
  --shadow-md: 0 4px 16px rgba(14, 31, 74, 0.12);
  --shadow-lg: 0 8px 32px rgba(14, 31, 74, 0.18);

  /* Transitions */
  --transition:      0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* ---- Section scaffolding ---- */
.section {
  padding-block: var(--space-20);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-32);
  }
}

.section--dark {
  background-color: var(--color-primary-dark);
  color: white;
}

.section--surface {
  background-color: var(--color-surface);
}

.section__header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.section__label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  display: block;
}

.section__label--light {
  color: var(--color-silver);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .section__title {
    font-size: var(--text-4xl);
  }
}

.section__title--light {
  color: white;
}

.section__sub {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.section__sub--light {
  color: rgba(255, 255, 255, 0.72);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  white-space: nowrap;
  min-height: 44px;
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn--primary {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background-color: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
  border-color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.btn--white {
  background-color: white;
  color: var(--color-primary);
  border-color: white;
}

.btn--white:hover {
  background-color: var(--color-surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline-white {
  background-color: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.65);
}

.btn--outline-white:hover {
  border-color: white;
  background-color: rgba(255, 255, 255, 0.12);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-lg);
}

.btn--full {
  width: 100%;
}

/* ---- Scroll-reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
