/* Colorful Aura studio site. Tokens and rules are described in DESIGN.md. */

:root {
  --cream: #f5eeda;
  --cream-deep: #eae0c4;
  --card: #fcf8ec;
  --ink: #172516;
  --ink-soft: #4b5848;
  --blue: #9dd7b3;
  --green: #86c13a;
  --orange: #f9a44d;
  --yellow: #f0d258;
  --pink: #f57c76;
  --error: #9c2219;

  --display: "Gabarito", "Albert Sans", system-ui, sans-serif;
  --text: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 72px;
  --s9: 120px;

  --width: 1240px;
  --gutter: 24px;
  --r-panel: 32px;
  --r-frame: 14px;
  --r-field: 12px;

  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
  --ease-spring: cubic-bezier(0.2, 1.1, 0.3, 1.12);
  --ease-move: cubic-bezier(0.62, 0, 0.18, 1);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--pink);
  color: var(--ink);
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
  transition: text-decoration-color 160ms ease;
}

a:hover {
  text-decoration-color: var(--pink);
}

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

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

.skip {
  position: absolute;
  left: var(--s4);
  top: -80px;
  z-index: 10;
  padding: var(--s3) var(--s4);
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
}

.skip:focus {
  top: var(--s4);
}

/* Button */

.button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 var(--s6);
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font: 600 17px/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: color 220ms ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--yellow);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 320ms var(--ease-out);
}

.button:hover,
.button:focus-visible {
  color: var(--ink);
}

.button:hover::before,
.button:focus-visible::before {
  transform: translateY(0);
}

.button:focus-visible {
  border-radius: 999px;
}

.button:active {
  transform: scale(0.97);
}

.button[disabled] {
  background: var(--cream-deep);
  color: var(--ink-soft);
  cursor: default;
}

.button[disabled]::before {
  display: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--cream);
  border-bottom: 1.5px solid transparent;
  transition: border-color 200ms ease;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding-block: 20px;
  transition: padding 300ms var(--ease-out);
}

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

.scrolled .site-header .wrap {
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font: 700 24px/1 var(--display);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: auto;
  transition: transform 420ms var(--ease-spring);
}

.brand:hover img {
  transform: translateY(-4px) rotate(-6deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s6);
  font-weight: 500;
  font-size: 17px;
}

.site-nav a:not(.button) {
  text-decoration-color: transparent;
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current="true"] {
  text-decoration-color: var(--ink);
}

.site-nav .button {
  min-height: 44px;
  padding: 0 var(--s5);
  font-size: 16px;
}

/* Hero */

.hero {
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: var(--s7);
  align-items: center;
  min-height: clamp(520px, 44vw, 700px);
  padding-block: var(--s7) var(--s9);
}

