/* Portfolio: woven-label system.
   One family (Archivo) used at different widths: expanded for display,
   normal for reading, condensed for small supporting text. */

:root {
  --loom: #F3F5F8;        /* page */
  --white: #FFFFFF;
  --ink: #1C212B;         /* text */
  --slate: #545D6E;       /* secondary text */
  --thread: #2741C7;      /* cobalt accent */
  --thread-deep: #1A2E94;
  --selvedge: #E2E7FA;    /* pale cobalt */
  --rule: #D3D9E2;
  --go: #0F7A45;
  --amber: #A85400;
  --stop: #B3261E;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(4rem, 9vw, 7.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

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

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: var(--thread); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--thread-deep); text-decoration-thickness: 2px; }

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

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: .75rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
}
.skip:focus { top: .75rem; color: var(--white); }

/* ---------- Header: the seam the label hangs from ---------- */

.masthead {
  position: relative;
  z-index: 2;                    /* the label tucks under the seam */
  background: var(--loom);
  border-bottom: 1px solid var(--rule);
}
.masthead::after {               /* stitch line along the seam */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 5px;
  border-bottom: 1.5px dashed rgba(39, 65, 199, .35);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
}
.brand:hover { color: var(--ink); }
.brand__name { font-weight: 750; font-stretch: 112%; font-size: 1.0625rem; }
.brand__role { font-stretch: 80%; font-weight: 500; color: var(--slate); font-size: .9375rem; }

.nav ul { display: flex; gap: .25rem; align-items: center; }
.nav li:not(.nav__cta) { display: none; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: .75rem;
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}
.nav a:hover { color: var(--thread); }
.nav__cta a {
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding-inline: 1rem;
}
.nav__cta a:hover { background: var(--ink); color: var(--white); }

@media (min-width: 48rem) {
  .nav li:not(.nav__cta) { display: block; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .625rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--thread); color: var(--white); }
.btn--primary:hover { background: var(--thread-deep); color: var(--white); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--line { border-color: var(--thread); color: var(--thread); }
.btn--line:hover { background: var(--thread); color: var(--white); }

/* ---------- Hero ---------- */

.hero {
  padding-bottom: var(--space);
  overflow-x: hidden;            /* the swinging label must never cause sideways scroll */
  overflow-x: clip;
}

.hero__grid {
  display: grid;
  gap: 3rem;
}

.hero__text { padding-top: clamp(2.5rem, 7vw, 6rem); }

.hero h1 {
  font-size: clamp(2.125rem, 1.1rem + 4.6vw, 4.375rem);
  font-stretch: 118%;
  font-weight: 780;
  line-height: 1.02;
  letter-spacing: -.022em;
  max-width: 13ch;
  text-wrap: balance;
}

.lede {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.clock {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-top: 1.75rem;
  font-stretch: 87.5%;
  color: var(--slate);
  font-size: .9375rem;
}
.clock__dot {
  flex: none;
  width: .625rem;
  height: .625rem;
  border-radius: 50%;
  background: var(--slate);
  transform: translateY(-.05em);
}
.clock.is-working .clock__dot { background: var(--go); box-shadow: 0 0 0 4px rgba(15, 122, 69, .14); }

/* The label */

.hero__label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  padding-top: 1.25rem;
}
.hero__label::before {           /* mobile: its own short seam */
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  border-top: 1.5px dashed rgba(39, 65, 199, .35);
}

.label {
  position: relative;
  width: min(19.5rem, 100%);
  padding: 2.5rem 1.625rem 1.5rem;
  color: var(--thread-deep);
  background-color: var(--white);
  background-image:
    repeating-linear-gradient(90deg, rgba(39, 65, 199, .05) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg, rgba(28, 33, 43, .035) 0 1px, transparent 1px 3px);
  border-radius: 1px 1px 5px 5px;
  box-shadow: 0 1px 0 var(--rule), 0 28px 40px -26px rgba(28, 33, 43, .5);
  transform: rotate(-2.5deg);
  transform-origin: 50% 0;
  animation: settle 1.6s cubic-bezier(.25, .7, .25, 1) .2s both;
}
.label::before {                 /* stitched edge */
  content: "";
  position: absolute;
  inset: 1.5rem .55rem .55rem;
  border: 1.5px dashed currentColor;
  border-radius: 2px;
  opacity: .45;
  pointer-events: none;
}
.label__fold {
  position: absolute;
  inset: 0 0 auto;
  height: 1rem;
  background: var(--selvedge);
  border-bottom: 1px solid rgba(39, 65, 199, .25);
}

.label__for {
  font-stretch: 75%;
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.2;
}
.label__brand {
  margin-top: .25rem;
  font-stretch: 125%;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  min-height: 2.04em;
  display: flex;
  align-items: flex-end;
}
.label__brand.is-long { font-size: 1.5rem; }

.label__care {
  display: grid;
  gap: .55rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1.5px solid currentColor;
  font-stretch: 87.5%;
  font-weight: 550;
  font-size: .9375rem;
  line-height: 1.3;
}
.label__care li { display: grid; grid-template-columns: 1.375rem 1fr; gap: .6rem; align-items: center; }
.label__care svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.label__made {
  margin-top: 1.25rem;
  padding-top: .9rem;
  border-top: 1.5px dashed currentColor;
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.25;
}

@keyframes settle {
  0%   { transform: rotate(-10deg); }
  45%  { transform: rotate(2deg); }
  72%  { transform: rotate(-4deg); }
  100% { transform: rotate(-2.5deg); }
}

.label-try {
  display: grid;
  gap: .4rem;
  width: min(19.5rem, 100%);
}
.label-try label { font-stretch: 87.5%; font-weight: 600; font-size: .9375rem; }
.label-try input {
  width: 100%;
  min-height: 48px;
  padding: .5rem .875rem;
  border: 1.5px solid var(--slate);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.label-try input::placeholder { color: var(--slate); opacity: 1; }
.label-try input:focus-visible { border-color: var(--thread); }

@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 4rem; }
  .hero__label { padding-top: 0; margin-top: -6px; }   /* tuck under the header seam */
  .hero__label::before { display: none; }
  .label { margin-top: 0; }
}

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

