/* BeanPoint — THE POUR LEDGE */
:root {
  --espresso: #14110F;
  --cocoa: #241C18;
  --foam: #EDE8E1;
  --cascara: #A8485C;
  --steel: #8B837A;
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Karla", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --header-h: 4.5rem;
  --pour-rail-w: 3.5rem;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--foam);
  background: var(--espresso);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--cascara);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover { color: var(--foam); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-top: 0; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p { margin: 0 0 1.25rem; }

ul, ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }

/* Surfaces — paired bg + text ONLY */
.surface-espresso { background: var(--espresso); color: var(--foam); }
.surface-espresso a { color: var(--cascara); }
.surface-espresso a:hover { color: var(--foam); }

.surface-foam { background: var(--foam); color: var(--espresso); }
.surface-foam a { color: var(--cascara); }
.surface-foam a:hover { color: var(--cocoa); }

.surface-cocoa { background: var(--cocoa); color: var(--foam); }
.surface-cocoa a { color: var(--cascara); }

.surface-cascara { background: var(--cascara); color: var(--foam); }
.surface-cascara a { color: var(--foam); text-decoration-color: rgba(237,232,225,0.6); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

.container {
  width: min(72rem, 92vw);
  margin: 0 auto;
}

.container-narrow {
  width: min(48rem, 92vw);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
}

.site-header.is-transparent {
  background: transparent;
  color: var(--foam);
}

.site-header.is-transparent .logo,
.site-header.is-transparent .main-nav a {
  color: var(--foam);
}

.site-header.is-sticky {
  background: var(--foam);
  color: var(--espresso);
  box-shadow: 0 1px 0 rgba(20,17,15,0.08);
}

.site-header.is-sticky .logo,
.site-header.is-sticky .main-nav a {
  color: var(--espresso);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(72rem, 92vw);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
}

.main-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  opacity: 0.85;
}

.main-nav a:hover,
.main-nav a.is-active { opacity: 1; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: inherit;
}

.nav-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--foam);
    color: var(--espresso);
    padding: 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.35s, opacity 0.35s;
    pointer-events: none;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav ul { flex-direction: column; gap: 1rem; }
  .main-nav a { color: var(--espresso); }
}

/* Hero */
.hero-pour-ledge {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--espresso) center/cover no-repeat;
  padding: calc(var(--header-h) + 2rem) 0 4rem;
}

.hero-pour-ledge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20,17,15,0.35) 0%,
    rgba(20,17,15,0.55) 45%,
    rgba(20,17,15,0.88) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(52rem, 92vw);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.hero-eyebrow-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: center;
  width: min(52rem, 92vw);
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--foam);
  border-bottom: 1px solid rgba(237,232,225,0.25);
}

.hero-eyebrow-row::after {
  content: '';
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0;
  height: 1px;
  background: var(--foam);
  transform: scaleX(0);
  transform-origin: left;
}

.js .hero-eyebrow-row.is-wiped::after {
  animation: hairlineWipe 0.8s ease forwards;
}

.trust-strip {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--steel);
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.95;
}

.hero-tagline {
  font-size: 1.2rem;
  line-height: 1.55;
  margin-bottom: 2rem;
  color: rgba(237,232,225,0.92);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.875rem 1.75rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary {
  background: var(--cascara);
  color: var(--foam);
  border-color: var(--cascara);
}

.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn.btn-primary:hover {
  background: transparent;
  color: var(--foam);
  border-color: var(--foam);
}

.btn-secondary {
  background: transparent;
  color: var(--foam);
  border-color: rgba(237,232,225,0.5);
}

.btn-secondary:hover {
  border-color: var(--foam);
  color: var(--foam);
}

.btn-dark,
a.btn.btn-dark,
button.btn.btn-dark {
  background: var(--espresso);
  color: var(--foam);
  border-color: var(--espresso);
}

.btn-dark:hover,
a.btn.btn-dark:hover,
button.btn.btn-dark:hover {
  background: var(--cascara);
  border-color: var(--cascara);
  color: var(--foam);
}

.section-foam a.btn.btn-primary,
.section-foam a.btn.btn-dark {
  color: var(--foam);
}

/* Pour line animation */
.pour-line-wrap {
  padding: 3rem 0;
  overflow: hidden;
}

.pour-line {
  position: relative;
  width: min(48rem, 90vw);
  margin: 0 auto;
  height: 4rem;
}

.pour-line svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pour-line-path {
  fill: none;
  stroke: var(--cascara);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.js .pour-line-path.is-drawn {
  animation: pourDraw 2s ease forwards;
}

.pour-nodes {
  display: flex;
  justify-content: space-between;
  width: min(48rem, 90vw);
  margin: 0.75rem auto 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}

.pour-nodes span { position: relative; }
.pour-nodes span::before {
  content: "·";
  color: var(--cascara);
  margin-right: 0.25rem;
}

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

/* Hairline wipe */
.hairline-wipe {
  position: relative;
  height: 1px;
  background: var(--steel);
  opacity: 0.3;
  transform-origin: left;
  transform: scaleX(0);
}

.js .hairline-wipe.is-wiped {
  animation: hairlineWipe 0.8s ease forwards;
}

@keyframes hairlineWipe {
  to { transform: scaleX(1); }
}

/* Reveal — content visible without JS */
.reveal {
  /* No opacity:0 at rest — content always visible */
}

.js .reveal {
  transition: transform 0.6s ease;
}

.js .reveal:not(.is-visible) {
  transform: translateY(16px);
}

.js .reveal.is-visible {
  transform: translateY(0);
  transition: transform 0.6s ease;
}

/* Inner page layout with pour rail */
.page-shell {
  padding-top: var(--header-h);
  min-height: 100vh;
}

.page-with-rail {
  display: grid;
  grid-template-columns: var(--pour-rail-w) 1fr;
}

.pour-rail {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  border-right: 1px solid rgba(139,131,122,0.25);
  padding: 2rem 0.5rem;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

@media (min-width: 900px) {
  .pour-rail { display: flex; }
}

.pour-rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  color: var(--steel);
  text-transform: uppercase;
}

.pour-rail-tick {
  width: 1px;
  height: 1.5rem;
  background: var(--steel);
  opacity: 0.4;
}

.pour-rail-tick:nth-child(odd) { height: 0.75rem; }

.page-main {
  min-width: 0;
}

.page-hero-inner {
  padding: 4rem 0 3rem;
}

.page-hero-inner .container,
.page-content .container {
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt { background: var(--cocoa); }

.section-foam { background: var(--foam); color: var(--espresso); }
.section-foam .mono-label { color: var(--steel); }
.section-foam h2, .section-foam h3 { color: var(--espresso); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--cocoa);
  padding: 2rem;
  border: 1px solid rgba(139,131,122,0.2);
}

.section-foam .card {
  background: var(--espresso);
  color: var(--foam);
}

.card h3 { margin-top: 0; }

.card-price {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--cascara);
  margin-top: 1rem;
}

.img-frame {
  position: relative;
  overflow: hidden;
}

.img-frame img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.img-caption {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--steel);
  margin-top: 0.5rem;
  text-transform: uppercase;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid rgba(139,131,122,0.25);
  padding: 1.5rem 0;
}

