/* MaroSoft Services LLC — site styles
   Visual system: zellige tilework. One 8-point star motif, cut and recombined. */

:root {
  --paper: #f3f6f5;
  --surface: #ffffff;
  --ink: #12332d;
  --muted: #4b6560;
  --line: #d3dedb;
  --green: #0b6e58;
  --green-dark: #0a4d40;
  --deep: #0e3b33;
  --mid: #155e4f;
  --saffron: #e3a833;
  --saffron-soft: #f8ecd2;
  --cobalt: #2c5bb0;

  /* Estimator stage colours (validated for colour-vision deficiency) */
  --stage-deposit: #d99a22;
  --stage-milestones: #0e8a66;
  --stage-delivery: #2c5bb0;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 118%;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.4rem + 2vw, 2.625rem);
  --step-4: clamp(2.375rem, 1.5rem + 3.6vw, 4.25rem);
  --step-5: clamp(2.75rem, 1.4rem + 5.4vw, 5.5rem);

  --gutter: clamp(16px, 4vw, 32px);
  --max: 1180px;
  --radius: 0;

  --star: polygon(100% 50%, 85.36% 64.64%, 85.36% 85.36%, 64.64% 85.36%, 50% 100%, 35.36% 85.36%, 14.64% 85.36%, 14.64% 64.64%, 0 50%, 14.64% 35.36%, 14.64% 14.64%, 35.36% 14.64%, 50% 0, 64.64% 14.64%, 85.36% 14.64%, 85.36% 35.36%);
  --frieze: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Crect width='36' height='18' fill='%230e3b33'/%3E%3Cpolygon points='16.50,9.00 14.30,11.20 14.30,14.30 11.20,14.30 9.00,16.50 6.80,14.30 3.70,14.30 3.70,11.20 1.50,9.00 3.70,6.80 3.70,3.70 6.80,3.70 9.00,1.50 11.20,3.70 14.30,3.70 14.30,6.80' fill='%23e3a833'/%3E%3Cpolygon points='9,6.6 11.4,9 9,11.4 6.6,9' fill='%230e3b33'/%3E%3Cpolygon points='34.50,9.00 32.30,11.20 32.30,14.30 29.20,14.30 27.00,16.50 24.80,14.30 21.70,14.30 21.70,11.20 19.50,9.00 21.70,6.80 21.70,3.70 24.80,3.70 27.00,1.50 29.20,3.70 32.30,3.70 32.30,6.80' fill='%230b6e58'/%3E%3Cpolygon points='27,6.6 29.4,9 27,11.4 24.6,9' fill='%23f3f6f5'/%3E%3C/svg%3E");
  --mosaic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%230e3b33'/%3E%3Cpolygon points='62.00,32.00 53.21,40.79 53.21,53.21 40.79,53.21 32.00,62.00 23.21,53.21 10.79,53.21 10.79,40.79 2.00,32.00 10.79,23.21 10.79,10.79 23.21,10.79 32.00,2.00 40.79,10.79 53.21,10.79 53.21,23.21' fill='%23155e4f'/%3E%3Cpolygon points='32,23 41,32 32,41 23,32' fill='%230b6e58'/%3E%3C/svg%3E");
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green-dark);
}

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

h1,
h2,
h3 {
  font-stretch: var(--wide);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

h1 {
  font-size: var(--step-4);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--step-3);
  font-weight: 700;
}

h3 {
  font-size: var(--step-1);
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.glyph {
  width: 56px;
  height: 56px;
  flex: none;
}

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

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

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

.frieze {
  height: 18px;
  background: var(--deep) var(--frieze) repeat-x 0 0 / 36px 18px;
}

html:not(.js) .js-only {
  display: none;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-stretch: 125%;
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  width: 30px;
  height: 30px;
}

/* Cut-tile shape shared by buttons, the menu toggle and payment tags.
   Each component sets its own --cut (corner size). */
.btn,
.nav-toggle,
.pay {
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}

.nav-toggle {
  --cut: 7px;
  display: none;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 650;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  padding: 11px 16px;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--line);
}

.nav-toggle[aria-expanded="true"] {
  background: var(--ink);
  color: #fff;
}

.nav-toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--saffron);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -5px;
}

