/* ============ Woods & Co · After Hours v2 ============
   Theme tokens are set on :root from the Tweaks panel.
   --bg / --paper / --mute / --accent retune everything. */

:root {
  /* base palette — overridden by Tweaks */
  --bg:       #f6f1e6;
  --bg-2:     #ece6d6;
  --paper:    #14110a;
  --paper-2:  #3a352a;
  --mute:     #7a7060;
  --mute-2:   #a89e88;
  --accent:   #c45a2c;
  --accent-2: #e07d4a;
  --rule:     rgba(20,17,10,0.18);
  --rule-soft:rgba(20,17,10,0.07);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --read:  "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:  "Geist", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --thread-h: clamp(220px, 26vw, 340px);
  --thread-stroke: 2;
  --thread-dur: 4.5s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 320ms ease, color 320ms ease;
}
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }

/* ---------- top bar ---------- */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px clamp(18px, 3vw, 36px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.bar .id {
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}
.wc-stamp--inline {
  width: 26px;
  height: 26px;
  flex: none;
}
.wc-stamp--inline path {
  stroke-width: 1.0;
  opacity: 0.95;
}
a.id:hover .wc-wordmark { color: var(--accent-2); }
.bar .meta { display: flex; gap: 22px; align-items: center; }
.bar .meta a { transition: color 200ms ease; }
.bar .meta a:hover { color: var(--paper); }

/* ---------- brand wordmark ---------- */
/* Serif lockup — sole brand expression. */
.wc-wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.012em;
  color: var(--paper);
  white-space: nowrap;
  transition: color 200ms ease;
}
.wc-wordmark em {
  font-style: italic;
  padding: 0 1px;
  color: var(--paper);
}

/* ---------- brand stamp ---------- */
/* Dense chaotic tangle — separate from the wordmark.
   Used as a decorative seal; the path is generated at runtime. */
.wc-stamp {
  display: block;
  color: var(--accent);
  overflow: visible;
  pointer-events: none;
  transition: color 200ms ease;
}
.wc-stamp path {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

/* hero corner seal */
.hero { position: relative; }
.hero-seal {
  position: absolute;
  top: 8px;
  right: clamp(12px, 3vw, 32px);
  width: clamp(72px, 9vw, 120px);
  height: clamp(72px, 9vw, 120px);
  z-index: 1;
  pointer-events: none;
}
.hero-seal .label {
  position: absolute;
  top: -2px; right: 100%;
  margin-right: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}
.hero-seal .label em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--paper-2);
  display: block;
}
@media (max-width: 700px) {
  .hero-seal { display: none; }
}

/* ---------- main ---------- */
main {
  position: relative;
  z-index: 2;
  padding: 96px clamp(20px, 4vw, 56px) 0;
  max-width: 1320px;
  margin: 0 auto;
}

/* ---------- hero ---------- */
.hero {
  padding: 8px 0 24px;
}
.lockup { display: block; margin-bottom: 24px; }
.lockup h1 { margin: 0; }
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7.6vw, 112px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  color: var(--paper);
  max-width: 22ch;
  text-wrap: pretty;
}
h1 .ital {
  font-style: italic;
  color: var(--paper-2);
}
h1 .glow {
  text-shadow: 0 0 32px color-mix(in srgb, var(--accent) 28%, transparent);
}
/* word reveal — opacity fade, text stays editable */
h1 .word {
  display: inline;
  opacity: 0;
  animation: wordIn 1000ms cubic-bezier(.2,.7,.2,1) forwards;
}
h1 .word#hw1 { animation-delay: 120ms; }
h1 .word#hw2 { animation-delay: 580ms; }
@keyframes wordIn { to { opacity: 1; } }

/* thread under the headline */
.lockup .thread-svg {
  display: block;
  width: 100%;
  height: var(--thread-h);
  overflow: visible;
  margin-top: 24px;
}
.lockup .thread-svg path {
  fill: none;
  stroke: var(--accent);
  stroke-width: var(--thread-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 36%, transparent));
}
.lockup .thread-svg path.draw {
  animation: thread-draw var(--thread-dur) cubic-bezier(.55,.08,.45,.92) forwards;
}
@keyframes thread-draw { to { stroke-dashoffset: 0; } }

/* ---------- section heads (prompts) ---------- */
.prompt {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 56px 0 28px;
}
.prompt .gt { color: var(--accent); font-size: 14px; }
.prompt .line { flex: 1; height: 1px; background: var(--rule); }
.prompt .n { color: var(--mute-2); }

/* ---------- positioning (what we do) ---------- */
.position {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 16px 0 80px;
}
@media (max-width: 880px) { .position { grid-template-columns: 1fr; gap: 32px; } }
.position .quote {
  font-family: var(--serif);
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.014em;
  color: var(--paper);
  max-width: 520px;
}
.position .quote em { font-style: italic; color: var(--accent-2); }
.position .quote .red { color: var(--accent); }
.position .body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--paper-2);
  max-width: 480px;
  align-self: end;
}
.position .body p { margin-bottom: 1.2em; }
.position .body em.ital {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--paper);
  padding: 0 2px;
}

