/* Stirling Woodworks — homepage styles
   Palette and type follow the redesign plan: charcoal, stone white, oak accent;
   Jost for wide-spaced headings (close to the logo), Source Sans 3 for body text. */

:root {
  --charcoal: #24231f;
  --charcoal-2: #2e2c29;
  --stone: #f3f3f1;
  --white: #ffffff;
  --oak: #9a6f45;
  --oak-dark: #7d5934;
  --grey: #6e6a63;
  --line: #d9d6d0;

  --display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 10vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--stone);
  color: var(--charcoal);
  font: 300 18px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--oak); outline-offset: 3px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); letter-spacing: .02em; margin-bottom: 1.25em; }
h3 { font-size: 1.05rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5em; }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--oak);
  margin-bottom: .9em;
}

.section { padding-block: var(--section); }

/* Buttons and links */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95em 1.8em;
  border: 1px solid currentColor;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-outline:hover { background: var(--white); color: var(--charcoal); border-color: var(--white); }
.btn-solid { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.btn-solid:hover { background: transparent; color: var(--charcoal); }

.text-link {
  display: inline-block;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--oak);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.text-link:hover { border-color: currentColor; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.logo-mark { width: 44px; height: 44px; }
.logo-word {
  font-family: var(--display); font-weight: 300; font-size: .82rem;
  letter-spacing: .28em; text-transform: uppercase; line-height: 1.35;
}

/* Header: transparent over the photo, solid once scrolled */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--white);
  transition: background-color .3s, padding .3s;
  padding-block: 22px;
}
.site-header.is-solid,
.site-header.always-solid { background: var(--charcoal); padding-block: 12px; }
.site-nav a[aria-current="page"] { border-color: currentColor; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.site-nav a:not(.btn) {
  font-family: var(--display); font-size: .82rem; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.site-nav a:not(.btn):hover { border-color: currentColor; }
.site-nav .btn { padding: .75em 1.4em; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid currentColor; color: inherit;
  font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  padding: .6em 1em; cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: max(560px, min(92vh, 900px));
  padding-top: 120px; /* keeps the headline clear of the header on short screens */
  display: flex; align-items: flex-end;
  color: var(--white);
  background: var(--charcoal);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-slides .hero-img { opacity: 0; transition: opacity 1.4s ease; }
.hero-slides .hero-img.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-slides .hero-img { transition: none; } }
.hero-credit {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 24px;
  font-family: var(--display); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: var(--white); opacity: .85;
}
.hero-credit:hover { opacity: 1; text-decoration: underline; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  /* top shade for the header, plus a darker lower-left corner where the headline sits,
     so it stays readable over bright photos (marble, white kitchens) */
  background:
    linear-gradient(180deg, rgba(20,19,17,.55) 0%, rgba(20,19,17,0) 25%, rgba(20,19,17,0) 35%, rgba(20,19,17,.8) 100%),
    linear-gradient(90deg, rgba(20,19,17,.55) 0%, rgba(20,19,17,.25) 45%, rgba(20,19,17,0) 70%);
}
.hero-text { text-shadow: 0 1px 18px rgba(0,0,0,.35); }
.hero-text { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(48px, 9vh, 96px); }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: .01em;
  margin-bottom: .45em;
}
.hero p { max-width: 34em; font-size: clamp(1rem, 1.6vw, 1.2rem); margin-bottom: 2em; opacity: .92; }

/* Inner page intro (sits under the fixed header) */
.page-intro { background: var(--charcoal); color: var(--white); padding-top: 150px; padding-bottom: clamp(48px, 7vw, 80px); }
.page-intro h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 1.2em; max-width: 18em; }
.page-links { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.page-links a {
  font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: #d8d4cc; border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.page-links a:hover { color: var(--white); border-color: currentColor; }

/* Our story */
.muted-dark { color: var(--grey); font-family: var(--display); letter-spacing: .12em; }
.signature { font-family: var(--display); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; font-size: .9rem; margin-top: 1.5em; }

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
.tile { position: relative; display: block; overflow: hidden; text-decoration: none; color: var(--white); background: var(--charcoal); }
.tile-wide { grid-row: span 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 7 / 5; transition: transform .6s ease; }
.tile-wide img { aspect-ratio: auto; min-height: 100%; }
.tile:hover img { transform: scale(1.03); }
.tile-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 48px 22px 18px;
  background: linear-gradient(0deg, rgba(20,19,17,.8), rgba(20,19,17,0));
  font-size: .9rem;
}
.tile-caption strong {
  display: block;
  font-family: var(--display); font-weight: 400; font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase;
}

/* How we work */
.how { background: var(--white); }
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.prose { max-width: 38em; }
.points { list-style: none; padding: 0; margin: 2em 0; display: grid; gap: 1.2em; }
.points li { border-top: 1px solid var(--line); padding-top: 1em; color: var(--grey); }
.points strong { display: block; color: var(--charcoal); font-weight: 600; }

/* Who we work with */
.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.who-grid > div { border-top: 1px solid var(--charcoal); padding-top: 18px; }
.who-grid p { color: var(--grey); font-size: 1rem; }

/* Testimonials */
.quotes { background: var(--charcoal); color: var(--white); padding-block: var(--section); }
.quotes .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.quotes figure { margin: 0; }
.quotes blockquote {
  margin: 0 0 1.2em;
  font-family: var(--body); font-style: italic; font-weight: 300;
  font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.5;
}
.quotes figcaption {
  font-family: var(--display); font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; color: #c7a47e;
}
.quotes-single .wrap { grid-template-columns: 1fr; max-width: 980px; text-align: center; }
.quotes-single blockquote { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }

/* One-line recognition band (homepage) */
.recognition-line { border-bottom: 1px solid var(--line); }
.recognition-line a {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 40px;
  padding-block: 28px; text-decoration: none;
  font-family: var(--display); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
}
.recognition-line .arrow { color: var(--oak); }
.recognition-line a:hover .arrow { text-decoration: underline; }

/* Recognition */
.award-grid { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 24px; align-items: start; }
.award-grid figure { margin: 0; }
.award-grid img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; }
.award-grid figcaption { padding-top: 12px; font-size: .95rem; color: var(--grey); }
.award-grid figcaption strong { display: block; color: var(--charcoal); font-weight: 600; }
.press { border: 1px solid var(--line); padding: 28px; background: var(--white); }
.press-title { font-family: var(--display); font-weight: 400; font-size: 1.2rem; }
.press p:not(.press-title) { color: var(--grey); font-size: 1rem; }
.note { margin-top: 36px; color: var(--grey); max-width: 46em; font-size: 1rem; }

