@font-face {
  font-family: Manrope;
  src: url("/assets/manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f5ed;
  --cream: #fffdf5;
  --ink: #20382d;
  --muted: #4d5c50;
  --pine: #183d30;
  --sage: #476951;
  --line: #d8dbce;
  --sand: #ebece0;
  --focus: #9d4829;
  --serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 Manrope, Arial, sans-serif; }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { background: #d0deaa; color: var(--ink); }

.wrap { width: min(76rem, calc(100% - 5rem)); margin-inline: auto; }
.skip { position: absolute; top: -10rem; left: 1rem; z-index: 110; padding: .55rem 1rem; color: white; background: var(--pine); }
.skip:focus { top: .5rem; }
.masthead { min-height: 5.25rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem 2rem; border-bottom: 1px solid var(--line); }
.studio-brand { display: inline-flex; flex: 0 0 auto; min-height: 2.75rem; align-items: center; gap: .7rem; font: 700 1.4rem/1.15 var(--serif); letter-spacing: -.035em; text-decoration: none; }
.brand-mark { position: relative; width: 1.6rem; height: 1.5rem; flex: 0 0 auto; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; top: .17rem; left: .08rem; width: .78rem; height: 1.2rem; border: 2px solid var(--pine); border-radius: .7rem; transform: rotate(31deg); }
.brand-mark::after { left: .57rem; border-color: #748745; }
.masthead nav, .footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.75rem; }
.masthead nav a { display: grid; align-items: center; min-height: 2.75rem; font-weight: 750; font-size: .94rem; text-decoration: none; }
.masthead nav a:hover, .studio-brand:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.65rem, 5.15vw, 5.25rem); line-height: 1.02; letter-spacing: -.062em; }
h1 em { font-weight: inherit; color: var(--sage); }
h2 { font-size: clamp(2.25rem, 4.3vw, 3.95rem); line-height: 1; letter-spacing: -.052em; }
.eyebrow { color: var(--sage); font-size: .875rem; font-weight: 800; letter-spacing: .105em; line-height: 1.4; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; max-width: 100%; padding: .72rem 1.22rem; border: 1px solid var(--pine); border-radius: .4rem; background: var(--pine); color: var(--cream); font-size: .94rem; font-weight: 800; line-height: 1.35; text-align: center; text-decoration: none; }
.button:hover { background: #2d5542; }
.button-light { background: #eef1db; border-color: #eef1db; color: var(--pine); }
.button-light:hover { background: #dce6bf; }
.button-light:focus-visible { outline-color: #eec77d; }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; width: fit-content; color: var(--pine); font-weight: 800; text-decoration-thickness: .07em; }
.text-link:hover { color: #38634d; }

.studio-hero, .trace-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.75rem); align-items: center; padding-block: clamp(2.6rem, 5.7vw, 5.4rem); }
.studio-intro, .trace-intro { display: grid; justify-items: start; gap: 1.3rem; }
.studio-intro > p:not(.eyebrow), .trace-intro > p { font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--muted); max-width: 34ch; }
.studio-art { width: 100%; aspect-ratio: 1.35; object-fit: cover; object-position: 62% center; border-radius: .6rem; background: var(--pine); }

.work { border-top: 1px solid var(--line); padding-block: 2.2rem 4rem; }
.work h2 { margin-bottom: 1.6rem; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.work-card { min-width: 0; position: relative; border: 1px solid var(--line); border-radius: .6rem; background: var(--cream); }
.anchor { position: absolute; inset: 0 auto auto; }
.work-image { display: block; border-radius: .56rem .56rem 0 0; overflow: hidden; background: var(--pine); }
.work-image img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; object-position: center 46%; transition: transform .3s ease; }
.work-image:hover img { transform: scale(1.035); }
.work-family img { object-position: center 44%; }
.work-copy { display: grid; justify-items: start; align-content: start; gap: .35rem; padding: clamp(1.2rem, 3vw, 2.15rem); }
.work-copy h3 { font-size: clamp(2.25rem, 3.8vw, 3.25rem); line-height: 1.06; letter-spacing: -.045em; }
.work-copy p:not(.eyebrow) { margin-top: .45rem; max-width: 42ch; color: var(--muted); }
.work-copy .text-link { margin-top: .3rem; }

.studio-contact { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; background: var(--pine); color: var(--cream); border-radius: .6rem; padding: clamp(1.6rem, 4vw, 3.25rem); }
.studio-contact h2 { font-size: clamp(2.2rem, 4vw, 3.35rem); }
.studio-contact p { margin-top: .65rem; color: #edeedf; }
.footer { margin-top: 3rem; border-top: 1px solid var(--line); padding-block: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--muted); font-size: .875rem; }
.footer nav a, .footer > a { min-height: 2.75rem; display: inline-flex; align-items: center; }

.trace-hero { align-items: center; }
.trace-wordmark { width: clamp(8.5rem, 16vw, 12rem); margin-left: -.22rem; }
.trace-intro h1 { font-size: clamp(2.65rem, 4.75vw, 4.65rem); }
.trace-intro > p { max-width: 38ch; }
.trace-stage { min-width: 0; }
.trace-stage-art { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1.19; border-radius: .6rem; background: #4c795c url("/assets/trace-tempo-kite-cover.webp") center 62% / cover no-repeat; }
.trace-stage-art::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(115deg, #15362109 35%, #142e1f4f 90%); }
.shot { position: absolute; top: 50%; width: auto; max-width: none; border: clamp(3px, .52vw, 8px) solid #21362c; border-radius: clamp(.55rem, 1.6vw, 1.2rem); box-shadow: 0 .85rem 1.65rem #13221a80; background: #20342a; }
.shot-guide { left: 58%; height: 68%; transform: translateY(-46%) rotate(9deg); }
.shot-game { left: 31%; height: 89%; transform: translateY(-50%) rotate(-6deg); }
.trace-stage figcaption { margin-top: .55rem; color: var(--muted); font-size: .875rem; text-align: right; }

.games { background: var(--sand); padding-block: clamp(2.5rem, 6vw, 5rem); }
.games-heading { margin-bottom: 1.75rem; }
.games-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.15rem; }
.mode { grid-column: span 3; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: .55rem; background: var(--cream); border: 1px solid #d7dace; }
.mode:nth-child(-n+3) { grid-column: span 4; }
.mode img { width: 100%; aspect-ratio: 1.75; object-fit: cover; object-position: center; background: var(--pine); }
.mode-tempo img { object-position: center 30%; }
.mode-sprint img { object-position: center 59%; }
.mode-tide img { object-position: center 52%; }
.mode-remix img { object-position: center 53%; }
.mode > div { padding: 1rem 1.08rem 1.25rem; }
.mode h3 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); line-height: 1.08; letter-spacing: -.035em; }
.mode p { margin-top: .45rem; color: var(--muted); }

.availability { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.75rem; padding-top: clamp(2.4rem, 5.5vw, 4.1rem); }
.availability h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
.availability p { margin-top: .65rem; color: var(--muted); }

@media (max-width: 1020px) {
  .wrap { width: calc(100% - 3.5rem); }
  .studio-hero, .trace-hero { gap: 2rem; }
  .games-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mode, .mode:nth-child(-n+3) { grid-column: span 2; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 2.25rem); }
  .masthead { min-height: 4.4rem; flex-wrap: wrap; }
  .masthead nav { flex-wrap: nowrap; gap: 0 .85rem; }
  .studio-brand { font-size: 1.18rem; gap: .4rem; }
  .masthead nav a { font-size: .875rem; white-space: nowrap; }
  .studio-hero, .trace-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  h1, .trace-intro h1 { font-size: clamp(2.65rem, 8.7vw, 4.3rem); }
  .studio-art { aspect-ratio: 1.75; }
  .studio-intro, .trace-intro { gap: 1rem; }
  .trace-stage-art { aspect-ratio: 1.18; }
  .work { padding-block: 1.8rem 2.5rem; }
  .work h2 { margin-bottom: 1.25rem; }
  .footer { margin-top: 2.2rem; }
  .footer nav { gap: 0 1rem; }
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
  .mode, .mode:nth-child(-n+3) { grid-column: auto; }
}

@media (max-width: 480px) {
  .masthead { gap: .35rem; }
  .studio-brand { font-size: 1.05rem; }
  .masthead nav { gap: .55rem; }
  .masthead nav a { font-size: .84rem; }
  .work-grid { grid-template-columns: 1fr; }
  .work-image img { aspect-ratio: 1.85; }
  .games-grid { grid-template-columns: 1fr; }
  .mode { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); min-height: 8.5rem; }
  .mode img { height: 100%; aspect-ratio: auto; contain: size; }
  .mode > div { align-self: center; padding: .83rem .85rem; }
  .mode p { font-size: 1rem; line-height: 1.48; }
}

@media (max-width: 360px) {
  .brand-mark { display: none; }
  .masthead nav { gap: 0 .55rem; }
  .masthead nav a { font-size: .82rem; }
  .masthead { gap: .3rem; }
}

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