:root {
  --paper: #f5f3ee;
  --ink: #141414;
  --ink-2: #3a3935;
  --muted: #6e6c66;
  --line: #d9d5cb;
  --accent: #ff5a1f;
  --max: 1200px;
  --header: 64px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

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

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
}

.skip-link:focus {
  left: 8px;
}

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

.label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4em;
}

.label .num {
  color: var(--ink);
  margin-right: 0.8em;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink-2);
  max-width: 34em;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand svg {
  width: 22px;
  height: 22px;
}

.brand rect {
  fill: currentColor;
}

.brand .hub {
  fill: var(--paper);
  stroke: currentColor;
  stroke-width: 6;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.93rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-2);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

.nav-links .nav-cta {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}

.nav-links .nav-cta:hover {
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}

/* Buttons and links */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 2px;
  padding: 15px 26px;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--accent);
  color: var(--ink);
}

.btn-light {
  background: var(--paper);
  color: var(--ink);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.link-arrow {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.link-arrow:hover {
  color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
}

/* Journey: text scrolls on the left, the blocks assemble on the right */
.journey-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
}

.chapter {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0;
  max-width: 520px;
}

.chapter h2 {
  margin-bottom: 0.6em;
}

.chapter p:not(.label) {
  color: var(--ink-2);
  font-size: 1.1rem;
}

.chapter-hero {
  min-height: calc(100vh - var(--header));
  max-width: 600px;
}

.chapter-done .btn {
  align-self: flex-start;
  margin-top: 12px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
  margin: 24px 0 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.stats dt {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stats dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.journey-stage {
  position: relative;
}

.stage {
  position: sticky;
  top: calc(var(--header) + (100vh - var(--header) - min(520px, 70vh)) / 2);
  width: min(100%, 520px, 70vh);
  aspect-ratio: 1;
  margin-left: auto;
  container-type: inline-size;
}

/*
  The finished shape is the DevVibe mark: four quadrants of four tiles
  around a hub. Positions are percentages of the stage; main.js only
  sets the scatter offsets (--dx, --dy in tile widths, --r in degrees).
*/
.tile {
  position: absolute;
  left: calc((var(--qx) + var(--ix)) * 1%);
  top: calc((var(--qy) + var(--iy)) * 1%);
  width: 22.5%;
  aspect-ratio: 1;
  display: flex;
  align-items: flex-end;
  padding: 0.7em;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(8px, 2.3cqi, 12px);
  line-height: 1.2;
  transform: translate(calc(var(--dx, 0) * 100%), calc(var(--dy, 0) * 100%)) rotate(calc(var(--r, 0) * 1deg));
  transition: background 0.35s, color 0.35s, border-color 0.35s;
  will-change: transform;
}

.tile:not(.set) {
  border-color: #aaa69b;
  color: var(--muted);
}

.tile.set {
  background: var(--ink);
  color: var(--paper);
}

.tile.set.now {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.q1 { --qx: 0; --qy: 0; }
.q2 { --qx: 53; --qy: 0; }
.q3 { --qx: 0; --qy: 53; }
.q4 { --qx: 53; --qy: 53; }
.i1 { --ix: 0; --iy: 0; }
.i2 { --ix: 24.5; --iy: 0; }
.i3 { --ix: 0; --iy: 24.5; }
.i4 { --ix: 24.5; --iy: 24.5; }

.stage .hub {
  position: absolute;
  left: 43%;
  top: 43%;
  width: 14%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  border: 0.9cqi solid var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: clamp(9px, 2.6cqi, 14px);
  font-weight: 600;
  color: var(--ink);
  transform: scale(var(--s, 0));
  z-index: 2;
}

/* Sections */
.section {
  padding: 120px 0;
}

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

.section-title {
  max-width: 16em;
  margin-bottom: 0.5em;
}

.section-sub {
  color: var(--ink-2);
  font-size: 1.1rem;
  max-width: 32em;
}

.cols-2,
.cols-3,
.cols-4 {
  display: grid;
  gap: 48px;
  margin-top: 56px;
}

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cols-2 > div,
.cols-3 > div,
.cols-4 > div {
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}

.cols-2 p,
.cols-3 p,
.cols-4 p {
  color: var(--ink-2);
  margin: 0;
}

.quotes {
  margin-top: 8px;
}

.quotes figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.quotes blockquote {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.quotes figcaption {
  font-weight: 600;
  font-size: 0.95rem;
}

.quotes figcaption span {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--ink);
}

.plan {
  padding: 28px 32px 32px 0;
  display: flex;
  flex-direction: column;
}

.plan + .plan {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.plan h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--accent);
  padding: 3px 7px;
  vertical-align: middle;
  margin-left: 8px;
}

.plan-for {
  color: var(--muted);
}

.plan ul {
  list-style: none;
  margin: 8px 0 32px;
  padding: 0;
  flex: 1;
}

.plan li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.97rem;
}

.plan .link-arrow {
  align-self: flex-start;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
}

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

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

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 0;
  font-weight: 600;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 1.2rem;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  color: var(--ink-2);
  margin: 0;
  padding: 0 40px 22px 0;
}

/* Contact */
.section-ink {
  background: var(--ink);
  color: var(--paper);
}

.section-ink .label,
.section-ink .section-sub,
.section-ink .form-note,
.section-ink .optional {
  color: #a8a59d;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-alt {
  margin-top: 40px;
  color: #a8a59d;
}

.contact-alt a {
  color: var(--paper);
}

.form {
  display: grid;
  gap: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--paper);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #55534e;
  border-radius: 0;
  padding: 10px 0;
}

