/* ==========================================================================
   Castellum Building Restoration — stylesheet
   Edit brand colors and type in the :root block below.
   ========================================================================== */

:root {
  /* --- Color --- */
  --bg:            #0B0B0C;   /* page background, near-black warm charcoal */
  --bg-raised:     #131312;   /* section alt background */
  --bg-card:       #171715;   /* card surfaces */
  --line:          rgba(237, 232, 221, 0.10);
  --line-strong:   rgba(237, 232, 221, 0.20);

  --gold:          #B08D57;   /* logo gold — fills, borders, icons */
  --gold-text:     #C9A876;   /* lighter gold tuned for AA text contrast */
  --gold-dim:      rgba(176, 141, 87, 0.35);

  --ink:           #EDE8DD;   /* primary off-white text */
  --ink-dim:       #A39C8E;   /* secondary text */
  --ink-faint:     #6E6862;   /* tertiary / labels on dark */

  /* --- Type --- */
  --font-display:  'Jost', 'Century Gothic', sans-serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:     'IBM Plex Mono', 'Courier New', monospace;

  /* --- Layout --- */
  --container-w:   1180px;
  --radius:        3px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  letter-spacing: 0.01em;
}

h2 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 500; }

p { margin: 0; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #0B0B0C;
  padding: var(--space-1) var(--space-2);
  z-index: 1000;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

:focus-visible {
  outline: 2px solid var(--gold-text);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 var(--space-2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gold);
  color: #14120D;
}
.btn-primary:hover { background: var(--gold-text); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-text); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.brand { flex-shrink: 0; }
.brand-logo { height: 40px; width: auto; }

.nav {
  display: flex;
  gap: var(--space-4);
  margin-right: auto;
}
.nav a {
  font-size: 0.9rem;
  color: var(--ink-dim);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--ink); }

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  margin-left: var(--space-2);
}
.nav-toggle span {
  display: block;
  height: 1px;
  width: 18px;
  margin: 0 auto;
  background: var(--ink);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-7) 0 var(--space-6);
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg svg { width: 100%; height: 100%; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(2.4rem, 1.9rem + 2.4vw, 3.75rem);
  margin-bottom: var(--space-3);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 640px;
  margin-bottom: var(--space-2);
}

.hero-detail {
  font-size: 0.95rem;
  color: var(--ink-dim);
  max-width: 600px;
  margin-bottom: var(--space-4);
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ==========================================================================
   Intro
   ========================================================================== */

.intro { padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }

.intro-inner h2 {
  max-width: 780px;
  margin-bottom: var(--space-4);
}

.intro-copy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.intro-copy p { color: var(--ink-dim); font-size: 0.98rem; }

/* ==========================================================================
   Services
   ========================================================================== */

.services { padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
.services h2 { max-width: 640px; margin-bottom: var(--space-5); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  position: relative;
  background: var(--bg);
  padding: var(--space-4);
  transition: background-color 0.2s ease;
}
.service-card:hover { background: var(--bg-raised); }

.service-card::before,
.service-card::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--gold-dim);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.service-card::before {
  top: 10px; left: 10px;
  border-width: 1px 0 0 1px;
}
.service-card::after {
  bottom: 10px; right: 10px;
  border-width: 0 1px 1px 0;
}
.service-card:hover::before,
.service-card:hover::after { opacity: 1; }

.card-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold-text);
  margin-bottom: var(--space-3);
}

.service-card h3 { margin-bottom: var(--space-1); }
.service-card p { color: var(--ink-dim); font-size: 0.92rem; }

/* ==========================================================================
   Who we serve
   ========================================================================== */

.who-we-serve { padding: var(--space-6) 0; border-bottom: 1px solid var(--line); background: var(--bg-raised); }

.who-we-serve h2 { max-width: 720px; margin-bottom: var(--space-2); }
.section-lead { color: var(--ink-dim); max-width: 640px; margin-bottom: var(--space-4); font-size: 1rem; }

.client-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.client-grid li {
  background: var(--bg-raised);
  padding: var(--space-3);
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}

/* ==========================================================================
   Why Castellum
   ========================================================================== */

.why { padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
.why h2 { margin-bottom: var(--space-5); max-width: 640px; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.why-item { border-top: 1px solid var(--gold-dim); padding-top: var(--space-2); }
.why-item h3 { margin-bottom: var(--space-1); }
.why-item p { color: var(--ink-dim); font-size: 0.92rem; }

/* ==========================================================================
   Process
   ========================================================================== */

.process { padding: var(--space-6) 0; border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.process h2 { margin-bottom: var(--space-5); max-width: 640px; }

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  counter-reset: step;
}
.process-steps li { position: relative; padding-left: var(--space-2); border-left: 1px solid var(--line-strong); }
.step-num {
  display: block;
  font-family: var(--font-mono);
  color: var(--gold-text);
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}
.process-steps h3 { margin-bottom: var(--space-1); }
.process-steps p { color: var(--ink-dim); font-size: 0.92rem; }

/* ==========================================================================
   Work / gallery
   ========================================================================== */

.work { padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
.work h2 { margin-bottom: var(--space-1); }
.work .section-lead { margin-bottom: var(--space-5); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.work-card { margin: 0; }
.work-photo {
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, var(--bg-card), var(--bg-card) 10px, var(--bg-raised) 10px, var(--bg-raised) 20px);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.work-card figcaption {
  margin-top: var(--space-1);
  font-size: 0.85rem;
  color: var(--ink-dim);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact { padding: var(--space-6) 0; }

.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-6);
  align-items: start;
}

.contact-intro h2 { margin-bottom: var(--space-2); }
.contact-intro > p { color: var(--ink-dim); margin-bottom: var(--space-4); max-width: 440px; }

.contact-details { margin: 0; }
.contact-details div {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
}
.contact-details dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.3em;
}
.contact-details dd { margin: 0; font-size: 1rem; }
.contact-details a:hover { color: var(--gold-text); }

.quote-form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: var(--space-4);
  border-radius: var(--radius);
}

.form-row { margin-bottom: var(--space-3); }
.form-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.form-row-half > div { margin: 0; }

label, .fieldset-label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin-bottom: 0.5em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7em 0.8em;
  transition: border-color 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  outline: none;
}
textarea { resize: vertical; }

.radio-group { display: flex; gap: var(--space-3); }
.radio-label { display: flex; align-items: center; gap: 0.4em; font-size: 0.9rem; color: var(--ink); }
.radio-label input { accent-color: var(--gold); }

.quote-form .btn { width: 100%; margin-top: var(--space-1); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-5) 0 var(--space-3);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
}

.footer-name { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.3em; }
.footer-tagline, .footer-area { color: var(--ink-dim); font-size: 0.88rem; margin-bottom: 0.2em; }

.footer-nav { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.footer-nav a { font-size: 0.88rem; color: var(--ink-dim); }
.footer-nav a:hover { color: var(--gold-text); }

.legal {
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .intro-copy { grid-template-columns: 1fr; gap: var(--space-3); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr; gap: var(--space-4); }
}

@media (max-width: 720px) {
  :root {
    --space-6: 3.5rem;
    --space-7: 5rem;
  }

  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: var(--space-2) var(--space-3) var(--space-3);
    gap: var(--space-2);
  }
  .site-header.nav-open .header-cta {
    display: inline-flex;
    position: absolute;
    top: 100%;
    right: var(--space-3);
    margin-top: calc(5 * var(--space-2) + 2px);
  }

  .card-grid, .client-grid, .why-grid, .process-steps, .work-grid { grid-template-columns: 1fr; }
  .form-row-half { grid-template-columns: 1fr; }
}
