/* Standafer Builders — Option C: Project-Led | Fjalla One + Source Sans 3 */

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

:root {
  --black:     #111111;
  --black-mid: #2a2a2a;
  --red:       #c0191e;
  --red-dark:  #96141a;
  --white:     #ffffff;
  --off-white: #f7f6f4;
  --border:    #e2e0dc;
  --text:      #1a1a1a;
  --text-mid:  #555555;
  --text-lt:   #999999;
  --font-head: 'Fjalla One', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
}

body { font-family: var(--font-body); color: var(--text); background: var(--white); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── NAV ── */
.site-header { background: var(--black); position: sticky; top: 0; z-index: 100; border-bottom: 3px solid var(--red); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; }
.logo img { height: 58px; width: auto; display: block; filter: invert(1) hue-rotate(180deg); }
nav { display: flex; gap: 28px; }
nav a { font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 1px; transition: color 0.2s; }
nav a:hover, nav a.active { color: var(--white); }
.btn-nav { background: var(--red); color: var(--white); padding: 9px 18px; border-radius: 3px; font-family: var(--font-body); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; transition: background 0.2s; white-space: nowrap; }
.btn-nav:hover { background: var(--red-dark); }

/* ── PAGE HERO (inner pages) ── */
.page-hero { background: var(--black); padding: 56px 0; border-bottom: 3px solid var(--red); }
.page-hero .section-label { margin-bottom: 8px; }
.page-hero h1 { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); color: var(--white); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.6); font-size: 1.05rem; font-family: var(--font-body); }

/* ── HOME HEADLINE ── */
.home-headline { padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.home-headline .section-label { margin-bottom: 10px; }
.home-headline h1 { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 3.8rem); color: var(--black); line-height: 1.0; margin-bottom: 16px; }
.home-headline h1 span { color: var(--red); }
.home-headline p { font-size: 1.05rem; color: var(--text-mid); max-width: 560px; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn-primary { background: var(--red); color: var(--white); padding: 13px 26px; border-radius: 3px; font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; display: inline-block; transition: background 0.2s; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: var(--black); padding: 12px 26px; border-radius: 3px; font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; border: 2px solid var(--black); display: inline-block; transition: all 0.2s; }
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-outline-white { background: transparent; color: var(--white); padding: 12px 26px; border-radius: 3px; font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; border: 2px solid rgba(255,255,255,0.35); display: inline-block; transition: border-color 0.2s; }
.btn-outline-white:hover { border-color: var(--white); }
.btn-lg { font-size: 1rem; padding: 15px 30px; }
.cta-center { text-align: center; margin-top: 40px; }

/* ── PROJECT GRID ── */
.project-grid-section { background: var(--off-white); padding: 48px 0; }
.project-grid-section .section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.project-grid-section .section-header h2 { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--black); }
.view-all { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 1px; }
.view-all:hover { color: var(--red-dark); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.project-card { background: var(--white); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; transition: box-shadow 0.2s; }
.project-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.project-img { aspect-ratio: 16/9; background: var(--black-mid); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: rgba(255,255,255,0.12); border-bottom: 3px solid var(--red); }
.project-info { padding: 16px 18px; }
.project-status { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--red); margin-bottom: 4px; }
.project-info h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--black); margin-bottom: 4px; line-height: 1.2; }
.project-meta { font-family: var(--font-body); font-size: 0.82rem; color: var(--text-lt); }
.project-year { display: inline-block; background: var(--black); color: var(--white); font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 2px; margin-top: 8px; letter-spacing: 0.5px; }

/* ── STAT BAR ── */
.stat-bar { background: var(--black); padding: 24px 0; }
.stat-inner { display: flex; justify-content: center; gap: 0; flex-wrap: wrap; }
.stat-item { text-align: center; padding: 8px 48px; border-right: 1px solid rgba(255,255,255,0.1); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: var(--font-head); font-size: 2.2rem; color: var(--white); display: block; }
.stat-label { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1.5px; }

/* ── SECTIONS ── */
.section-white  { background: var(--white);     padding: 72px 0; }
.section-soft   { background: var(--off-white);  padding: 72px 0; }
.section-dark   { background: var(--black);      padding: 72px 0; color: var(--white); }

.section-label { display: block; font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
h2 { font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--black); margin-bottom: 14px; }
.section-dark h2 { color: var(--white); }
.section-sub { font-family: var(--font-body); font-size: 1.05rem; color: var(--text-mid); margin-bottom: 44px; max-width: 580px; line-height: 1.75; }
.section-dark .section-sub { color: rgba(255,255,255,0.6); }
.centered { text-align: center; }
.centered .section-sub { margin-left: auto; margin-right: auto; }