.section { padding-block: var(--space); }
.section--white { background: var(--white); border-block: 1px solid var(--rule); }

.section h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  font-stretch: 112%;
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.section__head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head p { margin-top: 1rem; color: var(--slate); font-size: 1.125rem; }

/* ---------- Builds ---------- */

.builds { display: grid; gap: clamp(3.5rem, 7vw, 6rem); }

.build { display: grid; gap: 1.75rem; }

.frame {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 24px 48px -32px rgba(28, 33, 43, .45);
}
.frame__bar {
  display: flex;
  align-items: center;
  height: 2rem;
  padding-inline: .75rem;
  border-bottom: 1px solid var(--rule);
  background: var(--loom);
  font-stretch: 80%;
  font-size: .8125rem;
  color: var(--slate);
}
.frame__bar span {
  padding: .1rem .6rem;
  border-radius: 99px;
  background: var(--white);
  border: 1px solid var(--rule);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Screenshots: desktop in a browser frame, the phone view overlapping it */
.build__preview { position: relative; padding: 0 9% 13% 0; }
.frame__shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 586;
  background: var(--selvedge);
}
.phone-shot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 27%;
  height: auto;
  aspect-ratio: 260 / 563;
  object-fit: cover;
  object-position: top;
  border: 5px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 18px 36px -18px rgba(28, 33, 43, .55);
}

.build h3 {
  font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem);
  font-stretch: 108%;
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.build__body > p { margin-top: .875rem; max-width: 38rem; }