/* ---------- services ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
@media (max-width: 880px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-grid > div {
  padding: 36px 28px 32px;
  position: relative;
  align-self: start;
  transition: background 240ms ease;
}
.svc-grid .lbl {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.svc-grid h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 64px;
  line-height: 0.9;
  color: var(--paper);
  margin-bottom: 22px;
}
.svc-grid .intro {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper-2);
  margin-bottom: 24px;
  max-width: 34ch;
}
.svc-grid .intro em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--paper);
  padding: 0 2px;
}
.svc-items { display: flex; flex-direction: column; gap: 0; }
.svc-item {
  padding: 16px 0;
}
.svc-item:last-child { padding-bottom: 0; }
.svc-h {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  color: var(--paper);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.svc-d {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--mute);
  max-width: 34ch;
}
.svc-d em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--paper-2);
  font-size: 14px;
  padding: 0 1px;
}

/* ---------- principles ---------- */
.principles {
  padding: 16px 0 80px;
}
.principles .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
@media (max-width: 720px) { .principles .grid { grid-template-columns: 1fr; } }
.principles .item {
  padding: 28px 28px 28px 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: baseline;
}
.principles .grid > .item:nth-child(odd)  { padding-right: 28px; }
.principles .grid > .item:nth-child(even) { padding-left: 28px; }
@media (max-width: 720px) {
  .principles .grid > .item:nth-child(odd)  { border-right: none; padding-right: 0; }
  .principles .grid > .item:nth-child(even) { padding-left: 0; }
}
.principles .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mute);
  padding-top: 6px;
}
.principles .item .h {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.1;
  color: var(--paper);
  margin-bottom: 6px;
}
.principles .item .h em {
  font-style: italic;
  color: var(--accent-2);
}
.principles .item p {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 38ch;
}
.principles .item p em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--paper-2);
  font-size: 15px;
}

/* ---------- about jon ---------- */
.jon-block {
  padding: 16px 0 80px;
}
.jon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-bottom: 40px;
}
@media (max-width: 880px) { .jon-grid { grid-template-columns: 1fr; gap: 32px; } }
.jon-headline h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.016em;
  color: var(--paper);
  max-width: 520px;
}
.jon-headline h2 em { font-style: italic; color: var(--accent-2); }
.jon-body p {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--paper-2);
  margin-bottom: 1.2em;
  max-width: 480px;
}
.jon-body em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--paper);
  padding: 0 2px;
}
.jon-creds {
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--mute);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: baseline;
}
.jon-creds .creds-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
}
.jon-creds em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--paper);
  white-space: nowrap;
}
.jon-creds .sep { color: var(--mute-2); margin: 0 14px; }

/* perpetual marquee for the credits */
.creds-marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.creds-track {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
  animation: creds-scroll 38s linear infinite;
  will-change: transform;
}
.creds-marquee:hover .creds-track { animation-play-state: paused; }
@keyframes creds-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- cta ---------- */
.cta {
  padding: 96px 0 120px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 820px) { .cta { grid-template-columns: 1fr; gap: 32px; } }
.cta .kick {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.cta h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.88;
  letter-spacing: -0.026em;
  color: var(--paper);
  margin-bottom: 36px;
}
.cta h2 em { font-style: italic; color: var(--accent-2); }
.mail {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1;
  color: var(--bg);
  background: var(--accent);
  padding: 18px 28px 22px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  transition: background 240ms ease, color 240ms ease, transform 320ms cubic-bezier(.2,.7,.2,1), gap 280ms ease;
}
.mail .arrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9em;
  line-height: 1;
  transition: transform 280ms cubic-bezier(.2,.7,.2,1);
}
.mail:hover {
  background: transparent;
  color: var(--accent);
  gap: 22px;
  transform: translateX(4px);
}
.mail:hover .arrow { transform: translateX(4px); }
.cta .aside {
  font-family: var(--mono);
  color: var(--mute);
  line-height: 1.65;
  font-size: 13.5px;
  border-left: 1px solid var(--rule);
  padding-left: 24px;
}
.cta .aside em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--paper-2);
  padding: 0 2px;
}
.cta .aside p { margin-bottom: 0.7em; }

/* ---------- mobile-specific tweaks ---------- */
@media (max-width: 720px) {
  /* tighten header */
  .bar {
    padding: 14px 18px;
  }
  .bar .id { gap: 5px; }
  .wc-stamp--inline { width: 22px; height: 22px; }
  .wc-wordmark { font-size: 19px; }
  .bar .meta { gap: 14px; font-size: 10.5px; letter-spacing: 0.04em; }

  /* shrink the big italic Lead/Build/Scale headings on mobile */
  .svc-grid h3 { font-size: 48px; margin-bottom: 16px; }
  .svc-grid > div { padding: 28px 20px 24px; }

  /* tighten section spacing */
  main { padding-top: 80px; }
  .prompt { margin: 40px 0 22px; }
  .position, .principles, .jon-block { padding: 16px 0 56px; }
  .cta { padding: 64px 0 96px; gap: 28px; }

  /* CTA pill button shouldn't overflow */
  .mail { padding: 16px 22px 18px; gap: 10px; }
  .mail:hover { gap: 14px; }

  /* About Jon — the giant headline shouldn't crowd the body copy */
  .jon-grid { gap: 24px; }

  /* tighten thread height on mobile so it doesn't dominate */
  .lockup .thread-svg {
    height: clamp(140px, 38vw, 220px);
    margin-top: 18px;
  }

  /* tweaks panel narrower so it doesn't cover hero on phones */
  .twk-panel { width: calc(100vw - 32px); max-width: 280px; }
}

@media (max-width: 420px) {
  .bar .meta { gap: 10px; }
  .bar .meta a:first-child,
  .bar .meta a:nth-child(2) { display: none; }
}

footer a:hover { color: var(--paper); }