.hero h1 {
  font-size: clamp(54px, 7.4vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.hero h1 .line > span {
  display: block;
}

.hero p {
  max-width: 28em;
  text-wrap: pretty;
  margin-top: var(--s6);
  font-size: clamp(18px, 1.5vw, 21px);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s5);
  margin-top: var(--s6);
  font-weight: 600;
}

/* The build: a small browser and phone where a page puts itself together
   from blocks in the logo's colours, then rearranges into other layouts. */

.stage {
  position: relative;
  width: 100%;
  max-width: 640px;
  justify-self: end;
  pointer-events: none;
  --p: 0;
  --mx: 0;
  --my: 0;
}

.mock {
  border-radius: var(--r-frame);
  overflow: hidden;
  background: var(--card);
  box-shadow:
    0 0 0 1.5px var(--ink),
    0 34px 54px -34px rgba(23, 37, 22, 0.55);
  transform: translate(calc(var(--mx) * -10px), calc(var(--my) * -8px + var(--p) * -30px));
  transition: transform 500ms var(--ease-out);
}

.canvas {
  position: relative;
  aspect-ratio: 4 / 3;
}

.mock-phone {
  position: absolute;
  right: -3%;
  bottom: -11%;
  width: 25%;
  aspect-ratio: 9 / 17;
  overflow: hidden;
  border: 5px solid var(--ink);
  border-radius: clamp(16px, 2.2vw, 28px);
  background: var(--card);
  box-shadow: 0 26px 40px -24px rgba(23, 37, 22, 0.6);
  transform: translate(calc(var(--mx) * -24px), calc(var(--my) * -18px + var(--p) * -70px));
  transition: transform 500ms var(--ease-out);
}

.mock-phone .canvas {
  aspect-ratio: auto;
  height: 100%;
}

.b {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
  height: calc(var(--h) * 1%);
  border-radius: 8px;
  background: var(--ink);
  transition:
    left 1000ms var(--ease-move) var(--stagger, 0ms),
    top 1000ms var(--ease-move) var(--stagger, 0ms),
    width 1000ms var(--ease-move) var(--stagger, 0ms),
    height 1000ms var(--ease-move) var(--stagger, 0ms);
}

.b:nth-child(1) { --i: 0; }
.b:nth-child(2) { --i: 1; }
.b:nth-child(3) { --i: 2; }
.b:nth-child(4) { --i: 3; }
.b:nth-child(5) { --i: 4; }
.b:nth-child(6) { --i: 5; }
.b:nth-child(7) { --i: 6; }
.b:nth-child(8) { --i: 7; }
.b:nth-child(9) { --i: 8; }
.b:nth-child(10) { --i: 9; }
.b:nth-child(11) { --i: 10; }
.b:nth-child(12) { --i: 11; }

.b {
  --stagger: calc(var(--i) * 30ms);
}

.nav-mark,
.p-mark,
.dot {
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
}

.nav-links {
  border-radius: 0;
  background: linear-gradient(90deg, var(--ink) 0 26%, transparent 26% 37%, var(--ink) 37% 63%, transparent 63% 74%, var(--ink) 74% 100%);
}

.nav-cta,
.cta,
.p-cta {
  border-radius: 999px;
}

.h-1,
.h-2,
.p-h1,
.p-h2 {
  border-radius: 999px;
  z-index: 2;
}

.copy {
  border-radius: 0;
  z-index: 2;
  background: linear-gradient(var(--ink-soft) 0 18%, transparent 18% 41%, var(--ink-soft) 41% 59%, transparent 59% 82%, var(--ink-soft) 82% 100%);
  -webkit-mask: linear-gradient(90deg, #000 0 100%) top / 100% 59% no-repeat, linear-gradient(90deg, #000 0 100%) bottom left / 62% 18% no-repeat;
  mask: linear-gradient(90deg, #000 0 100%) top / 100% 59% no-repeat, linear-gradient(90deg, #000 0 100%) bottom left / 62% 18% no-repeat;
}

.cta {
  z-index: 2;
}

.img-1, .p-b { background: var(--blue); }
.img-2, .p-g { background: var(--green); }
.img-3, .p-y { background: var(--yellow); }
.img-4, .p-o { background: var(--orange); }

.dot {
  background: var(--pink);
  z-index: 3;
}

.mock-phone .b {
  border-radius: 5px;
}

.mock-phone .p-mark {
  border-radius: 50%;
}

.mock-phone .p-h1,
.mock-phone .p-h2,
.mock-phone .p-cta {
  border-radius: 999px;
}

.nav-mark { --x: 6; --y: 6; --w: 5; }
.nav-links { --x: 56; --y: 7.6; --w: 22; --h: 2.6; }
.nav-cta { --x: 82; --y: 5.4; --w: 12; --h: 7; }
.h-1 { --x: 6; --y: 25; --w: 36; --h: 7; }
.h-2 { --x: 6; --y: 35; --w: 27; --h: 7; }
.copy { --x: 6; --y: 48; --w: 32; --h: 9; }
.cta { --x: 6; --y: 62; --w: 17; --h: 8.5; }
.img-1 { --x: 50; --y: 20; --w: 44; --h: 51; }
.img-2 { --x: 6; --y: 78; --w: 27; --h: 16; }
.img-3 { --x: 36.5; --y: 78; --w: 27; --h: 16; }
.img-4 { --x: 67; --y: 78; --w: 27; --h: 16; }
.dot { --x: 87.5; --y: 23.5; --w: 4; }

[data-layout="1"] .h-1 { --x: 11; --y: 27; --w: 40; --h: 7; }
[data-layout="1"] .h-2 { --x: 11; --y: 37; --w: 28; --h: 7; }
[data-layout="1"] .copy { --x: 6; --y: 61; --w: 38; --h: 9; }
[data-layout="1"] .cta { --x: 74; --y: 39.5; --w: 15; --h: 8.5; }
[data-layout="1"] .img-1 { --x: 6; --y: 75; --w: 38; --h: 19; }
[data-layout="1"] .img-2 { --x: 50; --y: 60; --w: 20.5; --h: 34; }
[data-layout="1"] .img-3 { --x: 6; --y: 20; --w: 88; --h: 35; }
[data-layout="1"] .img-4 { --x: 73.5; --y: 60; --w: 20.5; --h: 34; }
[data-layout="1"] .dot { --x: 88.5; --y: 63; --w: 3.6; }

[data-layout="2"] .h-1 { --x: 52; --y: 24; --w: 38; --h: 7; }
[data-layout="2"] .h-2 { --x: 52; --y: 34; --w: 26; --h: 7; }
[data-layout="2"] .copy { --x: 52; --y: 47; --w: 36; --h: 9; }
[data-layout="2"] .cta { --x: 52; --y: 61; --w: 18; --h: 8.5; }
[data-layout="2"] .img-1 { --x: 52; --y: 76; --w: 12.6; --h: 18; }
[data-layout="2"] .img-2 { --x: 66.7; --y: 76; --w: 12.6; --h: 18; }
[data-layout="2"] .img-3 { --x: 81.4; --y: 76; --w: 12.6; --h: 18; }
[data-layout="2"] .img-4 { --x: 6; --y: 20; --w: 40; --h: 74; }
[data-layout="2"] .dot { --x: 39.5; --y: 23.5; --w: 4; }

.p-mark { --x: 8; --y: 4.5; --w: 11; }
.p-h1 { --x: 8; --y: 44; --w: 60; --h: 4; }
.p-h2 { --x: 8; --y: 50.5; --w: 42; --h: 4; }
.p-cta { --x: 8; --y: 58; --w: 38; --h: 6; }
.p-b { --x: 8; --y: 12; --w: 84; --h: 28; }
.p-g { --x: 8; --y: 69; --w: 84; --h: 8; }
.p-y { --x: 8; --y: 79.5; --w: 40; --h: 15; }
.p-o { --x: 52; --y: 79.5; --w: 40; --h: 15; }

[data-layout="1"] .p-h1 { --x: 8; --y: 38; --w: 60; --h: 4; }
[data-layout="1"] .p-h2 { --x: 8; --y: 44.5; --w: 42; --h: 4; }
[data-layout="1"] .p-cta { --x: 8; --y: 52; --w: 38; --h: 6; }
[data-layout="1"] .p-b { --x: 8; --y: 63; --w: 40; --h: 17; }
[data-layout="1"] .p-g { --x: 52; --y: 63; --w: 40; --h: 17; }
[data-layout="1"] .p-y { --x: 8; --y: 12; --w: 84; --h: 22; }
[data-layout="1"] .p-o { --x: 8; --y: 83; --w: 84; --h: 11; }

[data-layout="2"] .p-h1 { --x: 8; --y: 50; --w: 60; --h: 4; }
[data-layout="2"] .p-h2 { --x: 8; --y: 56.5; --w: 42; --h: 4; }
[data-layout="2"] .p-cta { --x: 8; --y: 64; --w: 38; --h: 6; }
[data-layout="2"] .p-b { --x: 8; --y: 75; --w: 26; --h: 19; }
[data-layout="2"] .p-g { --x: 37; --y: 75; --w: 26; --h: 19; }
[data-layout="2"] .p-y { --x: 66; --y: 75; --w: 26; --h: 19; }
[data-layout="2"] .p-o { --x: 8; --y: 12; --w: 84; --h: 34; }

/* Sections */

.section {
  padding-top: var(--s9);
}

.section > h2,
.section-head h2 {
  font-size: clamp(40px, 5vw, 68px);
}

.section-head {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--s6);
  align-items: end;
}

.section-head p {
  max-width: 32em;
  color: var(--ink-soft);
}

/* Work */

.projects {
  list-style: none;
  margin: var(--s7) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s8);
}

.project {
  position: relative;
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: var(--s7);
  align-items: center;
  padding: var(--s7);
  border-radius: var(--r-panel);
  background: var(--tone);
}

.project--lead {
  grid-template-columns: 1fr;
  gap: var(--s6);
}

.project--flip {
  grid-template-columns: 8fr 4fr;
}

.project--flip .project-text {
  order: 2;
}

.project-text h3 {
  font-size: clamp(36px, 3.6vw, 52px);
}

.project-text .kind {
  margin-top: var(--s2);
  font-weight: 600;
}

.project-text .about {
  margin-top: var(--s4);
  max-width: 30em;
}

.project-text .visit {
  display: inline-block;
  margin-top: var(--s4);
  font-weight: 600;
}

.project-text a:hover {
  text-decoration-color: var(--ink);
  text-decoration-thickness: 3px;
}

.project--lead .project-text {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--s6);
  align-items: end;
}