.nav-toggle-bars::after {
  top: 5px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a:not(.btn) {
  position: relative;
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:not(.btn):hover {
  color: var(--green);
}

/* Current page: a small star set under the link, like a tile inlay */
.site-nav a[aria-current="page"] {
  color: var(--green);
  font-weight: 650;
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  background: var(--saffron);
  clip-path: var(--star);
}

.site-nav .btn {
  margin-left: 12px;
}

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

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a:not(.btn) {
    padding: 12px 8px;
  }

  .site-nav a[aria-current="page"]::after {
    left: auto;
    right: 8px;
    bottom: auto;
    top: 50%;
    margin: -4.5px 0 0;
  }

  .site-nav .btn {
    width: 100%;
    margin: 8px 0 0;
  }
}

/* ---------- Buttons: cut tiles with a star inlay ----------
   The visible edge is the button's own background; ::after is the inner
   fill, inset by --edge. Drawing the edge inside the shape keeps keyboard
   focus visible, since clip-path would clip an ordinary outline. */

.btn {
  --cut: 11px;
  --edge: 1.5px;
  --edge-color: var(--green);
  --fill: var(--green);
  --mark: var(--saffron);
  --mark-core: var(--deep);
  --mark-size: 18px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0.7rem 1.6rem 0.7rem 1.15rem;
  border: 0;
  background: var(--edge-color);
  color: #fff;
  font: inherit;
  font-weight: 650;
  font-stretch: 108%;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.btn::after {
  --cut-in: calc(var(--cut) - var(--edge) * 0.414);
  content: "";
  position: absolute;
  inset: var(--edge);
  z-index: -1;
  background: var(--fill);
  clip-path: polygon(var(--cut-in) 0, calc(100% - var(--cut-in)) 0, 100% var(--cut-in), 100% calc(100% - var(--cut-in)), calc(100% - var(--cut-in)) 100%, var(--cut-in) 100%, 0 calc(100% - var(--cut-in)), 0 var(--cut-in));
  transition: background-color 200ms ease;
}

/* The star: its square core reads as a diamond at rest and turns square on hover */
.btn::before {
  content: "";
  width: var(--mark-size);
  height: var(--mark-size);
  flex: none;
  clip-path: var(--star);
  background:
    linear-gradient(var(--mark-core), var(--mark-core)) center / 34% 34% no-repeat,
    var(--mark);
  transform: rotate(45deg);
  transition: transform 460ms cubic-bezier(0.2, 0.7, 0.2, 1), background-color 200ms ease;
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: rotate(90deg);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  --edge: 3px;
  --edge-color: var(--saffron);
}

.btn-primary:hover {
  --fill: var(--deep);
  --edge-color: var(--deep);
  color: #fff;
}

.btn-primary:focus-visible {
  --edge-color: var(--saffron);
}

.btn-secondary {
  --edge-color: var(--ink);
  --fill: var(--surface);
  --mark: var(--green);
  --mark-core: var(--saffron);
  color: var(--ink);
}

.btn-secondary:hover {
  --fill: var(--ink);
  --mark: var(--saffron);
  --mark-core: var(--deep);
  color: #fff;
}

.btn-secondary:focus-visible {
  --edge-color: var(--saffron);
}

.btn-saffron {
  --edge-color: var(--saffron);
  --fill: var(--saffron);
  --mark: var(--deep);
  --mark-core: var(--saffron);
  color: var(--deep);
}

.btn-saffron:hover {
  --fill: #f0bb4f;
  --edge-color: #f0bb4f;
  color: var(--deep);
}

.btn-saffron:focus-visible {
  --edge-color: #fff;
}

.btn-sm {
  --cut: 8px;
  --mark-size: 14px;
  min-height: 40px;
  gap: 9px;
  padding: 0.45rem 1.05rem 0.45rem 0.8rem;
  font-size: 0.9375rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn::before,
  .btn::after {
    transition: none;
  }
}

/* ---------- Hero: interactive mosaic with an inset panel ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--deep) var(--mosaic) 0 0 / 72px 72px;
}

.mosaic {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.mosaic svg {
  max-width: none;
}

.mosaic .m-bg {
  fill: var(--deep);
  stroke: #0a2e28;
  stroke-width: 1;
}

.mosaic .m-star {
  fill: var(--mid);
  transition: fill 420ms ease;
}

.mosaic .m-core {
  fill: var(--green);
  transition: fill 420ms ease;
}

.mosaic .mt {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.mosaic .mt.a-saffron .m-star {
  fill: var(--saffron);
}

.mosaic .mt.a-saffron .m-core {
  fill: var(--deep);
}

.mosaic .mt.a-paper .m-star {
  fill: var(--paper);
}

.mosaic .mt.a-paper .m-core {
  fill: var(--cobalt);
}

.mosaic .mt.lit {
  transform: rotate(22.5deg) scale(0.9);
}

.mosaic .mt.lit .m-star {
  fill: var(--saffron);
}

.mosaic .mt.lit .m-core {
  fill: var(--cobalt);
}

.mosaic.is-assembling .mt {
  animation: tile-set 640ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0ms);
}

@keyframes tile-set {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-45deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(56px, 9vw, 128px);
  pointer-events: none;
}

.hero-panel {
  pointer-events: auto;
  max-width: 680px;
  background: var(--surface);
  padding: clamp(28px, 4.5vw, 56px);
  box-shadow: 0 0 0 8px var(--deep), 0 0 0 10px var(--saffron);
}

.hero h1 {
  font-size: var(--step-5);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin-bottom: 0.4em;
}

.hero-lede {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 32em;
  margin-bottom: 1.6em;
}

.hero-legal {
  margin: 1.6em 0 0;
  padding-top: 1em;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}

@media (max-width: 640px) {
  .hero {
    background-size: 48px 48px;
  }

  .hero-inner {
    padding-block: 120px 40px;
  }

  .hero-panel {
    box-shadow: 0 0 0 6px var(--deep), 0 0 0 8px var(--saffron);
  }
}

/* ---------- Promises row ---------- */

.promises {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.promises ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  list-style: none;
  margin: 0 auto;
  padding-block: 22px;
  font-weight: 600;
}

.promises li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.promises li::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background: var(--saffron);
  clip-path: var(--star);
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

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

.section-intro {
  max-width: 40em;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-intro h2 {
  max-width: 20ch;
}

.section-intro p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Service catalog (home) ---------- */

.catalog {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.6fr);
  gap: 40px 72px;
  align-items: start;
}

.catalog-head {
  position: sticky;
  top: 100px;
}

.catalog-head h2 {
  max-width: 10ch;
}

.catalog-head p {
  color: var(--muted);
}

.catalog-head .small {
  font-size: var(--step--1);
}

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

.service-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: start;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

.service-list .glyph {
  grid-row: 1 / span 2;
}

.service-list h3 {
  margin: 0;
  font-size: var(--step-1);
}

.service-list h3 a {
  color: inherit;
  text-decoration: none;
}

.service-list h3 a:hover {
  color: var(--green);
  text-decoration: underline;
}

.service-list p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
}

.service-list .price {
  grid-column: 3;
  grid-row: 1;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.price small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: var(--step--1);
}

@media (max-width: 860px) {
  .catalog {
    grid-template-columns: 1fr;
  }

  .catalog-head {
    position: static;
  }

  .catalog-head h2 {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .service-list li {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 16px;
  }

  .service-list .glyph {
    width: 48px;
    height: 48px;
    grid-row: 1 / span 3;
  }

  .service-list .price {
    grid-column: 2;
    grid-row: auto;
    text-align: left;
  }

  .service-list .price small {
    display: inline;
    margin-left: 4px;
  }
}

/* ---------- Process: one tile, sketch to finished piece ---------- */

.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px 28px;
}

.stages .stage-tile {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
}

.stages h3 {
  font-size: var(--step-0);
  margin-bottom: 0.4em;
}

.stages p {
  font-size: var(--step--1);
  color: var(--muted);
  margin-bottom: 0.7em;
}

.pay {
  --cut: 5px;
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--deep);
  background: var(--saffron-soft);
  padding: 3px 11px;
}

