:root {
  --color-bg: #f8f6f3;
  --color-surface: #f0ede8;
  --color-border: rgba(28, 24, 20, 0.1);
  --color-border-thin: rgba(28, 24, 20, 0.07);
  --color-text: rgba(28, 24, 20, 0.72);
  --color-text-strong: #1c1814;
  --color-muted: rgba(28, 24, 20, 0.45);
  --color-accent: #1c1814;
  --color-accent-text: #f8f6f3;

  --font-body: 'Instrument Sans', sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;

  --nav-h: 64px;
  --max-w: 140rem;
  --page-pad: 2rem;

  --grid-gap: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 62.5%; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.5rem;
  letter-spacing: 0.06rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  grid-template-columns: 100%;
  min-height: 100vh;
}
@media (min-width: 750px) {
  body { font-size: 1.6rem; }
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.15;
  color: var(--color-text-strong);
}
h1 { font-size: clamp(3rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); }

p { max-width: 65ch; }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  padding: 1rem 2.8rem;
  border: 0.5px solid transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-color: var(--color-accent);
}
.btn--primary:hover {
  background: transparent;
  color: var(--color-text-strong);
  border-color: var(--color-text-strong);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text-strong);
  border-color: var(--color-text-strong);
}
.btn--ghost:hover {
  background: var(--color-accent);
  color: var(--color-accent-text);
}
.btn--outline {
  background: transparent;
  color: var(--color-text-strong);
  border-color: var(--color-text-strong);
}
.btn--outline:hover {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 4px 3rem 6px;
}
@media (min-width: 990px) {
  .site-header {
    padding-top: 8px;
    padding-bottom: 12px;
  }
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  text-align: center;
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-logo__img {
  height: 3.5rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 2.5rem;
  justify-content: flex-end;
  grid-column: 3;
  justify-self: end;
}
.site-nav a {
  font-size: 1.3rem;
  letter-spacing: 0.08rem;
  color: var(--color-text);
  transition: color 0.2s;
  padding: 0.5rem 0;
}
.site-nav a:hover,
.site-nav a.active { color: var(--color-text-strong); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-strong);
  font-size: 2rem;
  cursor: pointer;
}

main { grid-row: 3; }

.site-footer {
  grid-row: 4;
  background: var(--color-accent);
  color: var(--color-accent-text);
  padding: 4rem 2rem;
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.8rem;
  color: var(--color-accent-text);
}
.footer-tagline {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.7);
}
.footer-links {
  display: flex;
  gap: 2rem;
  font-size: 1.3rem;
}
.footer-links a:hover { text-decoration: underline; }
.footer-copy {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.home-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  padding: 4rem var(--page-pad);
  overflow: hidden;
  background: #000 url('/images/hero.jpg') center / cover no-repeat;
}
.home-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 768px) {
  .home-hero__video { display: none; }
}
.home-hero__content {
  position: relative;
  max-width: 80rem;
  width: 100%;
  margin: 0 auto;
  z-index: 1;
}
.home-hero__title {
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.95;
  color: #ffffff;
  letter-spacing: 0.02em;
}
.home-hero__sub {
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin: 1.5rem 0 2.5rem;
  max-width: none;
}
.home-hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.home-hero__actions .btn {
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  border-color: rgba(255, 255, 255, 0.95);
}
.home-hero__actions .btn:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.home-models {
  padding: 6rem var(--page-pad);
  max-width: var(--max-w);
  margin: 0 auto;
}
.home-models__cta { text-align: center; margin-top: 3rem; }

.home-about {
  background: var(--color-surface);
  padding: 6rem var(--page-pad);
}
.home-about__inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.home-about__inner p {
  font-size: 1.6rem;
  line-height: 1.7;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(325px, 1fr));
  gap: var(--grid-gap);
}

.board-card {
  display: block;
  background: var(--color-bg);
  overflow: hidden;
  transition: opacity 0.2s;
}
.board-card:hover { opacity: 0.85; }
.board-card__img-wrap {
  aspect-ratio: 1/1.2;
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.board-card__img-wrap--placeholder {
  background: var(--color-surface);
}
.board-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s ease;
}
.board-card:hover .board-card__img-wrap img { transform: scale(1.03); }
.board-card__info {
  padding: 1rem 0.5rem 1.5rem;
  text-align: center;
}
.board-card__type {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.board-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  color: var(--color-text-strong);
  margin-top: 0.25rem;
}
.board-card__length {
  font-size: 1.2rem;
  color: var(--color-muted);
}

.boards-index {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem var(--page-pad) 6rem;
}
.boards-index__header {
  margin-bottom: 3rem;
  text-align: center;
}
.boards-index__header p { color: var(--color-muted); margin-top: 0.5rem; }

