/* ==========================================================================
   Tokens (dark only)
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #141311;
  --bg-alt: #1a1916;
  --surface: #211f1c;
  --ink: #f1ece3;
  --ink-soft: #d8d2c7;
  --muted: #a39d92;
  --line: #322f2a;
  --dot: rgba(241, 236, 227, 0.09);

  --accent: #ff7a4d;
  --accent-text: #ff9a75;
  --accent-soft: #3a2319;
  --highlight: rgba(255, 122, 77, 0.3);
  --live: #4ade80;
  --danger: #ff6b5e;

  --term-bg: #0e0d0c;
  --term-line: #26231f;
  --term-ink: #ece7dd;
  --term-dim: #8a8478;
  --term-name: #f2c58b;
  --term-type: #ff8a5c;
  --term-val: #9fd8ff;
  --term-ok: #7fe0a8;

  --contact-bg: #221f1b;
  --on-dark: #f6f3ee;
  --on-dark-muted: #b9b2a6;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 60px -12px rgba(0, 0, 0, 0.7);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 18px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ==========================================================================
   Type
   ========================================================================== */

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.5rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
}

h1 em,
h2 em {
  display: inline-block;
  font-style: normal;
  line-height: 1;
  color: var(--accent-text);
  background: var(--highlight);
  padding: 0.02em 0.14em 0.08em;
  border-radius: 0.16em;
}

h3 {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 34em;
  text-wrap: pretty;
}

.eyebrow,
.record-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.record-label abbr {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 500;
  text-decoration: none;
  cursor: help;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--live);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--live);
  opacity: 0;
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  0% {
    transform: scale(0.5);
    opacity: 0.7;
  }
  80%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn svg,
.icon-btn svg,
.service-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-light {
  background: var(--on-dark);
  color: #1b1a17;
}

.btn-light:hover {
  background: var(--accent);
  color: #fff;
}

.btn-outline-light {
  border-color: rgba(246, 243, 238, 0.28);
  color: var(--on-dark);
}

.btn-outline-light:hover {
  border-color: var(--on-dark);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--ink);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 112px) clamp(64px, 8vw, 96px);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 72px);
}

.hero-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
}

.hero-copy .lede strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* Terminal */

.terminal {
  position: relative;
  border-radius: 16px;
  background: var(--term-bg);
  color: var(--term-ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  container-type: inline-size;
  transform: rotate(1.2deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.terminal:hover {
  transform: rotate(0deg) translateY(-4px);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--term-line);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3631;
}

.terminal-bar span:nth-child(1) {
  background: #ff6159;
}

.terminal-bar span:nth-child(2) {
  background: #ffbd2e;
}

.terminal-bar span:nth-child(3) {
  background: #28c941;
}

.terminal-bar p {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--term-dim);
}

.terminal-body {
  min-height: 23em;
  padding: 20px 22px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-size: clamp(0.6rem, 3.1cqi - 1.4px, 0.8rem);
  line-height: 1.75;
  scrollbar-width: thin;
}

.t-prompt {
  color: var(--term-type);
  user-select: none;
}

.t-dim {
  color: var(--term-dim);
}

.t-name {
  color: var(--term-name);
}

.t-type {
  color: var(--term-type);
}

.t-val {
  color: var(--term-val);
}

.t-ok {
  color: var(--term-ok);
}

.t-live {
  display: inline-block;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--term-ok);
  color: #0e0d0c;
  font-weight: 500;
}

.t-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--term-ink);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Pipeline */

.pipeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: clamp(56px, 7vw, 88px);
  border-top: 1px solid var(--line);
}

.pipeline li {
  position: relative;
  padding: 16px 12px 0 0;
  font-weight: 500;
  font-size: 0.98rem;
}

.pipeline li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: fill-bar 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pipeline li:nth-child(1)::before { animation-delay: 0.5s; }
.pipeline li:nth-child(2)::before { animation-delay: 0.85s; }
.pipeline li:nth-child(3)::before { animation-delay: 1.2s; }
.pipeline li:nth-child(4)::before { animation-delay: 1.55s; }
.pipeline li:nth-child(5)::before { animation-delay: 1.9s; }
.pipeline li:nth-child(6)::before { animation-delay: 2.25s; }
.pipeline li:nth-child(7)::before { animation-delay: 2.6s; }