.faq-item h3 {
  font-size: 1.125rem;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

/* Contact form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--steel);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid rgba(139,131,122,0.4);
  background: var(--espresso);
  color: var(--foam);
}

.section-foam .form-group input,
.section-foam .form-group textarea,
.section-foam .form-group select {
  background: #fff;
  color: var(--espresso);
}

.form-group textarea { min-height: 8rem; resize: vertical; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.form-check input { margin-top: 0.25rem; flex-shrink: 0; }

.form-check label {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-status {
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.form-status.success { background: rgba(168,72,92,0.15); border: 1px solid var(--cascara); }
.form-status.error { background: rgba(139,131,122,0.15); border: 1px solid var(--steel); }

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.contact-details li {
  margin-bottom: 0.75rem;
  padding-left: 0;
}

.contact-details strong {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  color: var(--steel);
  margin-bottom: 0.15rem;
}

/* Footer */
.site-footer {
  padding: 4rem 0 2.5rem;
  border-top: 1px solid rgba(168,72,92,0.2);
  background: linear-gradient(180deg, var(--espresso) 0%, #0c0a08 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(139,131,122,0.15);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  max-width: 28rem;
  line-height: 1.65;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li { margin-bottom: 0.5rem; }

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--steel);
}

.footer-nav a:hover { color: var(--cascara); }

.footer-disclaimer {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--steel);
  padding: 1.25rem 0;
  border-top: 1px solid rgba(139,131,122,0.2);
  border-bottom: 1px solid rgba(139,131,122,0.2);
  margin-bottom: 1.5rem;
}

.footer-contact {
  margin-bottom: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.footer-contact .mono-label {
  margin-bottom: 0.75rem;
}

.footer-contact a {
  color: var(--cascara);
  text-decoration: none;
}

.footer-contact a:hover {
  color: var(--foam);
}

.footer-hosting {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--steel);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--steel);
}

.footer-meta a { color: var(--steel); }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--cocoa);
  border-top: 1px solid rgba(139,131,122,0.3);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.is-visible { transform: translateY(0); }

.cookie-inner {
  width: min(72rem, 92vw);
  margin: 0 auto;
}

.cookie-inner p {
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-custom-panel {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(139,131,122,0.25);
}

.cookie-custom-panel.is-open { display: block; }

.cookie-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn-small {
  padding: 0.625rem 1.25rem;
  font-size: 0.6875rem;
}

/* Legal pages */
.legal-content h2 {
  font-size: 1.375rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-content h3 {
  font-size: 1.0625rem;
  margin-top: 1.75rem;
  text-transform: none;
  font-family: var(--font-body);
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
}

.legal-content th,
.legal-content td {
  border: 1px solid rgba(139,131,122,0.3);
  padding: 0.75rem;
  text-align: left;
}

.legal-content th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  background: var(--cocoa);
}

/* 404 */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}

.error-page h1 { margin-bottom: 1rem; }

/* Work moments */
.moment-card {
  position: relative;
  overflow: hidden;
}

.moment-card .img-frame img {
  aspect-ratio: 16/10;
}

.moment-time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--cascara);
  margin-bottom: 0.5rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal:not(.is-visible) { transform: none; }
  .pour-line-path { stroke-dashoffset: 0; }
  .hairline-wipe { transform: scaleX(1); }
}

/* Utility */
.text-steel { color: var(--steel); }
.text-cascara { color: var(--cascara); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
