:root {
  --display-font:
    "Bricolage Grotesque", "Inter Tight", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif;
  --body-font:
    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  --mono-font:
    "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", "SF Mono", Menlo,
    Consolas, monospace;

  --bg: #f3f6fb;
  --surface: #ffffff;
  --ink: #0c1424;
  --ink-soft: #475569;
  --ink-muted: #94a3b8;
  --rule: rgba(12, 20, 36, 0.07);
  --rule-strong: rgba(12, 20, 36, 0.14);
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-glow: rgba(14, 165, 233, 0.18);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0a1224;
  --surface: #11192e;
  --ink: #f1f5f9;
  --ink-soft: #94a3b8;
  --ink-muted: #475569;
  --rule: rgba(241, 245, 249, 0.07);
  --rule-strong: rgba(241, 245, 249, 0.16);
  --accent: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-glow: rgba(34, 211, 238, 0.22);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--body-font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.top-bar {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.top-bar__chip {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  font-family: var(--mono-font);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.top-bar__chip-mark {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--ink);
}

.top-bar__chip-mark svg {
  width: 100%;
  height: 100%;
}

.top-bar__actions {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.theme-toggle {
  display: inline-grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  transition:
    color 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent);
  outline: none;
  border-color: var(--accent);
}

.theme-toggle:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.theme-toggle__icon {
  grid-area: 1 / 1;
  width: 1.05rem;
  height: 1.05rem;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.theme-toggle__icon--sun {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cline x1='12' y1='2' x2='12' y2='4'/%3E%3Cline x1='12' y1='20' x2='12' y2='22'/%3E%3Cline x1='2' y1='12' x2='4' y2='12'/%3E%3Cline x1='20' y1='12' x2='22' y2='12'/%3E%3Cline x1='4.93' y1='4.93' x2='6.34' y2='6.34'/%3E%3Cline x1='17.66' y1='17.66' x2='19.07' y2='19.07'/%3E%3Cline x1='4.93' y1='19.07' x2='6.34' y2='17.66'/%3E%3Cline x1='17.66' y1='6.34' x2='19.07' y2='4.93'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cline x1='12' y1='2' x2='12' y2='4'/%3E%3Cline x1='12' y1='20' x2='12' y2='22'/%3E%3Cline x1='2' y1='12' x2='4' y2='12'/%3E%3Cline x1='20' y1='12' x2='22' y2='12'/%3E%3Cline x1='4.93' y1='4.93' x2='6.34' y2='6.34'/%3E%3Cline x1='17.66' y1='17.66' x2='19.07' y2='19.07'/%3E%3Cline x1='4.93' y1='19.07' x2='6.34' y2='17.66'/%3E%3Cline x1='17.66' y1='6.34' x2='19.07' y2='4.93'/%3E%3C/svg%3E");
}

.theme-toggle__icon--moon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z'/%3E%3C/svg%3E");
}

.theme-toggle[data-theme-value="light"] .theme-toggle__icon--sun,
.theme-toggle[data-theme-value="dark"] .theme-toggle__icon--moon {
  opacity: 0;
  transform: scale(0.55) rotate(-25deg);
}

.main {
  position: relative;
  display: grid;
  align-content: center;
  width: 100%;
  max-width: 80rem;
  padding: clamp(1.5rem, 4vh, 3rem) clamp(1.25rem, 4vw, 3rem);
  margin: 0 auto;
}

.hero {
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 1.85rem);
}

.title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-variation-settings:
    "wdth" 100,
    "opsz" 96;
  font-weight: 600;
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: -0.035em;
}

.summary {
  max-width: 38rem;
  margin: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-top: 0.4rem;
}

.cta {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.85rem 1.2rem;
  font-family: var(--mono-font);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bg);
  letter-spacing: 0.02em;
  text-decoration: none;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.cta:hover,
.cta:focus-visible {
  color: var(--bg);
  outline: none;
  background: var(--accent);
  border-color: var(--accent);
}

.cta:hover .cta__arrow,
.cta:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.bottom-bar {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: flex-end;
  height: 3rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
}

.bottom-bar__node {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.55rem;
  align-items: center;
}

.bottom-bar__node-square {
  width: 0.6rem;
  height: 0.6rem;
  border: 1px solid var(--rule-strong);
}

.bottom-bar__node-line {
  width: 1.4rem;
  height: 1px;
  background: var(--rule-strong);
}