/* ── SERVICES GRID ── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.service-card { background: var(--white); padding: 36px 30px; transition: background 0.2s; }
.service-card:hover { background: var(--off-white); }
.service-icon { font-size: 2.2rem; margin-bottom: 16px; }
.service-card h3 { font-family: var(--font-head); font-size: 1.3rem; color: var(--black); margin-bottom: 10px; }
.service-card p { font-family: var(--font-body); font-size: 0.95rem; color: var(--text-mid); line-height: 1.7; }
.service-card a { display: inline-block; margin-top: 16px; font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── TWO COL ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.col-img { background: var(--black-mid); border-radius: 4px; min-height: 340px; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: rgba(255,255,255,0.1); }

/* ── CTA BLOCK ── */
.cta-block { text-align: center; }
.cta-block h2 { color: var(--white); }
.cta-block .section-sub { margin-left: auto; margin-right: auto; }
.cta-block p { margin-bottom: 32px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── SERVICE DETAIL (services page) ── */
.service-section { padding: 64px 0; border-bottom: 1px solid var(--border); }
.service-section:last-child { border-bottom: none; }
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.service-detail.flip .sd-text { order: 2; }
.service-detail.flip .sd-img  { order: 1; }
.sd-img { background: var(--black-mid); border-radius: 4px; min-height: 300px; display: flex; align-items: center; justify-content: center; font-size: 4rem; border-left: 4px solid var(--red); }
.sd-text h2 { margin-bottom: 14px; }
.sd-text p { font-family: var(--font-body); color: var(--text-mid); margin-bottom: 18px; line-height: 1.8; }
.sd-list { list-style: none; margin-bottom: 28px; }
.sd-list li { font-family: var(--font-body); padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; color: var(--text-mid); display: flex; gap: 10px; align-items: flex-start; }
.sd-list li::before { content: "✓"; color: var(--red); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.sd-list li:last-child { border-bottom: none; }

/* ── ABOUT PAGE ── */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 40px; }
.team-card { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 32px 24px; text-align: center; border-top: 4px solid var(--red); }
.team-photo { width: 80px; height: 80px; background: var(--black-mid); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 14px; }
.team-card h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--black); margin-bottom: 4px; }
.team-title { font-family: var(--font-body); color: var(--red); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.team-card p { font-family: var(--font-body); font-size: 0.9rem; color: var(--text-mid); line-height: 1.65; }

.timeline { position: relative; padding-left: 28px; border-left: 3px solid var(--red); }
.timeline-item { margin-bottom: 32px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -37px; top: 6px; width: 12px; height: 12px; background: var(--red); border-radius: 50%; }
.timeline-year { font-family: var(--font-head); font-size: 1.1rem; color: var(--red); margin-bottom: 4px; }
.timeline-item p { font-family: var(--font-body); color: var(--text-mid); font-size: 0.95rem; line-height: 1.7; }

/* ── CONTACT PAGE ── */
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.contact-detail { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-icon { font-size: 1.4rem; flex-shrink: 0; padding-top: 2px; }
.contact-label { font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--red); margin-bottom: 4px; }
.contact-detail p, .contact-detail a { font-family: var(--font-body); color: var(--text-mid); font-size: 0.95rem; line-height: 1.7; }
.contact-detail a:hover { color: var(--black); }
.hours-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-family: var(--font-body); font-size: 0.88rem; color: var(--text-mid); }
.hours-row:last-child { border-bottom: none; }

.form-wrap { background: var(--off-white); border: 1px solid var(--border); border-radius: 4px; padding: 36px; border-top: 4px solid var(--red); }
.form-wrap h2 { margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-mid); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; background: var(--white); border: 1px solid var(--border); border-radius: 3px; padding: 11px 14px; font-family: var(--font-body); font-size: 0.95rem; color: var(--text); transition: border-color 0.2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-submit { width: 100%; cursor: pointer; border: none; font-family: var(--font-body); }
.form-note { font-family: var(--font-body); font-size: 0.78rem; color: var(--text-lt); text-align: center; margin-top: 10px; }
.hp-field { display: none; }

