/* ===========================================================
   Heath Arnold — Trade & Field Services
   Theme: garnet · black · silver
   =========================================================== */

:root {
  --garnet:        #7B1320;
  --garnet-bright: #A01B2B;
  --garnet-deep:   #5A0B12;
  --garnet-ink:    #3A060B;

  --ink:      #0C0D0F;   /* near-black */
  --charcoal: #16171B;
  --steel:    #24262C;
  --steel-2:  #2E3138;
  --silver:   #B9BDC2;
  --silver-2: #D9DCDF;
  --bone:     #F4F2EE;   /* off-white */
  --muted:    #9AA0A6;

  --line: rgba(185, 189, 194, 0.16);
  --line-strong: rgba(185, 189, 194, 0.3);

  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);

  --font-display: 'Archivo Black', system-ui, sans-serif;
  --font-head: 'Barlow Condensed', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--bone);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Headings ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.2px; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); text-transform: uppercase; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1rem; }

.kicker, .eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--garnet-bright);
  margin: 0 0 0.5rem;
}
.eyebrow { color: var(--silver); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px;
  font-weight: 700; font-size: 1rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.08rem; }
.btn-block { width: 100%; display: flex; }
.btn-primary { background: var(--garnet); color: #fff; border-color: var(--garnet); }
.btn-primary:hover { background: var(--garnet-bright); border-color: var(--garnet-bright); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--silver); background: rgba(255,255,255,0.04); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(12, 13, 15, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 1px; color: var(--bone); }
.brand-tag { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2.5px; font-size: 0.66rem; color: var(--silver); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; font-size: 0.98rem; color: var(--silver-2); transition: color .15s; }
.nav a:hover { color: #fff; }
.nav .nav-cta { color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--bone); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 500px at 75% -10%, rgba(160,27,43,0.28), transparent 60%),
    linear-gradient(180deg, #101115 0%, #0c0d0f 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px; opacity: 0.25; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 48px; align-items: center;
  padding: clamp(48px, 8vw, 96px) 24px;
}
.hero-copy h1 { margin: 0.4rem 0 1rem; }
.hero-sub { font-size: 1.16rem; color: var(--silver-2); max-width: 60ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.8rem 0 1.5rem; }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; }
.hero-badges li { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 0.84rem; color: var(--silver); position: relative; padding-left: 18px; }
.hero-badges li::before { content: "▸"; color: var(--garnet-bright); position: absolute; left: 0; }

.hero-side { display: flex; justify-content: center; }
.hero-card {
  width: 100%; max-width: 340px; background: linear-gradient(180deg, var(--steel) 0%, var(--charcoal) 100%);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border-top: 4px solid var(--garnet);
}
.hero-card-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; }
.hero-card-row span { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.78rem; color: var(--muted); }
.hero-card-row strong { font-family: var(--font-head); font-size: 1.18rem; color: var(--bone); }
.hero-card-line { height: 1px; background: var(--line); margin: 12px 0; }
.hero-card-note { font-size: 0.95rem; color: var(--silver); margin-bottom: 1.1rem; }

