/* ==========================================================================
   Eastfield Groundworks & Construction Ltd
   All brand colours live in :root below. Edit these to re-skin the site.
   ========================================================================== */

:root {
  /* --- Core palette (navy led, warm sand light, orange used sparingly) --- */
  --navy:        #17293b;  /* primary dark, sticky header, dark sections */
  --navy-900:    #101d2b;  /* deepest panels, contact, footer */
  --navy-700:    #21405a;  /* raised surfaces, mid bands */
  --navy-500:    #35597a;  /* hover accents on dark */

  --sand:        #f4f1ea;  /* warm light section background */
  --sand-200:    #e6e0d4;  /* light borders / card edges */

  --steel:       #cdd6df;  /* cool light grey text on dark */
  --steel-500:   #899aab;  /* muted labels on dark */

  --accent:      #e8792b;  /* logo orange, used as a small accent only */
  --accent-600:  #cf6a1f;

  --ink:         #1a2531;  /* body text on light */
  --ink-600:     #55636f;  /* secondary text on light */
  --white:       #ffffff;

  /* --- Type --- */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-label:   "Archivo", system-ui, sans-serif; /* letter-spaced uppercase labels */

  /* --- Structure --- */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 60px;
  --radius: 6px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
:where(section[id], [id].anchor) { scroll-margin-top: 84px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 300;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */
.label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ink-600);
  max-width: 58ch;
  margin: 0;
}

/* Buttons -------------------------------------------------------------- */
.btn {
  --_bg: var(--accent);
  --_fg: var(--white);
  --_bd: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.95rem 1.6rem;
  background: var(--_bg);
  color: var(--_fg);
  border: 2px solid var(--_bd);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { background: var(--accent-600); border-color: var(--accent-600); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }

.btn--ghost { --_bg: transparent; --_fg: var(--white); --_bd: rgba(255,255,255,0.5); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--white); color: var(--white); }

.btn--light { --_bg: var(--white); --_fg: var(--navy); --_bd: var(--white); }
.btn--light:hover { background: var(--sand); border-color: var(--sand); color: var(--navy); }

/* --------------------------------------------------------------------------
   Social links
   -------------------------------------------------------------------------- */
.socials { display: inline-flex; align-items: center; gap: 0.35rem; }
.socials a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  color: currentColor;
  opacity: 0.85;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
}
.socials a:hover { color: var(--white); background: var(--accent); opacity: 1; }
.socials svg { width: 17px; height: 17px; }

/* Social link that shows its handle alongside the icon */
.socials a.social-handle {
  width: auto;
  grid-auto-flow: column;
  gap: 0.45rem;
  padding: 0 0.6rem;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Masthead: transparent over the hero photo, solid navy once scrolled
   -------------------------------------------------------------------------- */
.masthead {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 100;
  color: var(--white);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,12,20,0.55), rgba(6,12,20,0));
  opacity: 1;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.masthead.is-stuck {
  position: fixed;
  background: var(--navy);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.masthead.is-stuck::before { opacity: 0; }

/* top utility row */
.topbar {
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-size: 0.75rem;
  transition: max-height 0.3s var(--ease), opacity 0.25s var(--ease),
              padding 0.3s var(--ease), border-color 0.3s var(--ease);
  max-height: 44px;
  overflow: hidden;
}
.masthead.is-stuck .topbar { max-height: 0; opacity: 0; border-color: transparent; }
.topbar .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
}
.topbar__facts { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.topbar__facts span { display: inline-flex; align-items: center; gap: 0.45rem; }
.topbar__facts svg { width: 14px; height: 14px; stroke: var(--accent); }

/* main header row */
.site-header .wrap {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; }
.brand img { height: 40px; width: auto; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-family: var(--font-label);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--white);
  opacity: 0.86;
  padding: 0.4rem 0;
  position: relative;
  transition: opacity 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 1rem; }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--white);
  padding: 0.6rem 1.05rem;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.header-phone svg { width: 15px; height: 15px; }
.header-phone:hover { background: var(--accent); border-color: var(--accent); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 2px;
  background: var(--white);
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease);
}
.nav-toggle span::before { transform: translate(-50%, -8px); }
.nav-toggle span::after  { transform: translate(-50%, 6px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translate(-50%, -50%) rotate(45deg); top: 0; left: 0; }
.nav-toggle[aria-expanded="true"] span::after  { transform: translate(-50%, -50%) rotate(-45deg); top: 0; left: 0; }

/* --------------------------------------------------------------------------
   Hero slider (full-bleed build photography)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  /* Kept deliberately short: the hero photo is 1400x694, so a taller band would
     upscale it and lose detail. */
  height: clamp(480px, 68vh, 640px);
  background: var(--navy);
  overflow: hidden;
}
.hero__image {
  position: absolute;
  inset: 0;
  background-image: url("../assets/projects/why-eastfield.jpg");
  background-size: cover;
  background-position: center;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,18,28,0.88) 0%, rgba(11,18,28,0.58) 46%, rgba(11,18,28,0.16) 100%),
    linear-gradient(0deg, rgba(11,18,28,0.75) 0%, transparent 48%);
}
.hero__inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* clear the whole masthead: utility topbar (44px) + header row */
  padding-top: calc(var(--header-h) + 44px);
  color: var(--white);
}
.hero__eyebrow {
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 1.25rem;
}
.hero__eyebrow b { color: var(--accent); font-weight: 700; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.6vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.35rem;
  max-width: 18ch;
  text-wrap: balance;
}
.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--steel);
  max-width: 50ch;
  margin: 0 0 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }


/* --------------------------------------------------------------------------
   Services at a glance (slim navy bar under hero)
   -------------------------------------------------------------------------- */
