/* ============================================================
   Tide & Timber - brochure site
   Palette pulled from the photography: bone, sand, honey ash,
   espresso. Fraunces (display) + Inter (text).
   ============================================================ */

:root {
  --bone:      #F5F0E8;
  --bone-deep: #EDE5D8;
  --sand:      #E2D5C2;
  --sand-deep: #CBB79C;
  --honey:     #B07C40;
  --honey-dk:  #8F6330;
  --espresso:  #2C2620;
  --ink:       #35302A;
  --muted:     #7A6E5F;
  --line:      rgba(44, 38, 32, 0.14);

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--bone);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--sand-deep); color: var(--espresso); }

/* ── Shared type ───────────────────────────────────────── */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--honey-dk);
  margin-bottom: 1.5rem;
}
.eyebrow--center { text-align: center; }
.eyebrow--light { color: rgba(255, 255, 255, 0.85); }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.05; letter-spacing: -0.01em; color: var(--espresso); }

.body { color: var(--muted); font-size: 1.02rem; }
.lede { font-size: 1.18rem; line-height: 1.6; color: var(--ink); margin-bottom: 1.4rem; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.1em 2.2em;
  border: 1px solid var(--espresso);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.btn--dark { background: var(--espresso); color: var(--bone); }
.btn--dark:hover { background: transparent; color: var(--espresso); }
.btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.75); }
.btn--light:hover { background: #fff; color: var(--espresso); border-color: #fff; }
.btn--center { display: block; width: max-content; margin: 3rem auto 0; }
.btn--full { width: 100%; text-align: center; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.header-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.4s var(--ease);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #fff;
  transition: color 0.4s var(--ease);
}
.wordmark .amp { font-style: italic; font-weight: 300; opacity: 0.75; margin: 0 0.05em; }

.nav { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.75rem); }
.nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease);
}
.nav a:hover::after { width: 100%; }
.nav .nav-cta {
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  padding: 0.55em 1.4em;
}
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { background: #fff; color: var(--espresso); }

/* scrolled state - solid bone header, dark text */
.site-header.scrolled {
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.scrolled .header-inner { padding-top: 1rem; padding-bottom: 1rem; }
.site-header.scrolled .wordmark { color: var(--espresso); }
.site-header.scrolled .nav a { color: var(--ink); }
.site-header.scrolled .nav .nav-cta { border-color: var(--espresso); }
.site-header.scrolled .nav .nav-cta:hover { background: var(--espresso); color: var(--bone); }
.site-header.scrolled .nav-toggle span { background: var(--espresso); }

/* mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 1.5px;
  background: #fff;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), background-color 0.4s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  background: rgba(245, 240, 232, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s var(--ease);
}
.nav-mobile a {
  padding: 1.15rem var(--gutter);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile.open { max-height: 320px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-image { position: absolute; inset: 0; z-index: -1; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-image::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(30,24,18,0.6) 0%, rgba(30,24,18,0.15) 38%, rgba(30,24,18,0) 62%),
    linear-gradient(to right, rgba(30,24,18,0.4) 0%, rgba(30,24,18,0) 55%);
}
.hero-copy {
  max-width: var(--wrap);
  width: 100%;
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(3.5rem, 9vh, 7rem);
}
.hero-title {
  font-size: clamp(2.75rem, 8vw, 6rem);
  color: #fff;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 30px rgba(0,0,0,0.25);
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  max-width: 34ch;
  color: rgba(255,255,255,0.92);
  margin-bottom: 2.5rem;
}
.scroll-cue {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%;
  width: 3px; height: 8px;
  background: rgba(255,255,255,0.85);
  border-radius: 3px;
  transform: translateX(-50%);
  animation: scrollpulse 1.8s var(--ease) infinite;
}
@keyframes scrollpulse {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* ============================================================
   Intro / manifesto
   ============================================================ */
.intro { padding: clamp(5rem, 14vh, 10rem) 0; text-align: center; }
.intro .wrap { max-width: 860px; }
.statement {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  line-height: 1.32;
  color: var(--espresso);
}

/* ============================================================
   Feature blocks (Collection + Craft)
   ============================================================ */
.collection { padding-bottom: clamp(4rem, 10vh, 8rem); }
.craft { background: var(--bone-deep); padding: clamp(4rem, 12vh, 9rem) 0; }

.feature {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.feature--reverse .feature-media { order: 2; }

.feature-media { position: relative; }
.feature-media img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 30px 60px -30px rgba(44, 38, 32, 0.4);
}
.feature-media::before {
  content: "";
  position: absolute;
  inset: clamp(0.75rem, 2vw, 1.5rem) 0 0 clamp(0.75rem, 2vw, 1.5rem);
  border: 1px solid var(--sand-deep);
  border-radius: 2px;
  z-index: -1;
}

.feature-title { font-size: clamp(2.25rem, 5vw, 3.6rem); margin-bottom: 1.75rem; }

.craft-list { margin-top: 1.75rem; }
.craft-list li {
  position: relative;
  padding-left: 1.75rem;
  padding-block: 0.7rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.craft-list li:last-child { border-bottom: none; }
.craft-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.25rem;
  width: 8px; height: 8px;
  border: 1px solid var(--honey);
  border-radius: 50%;
}

/* price */
.price-row { display: flex; align-items: baseline; gap: 1rem; margin: 2rem 0; flex-wrap: wrap; }
.price { font-family: var(--serif); font-size: 2.6rem; font-weight: 400; color: var(--espresso); }
.price-note { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   Specifications
   ============================================================ */
.specs { padding: clamp(5rem, 13vh, 9rem) 0; text-align: center; }
.specs-title { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 3.5rem; }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.spec {
  background: var(--bone);
  padding: 2.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.spec dt {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  order: 2;
}
.spec dd { font-family: var(--serif); font-size: 2.6rem; font-weight: 300; color: var(--espresso); order: 1; }
.spec dd span { font-size: 1rem; color: var(--honey-dk); margin-left: 0.15em; font-family: var(--sans); }
.spec dd.spec--word { font-size: 1.8rem; }

/* ============================================================
   Trade
   ============================================================ */
.trade { background: var(--espresso); color: var(--bone); padding: clamp(5rem, 14vh, 10rem) 0; text-align: center; }
.trade .eyebrow { color: var(--sand-deep); }
.trade-title { color: var(--bone); font-size: clamp(2.25rem, 5.5vw, 4rem); margin-bottom: 1.75rem; }
.trade-lede { max-width: 52ch; margin: 0 auto; font-size: 1.14rem; color: rgba(245, 240, 232, 0.8); line-height: 1.6; }

.trade-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: clamp(3rem, 7vh, 5rem);
  text-align: left;
}
.trade-point { padding-top: 1.75rem; border-top: 1px solid rgba(245, 240, 232, 0.2); }
.tp-num { font-family: var(--serif); font-size: 0.95rem; color: var(--sand-deep); letter-spacing: 0.1em; }
.trade-point h3 { color: var(--bone); font-size: 1.5rem; margin: 0.75rem 0 0.75rem; }
.trade-point p { color: rgba(245, 240, 232, 0.72); font-size: 0.98rem; }

/* ============================================================
   Enquire
   ============================================================ */
.enquire { padding: clamp(5rem, 13vh, 9rem) 0; }
.enquire-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.enquire-title { font-size: clamp(2.25rem, 5vw, 3.4rem); margin-bottom: 1.5rem; }
.contact-list { margin-top: 2.5rem; }
.contact-list li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.02rem;
  color: var(--ink);
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.contact-list a { border-bottom: 1px solid var(--honey); transition: color 0.3s var(--ease); }
.contact-list a:hover { color: var(--honey-dk); }

/* form */
.enquire-form { background: var(--bone-deep); padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: 3px; }
.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--honey);
  background: #fff;
}
.field textarea { resize: vertical; }
.form-note { margin-top: 1rem; font-size: 0.9rem; color: var(--honey-dk); min-height: 1.2em; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--bone-deep); border-top: 1px solid var(--line); padding: clamp(3rem, 7vh, 5rem) 0; }
.footer-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  text-align: center;
}
.wordmark--footer { color: var(--espresso); font-size: 1.6rem; display: inline-block; margin-bottom: 1rem; }
.footer-tag { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.25rem; }
.footer-legal { color: var(--muted); font-size: 0.8rem; }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: flex; }

  .feature { grid-template-columns: 1fr; gap: 2.5rem; }
  .feature--reverse .feature-media { order: 0; }
  .feature-media { max-width: 460px; margin-inline: auto; }
  .feature-media::before { inset: 0.75rem 0 0 0.75rem; }

  .enquire-inner { grid-template-columns: 1fr; }
  .trade-points { grid-template-columns: 1fr; gap: 0; }
  .trade-point { border-top: 1px solid rgba(245,240,232,0.2); padding-block: 1.75rem; }
}

