/* ---------- tokens ---------- */
:root {
  --bg: #101C14;
  --text: #F2EFE0;
  --text-soft: #A9B8A2;
  --forest: #1F5C3F;
  --forest-deep: #14392A;
  --leaf: #7FB78C;
  --copper: #D98A4C;
  --line: rgba(242, 239, 224, 0.14);

  --font-display: 'Besley', serif;
  --font-body: 'Karla', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max: 1120px;
}

* { box-sizing: border-box; }


body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 1.6rem;
  letter-spacing: -0.01em;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5.5rem 1.6rem;
  scroll-margin-top: 5.5rem;
}

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.6rem 1.4rem;
  padding: 1.1rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}
.topbar.scrolled {
  background: rgba(16, 28, 20, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.topbar-brand {
  letter-spacing: 0.04em;
  color: var(--text);
  font-weight: 500;
}
.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.1rem;
}
.topbar-navlink {
  color: var(--text);
  text-decoration: none;
  opacity: 0.8;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.topbar-navlink:hover {
  color: var(--leaf);
  opacity: 1;
}
.topbar-icon {
  display: inline-flex;
  color: var(--text);
  opacity: 0.8;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.topbar-icon svg {
  width: 19px;
  height: 19px;
}
.topbar-icon:hover {
  color: var(--leaf);
  opacity: 1;
}
.topbar-cta {
  margin-left: auto;
  text-decoration: none;
  color: var(--text);
  background: var(--forest);
  padding: 0.5rem 0.9rem;
  border-radius: 100px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}
.topbar-cta:hover { background: var(--forest-deep); transform: translateY(-1px); }
.topbar-cta-short { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 100px;
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--forest);
  color: var(--text);
}
.btn-primary:hover { background: var(--forest-deep); transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--text);
  color: var(--text);
}
.btn-ghost:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 230vh;
  height: 230dvh;
}

.hero-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hero-titlecard {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 1.2rem;
  background:
    radial-gradient(ellipse at 50% 42%, #2f5d3a 0%, #17321e 38%, var(--bg) 78%, var(--bg) 100%);
  will-change: transform, opacity;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.6rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  transform: translateY(50px);
  will-change: transform, opacity;
}

.hero-curve {
  position: absolute;
  inset: -5% -5% auto -5%;
  height: 105%;
  width: 110%;
  z-index: 0;
  pointer-events: none;
}
.hero-curve path {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 2;
  opacity: 0.5;
  stroke-dasharray: 1900;
  stroke-dashoffset: 1900;
  animation: draw 2.2s 0.3s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.hero-inner { position: relative; z-index: 1; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bb-logo {
  display: flex;
  flex-direction: column;
  gap: 0.5vw;
}
.bb-word {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8.5vw, 7.5rem);
  line-height: 1;
  color: var(--text);
}
.bb-word-2 { margin-left: clamp(1.2rem, 5vw, 3.4rem); }
.bb-word-3 { margin-left: clamp(0.4rem, 1.6vw, 1.2rem); }

.bb-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.06em;
  background: #2c5236;
  border: 0.035em solid var(--text);
  font-weight: 600;
  flex: none;
}
.bb-rest {
  font-weight: 400;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 38ch;
  margin: 0 0 2.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-photo-wrap {
  position: relative;
  z-index: 1;
  justify-self: center;
  transform: rotate(2.5deg);
}

.hero-photo {
  width: min(280px, 60vw);
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.55);
  border: 6px solid var(--text);
  outline: 1px solid var(--line);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.hero-photo-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 78px;
  height: 26px;
  background: rgba(184, 91, 39, 0.28);
  border: 1px solid rgba(184, 91, 39, 0.35);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- about / certificate of analysis ---------- */

.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem 3.2rem;
  padding-bottom: 2.2rem;
  margin-bottom: 2rem;
}
.credential {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.credential-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--text);
  line-height: 1;
}
.credential-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.about-bio {
  max-width: 58ch;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.about-bio-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
}
.about-bio-item {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin: 0;
}
.about-bio-key {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
}

/* ---------- results ---------- */

