:root {
  --parchment: #f6f3ea;
  --parchment-deep: #ece3d2;
  --paper: #fffdf7;
  --sage: #7d8c77;
  --sage-deep: #5c6b57;
  --sage-wash: rgba(125, 140, 119, 0.14);
  --bark: #4a3728;
  --bark-soft: #6c5643;
  --ink: #2f3a33;
  --ink-soft: #4c574f;
  --muted: #857a6b;
  --line: rgba(47, 58, 51, 0.14);
  --radius: 16px;
  --max: 1080px;
  --header-h: 66px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: 1.06rem;
  line-height: 1.68;
  color: var(--ink);
  background: var(--parchment);
}

/* --- Logo-inspired background: the Abstrahere mark as a watermark --- */
.page-wash {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 44% at 50% 112%, rgba(74, 55, 40, 0.14), transparent 60%),
    radial-gradient(ellipse 78% 46% at 50% -8%, rgba(125, 140, 119, 0.18), transparent 62%),
    var(--parchment);
}

.page-wash img {
  position: absolute;
  left: 50%;
  top: 45%;
  width: min(82vw, 900px);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.17;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 74%, transparent 98%);
  mask-image: radial-gradient(circle at 50% 50%, #000 74%, transparent 98%);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding: 0.55rem 1.6rem;
  background: rgba(47, 58, 51, 0.96);
  backdrop-filter: blur(10px);
}

.lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: none;
  color: var(--parchment);
  text-decoration: none;
  font-family: Outfit, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.brand-name {
  white-space: nowrap;
}

.brand-tagline {
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: rgba(246, 243, 234, 0.62);
}

.brand-def {
  margin: 0;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(246, 243, 234, 0.26);
  max-width: 48ch;
  font-size: 0.7rem;
  line-height: 1.5;
  color: rgba(246, 243, 234, 0.6);
}

.brand-def .term {
  font-style: italic;
  color: rgba(246, 243, 234, 0.82);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.2rem;
}