.team-contacts { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.team-contact-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.tci-avatar { width: 40px; height: 40px; background: var(--black-mid); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.tci-name { font-family: var(--font-head); font-size: 1rem; color: var(--black); }
.tci-title { font-family: var(--font-body); font-size: 0.78rem; color: var(--text-lt); margin-bottom: 3px; }
.tci-contact a { font-family: var(--font-body); font-size: 0.82rem; color: var(--red); }

/* ── FOOTER ── */
.site-footer { background: #0a0a0a; padding: 56px 0 0; color: var(--white); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-brand { text-align: left; }
.footer-brand img { height: 48px; width: auto; margin: 0 0 14px 0; display: block; filter: invert(1) hue-rotate(180deg); }
.footer-brand p { font-family: var(--font-body); font-size: 0.88rem; color: rgba(255,255,255,0.45); line-height: 1.8; }
.footer-col strong { display: block; font-family: var(--font-body); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; color: var(--red); margin-bottom: 14px; }
.footer-col a, .footer-col p { font-family: var(--font-body); font-size: 0.88rem; color: rgba(255,255,255,0.5); display: block; margin-bottom: 8px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding: 18px 24px; text-align: center; font-family: var(--font-body); font-size: 0.78rem; color: rgba(255,255,255,0.25); }

/* ── SECTION NAVY (alias for section-dark, used in projects.html) ── */
.section-navy { background: var(--black); padding: 72px 0; color: var(--white); }
.section-navy h2 { color: var(--white); }
.section-navy .section-sub { color: rgba(255,255,255,0.6); }

/* ── THANK YOU ── */
.ty-wrap { min-height: 55vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 80px 24px; }
.ty-icon { font-size: 3.2rem; margin-bottom: 20px; }

/* ── ANIMATIONS ── */
html { scroll-behavior: smooth; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children inside a parent */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-stagger.visible > * { opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.5s; }

/* Hero headline entrance (load, not scroll) */
.hero-animate .section-label { animation: fadeUp 0.5s ease 0.05s both; }
.hero-animate h1              { animation: fadeUp 0.6s ease 0.18s both; }
.hero-animate p               { animation: fadeUp 0.6s ease 0.30s both; }
.hero-animate .hero-ctas      { animation: fadeUp 0.6s ease 0.42s both; }

/* Better project card hover */
.project-card { transition: box-shadow 0.25s ease, transform 0.25s ease; }
.project-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.13); transform: translateY(-4px); }

/* Nav scroll shadow */
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.5); }

/* Service card hover — left accent */
.service-card { border-left: 3px solid transparent; transition: background 0.2s ease, border-color 0.25s ease; }
.service-card:hover { border-left-color: var(--red); }

/* Project image placeholder (replaces emojis) */
.project-img {
  aspect-ratio: 16/9;
  background: var(--black-mid);
  position: relative; overflow: hidden;
  border-bottom: 3px solid var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 0; /* hide any leftover emoji */
}
.project-img::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 18px,
    rgba(255,255,255,0.03) 18px, rgba(255,255,255,0.03) 19px
  );
}
.project-img-label {
  position: relative; z-index: 1;
  font-family: var(--font-head); font-size: 0.68rem;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.18);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { display: none; }
  .container { padding: 0 20px; }
  .nav-inner { padding: 10px 20px; }

  /* sections */
  .section-white, .section-soft, .section-dark { padding: 48px 0; }
  .project-grid-section { padding: 36px 0; }
  .home-headline { padding: 36px 20px 32px; }
  .home-headline h1 { font-size: 2.4rem; }
  .page-hero { padding: 40px 0; }

  /* buttons */
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn-primary, .hero-ctas .btn-outline { width: 100%; text-align: center; }
  .cta-btns { flex-direction: column; align-items: center; }
  .cta-btns .btn-primary, .cta-btns .btn-outline-white { width: 100%; max-width: 320px; text-align: center; }
  .btn-lg { padding: 14px 24px; font-size: 0.95rem; }

  /* stat bar */
  .stat-inner { flex-wrap: wrap; }
  .stat-item { padding: 12px 20px; width: 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.1); }

  /* grids */
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .col-img { min-height: 200px; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }

  /* footer */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding: 40px 0 0; }

  /* contact */
  .contact-layout { grid-template-columns: 1fr; }
  .form-wrap { padding: 24px 18px; }
  .form-row { grid-template-columns: 1fr; }

  /* services page */
  .service-detail, .service-detail.flip { grid-template-columns: 1fr; }
  .service-detail.flip .sd-text, .service-detail.flip .sd-img { order: unset; }
  .sd-img { min-height: 180px; border-left: none; border-top: 4px solid var(--red); }
  .form-wrap { padding: 24px 18px; }
}
