@font-face {
  font-family: Fraunces;
  src: url("./fable/fonts/fraunces-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url("./fable/fonts/fraunces-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fable/fonts/plexmono-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  color: #231b17;
  background: #f7f3e8;
  font-family: system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 0%, #fffaf0 12%, transparent 70%);
}

.layout {
  width: min(76rem, 100% - 5rem);
  margin-inline: auto;
  padding-block: 3rem 4rem;
}

.intro {
  text-align: center;
  margin: 0 auto 2.65rem;
}

.catalog-return {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  margin: -1.25rem 0 .75rem;
  color: #68457e;
  font-size: .85rem;
  font-weight: 650;
  text-decoration: none;
}

.catalog-return:hover {
  text-decoration: underline;
}

.route {
  display: flex;
  align-items: center;
  gap: .9rem;
  width: min(13rem, 56%);
  margin: 0 auto 1.45rem;
  color: #a85e43;
}

.route::before,
.route::after {
  content: "";
  flex: 1;
  border-top: 1px dotted #ae866e;
}

.compass {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.9rem;
  aspect-ratio: 1;
  border: 1px solid #d1ac98;
  border-radius: 50%;
}

.compass::before,
.compass::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.compass::before {
  width: .48rem;
  height: 1.25rem;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.compass::after {
  width: 1.25rem;
  height: .42rem;
  clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}

h1,
h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 530;
}

h1 {
  margin: 0;
  font-size: clamp(3.15rem, 8.4vw, 6.65rem);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

h1 em {
  color: #a34531;
  font-weight: inherit;
}

.intro p {
  margin: 1.35rem auto 0;
  max-width: 34rem;
  color: #5b4b40;
  font-size: clamp(.98rem, 1.55vw, 1.12rem);
  line-height: 1.6;
  text-wrap: balance;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.65rem);
}

.project {
  --accent: #9e4334;
  --outline: #d7cab8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  color: inherit;
  text-decoration: none;
  background: #fffaf1;
  border: 1px solid var(--outline);
  border-radius: .7rem;
  box-shadow: 0 .6rem 1.6rem #5534220c;
}

.project--gemini {
  --accent: #376761;
}

.project--hydrogen {
  --accent: #685687;
}

.preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: #161d2b;
}

.project__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  padding: 1.35rem clamp(1rem, 2vw, 1.6rem) 1.25rem;
  border-top: 2px solid var(--accent);
}

.model {
  margin: 0 0 .45rem;
  color: var(--accent);
  font: 500 .75rem/1.4 "IBM Plex Mono", monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.project__action {
  width: 100%;
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px solid #e5d9c8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 650;
}

.arrow {
  display: grid;
  place-items: center;
  width: 2.2rem;
  aspect-ratio: 1;
  border: 1px solid #d7c7b5;
  border-radius: 50%;
  font-size: 1.19rem;
  line-height: 1;
  transition: background-color 160ms, color 160ms, border-color 160ms;
}

.project:is(:hover, :focus-visible) {
  border-color: var(--accent);
}

.project:is(:hover, :focus-visible) .arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf1;
}

.project:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.sponsor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  align-items: center;
  margin-top: clamp(1.75rem, 4.5vw, 3.75rem);
  padding: clamp(1.25rem, 3.1vw, 2.5rem);
  color: #fcf7f1;
  background: radial-gradient(ellipse at 100% 0%, #503879, transparent 72%), #221933;
  border: 1px solid #4c3864;
  border-radius: .7rem;
}

.sponsor__label {
  margin: 0 0 .55rem;
  color: #dacafa;
  font: 500 .73rem/1.4 "IBM Plex Mono", monospace;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.sponsor h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  text-wrap: pretty;
}

.sponsor__detail {
  margin: 0;
  color: #e4d9ee;
  font-size: .94rem;
  line-height: 1.55;
}

.sponsor__offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
}

.sponsor__discount {
  display: grid;
  gap: .2rem;
  padding: .55rem .75rem;
  border: 1px dashed #a991c7;
  border-radius: .4rem;
}

.sponsor__discount span {
  color: #e4d9ee;
  font-size: .7rem;
}

.sponsor__discount code {
  color: #fcf7f1;
  font: 500 .9rem/1.3 "IBM Plex Mono", monospace;
  letter-spacing: .03em;
}

.sponsor__link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .65rem .9rem;
  color: #241936;
  background: #eee5ff;
  border-radius: .4rem;
  font-size: .87rem;
  font-weight: 700;
  text-decoration: none;
}

.sponsor__link:hover {
  background: #fff7ee;
}

.sponsor__link:focus-visible {
  outline: 2px solid #fff7ee;
  outline-offset: 3px;
}

@media (max-width: 60rem) {
  .sponsor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 46rem) {
  .layout {
    width: min(34rem, 100% - 2rem);
    padding-block: 2.6rem 2.7rem;
  }

  .intro {
    margin-bottom: 2rem;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project__text {
    padding: 1.15rem 1.15rem 1rem;
  }

  .sponsor__offer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arrow {
    transition: none;
  }
}