@media (max-width: 960px) {
  .stages {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stages li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 20px;
    padding-bottom: 24px;
  }

  .stages .stage-tile {
    width: 56px;
    height: 56px;
    grid-row: 1 / span 3;
    margin: 0;
  }

  .stages li > :not(.stage-tile) {
    grid-column: 2;
  }

  .stages .pay {
    justify-self: start;
  }
}

/* ---------- Company plaque ---------- */

.company {
  background: var(--deep);
  color: #e6efec;
}

.company .container {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px 72px;
  align-items: center;
  padding-block: clamp(56px, 7vw, 96px);
}

.company h2 {
  color: #fff;
  max-width: 14ch;
}

.company p {
  color: #c4d6d1;
  max-width: 34em;
}

.company a {
  color: #fff;
}

.company a:hover {
  color: var(--saffron);
}

.plaque {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 40px 28px 24px;
}

.plaque .glyph {
  position: absolute;
  top: -28px;
  left: 28px;
  box-shadow: 0 0 0 6px var(--deep);
}

.plaque dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 28px;
  font-size: var(--step--1);
}

.plaque dt {
  color: #9fbab3;
}

.plaque dd {
  margin: 0;
  color: #fff;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .company .container {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .plaque dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .plaque dd {
    margin-bottom: 12px;
  }
}