.project--lead .project-text h3 {
  font-size: clamp(48px, 6vw, 84px);
}

.project--lead .about {
  margin-top: 0;
}

.shots {
  position: relative;
  display: block;
  text-decoration: none;
}

.browser {
  display: block;
  border-radius: var(--r-frame);
  overflow: hidden;
  background: var(--card);
  box-shadow:
    0 0 0 1.5px var(--ink),
    0 30px 50px -30px rgba(23, 37, 22, 0.55);
}

.bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding-inline: 14px;
  border-bottom: 1.5px solid var(--ink);
  font: 500 13px/1 var(--text);
}

.bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}

.bar b {
  flex: 1;
  margin-right: 39px;
  text-align: center;
  font-weight: 500;
}

.view {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  container-type: size;
}

.view img {
  width: 100%;
  transition: transform 1100ms var(--ease-out);
}

.phone {
  position: absolute;
  right: -22px;
  bottom: calc(var(--s7) * -1 - 16px);
  width: 20%;
  max-width: 230px;
  aspect-ratio: 390 / 720;
  overflow: hidden;
  border: 5px solid var(--ink);
  border-radius: clamp(18px, 2.4vw, 32px);
  background: var(--card);
  box-shadow: 0 26px 40px -24px rgba(23, 37, 22, 0.6);
}

