:root {
  --ink: #1c1c1b;
  --muted: #6d6d69;
  --paper: #ffffff;
  --gray: #f4f4f2;
  --line: #e4e3e0;
  --accent: #175d4f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.brand {
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .mark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand .mark span { color: var(--muted); font-weight: 400; }
.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: rgba(29, 29, 31, 0.8);
  font-size: 13px;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.nav-cta {
  color: #fff;
  background: var(--ink);
  border-radius: 980px;
  padding: 6px 14px;
  font-weight: 500;
}
.site-nav a.nav-cta:hover {
  background: #3a3a36;
  text-decoration: none;
}

/* Sections */
section { padding: 100px 0; }
#services, #about { background: var(--gray); }

/* Art-paper flecks on every section below the hero: sparse short
   fibers and dots, like cotton rag stock */
#services, #portfolio, #about, #contact, .site-footer {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><g stroke='%23706f68' stroke-width='1.3' fill='none'><path d='M23 41l8 3' stroke-opacity='.22'/><path d='M141 22l-7 5' stroke-opacity='.16'/><path d='M266 58l9 -2' stroke-opacity='.20'/><path d='M58 118l5 7' stroke-opacity='.18'/><path d='M304 170l-8 4' stroke-opacity='.16'/><path d='M141 246l6 -7' stroke-opacity='.18'/><path d='M88 299l8 3' stroke-opacity='.16'/><path d='M310 262l-6 5' stroke-opacity='.20'/><path d='M180 78l-8 -3' stroke-opacity='.16'/><path d='M255 205l6 6' stroke-opacity='.18'/><path d='M117 175l9 -3' stroke-opacity='.14'/><path d='M78 24l6 6' stroke-opacity='.15'/></g><g stroke='%236f7f5c' stroke-width='1.3' fill='none'><path d='M203 131l8 -5' stroke-opacity='.22'/><path d='M37 208l9 2' stroke-opacity='.18'/><path d='M129 90l7 4' stroke-opacity='.16'/><path d='M289 20l-7 5' stroke-opacity='.17'/><path d='M52 305l8 -4' stroke-opacity='.16'/><path d='M226 174l7 5' stroke-opacity='.15'/></g><g stroke='%239c6b52' stroke-width='1.3' fill='none'><path d='M232 281l-9 -3' stroke-opacity='.20'/><path d='M12 158l6 -5' stroke-opacity='.18'/><path d='M167 210l8 4' stroke-opacity='.16'/><path d='M311 118l-7 -4' stroke-opacity='.17'/><path d='M97 142l6 -6' stroke-opacity='.14'/></g><g stroke='%235f7482' stroke-width='1.3' fill='none'><path d='M97 12l7 5' stroke-opacity='.18'/><path d='M270 240l-8 3' stroke-opacity='.16'/><path d='M20 236l7 5' stroke-opacity='.15'/><path d='M186 269l8 -4' stroke-opacity='.16'/><path d='M247 92l6 6' stroke-opacity='.14'/></g><g stroke='%23a08b4a' stroke-width='1.3' fill='none'><path d='M156 306l8 -3' stroke-opacity='.16'/><path d='M69 232l-7 4' stroke-opacity='.15'/><path d='M215 51l7 4' stroke-opacity='.14'/><path d='M300 300l-6 -6' stroke-opacity='.15'/></g><g fill='%23706f68'><circle cx='71' cy='68' r='1.2' fill-opacity='.22'/><circle cx='189' cy='49' r='1' fill-opacity='.16'/><circle cx='287' cy='109' r='1.1' fill-opacity='.20'/><circle cx='33' cy='262' r='1.2' fill-opacity='.18'/><circle cx='158' cy='120' r='.9' fill-opacity='.15'/><circle cx='276' cy='309' r='1.1' fill-opacity='.15'/><circle cx='63' cy='170' r='.9' fill-opacity='.17'/></g><g fill='%236f7f5c'><circle cx='243' cy='27' r='1' fill-opacity='.18'/><circle cx='110' cy='222' r='1.1' fill-opacity='.19'/><circle cx='305' cy='196' r='.9' fill-opacity='.15'/><circle cx='134' cy='288' r='1' fill-opacity='.16'/></g><g fill='%239c6b52'><circle cx='198' cy='300' r='1.2' fill-opacity='.18'/><circle cx='16' cy='105' r='1' fill-opacity='.18'/><circle cx='222' cy='108' r='.9' fill-opacity='.15'/><circle cx='86' cy='186' r='1' fill-opacity='.14'/></g><g fill='%235f7482'><circle cx='296' cy='226' r='.9' fill-opacity='.16'/><circle cx='46' cy='30' r='1' fill-opacity='.15'/><circle cx='173' cy='161' r='.9' fill-opacity='.14'/><circle cx='258' cy='158' r='1' fill-opacity='.13'/></g><g fill='%23a08b4a'><circle cx='121' cy='51' r='1' fill-opacity='.16'/><circle cx='27' cy='196' r='.9' fill-opacity='.14'/><circle cx='236' cy='222' r='1' fill-opacity='.13'/><circle cx='308' cy='60' r='.9' fill-opacity='.14'/></g></svg>");
}