.hazard-stripe {
  height: 10px;
  background: repeating-linear-gradient(45deg, var(--garnet) 0 22px, var(--ink) 22px 44px);
  opacity: 0.85;
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--dark { background: linear-gradient(180deg, #0a0b0d 0%, #101115 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--contact { background: linear-gradient(180deg, #101115 0%, #0a0b0d 100%); border-top: 1px solid var(--line); }

.section-head { max-width: 760px; margin: 0 auto 3rem; text-align: center; }
.section-head h2 { margin-bottom: 0.8rem; }
.section-lede { color: var(--silver); font-size: 1.1rem; }

/* ---------- Cards grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: linear-gradient(180deg, var(--steel) 0%, var(--charcoal) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }

/* Service cards */
.service-card { border-top: 3px solid var(--garnet); display: flex; flex-direction: column; }
.card-icon { font-size: 2rem; line-height: 1; margin-bottom: 0.6rem; }
.service-card h3 { margin-bottom: 0.5rem; color: var(--bone); }
.service-card > p { color: var(--silver); }
.service-card ul { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.service-card ul li { position: relative; padding: 5px 0 5px 22px; color: var(--silver-2); font-size: 0.98rem; border-bottom: 1px dashed rgba(255,255,255,0.05); }
.service-card ul li::before { content: "›"; position: absolute; left: 4px; color: var(--garnet-bright); font-weight: 700; }
.service-card--cta { background: linear-gradient(160deg, var(--garnet-deep), var(--garnet-ink)); border-top: 3px solid var(--garnet-bright); justify-content: center; }
.service-card--cta h3 { color: #fff; }
.service-card--cta p { color: rgba(244,242,238,0.85); }
.service-card--cta .btn { margin-top: 0.6rem; }

/* Project cards */
.projects { grid-template-columns: repeat(3, 1fr); }
.project-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-photo {
  aspect-ratio: 16 / 10; background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.018) 0 14px, transparent 14px 28px),
    linear-gradient(135deg, var(--steel-2), var(--charcoal));
  display: grid; place-items: center; position: relative; border-bottom: 1px solid var(--line);
}
.project-photo::after {
  content: attr(data-label); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.78rem; color: var(--muted); border: 1px dashed var(--line-strong); padding: 8px 14px; border-radius: 6px;
}
.project-body { padding: 22px 24px 26px; }
.tag {
  display: inline-block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 0.72rem; color: var(--garnet-bright); border: 1px solid var(--line-strong);
  padding: 3px 10px; border-radius: 100px; margin-bottom: 0.7rem;
}
.project-body h3 { margin-bottom: 0.5rem; }
.project-body p { color: var(--silver); font-size: 0.98rem; }
.project-body .outcome { color: var(--silver-2); font-size: 0.95rem; margin-bottom: 0; }
.project-body .outcome strong { color: var(--bone); }

/* ---------- Experience ---------- */
.experience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.exp-card {
  background: linear-gradient(180deg, var(--steel) 0%, var(--charcoal) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; border-left: 4px solid var(--garnet);
}
.exp-card header { margin-bottom: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.exp-card h3 { color: var(--bone); }
.exp-role { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.82rem; color: var(--garnet-bright); }
.exp-card ul { margin: 0; padding-left: 1.1rem; }
.exp-card ul li { color: var(--silver-2); margin-bottom: 0.5rem; font-size: 0.98rem; }
.exp-card ul li::marker { color: var(--garnet-bright); }

/* ---------- About split ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.about-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 16px, transparent 16px 32px),
    linear-gradient(135deg, var(--steel-2), var(--charcoal));
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.about-photo::after {
  content: attr(data-label); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.8rem; color: var(--muted); border: 1px dashed var(--line-strong); padding: 8px 14px; border-radius: 6px;
}
.split-copy p { color: var(--silver-2); }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; }
.check-list li { position: relative; padding: 6px 0 6px 30px; color: var(--bone); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: #fff; background: var(--garnet); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; top: 8px; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-item { background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .15s; }
.why-item:hover { border-color: var(--garnet); }
.why-no { font-family: var(--font-display); font-size: 1.3rem; color: var(--garnet-bright); display: block; margin-bottom: 0.5rem; }
.why-item h3 { font-size: 1.15rem; margin-bottom: 0.4rem; color: var(--bone); }
.why-item p { color: var(--silver); font-size: 0.95rem; margin: 0; }

/* ---------- Testimonials ---------- */
.quote-card { display: flex; flex-direction: column; gap: 0.6rem; border-top: 3px solid var(--garnet); }
.stars { color: #E8B83A; letter-spacing: 2px; font-size: 1.05rem; }
.quote-card blockquote { margin: 0; font-size: 1.08rem; color: var(--bone); }
.quote-card figcaption { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 0.82rem; color: var(--muted); margin-top: auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.contact-list li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ci-label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px; font-size: 0.74rem; color: var(--muted); }
.ci-value { font-family: var(--font-head); font-size: 1.3rem; color: var(--bone); }
a.ci-value:hover { color: var(--garnet-bright); }
.contact-actions { display: grid; gap: 12px; margin-top: 1.4rem; }

.contact-form-wrap {
  background: linear-gradient(180deg, var(--steel) 0%, var(--charcoal) 100%);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
  border-top: 4px solid var(--garnet);
}
.quote-form h3 { margin-bottom: 1.2rem; color: var(--bone); }
.field { display: flex; flex-direction: column; margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.8rem; color: var(--silver); margin-bottom: 6px; }
.req { color: var(--garnet-bright); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--bone);
  background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--garnet-bright); box-shadow: 0 0 0 3px rgba(160,27,43,0.25);
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6a6f76; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239AA0A6' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.form-fineprint { font-size: 0.82rem; color: var(--muted); margin: 0.4rem 0 1rem; }
.form-status { margin: 0.9rem 0 0; font-weight: 600; min-height: 1.2rem; }
.form-status.success { color: #7ed09a; }
.form-status.error { color: #ef9a9a; }

/* ---------- Footer ---------- */
.site-footer { background: #08090b; border-top: 1px solid var(--line); padding-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; align-items: start; padding-bottom: 28px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { font-family: var(--font-display); display: block; letter-spacing: 1px; }
.footer-brand span { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px; font-size: 0.72rem; color: var(--silver); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px; align-content: start; }
.footer-nav a { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 0.92rem; color: var(--silver-2); }
.footer-nav a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; }
.footer-contact a, .footer-contact span { color: var(--silver-2); font-size: 0.95rem; }
.footer-contact a:hover { color: var(--garnet-bright); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); padding: 18px 24px; margin-top: 8px; }
.footer-base span { font-size: 0.82rem; color: var(--muted); }

/* ---------- Chat widget ---------- */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 90; font-family: var(--font-body); }
.chat-launch {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--garnet); color: #fff; border: none; border-radius: 100px;
  padding: 13px 20px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px;
  font-weight: 700; font-size: 1rem; box-shadow: var(--shadow); transition: background .15s, transform .12s;
}
.chat-launch:hover { background: var(--garnet-bright); }
.chat-launch:active { transform: translateY(1px); }
.chat-launch .dot { width: 9px; height: 9px; border-radius: 50%; background: #54d98c; box-shadow: 0 0 0 0 rgba(84,217,140,.6); animation: pulse 2s infinite; }
.chat-launch .dot.off { background: #b9bdc2; animation: none; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(84,217,140,.6)} 70%{box-shadow:0 0 0 8px rgba(84,217,140,0)} 100%{box-shadow:0 0 0 0 rgba(84,217,140,0)} }

.chat-panel {
  position: absolute; right: 0; bottom: 64px; width: min(360px, calc(100vw - 40px));
  background: var(--charcoal); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; display: none; flex-direction: column;
}
.chat-panel.open { display: flex; }
.chat-header { background: linear-gradient(180deg, var(--garnet), var(--garnet-deep)); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.chat-header .ch-title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.chat-header .ch-sub { font-size: 0.78rem; color: rgba(255,255,255,0.8); }
.chat-close { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat-status-bar { font-size: 0.8rem; padding: 8px 16px; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--line); color: var(--silver); }
.chat-status-bar .online { color: #7ed09a; font-weight: 700; }
.chat-status-bar .offline { color: #e0b34a; font-weight: 700; }
.chat-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; max-height: 320px; min-height: 180px; overflow-y: auto; }
.chat-msg { max-width: 82%; padding: 9px 13px; border-radius: 12px; font-size: 0.95rem; line-height: 1.45; }
.chat-msg.visitor { align-self: flex-end; background: var(--garnet); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.heath { align-self: flex-start; background: var(--steel-2); color: var(--bone); border-bottom-left-radius: 4px; }
.chat-msg.system { align-self: center; background: transparent; color: var(--muted); font-size: 0.82rem; text-align: center; }
.chat-foot { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-foot .chat-name { width: 100%; }
.chat-input-row { display: flex; gap: 8px; }
.chat-foot input, .chat-foot textarea {
  flex: 1; font-family: var(--font-body); font-size: 0.95rem; color: var(--bone);
  background: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px;
}
.chat-foot input:focus, .chat-foot textarea:focus { outline: none; border-color: var(--garnet-bright); }
.chat-send { background: var(--garnet); color: #fff; border: none; border-radius: 8px; padding: 0 16px; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; cursor: pointer; letter-spacing: 1px; }
.chat-send:hover { background: var(--garnet-bright); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards, .projects, .experience { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { order: -1; justify-content: flex-start; }
  .split { grid-template-columns: 1fr; }
  .split-media { max-width: 380px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--charcoal); border-bottom: 1px solid var(--line-strong);
    padding: 8px 24px 20px; transform: translateY(-130%); transition: transform .25s ease; max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { margin-top: 12px; border-bottom: none; }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; }
}

@media (max-width: 540px) {
  .cards, .projects, .experience, .why-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; animation: none !important; transition: none !important; }
}
