* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: #f0eae8;
  background-image: radial-gradient(ellipse at top right, #c8ae99, #dfccbc 38%, transparent 76%);
  background-position: top right;
  background-size: min(100%, 850px) 490px;
  background-repeat: no-repeat;
  --ink: #252525;
  color: var(--ink);
  font-family: sans-serif;
  font-size: 16px;
}

.content {
  width: min(1280px, calc(100% - 48px));
  margin: auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0;
}

.brand { display: block; width: 240px; min-width: 0; height: auto; }

main {
  padding: 50px 0;
  text-align: center;
}

.design-count { font-size: 20px; }

h1, .design-count {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  margin: 0 0 35px;
  font-size: 88px;
  font-weight: 400;
  font-style: italic;
  line-height: 110%;
  letter-spacing: -4px;
}

.intro, .viewing-note {
  line-height: 150%;
}

.intro { margin: 0 auto 23px; }

.line {
  width: 76px;
  height: 1px;
  margin: 0 auto 35px;
  background: currentColor;
}

.tabs {
  position: sticky;
  top: 15px;
  z-index: 1;
  display: flex;
  max-width: 590px;
  margin: 0 auto 60px;
  padding: 1px;
  border: 1px solid #c9c0bd;
  border-radius: 100px;
  background: #fff;
}

.tabs button {
  flex: 1;
  padding: 14px 8px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: var(--ink);
  color: white;
}

.tabs button:focus-visible {
  outline: 2px solid #76665d;
  outline-offset: 4px;
}

.viewing-note {
  display: none;
  margin: 30px auto 30px;
  font-size: 14px;
}

.preview {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid #faf7f5;
  box-shadow: 0 14px 32px #493c3530;
}

.preview[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  header, main { animation: fade-in 1100ms ease-in-out; }
  .tabs.has-switched ~ .preview:not([hidden]) { animation: fade-in 800ms ease-in-out; }

  @supports selector(:has(*)) {
    .tabs::before {
      content: "";
      position: absolute;
      inset: 1px auto 1px 1px;
      width: calc((100% - 2px) / 3);
      border-radius: inherit;
      background: var(--ink);
      pointer-events: none;
      transform: translateX(var(--tab-offset, 0%));
      transition: transform 240ms cubic-bezier(.2, .7, .3, 1);
    }

    .tabs:has(#tab2[aria-selected="true"]) { --tab-offset: 100%; }
    .tabs:has(#tab3[aria-selected="true"]) { --tab-offset: 200%; }
    .tabs button { position: relative; }
    .tabs button[aria-selected="true"] { background: transparent; }
  }
}

@media (max-width: 970px) {
  .tabs { margin-bottom: 0; }
  .viewing-note { display: block; }
  .intro { max-width: 420px; }
}

@media (max-width: 800px) {
  h1 { font-size: 64px; }
}

@media (max-width: 600px) {
  .brand { width: 190px; }
  header { gap: 12px; }
  .design-count { font-size: 16px; white-space: nowrap; }
  h1 { font-size: 60px; letter-spacing: -2px; }
}