.phone img {
  width: 100%;
}

/* The first project is shown larger, with the phone beside the page. */

.project--lead .shots {
  display: grid;
  grid-template-columns: 1fr clamp(170px, 19%, 226px);
  gap: var(--s6);
  align-items: end;
}

.project--lead .phone {
  position: static;
  width: auto;
  max-width: none;
  aspect-ratio: 390 / 780;
}

@media (hover: hover) {
  .project:hover .view img,
  .project:focus-within .view img {
    transform: translateY(calc(-100% + 100cqh));
    transition: transform 8s cubic-bezier(0.25, 0.1, 0.25, 1) 150ms;
  }
}

@keyframes peek {
  0%,
  100% {
    transform: translateY(0);
  }

  42%,
  58% {
    transform: translateY(calc((-100% + 100cqh) * 0.2));
  }
}

.project.peek .view img {
  animation: peek 4.6s cubic-bezier(0.45, 0, 0.2, 1) 1;
}

/* Prices */

.price-board {
  margin-top: var(--s7);
  border-top: 1.5px solid var(--ink);
}

.price {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 3fr 6fr 2fr 2.4fr;
  gap: var(--s6);
  align-items: baseline;
  padding: var(--s6) var(--s5);
  border-bottom: 1.5px solid var(--ink);
}

.price::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--tone);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 520ms var(--ease-out);
}

@media (hover: hover) {
  .price:hover::before {
    transform: scaleX(1);
  }

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

.price h3 {
  font-size: 32px;
}

.price p {
  max-width: 34em;
}

.price .time {
  color: var(--ink-soft);
  font-weight: 500;
  transition: color 200ms ease;
}

.price .amount {
  font: 700 clamp(34px, 3.4vw, 46px) / 1 var(--display);
  letter-spacing: -0.02em;
  text-align: right;
  white-space: nowrap;
}

.price .amount small {
  font: 500 16px/1 var(--text);
  letter-spacing: 0;
}

.price-note {
  margin-top: var(--s5);
  color: var(--ink-soft);
}

/* How it works */

.how {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--s8);
  align-items: start;
  margin-top: var(--s7);
}

