/* ════════════════════════════════════════════════════════
   Patterns Partners — DARK variant
   Modern, edgier visual language while keeping editorial restraint
   ════════════════════════════════════════════════════════ */

:root {
  --ink:          #0A0A0B;
  --ink-2:        #111114;
  --paper:        #15151A;
  --ivory:        #F3EFE6;        /* text on dark */
  --ivory-2:      #D7D1C2;
  --ivory-soft:   rgba(243,239,230,0.62);
  --ivory-faint:  rgba(243,239,230,0.18);
  --rule:         rgba(243,239,230,0.16);
  --rule-soft:    rgba(243,239,230,0.10);
  --accent:       oklch(0.78 0.13 70);   /* warmer bronze for dark */
  --accent-soft:  oklch(0.72 0.10 65);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;

  --max: 1320px;
  --pad: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--ink); }

.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.10em; text-transform: uppercase; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 0 0 0.4em 0;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--accent); }

.lede {
  font-family: var(--serif);
  font-size: clamp(20px, 1.7vw, 25px);
  line-height: 1.35;
  font-weight: 400;
}

/* ═════════════════════════════════════════════════════════
   BACKGROUND ATMOSPHERE — grid + grain + cursor glow
   ═════════════════════════════════════════════════════════ */
.bg-atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(243,239,230,0.035) 1px, transparent 1px);
  background-size: clamp(80px, 8vw, 120px) 100%;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 85%, transparent);
}
.bg-grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}
.bg-glow {
  position: absolute;
  width: 900px; height: 900px;
  left: var(--mx, 50%); top: var(--my, 30%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, oklch(0.78 0.13 70 / 0.10) 0%, transparent 60%);
  pointer-events: none;
  transition: opacity .8s;
  will-change: left, top;
}

main, .nav, .foot { position: relative; z-index: 1; }

/* ═════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
   ═════════════════════════════════════════════════════════ */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  z-index: 200;
  transition: width 50ms linear;
  box-shadow: 0 0 12px var(--accent);
}

/* ═════════════════════════════════════════════════════════
   NAV
   ═════════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 90;
  padding: 16px var(--pad);
  background: transparent;
  transition: background .35s ease, border-color .35s ease, padding .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--rule);
  padding: 10px var(--pad);
}
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.nav__brand { display: inline-flex; align-items: center; gap: 14px; }
.nav__monogram {
  width: 30px; height: auto; flex-shrink: 0; display: block;
  filter: invert(1) brightness(1.05);   /* logo is dark on light → invert for dark bg */
}
.nav__wordmark {
  display: inline-flex; flex-direction: column;
  font-family: var(--serif);
  font-size: 13px; line-height: 1.05;
  letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 500; padding-top: 2px;
}
.nav__wordmark-line { display: block; }
.nav__wordmark-line + .nav__wordmark-line { padding-left: 0.5em; }

.nav__links {
  display: flex; gap: 32px; justify-content: center;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.nav__links a {
  position: relative;
  padding: 6px 2px;
  color: var(--ivory-soft);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  transition: color .25s;
}
.nav__num {
  color: var(--ivory-faint);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--accent);
  transition: right .4s cubic-bezier(.2,.7,.2,1);
}
.nav__links a:hover { color: var(--ivory); }
.nav__links a:hover::after { right: 0; }

.nav__cta {
  justify-self: end;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--ivory-faint);
  border-radius: 999px;
  background: transparent;
  color: var(--ivory);
  display: inline-flex; align-items: center; gap: 10px;
  transition: background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.nav__cta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
.nav__cta span:last-child { transition: transform .3s; }
.nav__cta:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.nav__cta:hover .nav__cta-dot { background: var(--ink); box-shadow: none; }
.nav__cta:hover span:last-child { transform: translateX(4px); }

@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__inner { grid-template-columns: 1fr auto; }
}

