/* FAB Joinery — site styles
 * Heritage greens + warm oak on a cream base. Editorial / luxury feel.
 * Source of truth for the LOOK is the prototype; this file extends it with
 * accessibility, focus states, reduced-motion handling and a real mobile menu.
 */

:root {
  --forest: #1c2e21;
  --forest-deep: #13201688;
  --moss: #3a5a40;
  --sage: #a3b18a;
  --oak: #b07d4b;
  --oak-soft: #c89b6e;
  --cream: #f6f2e9;
  --cream-deep: #ece5d6;
  --ink: #1a1f1a;
  --line: rgba(28, 46, 33, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
}
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
section { padding: 130px 0; }
.eyebrow {
  font-size: .78rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--oak);
  font-weight: 500;
  margin-bottom: 22px;
}

/* ---- Accessibility ---------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1000;
  background: var(--forest);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

:focus-visible {
  outline: 2px solid var(--oak);
  outline-offset: 3px;
  border-radius: 4px;
}
nav a:focus-visible,
.hero a:focus-visible,
.contact a:focus-visible { outline-color: var(--oak-soft); }

/* Honeypot — visible to bots, hidden to humans + screen readers via aria-hidden */
.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Nav -------------------------------------------------------------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  transition: .4s;
}
nav.scrolled {
  background: rgba(246, 242, 233, .92);
  backdrop-filter: blur(14px);
  padding: 14px 40px;
  box-shadow: 0 1px 0 var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--cream);
  transition: .4s;
  letter-spacing: .01em;
  text-decoration: none;
}
nav.scrolled .brand { color: var(--forest); }

/* FAB wordmark — solid silhouette SVG used as a CSS mask so it can be
 * recoloured via background-color. Aspect ratio of the file is 1000:441.6. */
.brand-mark {
  display: inline-block;
  width: 88px;
  height: 39px;
  background-color: currentColor;
  -webkit-mask: url('/fab-logo.svg') center / contain no-repeat;
          mask: url('/fab-logo.svg') center / contain no-repeat;
  flex-shrink: 0;
}
nav.scrolled .brand-mark { width: 72px; height: 32px; transition: .4s; }
.brand-word { font-style: italic; opacity: .9; }

.nav-links {
  display: flex;
  gap: 38px;
  align-items: center;
}
.nav-links a {
  color: var(--cream);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 400;
  transition: .3s;
  opacity: .85;
}
nav.scrolled .nav-links a { color: var(--forest); }
.nav-links a:hover { opacity: 1; color: var(--oak-soft); }
nav.scrolled .nav-links a:hover { color: var(--oak); }
.nav-cta {
  border: 1px solid currentColor;
  padding: 10px 22px;
  border-radius: 40px;
  font-size: .88rem !important;
}
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: 8px;
  line-height: 0;
}
nav.scrolled .menu-btn { color: var(--forest); }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(58, 90, 64, .55), transparent 60%),
    linear-gradient(160deg, #13201a 0%, #1c2e21 55%, #24382a 100%);
  color: var(--cream);
  overflow: hidden;
  padding: 130px 0 90px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 400;
  margin-bottom: 28px;
}
.hero h1 em { font-style: italic; color: var(--sage); }
.hero p {
  font-size: 1.18rem;
  font-weight: 300;
  max-width: 520px;
  opacity: .86;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 50px;
  text-decoration: none;
  font-size: .98rem;
  font-weight: 500;
  transition: .35s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-primary { background: var(--oak); color: var(--cream); }
.btn-primary:hover { background: var(--oak-soft); transform: translateY(-2px); }
.btn-primary:disabled { background: #8a6a4a; cursor: progress; transform: none; }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(246, 242, 233, .4);
}
.btn-ghost:hover { border-color: var(--cream); background: rgba(246, 242, 233, .08); }

.hero-card {
  border: 1px solid rgba(163, 177, 138, .3);
  border-radius: 18px;
  padding: 38px;
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(6px);
}
.hero-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--sage);
  margin-bottom: 20px;
  font-weight: 600;
}
.hero-card ul { list-style: none; }
.hero-card li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  font-size: .98rem;
  opacity: .9;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.hero-card li:last-child { border: none; }
.hero-card li::before { content: "—"; color: var(--oak-soft); }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .74rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .5;
  z-index: 2;
  color: var(--cream);
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: 1s cubic-bezier(.2, .7, .2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---- Trust strip ------------------------------------------------------ */
.trust {
  background: var(--forest);
  color: var(--cream);
  padding: 46px 0;
}
.trust .wrap {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
}
.trust-item { display: flex; flex-direction: column; gap: 4px; }
.trust-item strong {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  color: var(--sage);
  font-weight: 500;
}
.trust-item span { font-size: .84rem; opacity: .7; letter-spacing: .04em; }

/* ---- Services --------------------------------------------------------- */
.services { background: var(--cream); }
.sec-head { max-width: 680px; margin-bottom: 80px; }
.sec-head h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); margin-bottom: 20px; }
.sec-head p { font-size: 1.12rem; color: #4a5448; font-weight: 300; }
.svc {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--line);
  transition: .4s;
}
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc:hover { padding-left: 14px; }
.svc-num {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  color: var(--oak);
  opacity: .5;
}
.svc-body h3 { font-size: 1.85rem; margin-bottom: 10px; }
.svc-body p { color: #4a5448; font-weight: 300; max-width: 560px; }
.svc-arrow {
  font-size: 1.6rem;
  color: var(--moss);
  transition: .4s;
  opacity: .4;
}
.svc:hover .svc-arrow { opacity: 1; transform: translateX(8px); }

/* ---- Portfolio -------------------------------------------------------- */
.portfolio { background: var(--cream-deep); }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(150deg, #2a3f2e, #1c2e21);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 26px;
  color: var(--cream);
  border: 1px solid var(--line);
}
.tile-wide { aspect-ratio: auto; grid-column: span 2; }
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect width='60' height='60' fill='none' stroke='%23a3b18a' stroke-opacity='.12'/%3E%3C/svg%3E");
  z-index: 1;
}
.tile:has(img)::after {
  /* Darken the bottom of real photos so the caption stays readable. */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19, 32, 22, .75), transparent 50%);
  z-index: 1;
}
.tile-caption { position: relative; z-index: 2; }
.tile-caption span {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  display: block;
}
.tile-caption small {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: .78rem;
  opacity: .75;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-top: 4px;
}
.gallery-note {
  margin-top: 30px;
  font-size: .92rem;
  color: #6a7464;
  font-style: italic;
}

