/* ==========================================================================
   OnlyBuilds — Design Tokens
   Palette: near-black ink, warm paper, antique brass accent
   Type: Fraunces (display) / Inter (body) / IBM Plex Mono (spec labels)
   ========================================================================== */

:root {
  --ink: #0e0e0f;
  --ink-soft: #1a1a17;
  --ink-line: rgba(217, 189, 135, 0.22);

  --paper: #f7f5ef;
  --paper-deep: #efeade;
  --charcoal: #232320;
  --charcoal-soft: #55524a;
  --line: #ddd4bd;

  --brass: #a97f42;
  --brass-deep: #8a6a37;
  --brass-light: #d9bd87;
  --brass-pale: #f0e3c7;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  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; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }

p { margin: 0 0 1em; color: var(--charcoal-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 1em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}
.on-dark .eyebrow { color: var(--brass-light); }

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

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.on-dark { background: var(--ink); color: #e9e4d6; }
.on-dark p { color: #c9c2ac; }
.on-dark h1, .on-dark h2, .on-dark h3 { color: #f7f3e8; }
.on-deep { background: var(--paper-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95em 1.7em;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brass);
  color: var(--ink);
  border-color: var(--brass);
}
.btn-primary:hover { background: var(--brass-light); border-color: var(--brass-light); }
.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  opacity: 0.85;
}
.btn-ghost:hover { opacity: 1; background: rgba(169,127,66,0.1); }
.on-dark .btn-ghost { border-color: var(--brass-light); color: var(--brass-light); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid var(--ink-line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--paper);
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-top: 0.4em;
}
.main-nav { display: flex; align-items: center; gap: 2.2rem; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: #cfc9b8;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.2em 0;
  transition: color 0.2s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--brass-light); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--brass);
}
.nav-phone {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--brass-light);
  border: 1px solid var(--ink-line);
  padding: 0.5em 1em;
  border-radius: 2px;
}
.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--paper);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--ink);
    flex-direction: column; align-items: flex-start; padding: 2rem var(--gutter);
    transform: translateY(-110%); transition: transform 0.3s ease; }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 1.4rem; }
  .nav-toggle { display: block; }
  .nav-phone { margin-top: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(3rem, 8vw, 5rem);
  min-height: 560px;
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at 30% 20%, black 0%, transparent 70%);
  z-index: 2;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 24s infinite;
}
.hero-bg-slide:nth-child(1) { animation-delay: 0s; }
.hero-bg-slide:nth-child(2) { animation-delay: 6s; }
.hero-bg-slide:nth-child(3) { animation-delay: 12s; }
.hero-bg-slide:nth-child(4) { animation-delay: 18s; }

@keyframes heroFade {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  22%  { opacity: 1; }
  28%  { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-slide { animation: none; opacity: 0; }
  .hero-bg-slide:nth-child(1) { opacity: 1; }
}

.hero-scrim {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(14,14,15,0.94) 0%, rgba(14,14,15,0.86) 38%, rgba(14,14,15,0.55) 68%, rgba(14,14,15,0.35) 100%);
}

.hero-inner { position: relative; z-index: 3; max-width: 760px; }
.hero h1 { color: var(--paper); }
.hero .lede { font-size: 1.15rem; color: #cfc9b8; max-width: 42em; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

.placeholder-frame {
  background: linear-gradient(155deg, #1c1c19, #262622);
  border: 1px dashed var(--brass-light);
  color: #a9a290;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}
.placeholder-frame.on-paper {
  background: repeating-linear-gradient(135deg, #eae3d1, #eae3d1 10px, #e2d9c2 10px, #e2d9c2 20px);
  border: 1px dashed var(--brass-deep);
  color: var(--brass-deep);
}

/* ---------- Spec stat strip (signature element) ---------- */
.spec-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
@media (max-width: 760px) { .spec-grid { grid-template-columns: 1fr; } }

.spec-card {
  position: relative;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--line);
}
.spec-card:last-child { border-right: none; }
.spec-card::before, .spec-card::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--brass);
  border-style: solid;
}
.spec-card::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.spec-card::after { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }
.spec-value {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--ink);
  display: block;
}
.spec-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  display: block;
  margin-top: 0.4em;
}

/* ---------- Split section ---------- */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.split.reverse { grid-template-columns: 1.1fr 0.9fr; }
.split.reverse .split-media { order: 2; }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}
.split-media .placeholder-frame { aspect-ratio: 4/5; width: 100%; }

/* ---------- Positioning band ---------- */
.callout-band {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 0;
}
.callout-band h2 { max-width: 16em; margin-left: auto; margin-right: auto; }
.callout-band .lede { max-width: 38em; margin: 1rem auto 0; }