/* ═════════════════════════════════════════════════════════
   BUTTONS
   ═════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn--solid { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.btn--solid:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--ivory); border-color: var(--ivory-faint); }
.btn--ghost:hover { border-color: var(--ivory); color: var(--ivory); }
.btn--lg { padding: 15px 26px; font-size: 14.5px; }

/* ═════════════════════════════════════════════════════════
   HERO
   ═════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 104px var(--pad) 0;
  max-width: var(--max);
  margin: 0 auto;
}
.hero__rule {
  position: absolute; left: var(--pad); right: var(--pad); top: 80px;
  height: 1px; background: var(--rule);
}
.hero__meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.70rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow--right { color: var(--ivory-faint); }
.meta-sep { opacity: 0.45; margin: 0 4px; }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: oklch(0.72 0.15 145);
  box-shadow: 0 0 10px oklch(0.72 0.15 145 / 0.7);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin: 0 0 28px;
  text-wrap: balance;
  max-width: 22em;
}
.hero__title em { font-style: italic; color: var(--accent); }

.reveal {
  display: inline-block;
  position: relative;
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  animation: revealUp 1.2s var(--d, 0s) cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

.hero__sub {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 28px;
}
.hero__lede p {
  font-family: var(--sans);
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  margin: 0;
  max-width: 36em;
  color: var(--ivory-2);
}
.hero__actions { display: flex; gap: 12px; justify-self: end; }

.hero__figure {
  margin: 0 0 24px;
  position: relative;
}
.hero__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 6;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: brightness(0.78) contrast(1.18) saturate(0.65) hue-rotate(-12deg);
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.hero__figure:hover .hero__photo img { transform: scale(1.04); }
.hero__photo-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,11,0.55) 0%, transparent 40%),
    linear-gradient(135deg, rgba(10,10,11,0.18), transparent 50%);
  pointer-events: none;
}
.hero__figure figcaption {
  margin-top: 8px;
  color: var(--ivory-faint);
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 820px) {
  .hero__sub { grid-template-columns: 1fr; gap: 20px; }
  .hero__actions { justify-self: start; }
}

/* ═════════════════════════════════════════════════════════
   TICKER
   ═════════════════════════════════════════════════════════ */
.ticker {
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.ticker__track {
  display: flex;
  gap: 24px;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(16px, 1.15vw, 19px);
  font-style: italic;
  color: var(--ivory);
  animation: marquee 60s linear infinite;
  width: max-content;
}
.ticker__sep {
  font-style: normal;
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 0.7em;
  align-self: center;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ═════════════════════════════════════════════════════════
   SECTION HEAD
   ═════════════════════════════════════════════════════════ */
.section__head {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 0 8px;
  margin-bottom: 36px;
}
.section__number { color: var(--ivory-faint); }
.section__kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory);
}
.section__rule {
  flex: 1; height: 1px;
  background: linear-gradient(to right, var(--rule), transparent);
  margin-left: 12px;
}

/* ═════════════════════════════════════════════════════════
   FIRM
   ═════════════════════════════════════════════════════════ */
.firm {
  padding: 48px var(--pad) 72px;
  max-width: var(--max);
  margin: 0 auto;
}
.firm__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}
.firm__statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.8vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
.firm__statement em { font-style: italic; color: var(--accent); }
.firm__body { padding-top: 8px; }
.firm__body p,
.firm__body .lede {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--ivory-2);
  max-width: 38em;
}

.firm__numbers {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.num {
  background: var(--ink);
  padding: 28px 24px 26px;
  position: relative;
  transition: background .4s;
}
.num:hover { background: var(--paper); }
.num__tag {
  color: var(--ivory-faint);
  margin-bottom: 14px;
  font-size: 0.66rem;
}
.num__v {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  color: var(--ivory);
}
.num__plus {
  color: var(--accent);
  font-size: 0.7em;
  margin-left: 0.04em;
}
.num__l {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ivory-soft);
  max-width: 22em;
}

@media (max-width: 820px) {
  .firm__grid { grid-template-columns: 1fr; gap: 32px; }
  .firm__numbers { grid-template-columns: repeat(2, 1fr); }
}

/* ═════════════════════════════════════════════════════════
   APPROACH
   ═════════════════════════════════════════════════════════ */
.approach {
  padding: 64px var(--pad) 72px;
  max-width: var(--max);
  margin: 0 auto;
}
.approach__intro {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 40px;
}
.approach__intro p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ivory-2);
  margin: 0;
  max-width: 36em;
}
.habits {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.habit {
  background: var(--ink);
  padding: 32px 28px 36px;
  position: relative;
  transition: background .35s;
}
.habit::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at top left, oklch(0.78 0.13 70 / 0.06), transparent 60%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.habit:hover { background: var(--paper); }
.habit:hover::before { opacity: 1; }
.habit__num {
  color: var(--ivory-faint);
  margin-bottom: 20px;
}
.habit h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--ivory);
}
.habit p { margin: 0; color: var(--ivory-2); max-width: 30em; line-height: 1.55; }

