/* ============================================================
   BLUECARP LLC — warm earth editorial composition
   ============================================================ */

:root {
  --bg: #f5efe4;
  --bg-soft: #ece3d3;
  --ink: #2b1e14;
  --ink-soft: #5a4a3b;
  --accent: #c25a37;
  --secondary: #6a7a4a;
  --line: rgba(43, 30, 20, 0.14);
  --card: rgba(255, 252, 245, 0.6);
  --shadow: 0 20px 50px -30px rgba(43, 30, 20, 0.4);
  --maxw: 1180px;
}

[data-theme="dark"] {
  --bg: #1d1712;
  --bg-soft: #241d16;
  --ink: #f2e9db;
  --ink-soft: #b8a996;
  --accent: #d97a54;
  --secondary: #93a86f;
  --line: rgba(242, 233, 219, 0.14);
  --card: rgba(36, 29, 22, 0.6);
  --shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Fraunces", "Cormorant Garamond", serif; font-weight: 500; line-height: 1.12; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- Animated noise background ---------- */
.noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
}
[data-theme="dark"] .noise { mix-blend-mode: screen; opacity: 0.06; }

main, header, footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--accent); }
.nav { display: flex; gap: 1.75rem; }
.nav a { color: var(--ink-soft); font-size: 0.95rem; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.05rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s ease;
}
.theme-toggle:hover { background: var(--bg-soft); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 5vw, 3rem) clamp(3rem, 7vw, 5rem);
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 300;
  max-width: 12ch;
  animation: weigh linear both;
  animation-timeline: scroll(root);
  animation-range: 0 30vh;
}
@keyframes weigh {
  from { font-variation-settings: "wght" 300; }
  to { font-variation-settings: "wght" 900; }
}
.hero-lede {
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 1.15rem;
  margin-top: 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-soft); }

.hero-mark {
  position: absolute;
  right: clamp(1rem, 6vw, 4rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 0.5rem;
  opacity: 0.9;
}
.mark-bar {
  width: 6px;
  border-radius: 3px;
  background: var(--accent);
  height: 4rem;
}
.mark-bar:nth-child(1) { height: 3rem; }
.mark-bar:nth-child(2) { height: 5.5rem; background: var(--secondary); }
.mark-bar:nth-child(3) { height: 4rem; }

/* ---------- Section scaffolding ---------- */
section {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.section-head { margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 400; }

/* ---------- Practice: broken bento ---------- */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
.practice-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}
.practice-card h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.practice-card p { color: var(--ink-soft); font-size: 0.98rem; }
.card-a { grid-column: 1 / 4; }
.card-b { grid-column: 4 / 7; }
.card-c { grid-column: 2 / 5; }
.card-d { grid-column: 5 / 7; }

/* ---------- Works: drag band ---------- */
.works { max-width: none; padding-left: 0; padding-right: 0; }
.works-head { padding: 0 clamp(1.25rem, 5vw, 3rem); max-width: var(--maxw); margin: 0 auto 2.5rem; }
.works-hint { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.5rem; }
.band {
  overflow: hidden;
  cursor: grab;
  padding: 0.5rem clamp(1.25rem, 5vw, 3rem) 1.5rem;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}
.band.dragging { cursor: grabbing; }
.band-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.band-track::-webkit-scrollbar { display: none; }
.work-card {
  flex: 0 0 min(340px, 82vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}
.work-tag { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--secondary); font-weight: 600; margin-bottom: 0.75rem; }
.work-card h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.work-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Approach ---------- */
.approach-body { max-width: 62ch; }
.approach-body p { color: var(--ink-soft); margin-bottom: 1.25rem; }
.approach-quote {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0 0;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-info p { color: var(--ink-soft); margin-bottom: 1.5rem; }
.contact-line strong { color: var(--ink); font-family: "Fraunces", serif; font-size: 1.05rem; }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-form label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.8rem 1rem;
  transition: border-color 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { align-self: flex-start; border: none; cursor: pointer; }
.form-status { font-size: 0.9rem; color: var(--secondary); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem);
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}
.footer-brand { font-family: "Fraunces", serif; font-weight: 600; }
.footer-note { color: var(--ink-soft); font-size: 0.85rem; max-width: 40ch; }
.attribution { font-size: 0.75rem; opacity: 0.6; }
.attribution a { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { gap: 1rem; }
  .nav a { font-size: 0.85rem; }
  .hero-mark { display: none; }
  .practice-grid { grid-template-columns: 1fr; }
  .card-a, .card-b, .card-c, .card-d { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .hero-title { font-size: 2.4rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-title { font-variation-settings: "wght" 500; }
  .noise rect { animation: none; }
}
