/* ============================================================
   Upspec Construction — styles
   ============================================================ */

:root {
  --char-900: #101216;
  --char-800: #16181d;
  --char-700: #1d2026;
  --char-600: #262b33;
  --line: rgba(255, 255, 255, .09);
  --line-dark: rgba(0, 0, 0, .08);

  --paper: #f6f5f3;
  --paper-2: #efedea;

  --ink: #14161a;
  --ink-soft: #3c424c;
  --muted: #7c8794;
  --muted-dark: #6b7480;

  --silver: #d7dbe0;
  --on-dark: #e8eaed;
  --on-dark-soft: #a7aeb8;

  --accent: #d8a24a;
  --accent-2: #e8b968;
  --accent-ink: #1a1205;

  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .45);
  --shadow-soft: 0 10px 30px -14px rgba(16, 18, 22, .35);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Barlow Condensed", "Inter", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -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; }

/* ---------- Typography helpers ---------- */
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.04; letter-spacing: .3px; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); text-transform: none; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.28rem; letter-spacing: .4px; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 .8rem;
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: .72rem; --pad-x: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  border-radius: 999px; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { --pad-y: .95rem; --pad-x: 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px -12px rgba(216, 162, 74, .8); }
.btn-accent:hover { background: var(--accent-2); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 18, 22, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background .3s ease;
}
.site-header.scrolled { background: rgba(16, 18, 22, .94); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand-logo { height: 62px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links > a { color: var(--on-dark); font-weight: 500; font-size: .96rem; transition: color .2s ease; }
.nav-links > a:hover { color: var(--accent-2); }
.nav-cta { color: var(--accent-ink) !important; }

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

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; color: var(--on-dark); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(16, 18, 22, .94) 0%, rgba(16, 18, 22, .78) 42%, rgba(16, 18, 22, .5) 100%),
    linear-gradient(to top, rgba(16, 18, 22, .95), rgba(16, 18, 22, 0) 55%);
}
.hero-inner { position: relative; padding: clamp(4.5rem, 11vw, 9rem) 24px clamp(4rem, 9vw, 7rem); max-width: var(--maxw); }
.hero h1 { max-width: 16ch; margin-bottom: 1.4rem; }
.hero-lead { max-width: 52ch; font-size: 1.14rem; color: var(--on-dark-soft); margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.6rem; }

.hero-badges {
  list-style: none; margin: 0; padding: 1.6rem 0 0; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1.6rem 2.6rem;
}
.hero-badges li { font-size: .95rem; color: var(--on-dark-soft); }
.hero-badges strong { color: var(--on-dark); font-weight: 600; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--char-800); color: var(--on-dark); }
.section-dark .section-sub { color: var(--on-dark-soft); }

.section-head { max-width: 640px; margin: 0 auto clamp(2.4rem, 5vw, 3.6rem); text-align: center; }
.section-head h2 { margin-bottom: .8rem; }
.section-sub { color: var(--muted-dark); font-size: 1.06rem; margin: 0; }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.card {
  background: #fff; border: 1px solid rgba(16, 18, 22, .07); border-radius: var(--radius);
  padding: 2rem 1.6rem; box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 44px -22px rgba(16, 18, 22, .4); border-color: rgba(216, 162, 74, .5); }
.service-icon {
  width: 54px; height: 54px; border-radius: 12px; margin-bottom: 1.1rem;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--char-700), var(--char-600));
}
.service-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--accent-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: .5rem; color: var(--ink); }
.card p { margin: 0; color: var(--muted-dark); font-size: .96rem; }

