/* BP7 — bp7.ai
   Palette: crema, oat, latte, caramel, coffee, espresso.
   Type: Libre Caslon (display + text) with Jost for interface text. */

@font-face { font-family: "Libre Caslon Display"; src: url("fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("fonts/jost-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --crema: #F2E8D5;
  --oat: #E8DAC0;
  --latte: #CDB08A;
  --caramel: #A8763E;
  --caramel-deep: #855628;
  --brass: #E9C58E;
  --coffee: #5E4433;
  --espresso: #2A1D15;

  --display: "Libre Caslon Display", "Libre Caslon Text", "Big Caslon", Georgia, serif;
  --text: "Libre Caslon Text", "Big Caslon", Georgia, serif;
  --ui: "Jost", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;

  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --band: clamp(4.5rem, 10vw, 9rem);
  --header-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--crema);
  color: var(--espresso);
  font-family: var(--text);
  font-size: clamp(1.02rem, 0.96rem + 0.28vw, 1.16rem);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
::selection { background: var(--espresso); color: var(--crema); }

:focus-visible { outline: 2px solid var(--caramel-deep); outline-offset: 4px; border-radius: 2px; }

.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 20; background: var(--espresso); color: var(--crema); padding: 0.6rem 1rem; font-family: var(--ui); text-decoration: none; }
.skip:focus { top: 0.75rem; }

/* Layering: section backgrounds sit at the bottom, the particle canvas is
   fixed above them, and all text (.wrap) is above the canvas. Sections must
   stay unpositioned for this to hold. */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: block; }

.wrap { position: relative; z-index: 2; width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }

/* A scene pairs a block of text with a slot for a particle figure. */
.scene { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.scene-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.scene-flip > .figure { order: -1; }
.figure { height: min(56vh, 30rem); min-height: 15rem; }
.figure-hero { height: min(68vh, 38rem); }
.figure-fallback { display: none; height: 100%; margin-inline: auto; fill: var(--caramel); }
html.no-gl .figure-fallback { display: block; }
html.no-gl .figure:not(.figure-hero) { display: none; }
html.no-gl .scene { grid-template-columns: 1fr; }
html.no-gl .hero .scene { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  height: var(--header-h);
  display: flex; align-items: center; gap: 2rem;
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
  background: rgba(242, 232, 213, 0.88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom-color: rgba(205, 176, 138, 0.6);
}

.brand { display: inline-flex; align-items: flex-end; text-decoration: none; color: var(--espresso); line-height: 1; }
.brand-letters { font-family: var(--display); font-size: 2.05rem; letter-spacing: -0.02em; }
.brand-bolt { height: 1.72rem; width: auto; margin-left: 0.05rem; margin-bottom: -0.06rem; fill: var(--caramel); }

.site-nav { margin-left: auto; display: flex; gap: clamp(1rem, 2.2vw, 2.1rem); font-family: var(--ui); font-size: 0.98rem; font-weight: 450; }
.site-nav a { text-decoration: none; color: var(--coffee); padding-block: 0.4rem; border-bottom: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease; }
.site-nav a:hover { color: var(--espresso); border-bottom-color: var(--caramel); }

.lang { display: inline-flex; border: 1px solid var(--latte); border-radius: 2px; overflow: hidden; }
.lang button {
  font-family: var(--ui); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em;
  background: transparent; color: var(--coffee); border: 0; padding: 0.38rem 0.62rem; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--espresso); color: var(--crema); }
.lang button:not([aria-pressed="true"]):hover { background: var(--oat); color: var(--espresso); }
.lang button:focus-visible { outline-offset: -3px; outline-color: var(--caramel); }

/* Hero */
.hero { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding-block: calc(var(--header-h) + 2rem) 4rem; }
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.5rem, 1.2rem + 5.4vw, 5.5rem);
  line-height: 1.03; letter-spacing: -0.012em;
  text-wrap: balance;
  max-width: 13em;
}
.lead { margin-top: 1.8rem; max-width: 33rem; color: var(--coffee); font-size: 1.12em; line-height: 1.6; }
.actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.8rem; }

.button {
  display: inline-block; font-family: var(--ui); font-weight: 500; font-size: 1.02rem;
  background: var(--espresso); color: var(--crema); text-decoration: none;
  padding: 0.85rem 1.5rem; border-radius: 2px;
  transition: background-color 0.2s ease;
}
.button:hover { background: var(--caramel-deep); }
/* WhatsApp links: the mark sits before the label and takes the text colour. */
.wa-icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.button-wa { display: inline-flex; align-items: center; gap: 0.65rem; }

.text-link {
  font-family: var(--ui); font-weight: 500; font-size: 1.02rem; color: var(--espresso);
  text-decoration: underline; text-decoration-color: var(--caramel); text-decoration-thickness: 1.5px; text-underline-offset: 0.35em;
  transition: text-decoration-color 0.2s ease;
}
.text-link:hover { text-decoration-color: var(--espresso); }

/* Bands */
.band { padding-block: var(--band); }
.band-oat { background: var(--oat); }