.ticks { display: grid; gap: .45rem; margin-top: 1.25rem; }
.ticks li { position: relative; padding-left: 1.5rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .78em;
  width: .875rem;
  border-top: 2px solid var(--thread);
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: .75rem 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.meta dt { font-stretch: 80%; font-weight: 600; font-size: .875rem; color: var(--slate); }
.meta dd { font-weight: 550; }
.meta [hidden] { display: none; }

.build .btn { margin-top: 1.75rem; }

/* Lighthouse scores: hidden until real numbers are filled in */
.lh[hidden] { display: none; }
.lh { margin-top: 1.5rem; }
.lh__caption { font-stretch: 80%; font-weight: 600; font-size: .875rem; color: var(--slate); }
.lh__list { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: .6rem; }
.lh__item { display: flex; align-items: center; gap: .6rem; }
.lh__ring { position: relative; width: 2.75rem; height: 2.75rem; }
.lh__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lh__ring circle { fill: none; stroke-width: 3.5; }
.lh__ring .track { stroke: var(--rule); }
.lh__ring .value { stroke: currentColor; stroke-linecap: round; }
.lh__score {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .875rem;
  color: var(--ink);
}
.lh__name { font-stretch: 87.5%; font-size: .9375rem; line-height: 1.2; }
.lh__item.is-good { color: var(--go); }
.lh__item.is-average { color: var(--amber); }
.lh__item.is-poor { color: var(--stop); }

@media (min-width: 54rem) {
  .build { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
}

/* ---------- Terms ---------- */

.split { display: grid; gap: 0; }
.terms { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.terms > div {
  display: grid;
  gap: .35rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.terms dt { font-weight: 700; font-stretch: 105%; font-size: 1.125rem; }
.terms dd { color: var(--slate); max-width: 36rem; }

@media (min-width: 54rem) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 4rem; }
  .split .section__head { margin-bottom: 0; }
  .terms > div { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2rem; }
}

/* ---------- Process: steps sewn along one seam ---------- */

.steps { counter-reset: step; display: grid; gap: 0; }

.step {
  counter-increment: step;
  position: relative;
  padding: 0 0 2.25rem 4rem;
}
.step::before {                  /* number */
  content: counter(step);
  position: absolute;
  left: 0; top: -.2rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--thread);
  border-radius: 50%;
  background: var(--loom);
  color: var(--thread);
  font-weight: 750;
  font-stretch: 112%;
  font-size: 1.0625rem;
  z-index: 1;
}
.step::after {                   /* stitched seam */
  content: "";
  position: absolute;
  left: 1.375rem; top: 2.6rem; bottom: .2rem;
  border-left: 1.5px dashed rgba(39, 65, 199, .5);
}
.step:last-child::after { display: none; }
.step:last-child { padding-bottom: 0; }

.step h3 { font-size: 1.1875rem; font-stretch: 105%; font-weight: 700; line-height: 1.25; }
.step p { margin-top: .4rem; color: var(--slate); max-width: 34rem; }

@media (min-width: 64rem) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.75rem; }
  .step { padding: 4.25rem 0 0; }
  .step::after { left: 3.25rem; right: -1.75rem; top: 1.375rem; bottom: auto; border-left: 0; border-top: 1.5px dashed rgba(39, 65, 199, .5); }
  .step:last-child::after { display: none; }
  .step p { font-size: 1rem; }
}

/* ---------- Rates ---------- */

.rates {
  display: grid;
  gap: 2rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.rate { padding-top: 1.25rem; border-top: 2px solid var(--ink); max-width: 30rem; }
.rate--offer { border-top-color: var(--thread); }
.rate__figure {
  font-size: clamp(3rem, 2rem + 5vw, 5.5rem);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}
.rate--offer .rate__figure { color: var(--thread); }
.rate__figure span {
  margin-left: .2em;
  font-size: .32em;
  font-stretch: 87.5%;
  font-weight: 600;
  letter-spacing: 0;
}
.rate p:not(.rate__figure) { margin-top: 1rem; font-size: 1.125rem; }

@media (min-width: 48rem) {
  .rates { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

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

.contact__lede { margin-top: 1rem; max-width: 34rem; font-size: 1.125rem; color: var(--slate); }

.contact__mail { margin-top: 2rem; }
.contact__mail a {
  display: inline-block;
  padding-block: .4rem;
  font-size: clamp(1.5rem, .9rem + 4vw, 3.25rem);
  font-stretch: 110%;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  text-decoration-thickness: 3px;
  text-underline-offset: .16em;
}

.contact__grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.contact__grid h3 { font-size: 1.125rem; font-weight: 700; }
.contact__grid .ticks { margin-top: .75rem; }

.signature {
  font-style: normal;
  color: var(--slate);
  line-height: 1.7;
}

@media (min-width: 48rem) {
  .contact__grid { grid-template-columns: 3fr 2fr; }
}

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

.footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: .9375rem;
  color: var(--slate);
}
.footer__inner { display: grid; gap: .5rem; }
@media (min-width: 48rem) {
  .footer__inner { grid-template-columns: auto 1fr; gap: 3rem; }
  .footer__inner p:last-child { text-align: right; }
}

/* ---------- Motion preference ---------- */

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