.glance { background: var(--navy-900); color: var(--steel); }
.glance .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-block: 1.15rem;
}
.glance__label { color: var(--steel-500); }
.glance__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.glance__list span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white);
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Section rhythm
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section--dark { background: var(--navy); color: var(--white); }
.section--darker { background: var(--navy-900); color: var(--white); }
.section--dark .lead, .section--darker .lead { color: var(--steel); }
.section__head { max-width: 62ch; margin-bottom: 3rem; }

/* Media wrapper: clean image with subtle depth */
.media { border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 40px rgba(16,29,43,0.18); }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --------------------------------------------------------------------------
   Services (cards with photos)
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(16,29,43,0.16); }
.service-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.service-card:hover .service-card__media img { transform: scale(1.05); }
.service-card__body { padding: 1.5rem 1.6rem 1.75rem; }
.service-card__top { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.service-card__icon {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  background: var(--navy);
  border-radius: var(--radius);
}
.service-card__icon svg { width: 22px; height: 22px; stroke: var(--white); }
.service-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin: 0; }
.service-card p { margin: 0; color: var(--ink-600); font-size: 0.94rem; }

/* --------------------------------------------------------------------------
   About / Why (navy blueprint band)
   -------------------------------------------------------------------------- */
.section--blueprint { position: relative; overflow: hidden; }
.section--blueprint::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  pointer-events: none;
}
.section--blueprint .wrap { position: relative; }

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.about__media { aspect-ratio: 4 / 5; }
.why-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
}
.why-list li { display: flex; gap: 0.85rem; align-items: flex-start; font-weight: 500; }
.why-list svg { flex: none; width: 22px; height: 22px; stroke: var(--accent); margin-top: 2px; }
.why-list b { display: block; }
.why-list small { color: var(--steel-500); font-weight: 400; }

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */
.pslider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy);
}
.pslider__track { position: relative; aspect-ratio: 3 / 2; }
.pslide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}
.pslide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s var(--ease), visibility 0s;
}
.pslide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pslide figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 4.5rem 1.5rem 1.3rem;
  background: linear-gradient(0deg, rgba(11,18,28,0.9) 0%, rgba(11,18,28,0.55) 45%, transparent 100%);
  color: var(--white);
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pslider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius);
  background: rgba(11,18,28,0.4);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pslider__arrow:hover { background: var(--accent); border-color: var(--accent); }
.pslider__arrow svg { width: 20px; height: 20px; }
.pslider__arrow--prev { left: 1rem; }
.pslider__arrow--next { right: 1rem; }

.pslider__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
}
.pslider__dots button {
  width: 26px; height: 4px;
  border: 0;
  padding: 0;
  border-radius: 2px;
  background: var(--sand-200);
  cursor: pointer;
  transition: background 0.2s var(--ease), width 0.2s var(--ease);
}
.pslider__dots button:hover { background: var(--ink-600); }
.pslider__dots button.is-active { background: var(--accent); width: 34px; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.contact__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.85rem);
  color: var(--white);
  margin: 0.5rem 0 1.5rem;
  transition: color 0.2s var(--ease);
}
.contact__phone svg { width: 32px; height: 32px; flex: none; stroke: var(--accent); }
.contact__phone:hover { color: var(--accent); }
.contact__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  font-size: 0.92rem;
  color: var(--steel);
  margin-bottom: 1.75rem;
}
.contact__row a { color: var(--white); border-bottom: 1px solid rgba(232,121,43,0.55); }
.contact__row a:hover { border-color: var(--accent); }
.contact__socials { color: var(--steel); }
.contact__socials .socials a { border: 1px solid rgba(255,255,255,0.2); }

.contact-card {
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 2rem;
}
.contact-card dl { margin: 0; display: grid; gap: 1.25rem; }
.contact-card dt {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.contact-card dd { margin: 0; color: var(--white); font-weight: 500; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--steel-500);
  padding-block: 3rem 2rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-footer img { height: 46px; margin-bottom: 1rem; }
.footer-contacts { display: flex; flex-direction: column; gap: 1rem; color: var(--steel); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a {
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--steel);
}
.footer-links a:hover { color: var(--accent); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1.5rem;
  font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about, .contact { grid-template-columns: 1fr; }
  .about__media, .contact-card { max-width: 520px; }
  .about__media { aspect-ratio: 16 / 10; }
}

@media (max-width: 720px) {
  .topbar__facts .hide-sm { display: none; }
  .nav, .header-phone { display: none; }
  .nav-toggle { display: block; }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav.is-open a { width: 100%; padding: 0.9rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav.is-open a::after { display: none; }

  .services-grid, .why-list { grid-template-columns: 1fr; }

  /* Slider: taller crop, smaller controls, arrows tucked in */
  .pslider__track { aspect-ratio: 4 / 3; }
  .pslider__arrow { width: 38px; height: 38px; }
  .pslider__arrow--prev { left: 0.5rem; }
  .pslider__arrow--next { right: 0.5rem; }
  .pslider__dots button { width: 16px; }
  .pslider__dots button.is-active { width: 22px; }
  .pslide figcaption { font-size: 0.68rem; padding: 3.5rem 1rem 1rem; }

  /* Headline wraps to more lines on narrow screens — let the hero grow with it
     rather than clipping the CTAs against a fixed height. */
  .hero { height: auto; min-height: clamp(560px, 88vh, 780px); }
  .hero__inner { padding-bottom: 5rem; }
}

@media (max-width: 520px) {
  /* Keep the Instagram icon on small screens, drop the handle text to save room */
  .topbar .wrap .social-handle span { display: none; }
  .topbar .wrap .social-handle { padding: 0; width: 34px; }
}
