/* ==========================================================
   JACD Excavations — website styles
   Built from the JACD Brand & Visual Style Guide
   ========================================================== */

/* ---------- Brand tokens (from the style guide) ---------- */
:root {
  /* Primary colours */
  --jacd-blue: #2D62FF;
  --jacd-black: #000000;
  --jacd-white: #FFFFFF;

  /* Secondary colours */
  --steel-grey: #6B7280;
  --concrete-grey: #A7ADB4;
  --safety-orange: #F28C28;   /* accent only — use sparingly */

  /* Supporting tones (derived from the palette for the web) */
  --ink: #0A0D14;              /* near-black for text on light */
  --night: #050816;            /* deep navy-black from the gradient */
  --paper: #F4F5F7;            /* light concrete background */
  --line: #DADDE2;

  /* Signature blue-to-black gradient used across the guide */
  --brand-gradient: radial-gradient(ellipse at 15% 0%, #3A6BFF 0%, #1B3BB0 28%, #08112E 62%, #000 100%);

  /* Type — Montserrat is the brand's secondary (web/body) font */
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --radius: 14px;
  --wrap: 1180px;
  --gutter: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--jacd-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--jacd-blue); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--paper { background: var(--paper); }
.section--dark { background: var(--brand-gradient); color: var(--jacd-white); }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--jacd-blue); margin-bottom: 14px;
}
.section--dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: #8FB0FF; }
.lead { font-size: 1.15rem; color: var(--steel-grey); max-width: 60ch; }
.section--dark .lead { color: #C9D2E6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--jacd-blue); color: var(--jacd-white); }
.btn--primary:hover { background: #1E4FE6; }
.btn--ghost { border-color: rgba(255,255,255,.55); color: var(--jacd-white); }
.btn--ghost:hover { border-color: var(--jacd-white); }
.btn--dark { background: var(--ink); color: var(--jacd-white); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { width: 160px; height: auto; }   /* guide: min 150px on screen */
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  color: #D7DCE6; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--jacd-white); border-bottom-color: var(--jacd-blue); }
.nav .btn { padding: 11px 20px; font-size: .92rem; border-bottom: 0; }
.nav .btn:hover { border-bottom: 0; }

.menu-toggle {
  display: none; background: none; border: 0; color: var(--jacd-white);
  width: 44px; height: 44px; cursor: pointer;
}
.menu-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--jacd-white);
  background: var(--brand-gradient);
  padding: clamp(80px, 13vw, 150px) 0 clamp(70px, 10vw, 120px);
}
/* Brand pattern — the repeated JACD mark from section 6 of the guide */
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: -40px;
  background-image: url("../images/pattern.png");
  background-size: 260px 90px;
  transform: rotate(-8deg);
  pointer-events: none;
}
.hero .wrap, .page-hero .wrap { position: relative; }
.hero h1 { max-width: 15ch; }
.hero h1 span { color: #7FA3FF; }
.hero .lead { color: #C9D2E6; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stripe {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--jacd-blue) 0 70%, var(--safety-orange) 70% 100%);
}

.page-hero {
  position: relative; overflow: hidden; color: var(--jacd-white);
  background: var(--brand-gradient);
  padding: clamp(64px, 9vw, 100px) 0 clamp(48px, 7vw, 72px);
}
.page-hero .lead { color: #C9D2E6; }

/* ---------- Trust strip ---------- */
.trust { background: var(--ink); color: var(--jacd-white); }
.trust .wrap {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.trust-item { border-left: 1px solid rgba(255,255,255,.08); padding: 26px 22px; display: flex; gap: 14px; align-items: flex-start; }
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-item svg { flex: none; width: 26px; height: 26px; color: var(--jacd-blue); margin-top: 2px; }
.trust-item strong { display: block; font-size: .98rem; }
.trust-item span { font-size: .86rem; color: var(--concrete-grey); }

/* ---------- Services ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head > div { max-width: 640px; }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  background: var(--jacd-white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; position: relative; transition: border-color .2s, transform .2s;
}
.service:hover { border-color: var(--jacd-blue); transform: translateY(-3px); }
.service .num { font-size: .8rem; font-weight: 700; color: var(--concrete-grey); letter-spacing: .1em; }
.service h3 { margin-top: 18px; }
.service p { color: var(--steel-grey); font-size: .97rem; margin: 0; }
.service-icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--jacd-blue);
  display: grid; place-items: center; color: var(--jacd-white); margin-top: 16px;
}
.service-icon svg { width: 26px; height: 26px; }

/* ---------- Split / about ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.values { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.values li { display: flex; gap: 14px; align-items: flex-start; }
.values li svg { flex: none; width: 22px; height: 22px; color: var(--jacd-blue); margin-top: 3px; }
.section--dark .values li svg { color: #7FA3FF; }

/* ---------- Photo slots (replace with real job photos) ---------- */
.photo {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #1A1F2B, #2B3140);
  aspect-ratio: 4 / 3;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--placeholder {
  display: grid; place-items: center; text-align: center; color: var(--concrete-grey);
  border: 2px dashed rgba(167,173,180,.45);
  font-size: .9rem; font-weight: 600; padding: 20px;
}
.photo--placeholder svg { display: block; width: 36px; height: 36px; margin: 0 auto 10px; opacity: .7; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo figcaption, .project figcaption {
  font-size: .9rem; color: var(--steel-grey); margin-top: 10px;
}

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project { margin: 0; }
.project figcaption strong { display: block; color: var(--ink); font-size: 1rem; }

/* ---------- CTA band ---------- */
.cta {
  background: var(--brand-gradient); color: var(--jacd-white);
  border-radius: 22px; padding: clamp(36px, 6vw, 64px);
  display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta h2 { margin: 0 0 8px; }
.cta p { margin: 0; color: #C9D2E6; }
.cta .hero-actions { position: relative; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-card {
  background: var(--ink); color: var(--jacd-white); border-radius: var(--radius); padding: 34px;
}
.contact-card h3 { margin-bottom: 18px; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); }
.contact-line:first-of-type { border-top: 0; }
.contact-line svg { width: 22px; height: 22px; color: #7FA3FF; flex: none; margin-top: 3px; }
.contact-line a { color: var(--jacd-white); text-decoration: none; font-weight: 700; word-break: break-word; }
.contact-line small { display: block; color: var(--concrete-grey); font-size: .82rem; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .9rem; }
.field label .opt { font-weight: 500; color: var(--steel-grey); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--jacd-white);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--jacd-blue); box-shadow: 0 0 0 4px rgba(45,98,255,.15);
}
.form-note { font-size: .85rem; color: var(--steel-grey); grid-column: 1 / -1; margin: 0; }
.hidden { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--jacd-black); color: var(--concrete-grey); padding: 64px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer img { width: 170px; margin-bottom: 18px; }
.site-footer h4 { color: var(--jacd-white); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #D7DCE6; text-decoration: none; }
.site-footer a:hover { color: var(--jacd-white); }
.footer-base {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem;
}
.tagline { color: var(--jacd-white); font-weight: 600; }

/* ---------- Mobile call bar ---------- */
.call-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services, .projects { grid-template-columns: repeat(2, 1fr); }
  .trust .wrap { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; background: var(--jacd-black);
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px var(--gutter) 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 1.05rem; }
  .nav a[aria-current="page"] { border-bottom-color: rgba(255,255,255,.08); color: #7FA3FF; }
  .nav .btn { margin-top: 16px; justify-content: center; }
}
@media (max-width: 620px) {
  body { font-size: 16px; padding-bottom: 68px; }
  .brand img { width: 150px; }
  .services, .projects, .trust .wrap, .footer-grid, .form { grid-template-columns: 1fr; }
  .trust-item { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); padding-left: 0; padding-right: 0; }
  .trust-item:first-child { border-top: 0; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .call-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--jacd-blue); color: var(--jacd-white); text-decoration: none;
    font-weight: 700; justify-content: center; align-items: center; gap: 10px; height: 60px;
    box-shadow: 0 -6px 20px rgba(0,0,0,.25);
  }
  .call-bar svg { width: 20px; height: 20px; }
}

/* ==========================================================
   Hero photo
   ========================================================== */
.hero--photo {
  background:
    linear-gradient(100deg, rgba(0,0,0,.92) 0%, rgba(5,10,30,.82) 45%, rgba(29,64,190,.55) 100%),
    url("../images/hero-rock-channel.jpg") center 60% / cover no-repeat,
    #000;
}
.hero--photo::before { opacity: .55; }

/* ==========================================================
   Animations — all switched off for "reduce motion" users
   ========================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* 1. Fade-up as things scroll into view */
  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .service.reveal.is-visible:hover { transform: translateY(-3px); }

  /* 2. Banner text eases in one line after another */
  .js .hero-anim .wrap > * {
    opacity: 0;
    animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards;
  }
  .js .hero-anim .wrap > *:nth-child(1) { animation-delay: .10s; }
  .js .hero-anim .wrap > *:nth-child(2) { animation-delay: .25s; }
  .js .hero-anim .wrap > *:nth-child(3) { animation-delay: .45s; }
  .js .hero-anim .wrap > *:nth-child(4) { animation-delay: .65s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
  }

  /* 3. JACD pattern drifts very slowly behind the banners */
  .hero::before, .page-hero::before { animation: drift 60s linear infinite; }
  @keyframes drift {
    from { background-position: 0 0; }
    to   { background-position: 260px 90px; }
  }

  /* Orange/blue stripe sweeps in under the home banner */
  .hero-stripe { transform-origin: left; animation: sweep 1.1s .5s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  /* Photos zoom a touch on hover */
  .photo img { transition: transform .6s ease; }
  .photo:hover img { transform: scale(1.04); }
}

/* About — founder photo + signature */
.photo--portrait { aspect-ratio: 11 / 12; }
.photo--portrait img { object-position: center 20%; }
.signature { margin-top: 26px; padding-left: 16px; border-left: 3px solid var(--jacd-blue); }
.signature strong { display: block; font-size: 1.05rem; }
.signature span { color: var(--steel-grey); font-size: .92rem; }
.section--dark .values li span strong { color: var(--jacd-white); }

/* ==========================================================
   Orange accents (Safety Orange #F28C28)
   ========================================================== */
:root { --orange-ink: #C2620A; }   /* darker orange for text on light backgrounds */

/* Section labels: orange with a short leading rule */
.eyebrow { color: var(--orange-ink); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--safety-orange); }
.section--dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow, .section--services .eyebrow { color: var(--safety-orange); }

/* Hero */
.hero h1 span { color: #7FA3FF; }
.trust-item svg { color: var(--safety-orange); }

/* Ticks, signature, footer headings, captions */
.values li svg { color: var(--safety-orange); }
.section--dark .values li svg { color: var(--safety-orange); }
.signature { border-left-color: var(--safety-orange); }
.site-footer h4 { color: var(--safety-orange); }
.project figcaption strong { position: relative; padding-left: 14px; }
.project figcaption strong::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 6px; height: 6px; border-radius: 1px;
  background: var(--safety-orange);
}
.contact-line svg { color: var(--safety-orange); }

/* CTA band: orange/blue stripe along the bottom */
.cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: linear-gradient(90deg, var(--jacd-blue) 0 70%, var(--safety-orange) 70% 100%);
}

/* Footer social icons */
.socials { display: flex; gap: 10px; margin-top: 6px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.18); color: #D7DCE6; transition: background .2s, color .2s, border-color .2s;
}
.socials a:hover { background: var(--safety-orange); border-color: var(--safety-orange); color: #111; }
.socials svg { width: 17px; height: 17px; }

/* ==========================================================
   Services — dark section with accented cards
   ========================================================== */
.section--services {
  background:
    radial-gradient(ellipse at 85% 0%, rgba(45,98,255,.22) 0%, rgba(45,98,255,0) 55%),
    radial-gradient(ellipse at 0% 100%, rgba(242,140,40,.10) 0%, rgba(242,140,40,0) 45%),
    #070A12;
  color: var(--jacd-white);
}
.section--services h2 { color: var(--jacd-white); }
.section--services .btn--dark { background: var(--safety-orange); color: #111; }
.section--services .btn--dark:hover { background: #FF9D3D; }

.section--services .service {
  background: linear-gradient(180deg, #121826 0%, #0C111C 100%);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.section--services .service::before {
  content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 64px;
  background: var(--safety-orange); transition: width .35s ease;
}
.section--services .service:hover { border-color: rgba(242,140,40,.55); }
.section--services .service:hover::before { width: 100%; }
.section--services .service .num {
  position: absolute; right: 22px; top: 14px;
  font-size: 3.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(242,140,40,.55);
}
.section--services .service-icon { margin-top: 6px; box-shadow: 0 8px 24px rgba(45,98,255,.35); }
.section--services .service h3 { color: var(--jacd-white); }
.section--services .service p { color: #AEB6C4; flex: 1; }
.service-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  color: var(--safety-orange); font-weight: 700; font-size: .92rem; text-decoration: none;
}
.service-link svg { width: 16px; height: 16px; transition: transform .2s; }
.service-link:hover svg { transform: translateX(4px); }
.service-detail { scroll-margin-top: 100px; }

/* Brand icons (from the JACD logo suite) */
.service-icon-brand { display: block; width: 84px; height: 84px; margin: 0 0 4px -6px; }
.trust-item { align-items: center; }
.trust-item .trust-icon { flex: none; width: 50px; height: 50px; }
.trust-item svg { width: 34px; height: 34px; margin: 0 8px; }
.trust-item svg { color: #FFFFFF; }

/* ==========================================================
   One consistent dark background across every page
   ========================================================== */
:root { --site-bg: #070A12; --panel: #10151F; --panel-line: rgba(255,255,255,.10); --text-soft: #AEB6C4; }
body { background: var(--site-bg); color: #E6E9EF; }
.section, .section--paper, .section--dark, .section--services { background: var(--site-bg); color: #E6E9EF; }
main > .section + .section { border-top: 1px solid rgba(255,255,255,.06); }
.trust, .trust-item { background: var(--site-bg); }
.trust { border-bottom: 1px solid rgba(255,255,255,.06); }

h1, h2, h3 { color: #FFFFFF; }
.lead, .section--dark .lead { color: var(--text-soft); }
.eyebrow { color: var(--safety-orange); }
a { color: #7FA3FF; }

/* Secondary buttons: orange instead of black-on-dark */
.btn--dark { background: var(--safety-orange); color: #111; }
.btn--dark:hover { background: #FF9D3D; }

/* Photos & projects */
.photo figcaption, .project figcaption { color: var(--text-soft); }
.project figcaption strong { color: #FFFFFF; }
.signature span { color: var(--text-soft); }

/* Contact */
.contact-card { background: var(--panel); border: 1px solid var(--panel-line); }
.field label { color: #FFFFFF; }
.field label .opt, .form-note { color: var(--text-soft); }
.field input, .field select, .field textarea {
  background: var(--panel); color: #FFFFFF; border-color: var(--panel-line);
}
.field input::placeholder, .field textarea::placeholder { color: #6F7888; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--safety-orange); box-shadow: 0 0 0 4px rgba(242,140,40,.18); }
.field select option { background: var(--panel); color: #FFFFFF; }
.field input[type="file"] { color: var(--text-soft); }
.form-note a { color: var(--safety-orange); }