/* About page photos */
.story-img { margin-top: 32px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.image-band { margin: 0; position: relative; background: var(--charcoal); }
.image-band img { width: 100%; height: clamp(320px, 62vh, 680px); object-fit: cover; }
.image-band figcaption { position: absolute; inset: auto 0 0 0; padding-block: 20px; }
.image-band a {
  font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--white); text-decoration: none; text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.image-band a:hover { text-decoration: underline; }
.install-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.install-strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.strip-caption { margin-top: 14px; color: var(--grey); font-size: .95rem; }
.who-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 18px; }
.who-grid > div:has(img) { border-top: 0; padding-top: 0; }
.who-grid > div:has(img) h3 { border-top: 1px solid var(--charcoal); padding-top: 16px; }
.award-grid figure a { display: block; }
.posters-head { margin-top: clamp(48px, 7vw, 80px); margin-bottom: 20px; }
.posters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.posters figure { margin: 0; }
.posters img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--white); }
.posters figcaption { padding-top: 8px; font-size: .85rem; color: var(--grey); }

/* Projects page */
.intro-text { max-width: 36em; color: #d8d4cc; font-size: 1.1rem; }
.intro-text a { color: var(--white); }
.project-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-index .tile img { aspect-ratio: 4 / 3; }

/* Project pages */
.project-hero { min-height: max(480px, min(78vh, 820px)); }
.project-hero .eyebrow { color: #e0c3a2; }
.project-intro { background: var(--white); }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.6; }
.facts { margin: 0; display: grid; gap: 20px; }
.facts div { border-top: 1px solid var(--line); padding-top: 12px; }
.facts dt { font-family: var(--display); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--oak); }
.facts dd { margin: 4px 0 0; }
.gallery-section { padding-block: 16px var(--section); background: var(--white); }
.gallery { columns: 2; column-gap: 16px; }
.gallery a { display: block; margin-bottom: 16px; break-inside: avoid; cursor: zoom-in; }
.gallery img { width: 100%; }
.project-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding-block: 48px;
}
.project-nav a:not(.text-link) {
  text-decoration: none; font-family: var(--display); font-size: 1.2rem; font-weight: 300;
}
.project-nav a:last-child { text-align: right; }
.project-nav a span {
  display: block; font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--oak);
}
.project-nav a:not(.text-link):hover { color: var(--oak); }