@media (max-width: 820px) {
  .approach__intro { grid-template-columns: 1fr; gap: 16px; }
  .habits { grid-template-columns: 1fr; }
}

/* ═════════════════════════════════════════════════════════
   PRACTICE
   ═════════════════════════════════════════════════════════ */
.practice {
  padding: 64px var(--pad) 72px;
  max-width: var(--max);
  margin: 0 auto;
}
.practice__title { margin: 0 0 40px; }

.desks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.desk {
  background: var(--ink);
  padding: 32px 28px 36px;
  transition: background .4s;
  position: relative;
}
.desk:hover { background: var(--paper); }
.desk header {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.desk__tag {
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
  font-size: 0.66rem;
}
.desk h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1;
  margin: 0;
  color: var(--ivory);
}
.desk__lede {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.4;
  color: var(--ivory);
  margin: 0 0 18px;
}
.desk__list { list-style: none; padding: 0; margin: 0; }
.desk__list li {
  padding: 12px 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 14px;
  color: var(--ivory-2);
  line-height: 1.45;
  position: relative;
  padding-left: 14px;
}
.desk__list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--ivory-faint);
}
.desk__list li:first-child { border-top: none; padding-top: 4px; }

@media (max-width: 820px) {
  .desks { grid-template-columns: 1fr; }
}

/* ═════════════════════════════════════════════════════════
   CONTACT
   ═════════════════════════════════════════════════════════ */
.contact {
  background: linear-gradient(to bottom, var(--ink), var(--paper));
  padding: 80px var(--pad);
  border-top: 1px solid var(--rule);
}
.contact__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact .display { margin-top: 14px; }
.contact .lede { color: var(--ivory-2); max-width: 24em; }

.contact__addr {
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px 24px;
}
.contact__addr dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  padding-top: 4px;
}
.contact__addr dd { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ivory); }
.contact__addr a:hover { color: var(--accent); }

.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}
.field input,
.field select,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 20px;
  padding: 10px 0 12px;
  outline: none;
  transition: border-color .25s;
  border-radius: 0;
}
.field textarea {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
  min-height: 110px;
}
.field select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ivory-soft) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--ivory-soft) 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.field select option { background: var(--ink); color: var(--ivory); }
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--accent); }
.field input::placeholder,
.field textarea::placeholder { color: var(--ivory-faint); font-style: italic; }
.field--invalid input,
.field--invalid select,
.field--invalid textarea { border-bottom-color: oklch(0.65 0.18 30); }

.field__actions { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 12px; flex-wrap: wrap; }
.field__legal { font-size: 12px; color: var(--ivory-faint); margin: 0; max-width: 28em; }
.field__success p { font-size: 15px; color: var(--ivory); border-top: 1px solid var(--rule); padding-top: 16px; }

@media (max-width: 820px) {
  .contact__inner { grid-template-columns: 1fr; gap: 60px; }
  .contact__form { grid-template-columns: 1fr; }
}

.hidden-honeypot {
  position: absolute; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* ═════════════════════════════════════════════════════════
   FOOTER
   ═════════════════════════════════════════════════════════ */
.foot {
  padding: 56px var(--pad) 32px;
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--rule);
}
.foot__top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 60px;
  margin-bottom: 40px;
}
.foot__brand .foot__logo {
  width: 200px; height: auto; display: block; margin-bottom: 18px;
  filter: invert(1) brightness(1.05);
}
.foot__tag { color: var(--ivory-faint); }

.foot__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.foot__h { color: var(--ivory-faint); margin-bottom: 16px; }
.foot__h a { color: inherit; }
.foot__h a:hover { color: var(--ivory); }
.foot__cols a { display: block; padding: 5px 0; color: var(--ivory-2); font-size: 14px; transition: color .25s; }
.foot__cols a:hover { color: var(--ivory); }
.foot__rule { height: 1px; background: var(--rule); margin: 24px 0 20px; }
.foot__bot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  font-size: 13px; color: var(--ivory-faint);
}

@media (max-width: 820px) {
  .foot__top { grid-template-columns: 1fr; gap: 32px; }
  .foot__cols { grid-template-columns: repeat(2, 1fr); }
}

/* ═════════════════════════════════════════════════════════
   SCROLL REVEAL UTILITY
   ═════════════════════════════════════════════════════════ */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal-on-scroll.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-on-scroll,
  .reveal { opacity: 1 !important; transform: none !important; }
  .bg-glow { display: none; }
  .status-dot, .nav__cta-dot { animation: none; }
}