/* ---------- Inner page header ---------- */

.page-header {
  background: var(--surface);
}

.page-header::after {
  content: "";
  display: block;
  height: 12px;
  background: var(--deep) var(--frieze) repeat-x 0 0 / 24px 12px;
}

.page-header .container {
  padding-block: clamp(44px, 6vw, 80px) clamp(36px, 5vw, 56px);
}

.page-header h1 {
  max-width: 16ch;
}

.page-header p {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 36em;
  margin: 0;
}

.page-header .meta {
  font-size: var(--step--1);
  margin-top: 16px;
}

/* ---------- Services page ---------- */

.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 24px 64px;
  padding-block: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.service-detail:last-of-type {
  border-bottom: 0;
}

.service-detail .glyph {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.service-detail h2 {
  font-size: var(--step-2);
  margin-bottom: 0.4em;
}

.service-detail .price {
  font-weight: 700;
  font-size: var(--step-1);
  margin: 0;
}

.service-detail .body > p {
  color: var(--muted);
  max-width: 40em;
}

.service-detail h3 {
  font-size: var(--step-0);
  margin: 1.4em 0 0.5em;
}

.detail-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 40px;
}

.detail-cols ul {
  margin: 0;
  padding-left: 1.1em;
}

.detail-cols li {
  margin-bottom: 0.35em;
}

@media (max-width: 760px) {
  .service-detail,
  .detail-cols {
    grid-template-columns: 1fr;
  }
}

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

.tech h3 {
  font-size: var(--step-0);
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--ink);
}

.tech ul {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}

.tech li {
  padding: 4px 0;
}

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

/* ---------- Pricing: estimator ---------- */

.estimator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
}

.est-controls {
  padding: clamp(22px, 3vw, 36px);
  border-right: 1px solid var(--line);
}

.est-controls fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 28px;
  min-width: 0;
}

.est-controls fieldset:last-child {
  margin-bottom: 0;
}

.est-controls legend {
  font-weight: 650;
  padding: 0;
  margin-bottom: 10px;
}

.choices {
  display: grid;
  gap: 8px;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
}

.choice:hover {
  border-color: #a9bcb7;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice .glyph {
  width: 32px;
  height: 32px;
}

.choice-name {
  font-weight: 600;
}

.choice-price {
  font-size: var(--step--1);
  color: var(--muted);
  white-space: nowrap;
}

.choice.is-selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--paper);
}

.choice:focus-within {
  outline: 3px solid var(--saffron);
  outline-offset: 1px;
}

.choice-none {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 14px;
}

.est-result {
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.est-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}

.est-summary .label {
  display: block;
  font-size: var(--step--1);
  color: var(--muted);
}

.est-total {
  font-stretch: var(--wide);
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.est-time {
  font-weight: 650;
}

.est-figure {
  margin: 0;
}

.est-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  max-width: 340px;
}

.est-star {
  aspect-ratio: 1;
  clip-path: var(--star);
  background: var(--line);
  transition: opacity 160ms ease;
  animation: star-in 260ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: var(--d, 0ms);
}

@keyframes star-in {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-45deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.est-star[data-stage="deposit"] {
  background: var(--stage-deposit);
}

.est-star[data-stage="milestones"] {
  background: var(--stage-milestones);
}

.est-star[data-stage="delivery"] {
  background: var(--stage-delivery);
}

.est-star[data-stage="deposit milestones"] {
  background: linear-gradient(90deg, var(--stage-deposit) 50%, var(--stage-milestones) 50%);
}

.est-star[data-stage="deposit delivery"] {
  background: linear-gradient(90deg, var(--stage-deposit) 50%, var(--stage-delivery) 50%);
}

.estimator[data-focus="deposit"] .est-star:not([data-stage~="deposit"]),
.estimator[data-focus="milestones"] .est-star:not([data-stage~="milestones"]),
.estimator[data-focus="delivery"] .est-star:not([data-stage~="delivery"]) {
  opacity: 0.18;
}

.est-figure figcaption {
  margin-top: 10px;
  font-size: var(--step--1);
  color: var(--muted);
}

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

.est-schedule li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: default;
}