.field select {
  appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23f5f3ee' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") right 4px center no-repeat;
  padding-right: 24px;
}

.field select option {
  color: var(--ink);
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.field ::placeholder {
  color: #77746d;
}

.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form .btn {
  justify-self: start;
}

.form-note {
  font-size: 0.85rem;
  margin: 0;
}

.form-note a {
  color: inherit;
}

.form-status {
  margin: 0;
  padding: 12px 0 12px 14px;
  border-left: 2px solid;
}

.form-status[hidden] {
  display: none;
}

.form-status.ok {
  border-color: #6fcf8a;
}

.form-status.err {
  border-color: var(--accent);
}

.field [aria-invalid="true"] {
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.site-footer .brand {
  color: var(--ink);
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 26em;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}

.site-footer ul a {
  text-decoration: none;
}

.site-footer ul a:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 56px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Inner pages */
.page-head {
  padding: 120px 0 80px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 13em;
}

.prose {
  max-width: 680px;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2em 0 0.6em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--ink-2);
}

.role {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8em;
}

.big {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}

.list {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.list h3 {
  margin: 0;
}

.list .meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
}

.not-found {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 24px;
}

.not-found .actions {
  justify-content: center;
}

/* Private inbox */
.admin main {
  padding-top: 48px;
  padding-bottom: 80px;
  max-width: 860px;
}

.admin h1 {
  font-size: 2rem;
  margin: 0;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-card {
  max-width: 460px;
  margin: 12vh auto 0;
}

.admin-card h1 {
  margin-bottom: 16px;
}

.admin-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 16px;
}

.admin-tabs a {
  padding: 8px 0;
  text-decoration: none;
  color: var(--muted);
}

.admin-tabs a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.admin-btn {
  display: inline-block;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: none;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 6px 12px;
  text-decoration: none;
  cursor: pointer;
}

.admin-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.admin-btn.danger {
  border-color: #b3261e;
  color: #b3261e;
}

.enquiry {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.enquiry header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.enquiry h2 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.enquiry time,
.admin .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.enquiry .body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0;
}

.statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 12px;
}

.status {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.status-sent {
  color: #1d7a3e;
}

.status-failed {
  color: #b3261e;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.row-actions summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
}

.row-actions details[open] summary {
  margin-bottom: 8px;
}

.pager {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.empty {
  color: var(--muted);
  padding: 32px 0;
}

/* Responsive */
@media (max-width: 900px) {
  .journey-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* On small screens the stage pins under the header and the chapters scroll below it. */
  .journey-stage {
    order: -1;
    position: sticky;
    top: var(--header);
    z-index: 5;
    background: var(--paper);
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .stage {
    position: relative;
    top: 0;
    width: min(100%, 34vh);
    margin: 0 auto;
  }

  .chapter {
    min-height: 70vh;
    padding: 48px 0;
  }

  .chapter-hero {
    min-height: 0;
    padding-top: 40px;
  }

  .cols-3,
  .cols-4,
  .plans,
  .faq-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cols-4 {
    grid-template-columns: 1fr 1fr;
  }

  .plan,
  .plan + .plan {
    padding: 28px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .faq-grid,
  .contact-grid {
    gap: 32px;
  }
}

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

  .container {
    padding: 0 16px;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 1.05rem;
  }

  .nav-links .nav-cta {
    border: 0;
    color: var(--accent);
  }

  .section {
    padding: 80px 0;
  }

  .page-head {
    padding: 72px 0 56px;
  }

  .cols-2,
  .cols-4,
  .form-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cols-2,
  .cols-3,
  .cols-4 {
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .stage .hub {
    transition: none;
  }
}