.bottom-bar__node-fill {
  width: 0.6rem;
  height: 0.6rem;
  background: var(--accent);
}

.contact-page {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.contact-page__heading {
  display: grid;
  gap: clamp(0.85rem, 1.6vw, 1.15rem);
  max-width: 52rem;
}

.contact-page__heading .title {
  font-size: clamp(2.5rem, 7vw, 5rem);
}

.contact-page__summary {
  max-width: 38rem;
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.contact-frame {
  position: relative;
  display: grid;
  max-width: 52rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
}

.contact-frame::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(2.5rem, 8vw, 4rem);
  height: 3px;
  content: "";
  background: var(--accent);
}

[data-contact-form] {
  width: 100%;
  color: var(--ink);
}

[data-contact-form] .mydomains-contact {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 1.1rem !important;
}

[data-contact-form] .mydomains-contact__eyebrow,
[data-contact-form] .mydomains-contact__title {
  display: none;
}

[data-contact-form] .mydomains-contact__copy {
  margin-top: 0;
  color: var(--ink-soft);
}

[data-contact-form] .mydomains-contact__form {
  grid-row: auto !important;
  grid-column: 1 / -1 !important;
  gap: 1rem;
  margin-top: 0;
}

[data-contact-form] .mydomains-contact__grid {
  gap: 0.85rem 1rem;
}

[data-contact-form] .mydomains-contact__label {
  font-family: var(--mono-font);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}

[data-contact-form] .mydomains-contact__label span[aria-hidden] {
  font-family: var(--mono-font);
  font-size: 0.66rem;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

[data-contact-form] input,
[data-contact-form] select,
[data-contact-form] textarea {
  width: 100%;
  padding: 0.78rem 0.9rem;
  font-family: var(--body-font);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

[data-contact-form] input::placeholder,
[data-contact-form] textarea::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}

[data-contact-form] input:focus-visible,
[data-contact-form] select:focus-visible,
[data-contact-form] textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

[data-contact-form] textarea {
  min-height: 6rem;
  font-family: var(--body-font);
  resize: vertical;
}

[data-contact-form] .mydomains-contact__fineprint {
  font-family: var(--mono-font);
  font-size: 0.66rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

[data-contact-form] .mydomains-contact__actions {
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

[data-contact-form] button[type="submit"],
[data-contact-form] .mydomains-contact__submit {
  padding: 0.78rem 1.1rem;
  font-family: var(--mono-font);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--bg);
  letter-spacing: 0.01em;
  cursor: pointer;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

[data-contact-form] button[type="submit"]:hover,
[data-contact-form] .mydomains-contact__submit:hover,
[data-contact-form] button[type="submit"]:focus-visible,
[data-contact-form] .mydomains-contact__submit:focus-visible {
  color: var(--bg);
  outline: none;
  background: var(--accent);
  border-color: var(--accent);
}

.missing {
  display: grid;
  gap: 1.25rem;
  max-width: 38rem;
}

.missing__title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-variation-settings:
    "wdth" 100,
    "opsz" 96;
  font-weight: 600;
  line-height: 0.96;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.missing__summary {
  max-width: 32rem;
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

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

@media (max-width: 40rem) {
  .top-bar {
    height: 3.5rem;
    padding: 0 1rem;
  }

  .main {
    padding: 2.5rem 1rem 2.5rem;
  }

  .title {
    font-size: clamp(2.6rem, 14vw, 4.5rem);
    letter-spacing: -0.03em;
  }

  .bottom-bar {
    height: 2.5rem;
    padding: 0 1rem;
  }
}

.hero {
  display: grid;
  place-items: center;
  width: 100%;
}

/* The canvas has no frame. What sits behind the page instead is one drawn
   field of alignment guides — placed by hand at irregular intervals, never
   tiled — panning slowly the way an infinite canvas does when nobody is
   touching it. No rectangle anywhere says where the work is allowed to stop. */
.canvas-ground {
  position: fixed;
  inset: -3rem;
  z-index: 0;
  pointer-events: none;
  animation: oac-pan 110s ease-in-out infinite alternate;
}

.canvas-ground__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.canvas-ground__guide {
  opacity: 0.045;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
}

.canvas-ground__node {
  opacity: 0.075;
  fill: var(--ink);
}

html[data-theme="dark"] .canvas-ground__guide {
  opacity: 0.065;
}

html[data-theme="dark"] .canvas-ground__node {
  opacity: 0.1;
}

@keyframes oac-pan {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-28px, -20px, 0);
  }
}

.canvas {
  position: relative;
  display: grid;
  gap: clamp(1.5rem, 4vh, 2.5rem);
  align-content: end;
  width: 100%;
  min-height: min(26rem, 52vh);
  padding: clamp(1.5rem, 4vh, 2.5rem) 0;
}

.canvas__sketch {
  position: absolute;
  top: 0;
  right: 0;
  width: min(19rem, 38%);
  height: auto;
}

.canvas__step {
  opacity: 0.42;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 1;
}

/* One flow gets roughed out, node by node, holds while it is readable, then
   the canvas clears and takes it from the top. The cursor leads the line. */
.canvas__step--1 {
  animation: oac-step-1 20s linear infinite;
}

.canvas__step--2 {
  animation: oac-step-2 20s linear infinite;
}

.canvas__step--3 {
  animation: oac-step-3 20s linear infinite;
}

.canvas__step--4 {
  animation: oac-step-4 20s linear infinite;
}

.canvas__step--5 {
  animation: oac-step-5 20s linear infinite;
}

.canvas__step--6 {
  animation: oac-step-6 20s linear infinite;
}

@keyframes oac-step-1 {
  0% {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  2% {
    opacity: 0.42;
    stroke-dashoffset: 1;
  }
  11% {
    stroke-dashoffset: 0;
  }
  74% {
    opacity: 0.42;
  }
  80%,
  100% {
    opacity: 0;
  }
}

@keyframes oac-step-2 {
  0%,
  11% {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  12% {
    opacity: 0.42;
    stroke-dashoffset: 1;
  }
  17% {
    stroke-dashoffset: 0;
  }
  74% {
    opacity: 0.42;
  }
  80%,
  100% {
    opacity: 0;
  }
}

@keyframes oac-step-3 {
  0%,
  16% {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  17% {
    opacity: 0.42;
    stroke-dashoffset: 1;
  }
  26% {
    stroke-dashoffset: 0;
  }
  74% {
    opacity: 0.42;
  }
  80%,
  100% {
    opacity: 0;
  }
}

@keyframes oac-step-4 {
  0%,
  25% {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  26% {
    opacity: 0.42;
    stroke-dashoffset: 1;
  }
  32% {
    stroke-dashoffset: 0;
  }
  74% {
    opacity: 0.42;
  }
  80%,
  100% {
    opacity: 0;
  }
}

@keyframes oac-step-5 {
  0%,
  31% {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  32% {
    opacity: 0.42;
    stroke-dashoffset: 1;
  }
  41% {
    stroke-dashoffset: 0;
  }
  74% {
    opacity: 0.42;
  }
  80%,
  100% {
    opacity: 0;
  }
}

@keyframes oac-step-6 {
  0%,
  40% {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  41% {
    opacity: 0.42;
    stroke-dashoffset: 1;
  }
  50% {
    stroke-dashoffset: 0;
  }
  74% {
    opacity: 0.42;
  }
  80%,
  100% {
    opacity: 0;
  }
}

.canvas__cursor {
  fill: var(--accent);
  stroke: none;
  animation: oac-cursor 20s linear infinite;
}

@keyframes oac-cursor {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  2%,
  11% {
    opacity: 1;
    transform: translate(0, 0);
  }
  12% {
    transform: translate(31px, 0);
  }
  17% {
    transform: translate(83px, 0);
  }
  18%,
  26% {
    transform: translate(114px, -10px);
  }
  27% {
    transform: translate(114px, 7px);
  }
  32% {
    transform: translate(114px, 59px);
  }
  33%,
  41% {
    transform: translate(88px, 76px);
  }
  42% {
    transform: translate(0, 17px);
  }
  46% {
    transform: translate(24px, 49px);
  }
  50%,
  74% {
    opacity: 1;
    transform: translate(57px, 73px);
  }
  80%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .canvas-ground,
  .canvas__step,
  .canvas__cursor {
    animation: none;
  }

  .canvas__cursor {
    transform: translate(57px, 73px);
  }
}

.canvas__copy {
  display: grid;
  gap: clamp(0.8rem, 2vh, 1.15rem);
  justify-items: start;
  max-width: 34rem;
}