.steps {
  margin: 0;
  border-top: 1.5px solid var(--ink);
}

.steps > div {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: var(--s5);
  padding-block: var(--s5);
  border-bottom: 1.5px solid var(--ink);
}

.steps dt {
  font: 700 26px/1.1 var(--display);
}

.steps dd {
  margin: 0;
}

.rules {
  padding: var(--s6);
  border-radius: var(--r-panel);
  background: var(--green);
}

.rules h3 {
  font-size: 30px;
}

.rules ul {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s4);
}

.rules li {
  padding-top: var(--s4);
  border-top: 1.5px solid var(--ink);
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--s8);
  margin-top: var(--s9);
  padding: var(--s8) var(--s7);
  border-radius: var(--r-panel);
  background: var(--blue);
}

.contact h2 {
  font-size: clamp(40px, 5vw, 68px);
}

.contact-text p {
  margin-top: var(--s5);
  max-width: 26em;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}

.field {
  display: grid;
  gap: var(--s2);
}

.field.wide,
.form-foot {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
  font-size: 16px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px var(--s4);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-field);
  background: var(--card);
  color: var(--ink);
  font: 400 18px/1.4 var(--text);
  transition: box-shadow 160ms ease;
}

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

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-radius: var(--r-field);
  box-shadow: 0 0 0 3px var(--ink);
}

.hp {
  position: absolute;
  left: -9999px;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s5);
}

.form-status {
  font-weight: 600;
}

.form-status.bad {
  color: var(--error);
}

/* Footer */

.site-footer {
  margin-top: var(--s9);
  padding-block: var(--s8) var(--s7);
  background: var(--ink);
  color: var(--cream);
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s7);
}

.site-footer h2 {
  font: 600 16px/1.3 var(--text);
  letter-spacing: 0;
  color: var(--blue);
}

.site-footer ul {
  list-style: none;
  margin: var(--s3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s2);
}

.site-footer p {
  margin-top: var(--s4);
}

.site-footer :focus-visible {
  outline-color: var(--cream);
}

.site-footer .legal {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: var(--s5);
  border-top: 1.5px solid rgba(245, 238, 218, 0.3);
  font-size: 15px;
}

/* Motion. Hidden starting states apply only once the script has marked the page. */

.js .hero h1 .line > span {
  transform: translateY(108%);
}

.js .hero p,
.js .hero-actions {
  opacity: 0;
  transform: translateY(14px);
}

.js .stage {
  opacity: 0;
  transform: translateY(46px);
}

.js .b {
  opacity: 0;
}