/* ---- About ------------------------------------------------------------ */
.about { background: var(--forest); color: var(--cream); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 28px; }
.about h2 em { font-style: italic; color: var(--sage); }
.about p {
  opacity: .85;
  font-weight: 300;
  margin-bottom: 20px;
  font-size: 1.06rem;
}
.about-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(150deg, #3a5a40, #1c2e21);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(163, 177, 138, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  text-align: center;
  padding: 30px;
  opacity: .9;
}
.about-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Testimonials ----------------------------------------------------- */
.quotes { background: var(--cream); }
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 20px;
}
.quote {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: .4s;
  margin: 0;
}
.quote:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -28px rgba(28, 46, 33, .4);
}
.quote-mark {
  font-family: 'Fraunces', serif;
  font-size: 3rem;
  color: var(--sage);
  line-height: .6;
  margin-bottom: 14px;
}
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-size: 1.02rem;
  color: #3a443a;
  margin-bottom: 22px;
  font-weight: 300;
}
.quote figcaption { margin: 0; }
.quote cite {
  font-style: normal;
  font-size: .9rem;
  color: var(--oak);
  font-weight: 500;
}
.quote cite span {
  display: block;
  color: #8a9484;
  font-weight: 400;
  margin-top: 2px;
}

/* ---- Contact ---------------------------------------------------------- */
.contact {
  background: linear-gradient(165deg, #13201a, #1c2e21);
  color: var(--cream);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.contact h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 22px; }
.contact h2 em { font-style: italic; color: var(--sage); }
.contact-lead { opacity: .84; font-weight: 300; margin-bottom: 40px; max-width: 420px; }
.contact-line {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.contact-line .lbl {
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sage);
  width: 90px;
  flex-shrink: 0;
}
.contact-line a, .contact-line span {
  color: var(--cream);
  text-decoration: none;
  font-size: 1.05rem;
}
.contact-line a:hover { color: var(--oak-soft); }

form { display: flex; flex-direction: column; gap: 18px; }
.field label {
  display: block;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 15px 18px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(163, 177, 138, .25);
  border-radius: 10px;
  color: var(--cream);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: .3s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--oak);
  background: rgba(255, 255, 255, .08);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #c66; }
.field textarea { resize: vertical; min-height: 110px; }
.field select option { background: #1c2e21; }
form .btn-primary { margin-top: 8px; justify-content: center; }
.form-note {
  font-size: .82rem;
  opacity: .65;
  text-align: center;
  min-height: 1.4em;
}
.form-note.success { color: var(--sage); opacity: 1; }
.form-note.error   { color: #e8b4a4;    opacity: 1; }

/* ---- Footer ----------------------------------------------------------- */
footer {
  background: #101a13;
  color: var(--cream);
  padding: 60px 0 40px;
}
.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 40px;
}
.foot-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 12px;
}
.foot-mark {
  width: 96px;
  height: 42px;
}
footer p {
  opacity: .6;
  font-size: .92rem;
  font-weight: 300;
  max-width: 340px;
}
.foot-area {
  font-style: normal;
  font-size: .92rem;
  opacity: .7;
  line-height: 2;
}
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .84rem;
  opacity: .5;
}
.foot-bottom a { color: inherit; text-decoration: none; }
.foot-bottom a:hover { color: var(--oak-soft); }

/* ---- Mobile ----------------------------------------------------------- */
@media (max-width: 900px) {
  section { padding: 90px 0; }
  .wrap { padding: 0 22px; }
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .gallery,
  .quote-grid { grid-template-columns: 1fr; }
  .tile-wide { grid-column: span 1; }
  .svc { grid-template-columns: 60px 1fr; gap: 20px; }
  .svc-arrow { display: none; }
  nav { padding: 18px 22px; }

  .menu-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(19, 32, 22, .98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    padding: 12px 22px 22px;
    border-top: 1px solid rgba(163, 177, 138, .15);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    color: var(--cream);
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-size: 1.05rem;
    opacity: 1;
  }
  .nav-links .nav-cta {
    border: 1px solid var(--oak-soft);
    text-align: center;
    margin-top: 10px;
    border-radius: 40px;
  }
  nav.scrolled .nav-links { background: rgba(246, 242, 233, .98); }
  nav.scrolled .nav-links a { color: var(--forest); }
}

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