.results-chart {
  margin: 0 0 3rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.results-chart-svg {
  width: 100%;
  min-width: 900px;
  height: auto;
  overflow: visible;
  display: block;
}

.chart-grid line {
  stroke: var(--line);
  stroke-width: 1;
}
.chart-axis {
  stroke: var(--text-soft);
  stroke-width: 1;
  opacity: 0.5;
}
.chart-ticks text {
  font-family: var(--font-mono);
  font-size: 15px;
  fill: var(--text-soft);
  text-anchor: end;
  dominant-baseline: middle;
}
.chart-axis-caption {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  fill: var(--text-soft);
  text-transform: uppercase;
}

.results-curve {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.4s cubic-bezier(.4,0,.2,1);
}
.is-visible .results-curve { stroke-dashoffset: 0; }

.chart-fine-label {
  font-family: var(--font-mono);
  font-size: 15px;
  fill: var(--text);
}

.results-log {
  display: flex;
  flex-direction: column;
  max-width: 68ch;
}

.log-entry {
  padding: 1.7rem 0;
}

.log-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 1rem;
}
.log-name span {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.log-entry blockquote {
  margin: 0 0 1.1rem;
}
.log-entry blockquote:last-child { margin-bottom: 0; }
.log-entry blockquote p {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-soft);
  font-style: italic;
}
.log-entry blockquote p strong {
  color: var(--text);
  font-weight: 700;
}
.quote-mark {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.8rem;
  color: var(--leaf);
  line-height: 0;
  position: relative;
  top: 0.35rem;
  margin-right: 0.1rem;
}
.quote-mark-end {
  margin-right: 0;
  margin-left: 0.15rem;
}
.log-entry blockquote cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.78rem;
  color: var(--copper);
}

.log-meta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--leaf);
  margin: 0;
}
.log-meta:not(:last-child) {
  margin-bottom: 1.1rem;
}
.log-grade {
  color: var(--copper);
  font-weight: 700;
}

/* ---------- fit list ---------- */

.fit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  max-width: 62ch;
}
.fit-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  font-size: 1.08rem;
  color: var(--text);
  padding-bottom: 1rem;
}

.tick {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  position: relative;
}
.tick::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--leaf);
  opacity: 0.55;
}
.tick::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 10px;
  height: 5px;
  border-left: 2.5px solid var(--leaf);
  border-bottom: 2.5px solid var(--leaf);
  transform: rotate(-45deg);
}

/* ---------- contact / footer ---------- */
.contact {
  background:
    radial-gradient(ellipse at 50% 30%, #2f5d3a 0%, #17321e 40%, var(--bg) 80%, var(--bg) 100%);
  color: var(--text);
  max-width: none;
  padding: 6rem 1.6rem 4rem;
  position: relative;
  text-align: center;
  overflow: hidden;
}
.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.contact .section-title { color: var(--text); }
.contact-sub {
  color: rgba(242, 239, 224, 0.72);
  margin: 0 0 2rem;
  font-size: 1.05rem;
}
.contact .btn-primary {
  background: var(--text);
  color: var(--bg);
}
.contact .btn-primary:hover {
  background: var(--copper);
  color: var(--text);
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.social-links a {
  color: rgba(242, 239, 224, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
}
.social-links a:hover { color: var(--text); }
.social-divider {
  width: 1px;
  height: 14px;
  background: rgba(242, 239, 224, 0.3);
}

.signoff {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(242, 239, 224, 0.75);
}

.location-tag {
  position: absolute;
  top: 2.2rem;
  right: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid rgba(242, 239, 224, 0.4);
}
.location-tag-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1.5px solid rgba(242, 239, 224, 0.7);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(242, 239, 224, 0.85);
}
.location-tag-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: rgba(242, 239, 224, 0.6);
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .location-tag { top: 1.4rem; right: 1.4rem; padding: 0.4rem 0.6rem; }
}

/* narrow screens keep the same pinned scroll intro as desktop, just with
   a single-column layout once the content reveals */
@media (max-width: 767px) {
  .topbar-cta-full { display: none; }
  .topbar-cta-short { display: inline; }
  .topbar-cta { padding: 0.4rem 0.7rem; font-size: 0.7rem; }
  .topbar-nav { gap: 0.6rem 0.8rem; }
  .topbar-navlink { font-size: 0.72rem; }
  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 1.1rem;
    text-align: left;
    padding-top: 7rem;
    padding-bottom: 1.5rem;
  }
  .hero-sub { margin-bottom: 0.3rem; }
  .hero-photo-wrap { justify-self: start; margin-top: 0.4rem; }
  .hero-photo { width: min(170px, 40vw); }
  .bb-word-2 { margin-left: clamp(0.8rem, 8vw, 2rem); }
  .bb-word-3 { margin-left: clamp(0.3rem, 3vw, 0.8rem); }
}

@media (max-width: 640px) {
  /* the fixed topbar wraps to two lines on narrow phones (~140-150px tall);
     without enough top padding, section headings scroll to a stop right
     behind it and read as cut off */
  .section { padding: 11rem 1.3rem 4rem; }
  .credentials { gap: 1.8rem 2.4rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero-pin { position: static; height: auto; overflow: visible; }
  .hero-titlecard { position: static; padding: 5rem 1.2rem 1rem; opacity: 1 !important; transform: none !important; }
  .hero-content { position: static; opacity: 1 !important; transform: none !important; padding: 2rem 1.6rem 4rem; }
  .hero-curve path { animation: none; stroke-dashoffset: 0; }
  .results-curve { transition: none; stroke-dashoffset: 0; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .btn, .topbar-cta { transition: none; }
}

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}
