/* =========================================================
   Cipher Drums — Site Styles
   Modern boutique. Minimalist. Warm.
   ========================================================= */

:root {
  /* Palette — sampled directly from the real drums.
     Honey/amber wood (exterior) + deep peacock blue (interior) + chrome (hardware). */
  --bone:       #f5efe3;
  --bone-soft:  #ece5d4;
  --line:       #ddd3bf;
  --ink:        #14110f;
  --ink-soft:   #3a352f;
  --mute:       #6b635a;
  --bronze:     #8b6a3f;        /* honey wood exterior */
  --bronze-lt:  #c9a76a;        /* light grain */
  --cipher:     #00B8B8;        /* brighter teal accent — text, eyebrows, links */
  --cipher-egg: #6EDCDC;        /* lighter teal — surfaces, marquee dots, hovers */
  --cipher-deep:#008888;        /* darker teal — hover/active state */
  --shadow:     0 30px 80px -40px rgba(20, 17, 15, 0.4);

  /* Type */
  --display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --max:    1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --rad:    2px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
a:hover { border-bottom-color: var(--cipher); color: var(--cipher-deep); }

/* ----------------------------- Typography ----------------------------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 .4em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-weight: 350; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1rem; font-family: var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-weight: 500; }

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

.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cipher);
  font-weight: 600;
}

.lede {
  font-family: var(--display);
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 350;
  max-width: 38ch;
}

/* ----------------------------- Layout ----------------------------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: clamp(64px, 10vw, 140px) 0; }
section + section { border-top: 1px solid var(--line); }

.grid {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 231, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-block;
}
.brand-name {
  font-family: var(--body);
  font-size: 0.95rem;
  letter-spacing: .2em;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
}
.brand-est {
  font-size: 9px;
  letter-spacing: .24em;
  color: var(--mute);
  font-weight: 500;
}

nav.primary {
  display: flex;
  gap: clamp(16px, 2.5vw, 32px);
  align-items: center;
}
nav.primary a {
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 0;
}
nav.primary a:hover { color: var(--ink); }
nav.primary a.active { color: var(--ink); border-bottom: 1px solid var(--cipher); padding-bottom: 2px; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; font-size: 22px; color: var(--ink); }

@media (max-width: 720px) {
  nav.primary { display: none; position: absolute; right: 0; top: 72px; flex-direction: column; gap: 0; background: var(--bone); border-top: 1px solid var(--line); width: 100%; padding: 8px var(--gutter) 16px; }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .menu-toggle { display: inline-flex; }
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--bone);
  border: 1px solid var(--ink);
  border-radius: var(--rad);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: transparent; color: var(--ink); border-bottom: 1px solid var(--ink); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--bone); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ----------------------------- Hero ----------------------------- */
.hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(56px, 8vw, 100px);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  gap: clamp(36px, 5vw, 72px);
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
}
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
}
.hero h1 .accent { color: var(--cipher); font-style: italic; }
.hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 13px;
  color: var(--mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero-meta strong { color: var(--ink); font-weight: 500; }
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Video embed (responsive 16:9) */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-radius: var(--rad);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Hero image frame */
.frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bone-soft);
  overflow: hidden;
  border-radius: var(--rad);
  box-shadow: var(--shadow);
}
.frame img, .frame svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame.square { aspect-ratio: 1 / 1; }
.frame.wide { aspect-ratio: 3 / 2; }

