@font-face {
  font-family: "DM Sans";
  src: url("dm-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("instrument-serif.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("instrument-serif-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --gold-light: #f9ebd0;
  --gold-deep: #e8d0a2;
  --gold-line: #c7ae7d;
  --ink: #293422;
  --muted: #505740;
  --moss: #34482c;
  --olive-light: #d7d8aa;
  --olive-deep: #9aa575;
  --magenta: #941b4b;
  --magenta-light: #ac2b55;
  --display: "Instrument Serif", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
  --edge: clamp(1.4375rem, 6.67vw, 6rem);
  --lift: 0 3px 2px rgb(56 49 31 / 13%), 0 13px 27px rgb(56 49 31 / 13%);
  --lift-lg: 0 4px 3px rgb(56 49 31 / 14%), 0 20px 37px rgb(56 49 31 / 14%);
}

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

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(119deg, var(--gold-light), var(--gold-deep));
  font: 400 1rem/1.5 var(--body);
}

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: .99; }
p { color: var(--muted); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-family: var(--display); font-weight: 400; }

.shell {
  width: min(78rem, calc(100% - 2 * var(--edge)));
  margin-inline: auto;
}

:focus-visible { outline: 2px solid var(--magenta); outline-offset: 5px; }
.button:focus-visible { outline-color: var(--moss); }
.site-footer a:focus-visible { outline-color: #fff3d6; }

.skip-link {
  position: fixed;
  z-index: 5;
  inset: .5rem auto auto .5rem;
  transform: translateY(-170%);
  padding: .75rem 1rem;
  color: white;
  background: var(--moss);
  border-radius: .5rem;
}
.skip-link:focus { transform: translateY(0); }

.site-header, .footer-inner {
  min-height: 4.125rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.site-header { border-bottom: 1px solid var(--gold-line); }
.site-header nav { display: flex; align-items: center; gap: .875rem; }
.site-header a, .site-footer a {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  min-height: 2.75rem;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 650;
}

.site-header a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.site-header .wordmark { font-size: 1rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 50%);
  column-gap: clamp(1.75rem, 4.2vw, 4rem);
  align-items: center;
  padding-block: 2.6875rem 3.375rem;
}

.hero-copy h1 { font-size: clamp(4.5rem, 8.125vw, 7.3125rem); letter-spacing: -.025em; }
.home-hero h1 em { display: block; color: var(--magenta); font-size: 1.095em; }
.home-hero p {
  max-width: 29.25rem;
  margin-block: 2rem 1.375rem;
  font-size: clamp(1.3125rem, 1.875vw, 1.6875rem);
  line-height: 1.38;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4375rem;
  min-height: 2.875rem;
  border-radius: 100vw;
  background: linear-gradient(112deg, var(--magenta), var(--magenta-light));
  padding: .625rem 1.35rem;
  color: #fff;
  box-shadow: 0 2px 2px rgb(63 27 36 / 15%), 0 5px 15px rgb(63 27 36 / 16%);
  font-size: .9375rem;
  font-weight: 650;
  text-decoration: none;
}
.button:hover { background: #7d153f; }

.device-art {
  --art-bg: linear-gradient(120deg, var(--olive-light), var(--olive-deep));
  --disc-bg: linear-gradient(130deg, #e790ab, #c7436b);
  --orbit: #fff1e5;
  --phone-width: 29.5%;
  --back-width: 26.25%;
  --front-x: 19%;
  --back-x: 52%;
  position: relative;
  aspect-ratio: 622 / 477;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.375rem;
  background: var(--art-bg);
  box-shadow: var(--lift);
}

.device-art::before, .card-art:not(.card-art--image)::before {
  position: absolute;
  content: "";
  height: 85%;
  aspect-ratio: 1;
  inset: 7% auto auto 11%;
  border-radius: 50%;
  background: var(--disc-bg);
}

.orbit {
  position: absolute;
  inset: 10% 9% 8% 34%;
  border: 1px solid var(--orbit);
  border-radius: 50%;
  opacity: .9;
  transform: rotate(13deg);
}
.orbit::after {
  content: "";
  position: absolute;
  top: 10%;
  right: 14%;
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background: var(--orbit);
}

.phone {
  position: absolute;
  border: 2px solid #fffdf5;
  border-radius: clamp(.55rem, 1.05vw, .9375rem);
  box-shadow: 0 7px 16px rgb(22 34 23 / 29%);
}
.phone--front {
  width: var(--phone-width);
  left: var(--front-x);
  top: 11%;
  transform: rotate(-9deg);
}
.phone--back {
  width: var(--back-width);
  left: var(--back-x);
  top: 20%;
  transform: rotate(10deg);
}
.device-art--moss {
  --art-bg: linear-gradient(119deg, #778754, #3d5134);
  --disc-bg: linear-gradient(130deg, #d97b97, #b63d63);
  --orbit: #f7d8df;
  --phone-width: 22%;
  --back-width: 19.6%;
  --front-x: 25%;
  --back-x: 51.5%;
  aspect-ratio: 569 / 326;
}
.device-art--magenta {
  --art-bg: linear-gradient(127deg, #ce517f, #8b254a);
  --disc-bg: linear-gradient(125deg, #e6e8b2, #b0b887);
  --orbit: #f7d8df;
  --phone-width: 31.5%;
  --back-width: 28%;
  --front-x: 17%;
  --back-x: 53%;
  aspect-ratio: 561 / 466;
}

.work,
.challenge { border-top: 1px solid var(--gold-line); }
.work { padding-block: 1.6875rem 3.25rem; }
.section-heading { font-size: clamp(3.75rem, 5.42vw, 4.875rem); letter-spacing: -.015em; }
.work > .section-heading { margin-bottom: 1.875rem; }

.raised {
  border: 1px solid var(--card-edge, #c5cba4);
  border-radius: 1.3125rem;
  box-shadow: var(--lift);
}
.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 48.5%);
  align-items: center;
  gap: 2.25rem;
  border-radius: 1.5625rem;
  padding: 1.5rem 1.625rem 1.5rem 2.1875rem;
  background: linear-gradient(118deg, #f7f7e7, #e4e8cc);
  box-shadow: var(--lift-lg);
}

.eyebrow {
  color: var(--magenta);
  font-size: .8125rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.feature-copy h3 { font-size: clamp(3.5rem, 5.14vw, 4.625rem); margin-top: .75rem; }
.feature-copy .measure { max-width: 25.625rem; font-size: 1.25rem; margin-block: 1rem 1.125rem; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.work > .project-grid { margin-top: 1.75rem; }
.project-card {
  display: flex;
  flex-direction: column;
  padding: .5625rem .5625rem .5rem;
  background: var(--surface);
}
.project-card--apricot {
  --surface: linear-gradient(120deg, #fff7e8, #fbe8cf);
  --card-edge: #ebc7a0;
  --art-bg: linear-gradient(120deg, #ffe3ad, #f8a579);
  --disc-bg: #fff2d0;
  --tilt: -7deg;
}
.project-card--rose {
  --surface: linear-gradient(120deg, #fff9f5, #f4dee3);
  --card-edge: #d8a4b1;
  --art-bg: linear-gradient(120deg, #e9a1b6, #c64a6d);
  --disc-bg: #fff2e8;
  --tilt: 6deg;
}
.project-card--sage {
  --surface: linear-gradient(120deg, #fcfcf1, #e7e9d1);
  --card-edge: #c7cca8;
}
.card-art {
  position: relative;
  aspect-ratio: 380 / 186;
  overflow: hidden;
  border-radius: .9375rem;
  background: var(--art-bg, #dfe3c1);
}
.card-art:not(.card-art--image)::before { top: 14%; left: 15%; height: 106%; }
.card-art .phone { width: 49%; top: 13%; left: 26%; transform: rotate(var(--tilt)); }
.card-art--image img { width: 100%; height: 100%; object-fit: cover; }
.project-copy { flex: 1; display: flex; flex-direction: column; padding: .875rem .625rem 0; }
.project-copy h3 { font-size: 2.1875rem; }
.project-copy p { flex: 1; margin-top: .375rem; line-height: 1.36; }
.text-link {
  color: var(--magenta);
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: .375rem;
  min-height: 2.75rem;
  font-size: .9375rem;
  font-weight: 650;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: .24em; }

.about-band, .features-band {
  background: linear-gradient(116deg, #eceed6, #d4dcc0);
  padding-block: 2.25rem;
}
.about-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 43%);
  align-items: center;
  gap: 2rem;
  border-color: #d7bf90;
  padding: 1.75rem 1.75rem 2.375rem;
  background: linear-gradient(120deg, #fff6df, #f6e7cd);
}
.about-card h2 { font-size: clamp(2.8125rem, 4.167vw, 3.75rem); margin-top: .65rem; }
.about-card h2 em { display: block; color: var(--moss); }
.about-card > p { font-size: 1.375rem; max-width: 30rem; }

.site-footer { background: linear-gradient(119deg, #283b25, #495a36); color: #fffff6; }
.footer-inner { min-height: 4.8125rem; }

.study-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 45%);
  padding-block: 3.0625rem 3rem;
}
.study-hero h1 { font-size: clamp(4.5rem, 8.61vw, 7.75rem); margin-block: .125rem .75rem; }
.back-link { color: var(--moss); }
.project-tagline {
  color: var(--ink);
  font-size: clamp(1.3125rem, 2.36vw, 2.125rem);
  font-weight: 700;
  max-width: 32rem;
  line-height: 1.24;
}
.study-intro { max-width: 32rem; margin-block: 1.25rem 1.375rem; font-size: 1.25rem; }
.challenge { padding-block: 1.75rem 3.25rem; }
.challenge .section-heading { max-width: 58rem; margin-block: .8rem 1.1rem; }
.challenge h2 em { display: block; color: var(--magenta); }
.challenge > p:last-child { max-width: 43rem; font-size: 1.3125rem; }
.features-band { padding-block: 2.125rem 2.3125rem; }
.features-band .section-heading { margin-bottom: 1.75rem; }
.detail-card {
  background: var(--surface);
  border-radius: 1.0625rem;
  padding: 1rem 1.125rem 1.25rem;
}
.detail-card::before {
  display: block;
  content: "";
  width: 2.375rem;
  height: .1875rem;
  border-radius: 100vw;
  background: var(--mark);
  margin-bottom: .6875rem;
}
.detail-card h3 { font-size: clamp(2.125rem, 2.92vw, 2.625rem); }
.detail-card p { margin-top: .65rem; font-size: 1.0625rem; line-height: 1.42; }
.detail-card--gold { --surface: linear-gradient(120deg, #fffdf2, #fbeccf); --card-edge: #e5c592; --mark: #aa5f27; }
.detail-card--rose { --surface: linear-gradient(120deg, #fff6f3, #f4dce3); --card-edge: #deaebb; --mark: #a63257; }
.detail-card--sage { --surface: linear-gradient(120deg, #fafbed, #e0e8cd); --card-edge: #bfc8a0; --mark: #596d3f; }
.try-section { padding-block: 1.875rem 2.75rem; }
.try-section h2 { font-size: clamp(2.6875rem, 4.17vw, 3.75rem); margin-bottom: 1.25rem; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .raised { transition: box-shadow 180ms ease, transform 180ms ease; }
  .project-card:focus-within, .project-card:hover { box-shadow: var(--lift-lg); transform: translateY(-3px); }
}

@media (max-width: 53rem) {
  :root { --edge: clamp(1.4375rem, 5.9vw, 2.75rem); }
  .site-header { min-height: 3.8125rem; }
  .site-header .wordmark { font-size: .875rem; }
  .site-header nav { gap: .75rem; }
  .site-header nav a { justify-content: center; min-width: 2.75rem; font-size: .875rem; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 40rem;
    padding-block: 1.75rem 2.25rem;
  }
  .hero-copy h1 { font-size: clamp(3.875rem, 19.2vw, 6rem); }
  .home-hero p { font-size: 1.3125rem; margin-block: 1.125rem 1.5rem; }
  .device-art { aspect-ratio: 344 / 286; }
  .phone--front { transform: rotate(-6deg); }
  .phone--back { transform: rotate(7deg); }
  .device-art--moss {
    --phone-width: 28%;
    --back-width: 25%;
    --front-x: 17.5%;
    --back-x: 52%;
    aspect-ratio: 324 / 238;
  }
  .device-art--magenta {
    --phone-width: 30%;
    --back-width: 26.75%;
    --front-x: 18%;
    --back-x: 52%;
  }
  .work { max-width: 40rem; padding-bottom: 2rem; }
  .work > .section-heading { margin-bottom: 1.5rem; }
  .section-heading { font-size: clamp(3rem, 15vw, 4.125rem); }
  .feature-card { grid-template-columns: minmax(0, 1fr); gap: 1.125rem; padding: .625rem; }
  .feature-copy { grid-row: 2; padding: 0 .5625rem .9375rem; }
  .feature-copy h3 { font-size: 3.5rem; margin-top: .5rem; }
  .feature-copy .measure { font-size: 1.0625rem; margin-block: .875rem 1rem; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 1.625rem; }
  .work > .project-grid { margin-top: 1.625rem; }
  .card-art { aspect-ratio: 324 / 167; }
  .about-card { grid-template-columns: minmax(0, 1fr); gap: .875rem; padding: 1.375rem 1.125rem 1.625rem; max-width: 40rem; }
  .about-card > p { font-size: 1.0625rem; }
  .footer-inner { min-height: 4.375rem; }
  .site-footer a { font-size: .875rem; }
  .study-hero { padding-top: .625rem; }
  .study-hero h1 { font-size: clamp(3.5rem, 19vw, 5.5rem); margin-block: 0 .75rem; }
  .study-intro { font-size: 1.0625rem; margin-block: .875rem 1.125rem; }
  .challenge { padding-block: 1.25rem 2.5rem; }
  .challenge .section-heading { font-size: clamp(2.5rem, 11.55vw, 3.5rem); }
  .challenge h2 em { display: inline; }
  .challenge > p:last-child { font-size: 1.0625rem; }
  .features-band .project-grid { gap: .875rem; }
  .detail-card { padding-bottom: 1rem; }
  .detail-card h3 { font-size: 2.3125rem; }
  .try-section { padding-block: 2.375rem 3.125rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