@media (max-width: 560px) {
  :root { --gutter: 1.4rem; }

  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .spec { padding: 1.75rem 0.75rem; }
  .spec dd { font-size: 2.1rem; }

  .hero { align-items: flex-end; }
  .hero-title { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .btn { padding: 1em 1.8em; }
  .btn--center { width: 100%; text-align: center; }

  .price { font-size: 2.2rem; }
}

@media (max-width: 380px) {
  .spec-grid { grid-template-columns: 1fr; }
  .wordmark { font-size: 1.3rem; }
}

/* Larger screens - let the hero image breathe */
@media (min-width: 1600px) {
  .hero-image img { object-position: center 45%; }
}

/* Motion / accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ============================================================
   Gallery
   ============================================================ */
.gallery { padding: clamp(5rem, 13vh, 9rem) 0; text-align: center; }
.gallery-title { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 1.25rem; }
.gallery-sub { max-width: 48ch; margin: 0 auto; color: var(--muted); font-size: 1.05rem; }
.gallery-grid {
  max-width: var(--wrap);
  margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 1.4vw, 1rem);
}
.gallery-item {
  position: relative;
  padding: 0;
  border: none;
  background: var(--bone-deep);
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 2 / 3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(44, 38, 32, 0);
  transition: background-color 0.4s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover::after { background: rgba(44, 38, 32, 0.08); }
.gallery-item:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(28, 23, 18, 0.94);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-figure { margin: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.lb-img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 2px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.lb-counter { color: rgba(245, 240, 232, 0.7); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; }
.lb-btn {
  position: absolute;
  background: rgba(245, 240, 232, 0.08);
  border: 1px solid rgba(245, 240, 232, 0.25);
  color: var(--bone);
  width: 52px; height: 52px;
  border-radius: 999px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; line-height: 1;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.lb-btn:hover { background: rgba(245, 240, 232, 0.18); border-color: rgba(245, 240, 232, 0.5); }
.lb-close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lb-prev { left: clamp(0.75rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(0.75rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
  .lb-btn { width: 44px; height: 44px; font-size: 1.3rem; }
  .lb-img { max-height: 74vh; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: none; }
  .lightbox { transition: none; }
}