/* ----------------------------- Cards / Tiles ----------------------------- */
.tile {
  display: block;
  border-bottom: 0;
}
.tile .frame { margin-bottom: 16px; transition: transform .4s ease; }
.tile:hover .frame { transform: translateY(-3px); }
.tile h3 { margin-bottom: 4px; }
.tile .meta {
  font-size: 13px;
  color: var(--mute);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ----------------------------- Gallery ----------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.5vw, 24px);
}
@media (max-width: 880px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-grid .frame:nth-child(7n+1) { grid-column: span 2; aspect-ratio: 3 / 2; }
@media (max-width: 880px) { .gallery-grid .frame:nth-child(7n+1) { grid-column: span 1; aspect-ratio: 4 / 5; } }

/* ----------------------------- Builds ----------------------------- */
.build {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(36px, 5vw, 64px) 0;
}
.build + .build { border-top: 1px solid var(--line); }
@media (max-width: 760px) { .build { grid-template-columns: 1fr; } }
.build h3 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
.build .price {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 8px 0 16px;
}
.build .price small { font-size: 13px; color: var(--mute); letter-spacing: .12em; text-transform: uppercase; margin-left: 8px; font-family: var(--body); }
.spec-list {
  margin: 14px 0 22px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.spec-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.spec-list li span:first-child { color: var(--mute); letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }

/* ----------------------------- Contact / Form ----------------------------- */
form.contact {
  display: grid;
  gap: 18px;
  max-width: 560px;
}
.field { display: grid; gap: 6px; }
.field label {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
}
.field input, .field textarea, .field select {
  font: inherit;
  background: transparent;
  border: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--ink);
  border-radius: var(--rad);
  transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ----------------------------- Footer ----------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bone-soft);
  padding: 56px 0 32px;
  font-size: 14px;
  color: var(--mute);
}
.site-footer .wrap { display: grid; gap: 36px; grid-template-columns: 2fr 1fr 1fr; }
.site-footer h4 { color: var(--ink-soft); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-soft); border-bottom: 0; }
.site-footer a:hover { color: var(--cipher); }
.copyright { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.copyright .cipher-mono { letter-spacing: .3em; font-size: 11px; color: var(--cipher); }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ----------------------------- Page header ----------------------------- */
.page-header {
  padding: clamp(72px, 12vw, 140px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.page-header .wrap { max-width: 880px; position: relative; z-index: 1; }
.page-header h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }

/* Background-image treatment on the page-header.
   Add class="page-header with-image" and set background-image inline.
   The bone-colored gradient overlay keeps text legible while letting the image show. */
.page-header.with-image {
  position: relative;
  padding: clamp(96px, 14vw, 180px) 0 clamp(64px, 8vw, 96px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.page-header.with-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(245, 239, 227, 0.35) 0%, rgba(245, 239, 227, 0.7) 60%, rgba(245, 239, 227, 0.95) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Content section with subtle photo background — softer than a page-header hero.
   Add class="section-photo" and set background-image inline.
   Strong overlay so any text in the section stays fully legible. */
.section-photo {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.section-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(245, 239, 227, 0.88) 0%, rgba(245, 239, 227, 0.94) 100%);
  pointer-events: none;
  z-index: 0;
}
.section-photo.tinted::before {
  background: linear-gradient(180deg, rgba(236, 229, 212, 0.9) 0%, rgba(236, 229, 212, 0.96) 100%);
}
.section-photo > .wrap { position: relative; z-index: 1; }

/* Split layout — photo beside text instead of stacked. Cuts vertical scroll dramatically. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split .split-media img,
.split .split-media video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--rad);
  box-shadow: var(--shadow);
  aspect-ratio: 4/5;
  object-fit: cover;
}
.split .prose { max-width: 100%; margin: 0; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 24px; }
  .split.reverse .split-media { order: 0; }
}

/* Split layout — photo + prose side-by-side. Mobile stacks.
   Used to cut vertical height of narrative sections in half. */
.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.section-split.reversed {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.section-split.reversed .split-photo { order: 2; }
.section-split.reversed .split-prose { order: 1; }
.section-split .prose,
.section-split .split-prose {
  max-width: none;
  margin: 0;
}
.split-photo {
  aspect-ratio: 4 / 5;
  background: var(--bone-soft);
  border-radius: var(--rad);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.split-photo img,
.split-photo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.split-photo.wide { aspect-ratio: 3 / 2; }
.split-photo.square { aspect-ratio: 1 / 1; }
@media (max-width: 760px) {
  .section-split,
  .section-split.reversed { grid-template-columns: 1fr; gap: 24px; }
  .section-split.reversed .split-photo { order: 0; }
  .section-split.reversed .split-prose { order: 0; }
  .split-photo { aspect-ratio: 16 / 10; }
}

/* Flekz-inspired line-art texture — subtle labyrinth/maze wash.
   Add the .textured modifier to any element to apply the pattern as background layer. */
.textured {
  background-image: url('../images/pattern-flekz.svg');
  background-repeat: repeat;
  background-size: 240px 240px;
}
.textured-tint {
  background-color: var(--bone-soft);
  background-image: url('../images/pattern-flekz.svg');
  background-repeat: repeat;
  background-size: 240px 240px;
}

/* ----------------------------- Long-form prose ----------------------------- */
/* Shared narrative rhythm for About and Your Build (and any future long-form page).
   Individual pages should NOT redefine these rules — only add page-specific ones (e.g., .story-frame). */
.prose {
  max-width: 680px;
  margin: 0 auto;
}
.prose p {
  font-size: 17px;
  line-height: 1.72;
  margin-bottom: 1.05em;
}
.prose p.beat {
  margin-bottom: 0.35em;
}
.prose .pull {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 1.8em 0;
  max-width: 34ch;
}

/* Centered display statement — used for the emotional-thread quote on About and
   for any future "one big beat" moment. Not intended for narrative body copy. */
.statement {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.45;
  color: var(--ink);
}

/* ----------------------------- Utilities ----------------------------- */
.text-center { text-align: center; }
.mute { color: var(--mute); }
.small { font-size: 14px; }
.divider { height: 1px; background: var(--line); margin: 48px 0; border: 0; }

/* subtle "sparkle" on the brand mark — homage to the clear-coat detail */
@keyframes shimmer {
  0%, 100% { opacity: .25; }
  50% { opacity: .85; }
}
.shimmer { animation: shimmer 5s ease-in-out infinite; }

/* Smooth scroll & reduced motion */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
