:root {
  --brand: #7BAFD4;
  --brand-pale: #DCEAF5;
  --ink: #13294B;
  --ink-2: #1E3D6B;
  --bg: #F6F8FA;
  --accent: #E0A526;
  --muted: #4A5A6A;
  --surface: #FFFFFF;
  --on-ink: #F6F8FA;
  --rule: color-mix(in srgb, var(--ink) 16%, transparent);
  --radius: 8px;
  --radius-btn: 6px;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);
  --measure: 34rem;
  --wrap: 72rem;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img, svg { max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--on-ink);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--brand);
  color: var(--on-ink);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}
.wordmark span { color: var(--accent); }
.brand svg { width: var(--logo-height, 2rem); height: var(--logo-height, 2rem); flex: none; }
.nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  background: var(--brand);
  color: var(--on-ink);
  padding-block: clamp(3rem, 8vw, 6.5rem);
  overflow: hidden;
}
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 56rem) {
  .hero .wrap:has(.hero-art) { grid-template-columns: 6fr 5fr; }
  .hero-art { order: 2; }
}
.hero-art { margin: 0; max-width: 34rem; }
.hero-title {
  margin: 0;
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  line-height: 0.98;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.hero-title .line { display: block; }
.hero-title .line + .line { color: var(--accent); }
.hero .section-title { color: var(--on-ink); }
.print {
  position: relative;
  margin: 0;
  font-size: clamp(3.4rem, 13.5vw, 11.5rem);
  line-height: 0.88;
  font-weight: 860;
  font-stretch: 125%;
  letter-spacing: -0.02em;
}
/* Layer lines: the headline reads as stacked print layers */
.print .ink {
  display: block;
  background: repeating-linear-gradient(
    to bottom,
    var(--ink) 0 0.055em,
    var(--ink-2) 0.055em 0.075em
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: build 2.6s steps(22, end) 0.25s both;
}
/* The nozzle: a gold bead that rides the top of each new layer */
.print::after {
  content: "";
  position: absolute;
  left: -1rem;
  right: -1rem;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent);
  animation:
    nozzle 2.6s steps(22, end) 0.25s both,
    cool 0.5s ease-out 2.95s forwards;
}
@keyframes build {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes nozzle {
  from { top: 100%; }
  to   { top: 0; }
}
@keyframes cool {
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .print .ink, .print::after { animation: none; }
  .print::after { display: none; }
}

.hero-lede {
  max-width: var(--measure);
  margin: 1.5rem 0 0;
  color: color-mix(in srgb, var(--on-ink) 85%, var(--brand));
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.45;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}
.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-btn);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-ink); }
/* On the dark hero the buttons flip to light */
.hero .btn-primary { background: var(--on-ink); color: var(--brand); border-color: var(--on-ink); }
.hero .btn-primary:hover { background: var(--brand-pale); border-color: var(--brand-pale); }
.hero .btn-ghost { color: var(--on-ink); border-color: var(--accent); }
.hero .btn-ghost:hover { background: var(--accent); color: var(--brand); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.02;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.section-intro {
  max-width: var(--measure);
  margin: 0;
  color: var(--muted);
}

/* Services: title column + list */
.split {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 5fr 7fr; gap: 4rem; }
  .split > :first-child { position: sticky; top: 2rem; align-self: start; }
}
.services {
  list-style: none;
  margin: 0;
  padding: 0;
}
.services li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule);
}
.services li:last-child { border-bottom: 1px solid var(--rule); }
.services .mark { grid-row: span 2; margin-top: 0.2rem; fill: var(--muted); }
.services h3 {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.services p { margin: 0; color: var(--muted); max-width: 34rem; }

/* Process: a real sequence, so it's numbered */
.process { background: var(--brand-pale); }
.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
}
.steps p { margin: 0; color: var(--muted); }