.type-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  justify-content: center;
}
.type-filter {
  font-size: 1.2rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: all 0.2s;
}
.type-filter:hover,
.type-filter.active {
  border-color: var(--color-text-strong);
  color: var(--color-text-strong);
}

.board-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-h));
}

.board-detail__images {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 3rem;
  gap: 1.5rem;
  background: var(--color-surface);
}

.board-detail__hero {
  width: 100%;
  max-width: 50rem;
  cursor: zoom-in;
  height: 750px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
}
.board-detail__hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.board-detail__3d {
  width: 100%;
  max-width: 50rem;
  position: relative;
}
.board-detail__3d-viewer {
  width: 100%;
  height: 750px;
  background: transparent;
  --poster-color: transparent;
}
.board-detail__3d-label {
  display: block;
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.5rem;
}

/* Toggle functionality */
.is-hidden {
  display: none !important;
}

.board-detail__thumbs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.board-detail__thumb {
  width: 6rem;
  height: 6rem;
  border: 0.5px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.25s, border-color 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.board-detail__thumb:hover,
.board-detail__thumb.is-active {
  opacity: 1;
  border-color: var(--color-text-strong);
}
.board-detail__thumb-3d {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text);
}
.board-detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.board-detail__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 5rem;
  max-width: 56rem;
}

.board-detail__type {
  font-family: var(--font-body);
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.board-detail__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.5rem, 5vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-text-strong);
  margin-bottom: 2.5rem;
}

.board-detail__description {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--color-text);
  max-width: 48ch;
  margin-bottom: 3rem;
}

.board-detail__specs {
  border-top: 0.5px solid var(--color-border-thin);
  padding-top: 2rem;
  margin-bottom: 3rem;
}

.board-detail__spec-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 2.5rem;
}
.board-detail__spec-list dt {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.board-detail__spec-list dd {
  font-size: 1.4rem;
  color: var(--color-text-strong);
}

.board-detail__actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.board-detail__back {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.25s;
}
.board-detail__back:hover { color: var(--color-text-strong); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(28, 24, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox__content {
  max-width: 90vw;
  max-height: 85vh;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}
.lightbox__close {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  background: none;
  border: none;
  color: var(--color-bg);
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox__close:hover { opacity: 1; }
.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0.5px solid rgba(248, 246, 243, 0.3);
  color: var(--color-bg);
  font-size: 2.5rem;
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}
.lightbox__prev:hover,
.lightbox__next:hover { opacity: 1; border-color: var(--color-bg); }
.lightbox__prev { left: 2rem; }
.lightbox__next { right: 2rem; }
.lightbox__counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: rgba(248, 246, 243, 0.5);
}

.page-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem var(--page-pad) 6rem;
}
.page-title {
  margin-bottom: 2rem;
}
.page-intro {
  font-size: 1.6rem;
  color: var(--color-text);
  margin-bottom: 3rem;
  max-width: 65ch;
  line-height: 1.7;
}

.enquiry-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 620px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-row--half {
  flex-direction: row;
  gap: 1.5rem;
}
.form-row--half > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
label {
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
}
input, select, textarea {
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.3);
  color: var(--color-text-strong);
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1.4rem;
  width: 100%;
  border-radius: 40px;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-text-strong);
}
select option { background: var(--color-bg); }
textarea { border-radius: 1rem; }

.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}
.merch-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  text-align: center;
}
.merch-card__img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-surface);
}
.merch-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.merch-card__info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.merch-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
}
.merch-card__price {
  font-size: 1.3rem;
  color: var(--color-muted);
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.contact-block a { color: var(--color-text-strong); }
.contact-block a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .site-logo { grid-column: 1; justify-self: start; }
  .site-nav {
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    padding: 2rem 1.5rem;
    gap: 0;
    z-index: 99;
  }
  .site-nav.open a {
    font-size: 1.5rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-toggle {
    display: block;
    grid-column: 2;
  }

  .board-detail {
    grid-template-columns: 1fr;
  }
  .board-detail__images {
    padding: 2rem 1.5rem;
    min-height: 50vh;
  }
  .board-detail__info {
    padding: 3rem 1.5rem;
  }

  .form-row--half { flex-direction: column; }

  .home-hero { min-height: 70vh; }
  .home-hero__title { font-size: clamp(3rem, 12vw, 5rem); }

  .home-models { padding-left: 1.5rem; padding-right: 1.5rem; }
  .home-about { padding-left: 1.5rem; padding-right: 1.5rem; }
}

.page--custom-order main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.airtable-embed {
  flex: 1;
  width: 100%;
  min-height: calc(100vh - var(--nav-h));
  border: 0;
}