.pipeline li span {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
}

.pipeline li.is-live {
  color: var(--live);
}

.pipeline li.is-live::before {
  background: var(--live);
}

@keyframes fill-bar {
  to {
    transform: scaleX(1);
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 40rem;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head > p:last-child {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}

.portrait {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.portrait img,
.portrait-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  object-fit: cover;
  transform: rotate(-2deg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portrait:hover img,
.portrait:hover .portrait-placeholder {
  transform: rotate(0deg);
}

.portrait-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 55%),
    linear-gradient(160deg, var(--accent-soft), var(--bg-alt));
  border: 1px solid var(--line);
}

.portrait-placeholder span {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 6.5rem);
  font-style: italic;
  line-height: 1;
  color: var(--accent-text);
}

.portrait-placeholder small {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portrait-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: -22px 0 0 24px;
  position: relative;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.88rem;
  font-weight: 500;
}

.about-copy {
  display: grid;
  gap: 20px;
}

.about-copy > p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 36em;
}

.zone-card {
  margin-top: 8px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--term-bg);
  color: var(--term-ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  box-shadow: var(--shadow-sm);
}

.zone-comment {
  color: var(--term-dim);
  margin-bottom: 6px;
}

.zone > div {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1ch;
}

.zone > div::before {
  content: "TXT";
  min-width: 4ch;
  color: var(--term-type);
}

.zone dt {
  color: var(--term-name);
}

.zone dt::after {
  content: " =";
  color: var(--term-dim);
}

.zone dd {
  color: var(--term-ok);
}

.values {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.values li {
  position: relative;
  padding-left: 32px;
  color: var(--ink-soft);
}

.values li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e4572e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.values strong {
  color: var(--ink);
}

/* Services */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-sm);
}

.service-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

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

.service ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.service li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* Work */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project {
  display: grid;
  align-content: start;
  gap: 18px;
}

.shot {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #15121f;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

.project:hover .shot {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project-body {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
}

.project-body p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tags li {
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Project screenshots in a browser frame */

.shot-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  background: #1f1b2e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shot-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.shot-bar span {
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
}

/* "Your site could be next" card: a browser showing a DNS error */

.next-body {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  aspect-ratio: 4 / 3;
  padding: 20px;
  background-color: var(--surface);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  text-align: center;
}

.next-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.next-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.next-fix {
  margin-top: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.project:hover .next-fix {
  background: var(--accent);
  color: #fff;
}

/* DNS explainer */

.dns-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.dns-intro {
  display: grid;
  gap: 18px;
}

.dns-intro > p:last-child {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.dns-explainer {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}

.dns-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-alt);
  overflow-x: auto;
  scrollbar-width: none;
}

.dns-tabs button {
  flex: 1;
  min-width: max-content;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.dns-tabs button:hover {
  color: var(--ink);
}

.dns-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}

.dns-panel {
  display: grid;
  gap: 12px;
  padding: 24px 18px 18px;
  animation: panel-in 0.35s ease;
}

.dns-panel[hidden] {
  display: none;
}

.dns-record {
  display: block;
  margin-bottom: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--term-bg);
  color: var(--term-ok);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: pre;
  overflow-x: auto;
  scrollbar-width: thin;
}

.dns-panel h3 {
  font-size: 1.3rem;
}

.dns-panel > p {
  color: var(--ink-soft);
}

.dns-panel .dns-me {
  margin-top: 4px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.97rem;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* Process */

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 8px;
}

.step::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 60px;
  right: -12px;
  height: 1px;
  background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 12px);
}

.step:last-child::after {
  display: none;
}

.step-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-text);
}

.step:last-child .step-num {
  border-color: var(--live);
  background: var(--live);
  color: var(--bg);
}

.step p {
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* FAQ */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.faq-grid .section-head {
  margin-bottom: 0;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-weight: 600;
  font-size: 1.06rem;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 10px no-repeat;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list summary:hover::after {
  border-color: var(--ink);
}

.faq-list details p {
  max-width: 38em;
  padding-bottom: 24px;
  color: var(--ink-soft);
}

/* Contact */

.contact {
  padding-bottom: clamp(56px, 8vw, 96px);
}

.contact-card {
  position: relative;
  display: grid;
  gap: 20px;
  justify-items: start;
  padding: clamp(36px, 7vw, 80px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--contact-bg);
  color: var(--on-dark);
  overflow: hidden;
  isolation: isolate;
}

.contact-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -10%;
  top: -40%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 65%);
  filter: blur(20px);
}