.band h2, .contact h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.95rem, 1.2rem + 2.5vw, 3.15rem);
  line-height: 1.1; letter-spacing: -0.008em; text-wrap: balance;
}
.band h3 { font-family: var(--ui); font-weight: 500; font-size: 1.16rem; line-height: 1.3; }

.scene-copy > p { color: var(--coffee); max-width: 36rem; }
.scene-copy > h2 + p, .scene-copy > p + p { margin-top: 1.4rem; }
.scene-copy > .scene-link { margin-top: 2rem; }

/* Practice: an introduction, then one scene per field */
.band-intro { max-width: 46rem; }
.band-intro p { margin-top: 1.4rem; color: var(--coffee); max-width: 36rem; }
.chapter { min-height: 76vh; }
.chapter:first-of-type { margin-top: clamp(1rem, 4vw, 3rem); }
.band .chapter h3 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.3rem); line-height: 1.08; letter-spacing: -0.008em; }
.chapter p { margin-top: 1.1rem; max-width: 30rem; font-size: 1.08em; }
#practice { padding-bottom: calc(var(--band) * 0.4); }

/* Built to order */
.builds { margin-top: 2.6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem clamp(1.5rem, 3vw, 3rem); }
.builds p { margin-top: 0.5rem; color: var(--coffee); }

/* Approach */
.steps { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; border-top: 1px solid var(--latte); }
.steps li { counter-increment: step; padding: 1.6rem 1.75rem 0 0; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-size: clamp(2.6rem, 2rem + 2vw, 3.8rem); line-height: 1; color: var(--caramel-deep); margin-bottom: 1.1rem; }
.steps p { margin-top: 0.5rem; color: var(--coffee); }

/* Work */
.work-grid { margin-top: clamp(2.2rem, 4vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; gap: 2.2rem clamp(1.25rem, 2.5vw, 2.2rem); }
.work-item { display: flex; flex-direction: column; }
.work-item-large { grid-row: span 2; }
.work-image {
  flex: 1; min-height: 12rem; aspect-ratio: 16 / 10;
  background-color: var(--oat);
  background-image: repeating-linear-gradient(135deg, rgba(205, 176, 138, 0.55) 0 1px, transparent 1px 14px);
  border: 1px solid var(--latte);
}
.work-item-large .work-image { aspect-ratio: auto; }
.work-item figcaption { margin-top: 0.9rem; display: flex; flex-direction: column; }
.work-item strong { font-family: var(--ui); font-weight: 500; font-size: 1.08rem; }
.work-item span { color: var(--coffee); font-size: 0.95em; }

/* About */

/* Contact + footer */
.contact { background: var(--espresso); color: var(--crema); padding-block: var(--band) 2.5rem; }
.contact .scene-copy > .contact-lead { margin-top: 1.3rem; max-width: 32rem; color: var(--latte); }
.contact-mail { margin-top: clamp(2rem, 5vw, 3.5rem); }
.contact-mail a {
  font-family: var(--display); font-size: clamp(2.2rem, 1rem + 4.6vw, 4.6rem); line-height: 1.05; letter-spacing: -0.015em;
  color: var(--brass); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; text-decoration-color: rgba(233, 197, 142, 0.4);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
  overflow-wrap: anywhere;
}
.contact-mail a:hover { color: var(--crema); text-decoration-color: var(--crema); }
.contact-phone { margin-top: 1.5rem; }
.contact-phone a {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--ui); font-weight: 450; font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem); letter-spacing: 0.01em;
  color: var(--brass); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; text-decoration-color: rgba(233, 197, 142, 0.4);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
.contact-phone a:hover { color: var(--crema); text-decoration-color: var(--crema); }
.contact :focus-visible { outline-color: var(--brass); }
.colophon {
  margin-top: clamp(4rem, 9vw, 7rem); padding-top: 1.6rem; border-top: 1px solid rgba(205, 176, 138, 0.3);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem 3rem;
  font-family: var(--ui); font-size: 0.92rem; line-height: 1.6; color: var(--latte);
}
.colophon a { text-decoration-color: rgba(205, 176, 138, 0.5); text-underline-offset: 0.25em; }
.colophon a:hover { color: var(--crema); }

/* Smaller screens */
@media (max-width: 900px) {
  .site-nav a:not(.nav-contact) { display: none; }
  .hero { align-items: end; padding-top: calc(var(--header-h) + 1rem); padding-bottom: 3.2rem; }
  .scene, .scene-flip, html.no-gl .hero .scene { grid-template-columns: 1fr; gap: 1.5rem; }
  .scene > .figure { order: -1; height: 36vh; min-height: 12rem; }
  .chapter { min-height: 0; padding-block: 2.5rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.2rem; }
  .work-grid { grid-template-columns: 1fr; }
  .work-item-large { grid-row: auto; }
  .work-item-large .work-image { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .site-header { gap: 1rem; }
  .builds, .steps { grid-template-columns: 1fr; }
  .steps li { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