/* Materials */
.materials {
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.material {
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-left: 6px solid var(--swatch, var(--brand));
  background: var(--brand-pale);
}
.material dt {
  font-weight: 800;
  font-stretch: 118%;
  font-size: 1.4rem;
  line-height: 1.1;
}
.material dd { margin: 0.4rem 0 0; color: var(--muted); }
.note { margin-top: 1.75rem; color: var(--muted); max-width: var(--measure); }

/* Name story */
.story {
  background: var(--ink);
  color: var(--on-ink);
}
.story .wrap {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 52rem) {
  .story .wrap { grid-template-columns: auto 1fr; gap: 4rem; }
}
.story .story-figure {
  margin: 0;
  font-weight: 800;
  font-size: clamp(5rem, 15vw, 9.5rem);
  line-height: 0.85;
  color: var(--accent);
}
.story-figure span {
  display: block;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  line-height: 1.4;
  color: var(--brand-pale);
  margin-top: 0.75rem;
}
.story p { max-width: var(--measure); margin: 0 0 1rem; color: color-mix(in srgb, var(--on-ink) 85%, var(--brand)); }
.story .section-title { color: var(--on-ink); }

/* Contact */
.contact .email {
  display: inline-block;
  margin: 1.5rem 0 0;
  font-size: clamp(1.6rem, 5.5vw, 3.2rem);
  font-weight: 800;
  font-stretch: 112%;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 4px solid var(--muted);
  line-height: 1.15;
}
.contact .email:hover { color: var(--ink-2); border-bottom-color: var(--ink); }
.checklist {
  margin: 2rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  max-width: var(--measure);
}
.checklist li { margin-bottom: 0.3rem; }

/* Footer */
.site-footer {
  background: var(--ink-2);
  color: color-mix(in srgb, var(--on-ink) 78%, var(--ink-2));
  padding-block: 2.5rem;
  font-size: 1rem;
}
.site-footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) {
  .site-footer .wrap { grid-template-columns: auto 1fr auto; align-items: center; gap: 3rem; }
}
.site-footer p { margin: 0; }
.footer-logo { width: 150px; --mk-bg: var(--ink-2); }
.footer-tag { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.95rem; }
.footer-links a { color: var(--on-ink); text-underline-offset: 3px; }
.footer-legal { margin-top: 0.5rem !important; font-size: 0.9rem; }

.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- Projects ---------- */
.recent { background: var(--surface); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cards {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.recent .card a { background: var(--bg); }
.card a:hover { border-color: var(--ink); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card a:hover { transform: none; } }
.card-media {
  aspect-ratio: 4 / 3;
  background: var(--brand-pale);
  display: grid;
  place-items: center;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media svg { width: 30%; opacity: 0.8; }
.card-body { padding: 1.1rem 1.25rem 1.4rem; }
.card-meta { margin: 0 0 0.35rem; font-size: 0.88rem; color: var(--muted); }
.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
  line-height: 1.2;
  font-weight: 760;
  font-stretch: 110%;
}
.card-body > p:last-child { margin: 0; color: var(--muted); }

/* ---------- Project & page detail ---------- */
.crumb { margin: 0 0 1.5rem; }
.crumb a { text-decoration: none; font-weight: 600; }
.crumb a:hover { text-decoration: underline; }
.page-head { margin-bottom: 2.5rem; }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  margin: 1.75rem 0 0;
}
.facts dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.facts dd { margin: 0; font-weight: 650; }
.project-cover { margin: 0 0 2.5rem; }
.project-cover img { width: 100%; max-height: 70vh; object-fit: cover; border-radius: var(--radius); display: block; }

.prose { max-width: 42rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; font-weight: 780; font-stretch: 112%; line-height: 1.15; margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: 1.25rem; font-weight: 720; margin: 2rem 0 0.5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose img { border-radius: var(--radius); height: auto; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 4px solid var(--accent); color: var(--muted); }
.prose a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.gallery {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); display: block; }
.gallery figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }

.cta {
  margin-top: 4rem;
  padding: 2rem;
  background: var(--brand-pale);
  border-radius: var(--radius);
  max-width: 42rem;
}
.cta h2 { margin: 0 0 0.4rem; font-size: 1.5rem; font-weight: 780; font-stretch: 112%; }
.cta p { margin: 0 0 1.25rem; color: var(--muted); }
.cta .btn { overflow-wrap: anywhere; }

.hero-404 { min-height: 70vh; }