h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  text-align: center;
}
.section-lede {
  color: var(--muted);
  font-size: 19px;
  max-width: 560px;
  margin: 18px auto 0;
  text-align: center;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 140px 0 130px;
  text-align: center;
}
.hero .wrap { position: relative; z-index: 2; }

/* Jacquard mural: each motif sketches in as line-work, then settles
   into a warm fill close to the section ground */
.hero-weave {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-weave svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-weave path { fill: #fafaf9; }
.hero-weave .weave-path {
  fill-opacity: 0;
  stroke: #e8e8e4;
  stroke-width: 7;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: reweave 60s linear var(--d, 0s) infinite;
}
.hero-weave .woven { fill-opacity: 1; }
@keyframes reweave {
  0% { stroke-dashoffset: 1; fill-opacity: 0; stroke-opacity: 1; }
  15% { stroke-dashoffset: 0; fill-opacity: 0; stroke-opacity: 1; }
  30% { stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; }
  70% { fill-opacity: 1; }
  90% { fill-opacity: 0; stroke-opacity: 0; }
  100% { stroke-dashoffset: 1; fill-opacity: 0; stroke-opacity: 1; }
}
.hero h1 {
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.hero .lede {
  font-size: 21px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 36px;
}
.btn-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  font-size: 17px;
  border-radius: 980px;
  padding: 12px 26px;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #3a3a36; }
.btn-secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
}
.btn-secondary:hover { border-color: var(--muted); }

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 52px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px 30px;
  box-shadow:
    0 1px 2px rgba(28, 28, 26, 0.06),
    0 10px 24px rgba(28, 28, 26, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgba(28, 28, 26, 0.06),
    0 16px 32px rgba(28, 28, 26, 0.10);
}
@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transform: none; transition: none; }
}
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
@media (max-width: 860px) {
  .grid, .grid-3 { grid-template-columns: 1fr; }
}

/* Work lists */
.list-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  margin-top: 56px;
}
.work-list {
  list-style: none;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.work-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 1px 2px rgba(28, 28, 26, 0.06),
    0 10px 24px rgba(28, 28, 26, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.work-list li:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgba(28, 28, 26, 0.06),
    0 16px 32px rgba(28, 28, 26, 0.10);
}
@media (prefers-reduced-motion: reduce) {
  .work-list li, .work-list li:hover { transform: none; transition: none; }
}
.work-list strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.work-list .kind {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.status {
  margin-top: auto;
  padding-top: 16px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.st-running { color: #0b7285; }
.st-acquired { color: #15803d; }
.st-paused { color: #a07800; }

/* About */
.about-prose {
  max-width: 620px;
  margin: 44px auto 0;
  font-size: 19px;
}
.about-prose p { color: var(--muted); }
.about-prose p + p { margin-top: 22px; }
.about-prose em { color: var(--ink); font-style: italic; }

/* Contact */
.contact-box {
  margin: 48px auto 0;
  max-width: 760px;
  background: var(--gray);
  border-radius: 12px;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  text-align: center;
}
.contact-box .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-box .value { font-size: 17px; font-weight: 500; }

/* Footer */
.site-footer {
  background: var(--gray);
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: 12px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); text-decoration: none; margin-left: 20px; }
.site-footer a:first-child { margin-left: 0; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Easter egg: © in the footer tunes into the old broadcast */
.site-footer a.egg {
  margin-left: 0;
  color: inherit;
  cursor: default;
}
.site-footer a.egg:hover {
  color: #00c8d7;
  text-shadow: 0 0 6px rgba(0, 200, 215, 0.6);
  text-decoration: none;
  cursor: pointer;
}

/* Legal pages */
.legal { padding: 80px 0 110px; }
.legal .wrap { max-width: 720px; }
.legal h1 {
  font-size: clamp(34px, 5vw, 48px);
  margin-bottom: 10px;
}
.legal .updated {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 44px;
}
.legal h2 {
  font-size: 22px;
  text-align: left;
  margin: 40px 0 10px;
}
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 22px; margin-top: 10px; }
.legal li + li { margin-top: 6px; }

@media (max-width: 640px) {
  .site-nav { gap: 16px; }
  .site-nav a:not(.nav-cta):not(:last-of-type) { display: none; }
  .hero { padding: 90px 0 80px; }
  section { padding: 68px 0; }
}