.contact-card h2 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.contact-card h2 em {
  color: #ff9a75;
  background: rgba(255, 122, 77, 0.26);
}

.contact-card > p {
  max-width: 32em;
  color: var(--on-dark-muted);
  font-size: 1.1rem;
}

.record-label.on-dark {
  color: var(--on-dark-muted);
}

.record-label.on-dark abbr {
  background: rgba(255, 138, 92, 0.16);
  color: #ffa784;
}

.contact-zone {
  justify-self: end;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(246, 243, 238, 0.42);
  white-space: pre;
}

/* Footer */

.site-footer {
  padding-block: 28px 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-zone {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.site-nav a[aria-current="page"] {
  background: var(--bg-alt);
  color: var(--ink);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 72px);
}

.compose {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.compose-fields > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.compose-fields dt {
  min-width: 4.5em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.compose-fields dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compose-email {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.compose-email:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compose-body {
  min-height: 7.5em;
  padding: 20px 22px;
  color: var(--ink-soft);
}

.compose-body .t-cursor {
  width: 2px;
  margin-left: 2px;
  background: var(--accent);
}

.compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 22px 22px;
}

.copy-btn.is-copied {
  border-color: var(--live);
  color: var(--live);
}

.include-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.include-grid .section-head {
  margin-bottom: 0;
}

.include-list {
  border-top: 1px solid var(--line);
}

.include-list li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.include-list .step-num {
  margin-bottom: 0;
}

.include-list h3 {
  margin: 4px 0 6px;
}

.include-list p {
  color: var(--ink-soft);
}

.footer-email {
  color: var(--ink-soft);
  text-underline-offset: 3px;
}

.footer-email:hover {
  color: var(--accent-text);
}

/* Free consultation form */

.consult-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.consult-grid .section-head {
  margin-bottom: 0;
}

.consult-card {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.consult-form {
  display: grid;
  gap: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > label,
.field > legend {
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.field > legend {
  margin-bottom: 8px;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.field ::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--danger);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.9rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover span {
  border-color: var(--ink);
}

.chip input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  font-size: 0.95rem;
}

.form-status a {
  color: inherit;
  font-weight: 600;
}

.btn:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

/* Spam trap for bots, never shown to people */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consult-done {
  display: grid;
  justify-items: start;
  gap: 12px;
  outline: none;
}

.consult-done h3 {
  font-size: 1.3rem;
}

.consult-done p {
  color: var(--ink-soft);
}

.done-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--live);
  color: var(--bg);
}

.done-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Scroll reveal (only when JS is running)
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1060px) {
  .site-nav a {
    padding: 8px 10px;
  }
}

@media (max-width: 1020px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 40px;
  }

  .step:nth-child(3)::after {
    display: none;
  }
}

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .site-header.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a {
    padding: 12px 14px;
    font-size: 1.05rem;
  }

  .hero-grid,
  .about-grid,
  .dns-grid,
  .faq-grid,
  .contact-grid,
  .include-grid,
  .consult-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .terminal {
    transform: none;
  }

  .portrait {
    position: relative;
    top: 0;
    max-width: 300px;
  }

  .work-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }

  /* Real project first when the cards stack */
  .project-featured {
    order: -1;
  }

  .pipeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 24px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .header-cta {
    display: none;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .terminal-body {
    min-height: 23em;
    padding: 16px;
  }

  .services-grid,
  .steps,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .service {
    padding: 24px;
  }

  .steps {
    row-gap: 0;
  }

  .step {
    grid-template-columns: 46px 1fr;
    column-gap: 18px;
    padding-bottom: 28px;
  }

  .step-num {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .step::after,
  .step:nth-child(3)::after {
    display: block;
    top: 54px;
    bottom: 0;
    left: 23px;
    right: auto;
    width: 1px;
    height: auto;
    background: repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 12px);
  }

  .step:last-child::after {
    display: none;
  }

  .contact-zone {
    justify-self: start;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