/* ---------- Theme hooks ---------- */
h1, h2, h3, .brand, .btn, .print, .story-figure, .steps li::before,
.material dt, .contact .email {
  font-family: var(--font-heading);
}
.brand-logo {
  display: block;
  height: var(--logo-height, 2rem);
  width: auto;
  max-width: 14rem;
  object-fit: contain;
}
/* Headline animation switched off in Theme settings */
.print.static .ink, .print.static::after { animation: none; }
.print.static::after { display: none; }

/* ---------- Products (Etsy) ---------- */
.products .card-media { aspect-ratio: 1; background: var(--surface); }
.products .card-body { display: flex; flex-direction: column; flex: 1; }
.products .card h3 { font-size: 1.1rem; font-weight: 650; font-stretch: 100%; line-height: 1.3; }
.product-foot {
  margin: auto 0 0;
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.price { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.product-link { font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.card a:hover .product-link { color: var(--ink); }
.shop { background: var(--brand-pale); }
.dev-note {
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  max-width: 42rem;
}
.products .card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Brand: FF.3D logo mark and badge ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.logo-mark { display: block; width: 100%; height: auto; }
.logo-mark .mk-blue { fill: var(--mk-blue); }
.logo-mark .mk-grey { fill: var(--mk-grey); }
.logo-mark .mk-bg { fill: var(--mk-bg); }
.logo-mark .mk-cut { stroke: var(--mk-bg); stroke-width: 5; stroke-linecap: round; }
.logo-mark .mk-filament { stroke: var(--mk-grey); stroke-linecap: round; }
.logo-mark .mk-3d { stroke: var(--mk-blue); stroke-width: 4; stroke-linejoin: round; }
.on-dark { --mk-blue: var(--on-ink); --mk-grey: var(--accent); --mk-bg: var(--brand); }
.on-light { --mk-blue: var(--ink); --mk-grey: var(--muted); --mk-bg: var(--bg); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.5rem 1.1rem;
  border: 2px solid currentColor;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.9rem;
}
.badge svg { width: 0.9rem; height: 0.9rem; fill: currentColor; flex: none; }
.hero .badge { margin-top: 2rem; }
.site-footer .badge { font-size: 0.8rem; padding: 0.4rem 0.9rem; justify-self: start; }

@media (max-width: 40rem) {
  .nav { gap: 1rem; }
  .nav a { font-size: 0.85rem; letter-spacing: 0.08em; }
}

/* ---------- Contact form ---------- */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 5fr 6fr; align-items: start; } }
.contact-form {
  display: grid; gap: 1.1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.contact-form .field { display: grid; gap: 0.35rem; }
.contact-form label { font-weight: 600; }
.contact-form .optional { font-weight: 400; color: var(--muted); }
.contact-form input[type=text], .contact-form input[type=email], .contact-form input[type=tel], .contact-form textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  border-radius: calc(var(--radius) * 0.6);
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sms-consent { margin: 0.25rem 0 0; padding: 0; border: 0; display: grid; gap: 0.6rem; }
.sms-consent legend { font-weight: 700; margin-bottom: 0.4rem; padding: 0; }
.contact-form .check { display: grid; grid-template-columns: 1.25rem 1fr; gap: 0.6rem; align-items: start; font-weight: 500; line-height: 1.45; cursor: pointer; }
.contact-form .check input { width: 1.1rem; height: 1.1rem; margin: 0.15rem 0 0; accent-color: var(--ink); }
.consent-text { font-size: 0.85rem; line-height: 1.5; color: var(--muted); margin-top: 0.4rem; }
.consent-text p { margin: 0 0 0.6rem; }
.consent-text p:last-child { margin-bottom: 0; }
.consent-text a { color: var(--ink); overflow-wrap: anywhere; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 600; }
.form-status.is-error { color: #A4161A; }
.form-status.is-ok { color: #1B6E3A; }
.contact-form .btn { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; }
.contact-form .btn:disabled { opacity: 0.6; cursor: progress; }
@media (min-width: 56rem) { .contact-grid .email { font-size: clamp(1.4rem, 2.4vw, 2rem); } }

/* Phone and hours */
.contact-direct { margin: 1.25rem 0 0; display: grid; gap: 0.2rem; }
.contact-phone { font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.3rem, 3vw, 1.75rem); color: var(--ink); text-decoration: none; }
.contact-phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-hours { color: var(--muted); }
.footer-hours { margin-top: 0.5rem !important; font-size: 0.95rem; }