.est-schedule li.is-focus {
  background: var(--paper);
  box-shadow: -10px 0 0 var(--paper), 10px 0 0 var(--paper);
}

.est-swatch {
  width: 14px;
  height: 14px;
  clip-path: var(--star);
  align-self: center;
}

.est-schedule .stage-name {
  font-weight: 650;
}

.est-schedule .stage-amount {
  font-weight: 700;
  text-align: right;
}

.est-schedule .stage-when {
  grid-column: 2 / -1;
  font-size: var(--step--1);
  color: var(--muted);
}

.est-care {
  margin: 0;
  font-size: var(--step--1);
}

.est-note {
  margin: auto 0 0;
  font-size: var(--step--1);
  color: var(--muted);
}

@media (max-width: 860px) {
  .estimator {
    grid-template-columns: 1fr;
  }

  .est-controls {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Pricing tables ---------- */

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1.5px solid var(--ink);
}

.price-table th,
.price-table td {
  text-align: left;
  vertical-align: top;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.price-table thead th {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}

.price-table tbody tr:last-child > * {
  border-bottom: 0;
}

.price-table .row-name {
  display: flex;
  align-items: center;
  gap: 14px;
  font-stretch: var(--wide);
  font-weight: 650;
}

.price-table .row-name .glyph {
  width: 36px;
  height: 36px;
}

.price-table td.amount {
  font-weight: 700;
  white-space: nowrap;
}

.price-table td.time {
  white-space: nowrap;
  color: var(--muted);
}

.price-table ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: var(--step--1);
}

@media (max-width: 760px) {
  .price-table,
  .price-table tbody,
  .price-table tr,
  .price-table tbody th,
  .price-table tbody td {
    display: block;
    width: 100%;
  }

  .price-table thead {
    display: none;
  }

  .price-table tbody tr {
    padding: 18px;
    border-bottom: 1px solid var(--line);
  }

  .price-table tbody tr:last-child {
    border-bottom: 0;
  }

  .price-table tbody th,
  .price-table tbody td {
    padding: 0;
    border: 0;
  }

  .price-table tbody td.amount {
    margin: 8px 0;
    font-size: var(--step-1);
  }

  .price-table tbody td.time {
    margin-top: 8px;
    font-size: var(--step--1);
  }

  .price-table td.time::before {
    content: "Typical timeline: ";
  }
}

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

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px);
}

.plan-featured {
  border: 1.5px solid var(--ink);
}

.plan .amount,
.big-rate {
  font-stretch: var(--wide);
  font-size: var(--step-3);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0.2em 0 0.1em;
}

.plan .amount span,
.big-rate span {
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.plan .billing {
  color: var(--muted);
  font-size: var(--step--1);
}

.plan ul {
  padding-left: 1.1em;
  margin: 1em 0 0;
}

.plan li {
  margin-bottom: 0.4em;
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.list-note {
  margin-top: 20px;
  font-size: var(--step--1);
  color: var(--muted);
}

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

.terms-grid h3 {
  font-size: var(--step-0);
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--ink);
}

.terms-grid p,
.terms-grid ul {
  font-size: var(--step--1);
  color: var(--muted);
}

.terms-grid ul {
  padding-left: 1.1em;
  margin: 0;
}

@media (max-width: 860px) {
  .terms-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 820px;
  border-top: 1.5px solid var(--ink);
}

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

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

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: var(--green);
  clip-path: var(--star);
  transition: transform 220ms ease, background-color 220ms ease;
}

.faq details[open] summary::after {
  transform: rotate(22.5deg);
  background: var(--saffron);
}

.faq details p {
  color: var(--muted);
  max-width: 44em;
  padding-bottom: 8px;
}