/* ============================================================
   Gallery
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 2.2rem; }
.filter {
  font-family: var(--sans); font-weight: 600; font-size: .9rem;
  padding: .55rem 1.15rem; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--ink-soft); border: 1.5px solid rgba(16, 18, 22, .12);
  transition: .2s ease;
}
.filter:hover { border-color: var(--accent); color: var(--ink); }
.filter.is-active { background: var(--char-800); color: #fff; border-color: var(--char-800); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.tile {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; box-shadow: var(--shadow-soft); cursor: pointer;
  background: var(--char-700);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.07); }
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem 1.1rem .95rem;
  display: flex; flex-direction: column; gap: .35rem;
  background: linear-gradient(to top, rgba(16, 18, 22, .92), rgba(16, 18, 22, 0));
  color: #fff; transform: translateY(8px); opacity: .96; transition: transform .3s ease;
}
.tile:hover figcaption { transform: translateY(0); }
.tag {
  align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: .2rem .55rem; border-radius: 5px;
}
.tile-title { font-family: var(--head); font-size: 1.2rem; font-weight: 600; letter-spacing: .3px; }
.tile.hide { display: none; }

/* ============================================================
   About
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-copy p { color: var(--ink-soft); }
.about-copy h2 { margin-bottom: 1.1rem; }
.about-copy > .btn { margin-top: .6rem; }

.stats { display: flex; gap: 2.2rem; flex-wrap: wrap; margin: 1.8rem 0 2rem; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--head); font-size: 2.4rem; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-label { font-size: .86rem; color: var(--muted-dark); margin-top: .3rem; }

.about-media { position: relative; }
.about-media > img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; }
.about-badge {
  position: absolute; left: -14px; bottom: -18px;
  display: flex; align-items: center; gap: .7rem;
  background: #fff; padding: .8rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow);
}
.about-badge img { width: 40px; height: 40px; border-radius: 8px; }
.about-badge strong { display: block; font-size: .95rem; color: var(--ink); }
.about-badge span { font-size: .8rem; color: var(--muted-dark); }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-info h2 { margin-bottom: .8rem; }

.contact-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.3rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.ci-icon {
  flex: none; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
}
.ci-icon svg { width: 21px; height: 21px; fill: none; stroke: var(--accent-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ci-label { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--on-dark-soft); margin-bottom: .1rem; }
.contact-list a { font-weight: 600; color: #fff; }
.contact-list a:hover { color: var(--accent-2); }
.contact-list li > div > span:not(.ci-label) { color: var(--on-dark); }

/* Form */
.contact-form {
  background: #fff; color: var(--ink); border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--shadow);
  display: grid; gap: 1.1rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: .98rem; color: var(--ink);
  padding: .8rem .9rem; border: 1.5px solid rgba(16, 18, 22, .15); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .2s ease, box-shadow .2s ease; width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(216, 162, 74, .18);
}
.field input.invalid, .field textarea.invalid { border-color: #d9534f; box-shadow: 0 0 0 3px rgba(217, 83, 79, .14); }
.form-status { margin: .2rem 0 0; font-size: .92rem; font-weight: 500; min-height: 1.2em; }
.form-status.ok { color: #2f8f4e; }
.form-status.err { color: #d9534f; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--char-900); color: var(--on-dark-soft); padding: 3.4rem 0 1.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2.4rem; border-bottom: 1px solid var(--line); }
.footer-logo { height: 38px; margin-bottom: 1rem; }
.footer-tag { max-width: 34ch; font-size: .93rem; margin: 0; }
.footer-nav { display: flex; flex-direction: column; gap: .6rem; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent-2); }
.footer-contact { display: flex; flex-direction: column; gap: .6rem; }
.footer-contact a, .footer-contact span { font-size: .95rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-top: 1.4rem; font-size: .85rem; }
.to-top:hover { color: var(--accent-2); }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 460px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 78px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(16, 18, 22, .98); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: .5rem 24px 1.4rem;
    transform: translateY(-140%); transition: transform .35s ease; visibility: hidden;
  }
  .nav-links.open { transform: translateY(0); visibility: visible; }
  .nav-links > a { padding: .95rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-cta { margin-top: 1rem; border-bottom: 0 !important; }

  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero-badges { gap: 1rem 1.6rem; }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { gap: 1.4rem; }
}
