/* ============ Woods & Co ============
   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-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: 28px;
  height: 28px;
  flex: none;
  align-self: center;
}
.wc-stamp--inline path {
  stroke-width: 1.0;
  opacity: 0.95;
}
a.id:hover .wm-serif,
a.id:hover .wm-mono  { color: var(--accent-2); }
a.id:hover .wm-amp   { color: var(--accent-2); }

/* live theme label in footer */
.theme-lbl {
  color: var(--accent);
  opacity: 0.6;
  transition: color 400ms ease, opacity 200ms ease;
}
.theme-lbl:hover { opacity: 1; text-decoration: underline; }

.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 ---------- */
.wc-wordmark {
  display: inline-flex;
  align-items: flex-end;
  line-height: 1;
  white-space: nowrap;
  gap: 1px;           /* tight but intentional gap */
}
/* 1. Woods — upright serif */
.wm-serif {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.012em;
  color: var(--paper);
  transition: color 200ms ease;
  line-height: 1;
}
/* "&CO" group — raised to match SVG proportions */
.wm-amp-group {
  display: inline-flex;
  align-items: flex-end;
  margin-bottom: 10px;
  gap: 0px;
}
/* 2. "&" — serif, accent colour */
.wm-amp {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14px;
  color: var(--accent);
  margin: 0;
  line-height: 1;
  transition: color 200ms ease;
}
/* 3. "Co" — mono, light */
.wm-mono {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--paper);
  line-height: 1;
  transition: color 200ms ease;
}

/* ---------- 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-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: 80px 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: 44px 0 22px;
}
.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: 48px;
  padding: 12px 0 60px;
}
@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: start;
}
.position .body p { margin-bottom: 1.2em; }

/* ---------- 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 .intro { min-height: 0; }
}
.svc-grid > div {
  padding: 28px 24px 28px;
  position: relative;
  align-self: start;
  transition: background 240ms ease;
}
.svc-grid h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 44px;
  line-height: 0.9;
  color: var(--paper);
  margin-bottom: 0;
}
.svc-items { display: flex; flex-direction: column; gap: 0; }
.svc-item { padding: 14px 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: 42ch;
}
.svc-d em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--paper-2);
  font-size: 14px;
  padding: 0 1px;
}

/* ---------- principles carousel ---------- */
.principles {
  padding: 12px 0 32px;
}

/* desktop: 3-column grid, no interaction */
.prin-track-wrap { overflow: visible; }
.prin-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 4px 0 12px;
}
.prin-card {
  border: none;
  border-radius: 6px;
  padding: 24px 24px 28px;
  background: transparent;
}
.prin-n {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.prin-h {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  color: var(--paper);
  margin-bottom: 10px;
}
.prin-h em { font-style: italic; color: var(--accent-2); }
.prin-card p {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--mute);
}
.prin-card p em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--paper-2);
  font-size: 14px;
}

/* swipe hint — desktop hidden */
.prin-hint { display: none; }

/* mobile: swipe carousel */
@media (max-width: 720px) {
  .prin-track-wrap {
    overflow: hidden;
    cursor: grab;
    user-select: none;
  }
  .prin-track-wrap:active { cursor: grabbing; }
  .prin-track {
    display: flex;
    grid-template-columns: unset;
    gap: 14px;
    transition: transform 420ms cubic-bezier(.2,.7,.2,1);
    will-change: transform;
  }
  .prin-card { flex: 0 0 82%; min-width: 0; }
}

/* ---------- about jon ---------- */
.jon-block {
  padding: 12px 0 60px;
}
.jon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 28px;
}
@media (max-width: 880px) { .jon-grid { grid-template-columns: 1fr; gap: 32px; } }
.jtw {
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 600ms cubic-bezier(.2,.7,.2,1), transform 600ms cubic-bezier(.2,.7,.2,1);
}
.jtw.active { opacity: 1; transform: none; }
.jtw-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
}
.jtw-bar i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--mute-2);
  opacity: 0.5;
}
.jtw-screen {
  padding: 22px 24px 26px;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 58px);
  line-height: 1.1;
}
.jtw-t1 { color: var(--paper); white-space: pre-wrap; }
.jtw-t2 { color: var(--accent-2); white-space: pre-wrap; }
.jtw-cur {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  opacity: 0;
}
.jtw.active .jtw-cur { animation: jtwblink 900ms step-end infinite; }
@keyframes jtwblink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.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: 0 0 88px;
}
.cta h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 8vw, 128px);
  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(17px, 1.8vw, 24px);
  line-height: 1;
  color: var(--bg);
  background: var(--accent);
  padding: 14px 24px 17px;
  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); }
/* ---------- 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 .wm-serif { font-size: 20px; }
  .wc-wordmark .wm-amp { font-size: 11px; }
  .wc-wordmark .wm-mono { font-size: 12px; }
  .wc-wordmark .wm-amp-group { margin-bottom: 8px; }
  .bar .meta { gap: 14px; font-size: 10.5px; letter-spacing: 0.04em; }

  /* shrink service headings on mobile */
  .svc-grid h3 { font-size: 36px; }

  /* tighten section spacing */
  main { padding-top: 68px; }
  .prompt { margin: 36px 0 18px; }
  .position, .principles, .jon-block { padding: 12px 0 44px; }
  .cta { padding: 48px 0 72px; }

  /* CTA pill button shouldn't overflow */
  .mail { padding: 12px 20px 14px; 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 { display: none; }
}

/* ---- service / cta marks ---- */
/* Small symbolic glyphs tying each block to the procedural-art vocabulary.
   Thin strokes, round caps, accent color — same family as the stamp. */
.svc-mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: none;
  color: var(--accent);
  opacity: 0.95;
  pointer-events: none;
}
.svc-mark path,
.svc-mark circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* mark sits inline, baseline-aligned with the big italic Lead/Build/Scale heading */
.svc-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.svc-head h3 { margin-bottom: 0; }
@media (max-width: 720px) {
  .svc-mark { width: 30px; height: 30px; }
  .svc-head { gap: 12px; margin-bottom: 16px; }
}

footer {
  background: var(--bg);
}

footer .prompt { margin: 0; padding: 28px clamp(18px, 3vw, 36px); }
footer .prompt.sr { opacity: 1; transform: none; }
footer .prompt .line { transform: scaleX(1); }

/* ---------- scroll reveals ---------- */
.sr {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 680ms cubic-bezier(.2,.7,.2,1),
              transform 680ms cubic-bezier(.2,.7,.2,1);
}
.sr.in { opacity: 1; transform: none; }

/* prompt rule line draws across after the label fades in */
.prompt .line {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 900ms cubic-bezier(.2,.7,.2,1) 700ms;
}
.prompt.in .line { transform: scaleX(1); }
