:root {
  --cream: #EDE3D1;
  --ink: #2A2418;
  --ink-soft: #5E5240;
  --chestnut: #8A5530;
  --chestnut-deep: #6E4224;
  --cork: #C2A27A;
  --cream-soft: #C9BBA3;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 5vw, 48px);
  --max: 1120px;
  --section: clamp(64px, 9vw, 128px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dots: radial-gradient(circle, var(--cork) 1.6px, transparent 2.1px) left center / 14px 6px round no-repeat;

  color-scheme: light;
  scrollbar-color: var(--cork) var(--cream);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  caret-color: var(--chestnut);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--chestnut);
  color: var(--cream);
}

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

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

:focus-visible {
  outline: 2px solid var(--chestnut);
  outline-offset: 4px;
  border-radius: 6px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

p {
  text-wrap: pretty;
}

h1,
h2 {
  font-weight: 380;
  font-variation-settings: "SOFT" 60;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.375rem, 2.2vw, 1.625rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

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

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

/* The rule between sections: a row of cork dots, like the acorn's cap. */
.services::before,
.contact::before,
.site-footer::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--dots);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 1;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.header-mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}

.header-mail:hover {
  color: var(--chestnut);
}

/* On phones the hero's button is the way in; the header keeps only the name. */
@media (max-width: 559px) {
  .header-mail {
    display: none;
  }
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  gap: 48px;
  padding-block: clamp(48px, 10vw, 128px) var(--section);
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(2.75rem, 7.6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 44rem;
  margin-top: clamp(20px, 3vw, 32px);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-top: clamp(28px, 4vw, 40px);
  padding: 0 24px 0 28px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 10px 24px -14px rgba(42, 36, 24, 0.8);
  transition: background-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

.button svg {
  transition: transform 220ms var(--ease-out);
}

.button:hover {
  background: var(--chestnut);
  box-shadow: 0 14px 28px -14px rgba(110, 66, 36, 0.9);
}

.button:hover svg {
  transform: translateX(3px);
}

.hero-acorn {
  height: auto;
  transform-origin: 50% 9%;
  animation: sway 1.8s var(--ease-out) 0.25s both;
}

/* On phones the acorn hangs at the top right, beside the short first line of the headline. */
@media (max-width: 719px) {
  .hero-acorn {
    position: absolute;
    top: clamp(48px, 10vw, 128px);
    right: var(--gutter);
    width: clamp(64px, 20vw, 96px);
  }
}

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero-acorn {
    width: clamp(170px, 24vw, 330px);
    margin-right: clamp(0px, 3vw, 40px);
  }
}

/* The acorn swings once from its stem and settles, as if it just landed. */
@keyframes sway {
  0% { transform: rotate(-9deg); }
  40% { transform: rotate(4deg); }
  70% { transform: rotate(-1.5deg); }
  100% { transform: rotate(0); }
}

/* What we do */

.services {
  padding-bottom: var(--section);
}

.services h2 {
  margin-top: clamp(40px, 6vw, 72px);
}

.service-list {
  margin-top: clamp(28px, 4vw, 40px);
}

.service + .service {
  margin-top: 32px;
}

.service p {
  max-width: 34rem;
  margin-top: 10px;
  color: var(--ink-soft);
}

/* What we do and Who we are share one grid on wide screens: heading left, content right. */
@media (min-width: 720px) {
  .services,
  .team {
    display: grid;
    grid-template-columns: 5fr 7fr;
    column-gap: clamp(40px, 6vw, 96px);
    align-items: start;
  }

  .services::before {
    grid-column: 1 / -1;
  }

  .service-list {
    margin-top: clamp(40px, 6vw, 72px);
    padding-top: 10px;
  }
}

/* From the lab: the one ink band, where the products live. */

.lab {
  padding-block: clamp(72px, 10vw, 136px);
  background: var(--ink);
  color: var(--cream);
}

.lab ::selection {
  background: var(--cork);
  color: var(--ink);
}

.lab :focus-visible {
  outline-color: var(--cork);
}

.lab-head p {
  max-width: 34rem;
  margin-top: 14px;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--cream-soft);
}

.projects {
  display: grid;
  gap: clamp(56px, 8vw, 96px);
  margin-top: clamp(40px, 6vw, 72px);
}

@media (min-width: 720px) {
  .projects {
    grid-template-columns: 1fr 1fr;
  }
}

.screens {
  display: flex;
  gap: clamp(10px, 2vw, 18px);
  align-items: flex-start;
}

/* Phone screenshots: the radius follows the screen's own curve at any size. */
.screens img {
  width: calc(50% - 9px);
  max-width: 230px;
  height: auto;
  border-radius: 14% / 6.4%;
  box-shadow:
    0 0 0 1px rgba(194, 162, 122, 0.22),
    0 28px 48px -28px rgba(0, 0, 0, 0.9);
}

.screens img + img {
  margin-top: clamp(28px, 5vw, 56px);
}

.project-text {
  margin-top: clamp(24px, 3vw, 32px);
}

.project-text p {
  max-width: 32rem;
  margin-top: 10px;
  color: var(--cream-soft);
}

.status {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border: 1px solid var(--cork);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--cork);
  vertical-align: 0.3em;
  white-space: nowrap;
}

/* Who we are */

.team {
  padding-block: var(--section);
}

.team-intro {
  max-width: 30rem;
  margin-top: 18px;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--ink-soft);
}

.people {
  margin-top: clamp(28px, 4vw, 40px);
}

.people li {
  padding-block: 18px;
}

.people li + li {
  background: var(--dots);
  background-position: left top;
}

.name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 60;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (min-width: 720px) {
  .team h2,
  .team-intro {
    grid-column: 1;
  }

  .people {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }

  .people li:first-child {
    padding-top: 4px;
  }
}

/* Contact */

.contact {
  padding-bottom: clamp(72px, 10vw, 136px);
}

.contact h2 {
  margin-top: clamp(40px, 6vw, 72px);
}

.email {
  display: inline-block;
  margin-top: clamp(6px, 1.4vw, 14px);
  padding-block: 10px;
  font-size: clamp(1.5rem, 6.4vw, 4.25rem);
  font-weight: 380;
  font-variation-settings: "SOFT" 60;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--chestnut);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
  overflow-wrap: break-word;
  transition: color 200ms var(--ease-out);
}

.email:hover {
  color: var(--chestnut-deep);
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding-bottom: 40px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.site-footer::before {
  flex-basis: 100%;
  margin-bottom: 24px;
}

.site-footer img {
  flex: none;
}

.footer-meta {
  display: flex;
  flex: 1 1 0;
  flex-wrap: wrap;
  gap: 4px 20px;
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