@keyframes place {
  from {
    opacity: 0;
    transform: scale(0.5);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.js.ready .hero h1 .line > span {
  transform: none;
  transition: transform 900ms var(--ease-out);
}

.js.ready .hero h1 .line:nth-child(2) > span { transition-delay: 90ms; }
.js.ready .hero h1 .line:nth-child(3) > span { transition-delay: 180ms; }

.js.ready .hero p,
.js.ready .hero-actions {
  opacity: 1;
  transform: none;
  transition: opacity 600ms ease 520ms, transform 700ms var(--ease-out) 520ms;
}

.js.ready .hero-actions {
  transition-delay: 640ms;
}

.js.ready .stage {
  opacity: 1;
  transform: none;
  transition: opacity 500ms ease 250ms, transform 1000ms var(--ease-out) 250ms;
}

.js.ready .b {
  animation: place 700ms var(--ease-spring) both;
  animation-delay: calc(650ms + var(--i) * 65ms);
}

.js .project {
  clip-path: inset(18% 7% 0 7% round var(--r-panel));
  transform: translateY(60px);
  transition: clip-path 1100ms var(--ease-out), transform 1100ms var(--ease-out);
}

.js .project .browser {
  transform: translateY(70px) scale(0.94);
  transition: transform 1200ms var(--ease-out) 150ms;
}

.js .project .phone {
  transform: translateY(110px) rotate(7deg);
  transition: transform 1100ms var(--ease-spring) 420ms;
}

.js .project.in {
  clip-path: inset(-140px -40px -140px -40px round var(--r-panel));
  transform: none;
}

.js .project.in .browser,
.js .project.in .phone {
  transform: none;
}

.js .price {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 800ms var(--ease-out);
}

.js .price-board.in .price {
  opacity: 1;
  transform: none;
}

.js .price-board.in .price:nth-child(2) { transition-delay: 90ms; }
.js .price-board.in .price:nth-child(3) { transition-delay: 180ms; }
.js .price-board.in .price:nth-child(4) { transition-delay: 270ms; }

.js .contact {
  clip-path: inset(14% 6% 0 6% round var(--r-panel));
  transition: clip-path 1100ms var(--ease-out);
}

.js .contact.in {
  clip-path: inset(0 0 0 0 round var(--r-panel));
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .js .hero h1 .line > span,
  .js .hero p,
  .js .hero-actions,
  .js .stage,
  .js .b,
  .js .project,
  .js .project .browser,
  .js .project .phone,
  .js .price,
  .js .contact {
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  .mock,
  .mock-phone {
    transform: none;
  }

  .project:hover .view img,
  .project:focus-within .view img {
    transform: none;
  }
}

/* Tablet */

@media (max-width: 980px) {
  :root {
    --s9: 88px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s7);
    min-height: 0;
    padding-block: var(--s6) var(--s8);
  }

  .stage {
    justify-self: start;
    max-width: 560px;
  }

  .mock-phone {
    right: -8px;
    bottom: -9%;
  }

  .section-head,
  .project,
  .project--lead .project-text,
  .how,
  .contact {
    grid-template-columns: 1fr;
  }

  .section-head {
    gap: var(--s4);
  }

  .project {
    gap: var(--s6);
    padding: var(--s6);
  }

  .project--lead .project-text {
    gap: var(--s4);
  }

  .project--flip .project-text {
    order: 0;
  }

  .project--flip {
    grid-template-columns: 1fr;
  }

  .project--lead .shots {
    display: block;
  }

  .phone,
  .project--lead .phone {
    position: absolute;
    right: -10px;
    bottom: calc(var(--s6) * -1 - 16px);
    width: 23%;
    aspect-ratio: 390 / 720;
  }

  .price {
    grid-template-columns: 1fr auto;
    gap: var(--s3) var(--s5);
  }

  .price h3 { grid-column: 1; grid-row: 1; }
  .price .amount { grid-column: 2; grid-row: 1; }
  .price p { grid-column: 1 / -1; }
  .price .time { grid-column: 1 / -1; }

  .how {
    gap: var(--s7);
  }

  .contact {
    gap: var(--s6);
    padding: var(--s7) var(--s6);
  }

  .site-footer .wrap {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer .wrap > div:first-child {
    grid-column: 1 / -1;
  }
}

/* Phone */

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --r-panel: 24px;
    --s9: 72px;
  }

  body {
    font-size: 17px;
  }

  html {
    scroll-padding-top: 76px;
  }

  .site-header .wrap {
    padding-block: 12px;
  }

  .scrolled .site-header .wrap {
    padding-block: 8px;
  }

  .site-nav {
    gap: var(--s4);
    font-size: 16px;
  }

  .site-nav .button {
    display: none;
  }

  .brand {
    font-size: 20px;
    white-space: nowrap;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .brand img {
    width: 36px;
  }

  .hero-inner {
    padding-top: var(--s5);
  }

  .project {
    padding: var(--s5) var(--s4);
  }

  .bar {
    height: 26px;
    font-size: 11px;
  }

  .bar i {
    width: 7px;
    height: 7px;
  }

  .phone,
  .project--lead .phone {
    right: -6px;
    width: 27%;
    border-width: 4px;
  }

  .price {
    padding-inline: 0;
  }

  .price h3 {
    font-size: 28px;
  }

  .steps > div {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }

  .rules {
    padding: var(--s5);
  }

  .contact {
    padding: var(--s6) var(--s4);
  }

  .form {
    grid-template-columns: 1fr;
  }

  .site-footer .wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-nav a[href="#how"] {
    display: none;
  }
}