/* Photo viewer */
.lightbox { border: 0; padding: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; background: rgba(20,19,17,.96); color: var(--white); }
.lightbox::backdrop { background: rgba(20,19,17,.96); }
.lightbox img { position: absolute; inset: 56px 64px; margin: auto; max-width: calc(100% - 128px); max-height: calc(100% - 112px); width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--white); cursor: pointer;
  font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; padding: 16px;
}
.lightbox .lb-close { top: 4px; right: 8px; }
.lightbox .lb-prev, .lightbox .lb-next { top: 50%; transform: translateY(-50%); font-size: 2rem; letter-spacing: 0; }
.lightbox .lb-prev { left: 4px; }
.lightbox .lb-next { right: 4px; }
.lightbox .lb-count { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-size: .85rem; color: #a8a39a; }

/* Contact form (not in use yet; enquiries go by email for now) */
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label {
  display: block;
  font-family: var(--display); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
}
.contact-form label span { text-transform: none; letter-spacing: .02em; opacity: .8; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 400 1rem/1.4 var(--body); color: var(--charcoal);
  background: var(--white); border: 1px solid transparent; border-radius: 0; padding: 12px 14px; width: 100%;
  display: block; margin-top: 6px;
}
.contact-form input[type="file"] { background: transparent; color: var(--white); padding: 4px 0; border: 0; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--charcoal); outline-offset: 0; }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; cursor: pointer; }
.hp { position: absolute; left: -9999px; }
.contact .form-note { font-size: .95rem; margin: 0; }
.form-note a { color: var(--white); }
.prose h3 { margin-top: 2em; }
.plain-list { padding-left: 1.1em; margin: 0 0 1em; }
.plain-list li { margin-bottom: .3em; }
.thanks { min-height: 70vh; }
.thanks .intro-text { margin-bottom: 2em; }
.thanks .btn-outline:hover { background: var(--white); color: var(--charcoal); }

/* Shop */
.shop { background: var(--white); }
.shop-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 1.25em; }
.shop-head h2 { margin-bottom: 0; }
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.shop-grid a { text-decoration: none; display: block; }
.shop-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--stone); }
.shop-grid span {
  display: block; padding-top: 10px;
  font-family: var(--display); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
}

/* FAQ */
.faq { background: var(--white); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 22px 40px 22px 0; position: relative;
  font-family: var(--display); font-weight: 400; font-size: 1.15rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-weight: 300; font-size: 1.5rem; color: var(--oak);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--grey); max-width: 42em; }
.faq details > p:last-child { padding-bottom: 12px; }

/* Contact */
.contact { background: var(--oak); color: var(--white); padding-block: var(--section); }
.contact h2 { margin-bottom: .5em; }
.contact p { font-size: 1.1rem; max-width: 30em; margin-bottom: 2em; }
.contact .btn-solid:hover { color: var(--white); border-color: var(--white); }
.contact-list { margin: 0; display: grid; gap: 22px; }
.contact-list dt {
  font-family: var(--display); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; opacity: .8;
}
.contact-list dd { margin: 4px 0 0; font-size: 1.2rem; }
.contact-list a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.5); }

/* Footer */
.site-footer { background: var(--charcoal); color: #cfcac2; padding-top: 72px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .logo { margin-bottom: 24px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-head {
  font-family: var(--display); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--white);
  margin-bottom: 6px;
}
.muted { color: #a8a39a; }
.footer-base { border-top: 1px solid #3a3833; margin-top: 56px; padding-block: 22px; font-size: .85rem; color: #8f8a82; }
.footer-base p { margin: 0; }

/* Tablet */
@media (max-width: 960px) {
  .split, .quotes .wrap { grid-template-columns: 1fr; }
  .who-grid { grid-template-columns: 1fr 1fr; }
  .award-grid { grid-template-columns: 1fr 1fr; }
  .press { grid-column: span 2; }
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .project-index { grid-template-columns: 1fr 1fr; }
  .posters { grid-template-columns: repeat(3, 1fr); }
  .story-img { max-width: 520px; }
}

/* Phone */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 20px;
    background: var(--charcoal);
    padding: 24px var(--gutter) 32px;
  }
  .site-nav.is-open { display: flex; }
  .site-header.menu-open { background: var(--charcoal); }
  .project-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .tile-wide { grid-row: auto; }
  .tile-wide img { aspect-ratio: 7 / 5; min-height: 0; }
  .who-grid, .award-grid, .footer-grid { grid-template-columns: 1fr; }
  .press { grid-column: auto; }
  .recognition-line a { flex-direction: column; text-align: center; gap: 10px; }
  .project-index, .field-row { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .install-strip { grid-template-columns: 1fr 1fr; }
  .install-strip img:nth-child(3) { display: none; }
  .posters { grid-template-columns: 1fr 1fr; }
  .project-nav { grid-template-columns: 1fr 1fr; }
  .project-nav .text-link { grid-column: span 2; grid-row: 2; justify-self: center; }
  .lightbox img { inset: 56px 8px; max-width: calc(100% - 16px); }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 0; transform: none; }
}