.nav a {
  color: rgba(246, 243, 234, 0.78);
  text-decoration: none;
  font-family: Outfit, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.nav a:hover,
.nav a.is-active {
  color: var(--parchment);
}

/* --- Layout containers --- */
main {
  display: block;
}

.stub {
  min-height: 58vh;
}

.wrap {
  width: min(var(--max), calc(100% - 2.6rem));
  margin-inline: auto;
}

/* --- Hero --- */
.hero {
  padding: 3.4rem 0 2.2rem;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: Outfit, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.hero h1 {
  margin: 0 0 1.1rem;
  max-width: 20ch;
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.15rem);
  line-height: 1.12;
  color: var(--ink);
}

.hero p {
  margin: 0;
  max-width: 56ch;
  font-size: 1.16rem;
  color: var(--ink-soft);
}

/* --- About page: portrait beside the intro text --- */
.hero-split {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.hero-split .hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-split .hero-copy p {
  max-width: none;
}

.hero-portrait {
  flex: none;
  width: 172px;
  height: 172px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

@media (max-width: 720px) {
  .hero-split {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
  }
  .hero-portrait {
    align-self: center;
  }
}

/* --- About panel --- */
.panel {
  margin: 1.6rem 0 0;
  padding: 2rem 2rem 2.1rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.intro {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.intro .seal {
  width: 172px;
  height: 172px;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.lead {
  margin: 0;
  font-size: 1.12rem;
}

.lead strong {
  font-weight: 600;
}

.panel h2,
.section h2 {
  margin: 2rem 0 0.9rem;
  font-family: Outfit, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.panel p + p {
  margin: 1.05rem 0 0;
}

.panel p {
  margin: 0;
}

.panel a {
  color: var(--sage-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- "Levels of Abstraction" narrative --- */
.panel .pull {
  margin: 1.5rem 0 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 3px solid var(--sage);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.16rem;
  line-height: 1.5;
  color: var(--ink);
}

.panel p.cue {
  margin: 1.5rem 0 0.55rem;
  font-weight: 600;
  color: var(--ink);
}

.panel .objections,
.panel .rebuttal {
  margin: 0.15rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.panel .objections {
  list-style: none;
  padding-left: 1.15rem;
  border-left: 3px solid var(--line);
  font-style: italic;
  color: var(--ink-soft);
}

.panel .rebuttal {
  padding-left: 1.25rem;
}

.panel .rebuttal li::marker {
  color: var(--sage-deep);
}

.panel .plain-list {
  margin: 0.9rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.55rem;
  color: var(--ink-soft);
}

.panel .plain-list li::marker {
  color: var(--sage-deep);
}

.panel .plain-list strong {
  color: var(--ink);
}

.panel :is(.pull, ul) + p {
  margin-top: 1.25rem;
}

.panel .aside-note {
  display: block;
  margin-bottom: 0.1rem;
  font-family: "Caveat", "Segoe Script", cursive;
  font-size: 1.72rem;
  line-height: 1.28;
  color: var(--bark-soft);
}

.construction {
  display: inline-block;
  margin: 0.5rem 0 0;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sage-wash);
  font-family: Outfit, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

/* --- Expertise / Services pages --- */
.hero-wide p {
  max-width: none;
}

.hero-wide a {
  color: var(--sage-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-wide .see-more {
  margin-top: 0.7rem;
  text-align: right;
}

.xp-list {
  display: grid;
}

.xp {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 1.6rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.xp:first-child {
  padding-top: 0.4rem;
  border-top: 0;
}

.xp:last-child {
  padding-bottom: 0.4rem;
}

.xp:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 13rem);
}

.xp:nth-child(even) > :first-child {
  order: 2;
}

.xp:nth-child(even) > .xp-body {
  order: 1;
}

.panel .xp h2 {
  margin: 0;
  font-family: Outfit, sans-serif;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-transform: none;
  color: var(--ink);
}

.xp-body p {
  margin: 0;
}

.xp-body p + p {
  margin-top: 0.9rem;
}

.xp-body ul {
  margin: 0.9rem 0 0;
  padding-left: 1.15rem;
  border-left: 3px solid var(--line);
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.xp-body ul + p {
  margin-top: 0.9rem;
}

.services-list .xp,
.services-list .xp:nth-child(even) {
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.services-list .xp:nth-child(even) > :first-child,
.services-list .xp:nth-child(even) > .xp-body {
  order: 0;
}

.services-list .xp h2 {
  text-align: center;
}

.xp-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.xp-diagram {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}

.xp-diagram img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .xp,
  .xp:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .xp:nth-child(even) > :first-child,
  .xp:nth-child(even) > .xp-body {
    order: 0;
  }
}

/* --- Core Principles page --- */
.tensions {
  display: grid;
}

.tension {
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
}

.tension:first-child {
  padding-top: 0.4rem;
  border-top: 0;
}

.tension:last-child {
  padding-bottom: 0.4rem;
}

/* tug-of-war visual */
.tug {
  margin: 0.4rem 0 0;
}

.panel .tug-names {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.2rem;
  padding: 0 6%;
  font-family: Outfit, sans-serif;
  font-size: 1.14rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
}

.tug-names .tug-name:first-child {
  color: var(--sage-deep);
}

.tug-names .tug-name:last-child {
  color: var(--bark);
}

.tug-names .tug-amp {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.24rem;
  color: var(--muted);
}

.tug-scene {
  position: relative;
  width: 100%;
}

.tug-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.tug-marker {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tug-line {
  padding: 0.08rem 0.55rem;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
}

.tug-tri {
  width: 100%;
  height: 13px;
  background: var(--sage-deep);
  -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.tug-poles {
  position: absolute;
  left: 19%;
  right: 19%;
  top: 57%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.4rem;
}

.tug-pole {
  text-align: center;
}

.tug-pole h3 {
  margin: 0 0 0.25rem;
  font-family: Outfit, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.tug-pole--b h3 {
  color: var(--bark);
}

.tug-pole p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.tension-note {
  margin: 1.2rem 0 0;
  color: var(--ink-soft);
}

.principles-close {
  margin: 2.2rem 0 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 3px solid var(--sage);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.16rem;
  line-height: 1.5;
  color: var(--ink);
}

.principles-close span {
  display: block;
  margin-top: 0.4rem;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  color: var(--ink-soft);
}

@media (max-width: 620px) {
  .tug-marker {
    position: static;
    transform: none;
    margin: 0 0 0.5rem;
  }
  .tug-tri {
    display: none;
  }
  .tug-line {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    font-size: 1rem;
  }
  .tug-svg {
    margin-bottom: -9%;
  }
  .tug-poles {
    position: static;
    left: auto;
    right: auto;
    top: auto;
  }
  .panel .tug-names {
    font-size: 1rem;
    padding: 0 1%;
  }
  .tug-pole p {
    font-size: 0.9rem;
  }
}

/* --- The Tree page: interactive emblem --- */
.tree-page .page-wash img {
  display: none;
}

.tree-stage {
  display: grid;
  grid-template-columns: min(46vw, 500px) minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 2.5rem 3rem;
  padding: 2rem 0 1rem;
}

.tree-figure {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  animation: tree-rise 0.7s ease both;
}

.tree-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #fffdf7, #f4f0e5 80%);
  box-shadow: 0 30px 62px rgba(47, 58, 51, 0.16),
    0 0 0 1px rgba(47, 58, 51, 0.05);
}

.tree-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tree-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tree-hot {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0.42rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--parchment) 84%, transparent);
  backdrop-filter: blur(3px);
  font-family: Outfit, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}

.tree-hot:hover,
.tree-hot.is-active {
  background: var(--sage-deep);
  color: var(--parchment);
  border-color: transparent;
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 10px 24px rgba(47, 58, 51, 0.18);
}

.tree-hot:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 2px;
}

.tree-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 620px;
  justify-self: start;
}

.tree-readout {
  display: grid;
  width: 100%;
  padding: 1.6rem 1.75rem 1.7rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tree-panel {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.tree-panel.is-showing {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.tree-panel h3 {
  margin: 0 0 0.5rem;
  font-family: Outfit, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.tree-panel p {
  margin: 0;
}

.tree-static-note h3 {
  margin: 0 0 0.5rem;
  font-family: Outfit, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.tree-static-note p {
  margin: 0;
}

@keyframes tree-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .tree-stage {
    grid-template-columns: 1fr;
  }
  .tree-side {
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .tree-figure {
    width: auto;
    max-width: none;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: none;
  }
  .tree-disc {
    position: static;
    width: min(66vw, 270px);
    aspect-ratio: 1;
  }
  .tree-dots {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
  }
  .tree-hot,
  .tree-hot:hover,
  .tree-hot.is-active {
    position: static;
    transform: none;
  }
  .tree-hot.is-active {
    box-shadow: none;
  }
  .tree-readout {
    display: block;
  }
  .tree-panel {
    grid-area: auto;
    display: none;
  }
  .tree-panel.is-showing {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tree-figure {
    animation: none;
  }
  .tree-panel {
    transition: none;
    transform: none;
  }
}

/* --- Layers section (roots / trunk / canopy, echoing the logo) --- */
.section {
  padding: 3rem 0 0.6rem;
}

.section > h2 {
  margin-top: 0;
}

.layers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.4rem;
}

.layer {
  padding: 1.35rem 1.3rem 1.5rem;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 13px;
  border-top: 3px solid var(--sage);
}

.layer:nth-child(2) {
  border-top-color: var(--bark-soft);
}

.layer:nth-child(3) {
  border-top-color: var(--bark);
}

.layer h3 {
  margin: 0 0 0.4rem;
  font-family: Outfit, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.layer p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* --- Contact --- */
.contact {
  padding: 3.4rem 0 4.4rem;
}

.contact h2 {
  margin: 0 0 0.4rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  color: var(--ink);
}

.contact-lede {
  margin: 0 0 1.6rem;
  color: var(--ink-soft);
}

form {
  max-width: 720px;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

label.full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding: 0.64rem 0.78rem;
}

textarea {
  min-height: 148px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--sage);
  outline-offset: 1px;
}

.count {
  align-self: flex-end;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

button {
  margin-top: 1.2rem;
  border: 0;
  border-radius: 9px;
  background: var(--sage-deep);
  color: var(--parchment);
  font-family: Outfit, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.82rem 1.5rem;
  cursor: pointer;
}

button:hover {
  background: var(--bark);
}

.direct {
  margin: 1.8rem 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.direct a {
  color: var(--sage-deep);
  font-weight: 600;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0 2.4rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-family: Outfit, sans-serif;
  font-size: 0.73rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

@media (max-width: 1440px) {
  .brand-def {
    display: none;
  }
}

@media (max-width: 1100px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .nav {
    justify-content: flex-start;
  }
}

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

@media (max-width: 620px) {
  .intro {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .nav {
    gap: 1rem 1.1rem;
  }
  .nav a {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }
  .page-wash img {
    opacity: 0.14;
  }
  .panel {
    padding: 1.5rem 1.3rem 1.7rem;
  }
}