/* ---------- Testimonials ---------- */
.testimonial {
  border-left: 2px solid var(--brass);
  padding-left: 1.6rem;
  max-width: 640px;
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-style: italic;
  color: var(--ink);
  margin: 0 0 1rem;
  line-height: 1.4;
}
.on-dark .testimonial blockquote { color: var(--paper); }
.testimonial cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--brass);
}

.testimonial-carousel { position: relative; max-width: 640px; }
.testimonial-slide {
  display: none;
  border-left: 2px solid var(--brass);
  padding-left: 1.6rem;
  animation: testimonialFade 0.6s ease;
}
.testimonial-slide.is-active { display: block; }
@keyframes testimonialFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.testimonial-slide blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-style: italic;
  color: var(--ink);
  margin: 0 0 1rem;
  line-height: 1.4;
}
.on-dark .testimonial-slide blockquote { color: var(--paper); }
.testimonial-slide cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--brass);
}
.testimonial-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-left: 1.6rem;
}
.testimonial-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--brass);
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.testimonial-dots button.is-active { background: var(--brass); }

/* ---------- Gallery preview grid ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
.grid-3 .placeholder-frame { aspect-ratio: 4/3; }
.grid-3 img { aspect-ratio: 4/3; border-radius: 2px; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #b8b096;
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--ink-line);
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--paper);
  max-width: 20em;
}
.footer-cols { display: flex; gap: 4rem; flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 0.9em;
}
.footer-col a, .footer-col p { display: block; color: #cfc9b8; margin: 0 0 0.5em; font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #756e5b;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(2.5rem, 6vw, 3.5rem);
}
.page-hero h1 { color: var(--paper); margin-bottom: 0.3em; }
.page-hero .lede { color: #cfc9b8; max-width: 40em; }

/* ---------- About: timeline (a true sequence, so numbered/ordered is justified) ---------- */
.timeline { position: relative; padding-left: 2.4rem; }
.timeline::before {
  content: "";
  position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.timeline-item { position: relative; padding-bottom: 2.4rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute; left: -2.4rem; top: 4px;
  width: 13px; height: 13px;
  background: var(--paper);
  border: 2px solid var(--brass);
  border-radius: 50%;
}
.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--brass-deep);
  text-transform: uppercase;
  margin-bottom: 0.3em;
  display: block;
}
.timeline-item h3 { margin-bottom: 0.3em; }

/* ---------- Licence / compliance bar ---------- */
.compliance-bar {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--charcoal-soft);
  border: 1px solid var(--line);
  padding: 0.9rem 1.2rem;
  display: inline-block;
}

/* ---------- Gallery page ---------- */
.filter-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5em 1.1em;
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
  background: transparent;
  color: var(--charcoal-soft);
  transition: all 0.2s ease;
}
.filter-pill.active, .filter-pill:hover {
  border-color: var(--brass);
  color: var(--ink);
  background: var(--brass-pale);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { cursor: pointer; }
.gallery-item .placeholder-frame { aspect-ratio: 1/1; }
.gallery-item img { aspect-ratio: 1/1; width: 100%; object-fit: cover; border-radius: 2px; display: block; }
.gallery-item-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--charcoal-soft);
  margin-top: 0.6em;
}
.gallery-item[data-cat] { }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(14,14,15,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox-box {
  max-width: 640px; width: 100%;
  aspect-ratio: 4/3;
}
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: 1px solid var(--brass-light);
  color: var(--brass-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.5em 1em;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 4rem);
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.3rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin-bottom: 0.5em;
}
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0.85em 1em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--charcoal);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px var(--brass-pale);
}
.field textarea { resize: vertical; min-height: 130px; }

.field-error {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a33d2f;
  margin-top: 0.4em;
}
.form-success:empty, .form-error:empty { display: none; }
.form-success {
  background: #eef3ea;
  border: 1px solid #a9c19a;
  color: #2f4a26;
}
.form-error {
  background: #f6e9e6;
  border: 1px solid #cc8c7d;
  color: #7a2e1f;
}
.form-success:not(:empty), .form-error:not(:empty) {
  font-family: var(--font-body);
  padding: 0.9em 1.1em;
  border-radius: 2px;
  margin-bottom: 1.3rem;
  font-size: 0.95rem;
}
[data-fs-field][aria-invalid="true"] { border-color: #a33d2f; }

.contact-info-card {
  background: var(--ink);
  color: var(--paper);
  padding: 2.4rem;
}
.contact-info-card h3 { color: var(--paper); }
.contact-line {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--ink-line);
  font-size: 0.95rem;
}
.contact-line:last-of-type { border-bottom: none; }
.contact-line span:first-child { color: #a9a290; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.contact-line a, .contact-line span:last-child { color: var(--brass-light); }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

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