/* ---------- About ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 24px 64px;
}

.split .prose p,
.split .prose ul {
  max-width: 40em;
}

@media (max-width: 760px) {
  .split {
    grid-template-columns: 1fr;
  }
}

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

.principles li {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 8px 64px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.principles h3 {
  margin: 0;
  font-size: var(--step-1);
}

.principles p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .principles li {
    grid-template-columns: 1fr;
  }
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
}

.details-table th,
.details-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.details-table tr:last-child > * {
  border-bottom: 0;
}

.details-table th {
  width: 38%;
  font-weight: 500;
  color: var(--muted);
}

@media (max-width: 520px) {
  .details-table th,
  .details-table td {
    display: block;
    width: 100%;
  }

  .details-table th {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .details-table td {
    padding-top: 2px;
  }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  gap: 40px 64px;
  align-items: start;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-grid h3 {
  margin-top: 1.6em;
}

.contact-methods {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  border-top: 1.5px solid var(--ink);
}

.contact-methods li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contact-methods .label {
  display: block;
  font-size: var(--step--1);
  color: var(--muted);
}

.contact-methods .value {
  font-weight: 600;
  font-size: var(--step-1);
  overflow-wrap: anywhere;
}

.contact-methods address {
  font-style: normal;
  font-weight: 600;
}

.next-steps {
  padding-left: 1.2em;
  margin: 0;
  color: var(--muted);
}

.next-steps li {
  margin-bottom: 0.6em;
}

.form {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 36px);
  scroll-margin-top: 90px;
}

.form h2 {
  font-size: var(--step-2);
}

.field {
  margin-bottom: 18px;
}

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

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-weight: 600;
  font-size: var(--step--1);
  margin-bottom: 6px;
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #a9bcb7;
  border-radius: var(--radius);
  padding: 11px 12px;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 0;
  border-color: var(--green);
}

.field-error {
  display: none;
  margin: 6px 0 0;
  font-size: var(--step--1);
  color: #a3271c;
}

.field.has-error input,
.field.has-error textarea {
  border-color: #a3271c;
}

.field.has-error .field-error {
  display: block;
}

.form-note {
  font-size: var(--step--1);
  color: var(--muted);
  margin: 14px 0 0;
}

.form-status {
  margin: 14px 0 0;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--green-dark);
}

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

/* ---------- Legal pages ---------- */

.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 92px;
  font-size: var(--step--1);
}

.legal-toc h2 {
  font-size: var(--step-0);
  margin-bottom: 0.75em;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.3em;
  color: var(--muted);
}

.legal-toc li {
  margin-bottom: 0.45em;
}

.legal-toc a {
  color: var(--muted);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--green);
  text-decoration: underline;
}

.legal-body {
  max-width: 46em;
}

.legal-body section {
  scroll-margin-top: 88px;
  padding-bottom: 12px;
}

.legal-body h2 {
  font-size: var(--step-2);
  margin-top: 1.4em;
  padding-top: 0.2em;
}

.legal-body section:first-child h2 {
  margin-top: 0;
}

.legal-body h3 {
  font-size: var(--step-0);
  margin-top: 1.4em;
}

.legal-body ul,
.legal-body ol {
  padding-left: 1.3em;
}

.legal-body li {
  margin-bottom: 0.45em;
}

.callout {
  background: var(--saffron-soft);
  border-left: 4px solid var(--saffron);
  padding: 16px 20px;
  margin: 0 0 1.5em;
}

.callout p:last-child {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .legal {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .legal-toc {
    position: static;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
  }
}

/* ---------- Closing call to action ---------- */

.cta-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.cta-band .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(40px, 6vw, 64px);
}

.cta-band h2 {
  margin: 0 0 0.2em;
  font-size: var(--step-2);
}

.cta-band p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  background: #081d19;
  color: #c3d3cf;
  font-size: var(--step--1);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px 40px;
  padding-block: 56px 40px;
}

.site-footer .brand {
  color: #fff;
  margin-bottom: 14px;
}

.site-footer h2 {
  font-size: var(--step--1);
  font-stretch: 100%;
  font-weight: 650;
  color: #fff;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.site-footer a {
  color: #c3d3cf;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer address {
  font-style: normal;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #9fb4ae;
}

.footer-bottom p {
  margin: 0;
}

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

/* ---------- Utilities ---------- */

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

.mt-0 {
  margin-top: 0;
}

.h-sm {
  font-size: var(--step-2);
}

.center-404 {
  min-height: 52vh;
  display: grid;
  align-content: center;
  justify-items: start;
  padding-block: 64px;
}

/* ---------- Motion preferences ---------- */

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

  .mosaic .mt,
  .mosaic .m-star,
  .mosaic .m-core,
  .faq summary::after {
    transition: none;
  }

  .mosaic.is-assembling .mt,
  .est-star {
    animation: none;
  }

  .mosaic .mt.lit {
    transform: none;
  }
}
