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

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

:root {
  --cream: #FDF9F9;
  --paper: #FDF9F9;
  --rose: #9D6462;
  --rose-light: #D1B7B6;
  --rose-pale: #E8DADA;
  --clay: #9D6462;
  --sage: #E8DADA;
  --charcoal: #444444;
  --deep-brown: #693F3D;
  --muted: #693F3D;
  --line: rgba(68, 68, 68, 0.2);
  --display: "Boska", serif;
  --body: "Josefin Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--charcoal);
  background: var(--cream);
  font-family: var(--body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.site-header,
main,
footer {
  width: min(100% - 48px, 1240px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  border-bottom: 1px solid var(--line);
  animation: reveal 0.7s ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-logo {
  display: block;
  width: 116px;
  height: auto;
}

.brand i {
  font-family: var(--display);
  font-size: 1.1em;
  font-weight: 500;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50% 50% 46% 54% / 58% 42% 58% 42%;
  color: var(--paper);
  background: var(--charcoal);
  font-family: var(--display);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
  transform: rotate(-6deg);
}

.back-link,
.jump-link,
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.back-link {
  padding-bottom: 5px;
  border-bottom: 1px solid var(--charcoal);
}

.back-link svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 0.25s ease;
}

.back-link:hover svg,
.back-link:focus-visible svg {
  transform: translate(3px, -3px);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  min-height: 680px;
  padding: 72px 0 90px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-right: 36px;
  animation: reveal 0.8s 0.12s ease both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9075rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 26px;
  height: 1px;
  background: currentColor;
}

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

h1 {
  max-width: 690px;
  margin-bottom: 30px;
  font-family: var(--display);
  font-size: clamp(4.5rem, 7.7vw, 7.4rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.87;
}

h1 em {
  position: relative;
  color: var(--clay);
  font-weight: 500;
}

h1 em::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: -5px;
  width: 73%;
  height: 9px;
  border-top: 2px solid var(--rose);
  border-radius: 50%;
  transform: rotate(-2deg);
}

.hero-intro {
  max-width: 580px;
  margin-bottom: 38px;
  color: var(--deep-brown);
  font-family: var(--body);
  font-size: clamp(1.3675rem, calc(1.8vw + 0.1875rem), 1.6375rem);
  line-height: 1.5;
}

.jump-link {
  gap: 16px;
}

.jump-link span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--charcoal);
  border-radius: 50%;
  font-size: 1rem;
  transition: 0.25s ease;
}

.jump-link:hover span,
.jump-link:focus-visible span {
  color: var(--cream);
  background: var(--charcoal);
  transform: translateY(3px);
}

.hero-object {
  position: relative;
  min-height: 510px;
  animation: reveal 0.9s 0.25s ease both;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(68, 68, 68, 0.22);
  border-radius: 50%;
}

.orbit-one {
  inset: 4% 3% 2% 6%;
  transform: rotate(17deg);
}

.orbit-two {
  inset: 13% -3% 12% 12%;
  transform: rotate(-24deg);
}

.paper-card {
  position: absolute;
  box-shadow: 0 25px 60px rgba(105, 63, 61, 0.12);
}

.card-back {
  top: 16%;
  left: 16%;
  display: flex;
  width: 68%;
  height: 66%;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  color: rgba(68, 68, 68, 0.7);
  background: var(--rose-pale);
  font-size: 0.8375rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  transform: rotate(8deg);
}

.card-front {
  top: 13%;
  left: 18%;
  display: flex;
  width: 65%;
  height: 68%;
  flex-direction: column;
  justify-content: center;
  padding: 12% 9% 8%;
  background: var(--paper);
  transform: rotate(-5deg);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-object:hover .card-front {
  transform: rotate(-2deg) translateY(-8px);
}

.scribble {
  margin-bottom: 15px;
  color: var(--clay);
  font-family: var(--display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
}

.card-front strong {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.93;
}

.paper-footer {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8075rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.asterisk {
  position: absolute;
  right: 2%;
  bottom: 7%;
  width: 72px;
  height: 72px;
  fill: none;
  stroke: var(--clay);
  stroke-width: 2;
  animation: spin 18s linear infinite;
}

.playground {
  padding: 110px 0 120px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: end;
  gap: 60px;
  margin-bottom: 60px;
}

.section-heading h2 {
  max-width: 700px;
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(3.5rem, 6vw, 6.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.section-heading > p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 1.1275rem;
  line-height: 1.7;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  gap: 18px;
}

.tool-card {
  position: relative;
  display: flex;
  min-height: 410px;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, transparent 55%, rgba(253, 249, 249, 0.24));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  z-index: 2;
  outline: none;
  box-shadow: 0 22px 50px rgba(105, 63, 61, 0.12);
  transform: translateY(-7px) rotate(-0.4deg);
}

.tool-card:hover::after,
.tool-card:focus-visible::after {
  opacity: 1;
}

.tool-card-featured {
  grid-column: span 7;
  grid-row: span 2;
  min-height: 620px;
  color: var(--paper);
  background: var(--charcoal);
}

.calculator-card {
  grid-column: span 5;
  min-height: 390px;
  background: var(--rose-light);
}

.date-card {
  grid-column: span 5;
  min-height: 480px;
  background: var(--paper);
}

.handoff-card {
  grid-column: 1 / span 7;
  min-height: 310px;
  background: var(--sage);
}

.card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-number {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 500;
}

.tool-type {
  padding: 7px 12px 6px;
  border: 1px solid currentColor;
  border-radius: 100px;
  font-size: 0.8075rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.tool-copy h3 {
  max-width: 510px;
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.tool-copy p {
  max-width: 450px;
  margin-bottom: 0;
  color: currentColor;
  font-size: 1.0575rem;
  line-height: 1.55;
  opacity: 0.72;
}

.card-arrow {
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.tool-card:hover .card-arrow,
.tool-card:focus-visible .card-arrow {
  color: var(--paper);
  background: var(--charcoal);
  transform: rotate(45deg);
}

.tool-card-featured:hover .card-arrow,
.tool-card-featured:focus-visible .card-arrow {
  color: var(--charcoal);
  background: var(--paper);
}

.tool-visual {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(88%, 530px);
  aspect-ratio: 1.8;
}

.quiz-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(253, 249, 249, 0.25);
  font-size: 0.7675rem;
  letter-spacing: 0.12em;
}

.quiz-visual > span:nth-child(1) {
  transform: translateY(42px) rotate(-10deg);
}

.quiz-visual > span:nth-child(2) {
  transform: translateY(-60px) rotate(7deg);
}

.quiz-visual > span:nth-child(3) {
  transform: translateY(20px) rotate(-4deg);
}

.dial {
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 48%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid rgba(253, 249, 249, 0.7);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  transform: translateX(-50%);
}

.dial::before,
.dial::after {
  content: "";
  position: absolute;
  bottom: -45%;
  width: 1px;
  height: 140%;
  background: rgba(253, 249, 249, 0.22);
  transform-origin: bottom;
}

.dial::before {
  left: 30%;
  transform: rotate(-28deg);
}

.dial::after {
  right: 30%;
  transform: rotate(28deg);
}

.dial i {
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 1px;
  height: 82%;
  background: var(--rose);
  transform: rotate(24deg);
  transform-origin: bottom;
  transition: transform 0.5s ease;
}

.tool-card:hover .dial i {
  transform: rotate(55deg);
}

.dial i::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
}

.mini-calculator {
  position: relative;
  z-index: 1;
  margin: 36px -28px -28px;
  border-top: 1px solid var(--line);
}

.mini-calculator div {
  display: flex;
  justify-content: space-between;
  padding: 15px 28px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9275rem;
}

.mini-calculator strong {
  font-weight: 600;
}

.mini-calculator .total {
  border-bottom: 0;
  color: var(--paper);
  background: var(--clay);
}

.date-stamp {
  position: relative;
  z-index: 1;
  display: grid;
  width: 185px;
  height: 185px;
  align-self: center;
  place-content: center;
  border: 1px solid var(--clay);
  border-radius: 50%;
  color: var(--clay);
  text-align: center;
  transform: rotate(7deg);
  transition: transform 0.4s ease;
}

.date-card:hover .date-stamp {
  transform: rotate(-3deg) scale(1.04);
}

.date-stamp::before,
.date-stamp::after {
  content: "✦";
  position: absolute;
  top: 50%;
  font-size: 0.6rem;
}

.date-stamp::before {
  left: 15px;
}

.date-stamp::after {
  right: 15px;
}

.date-stamp span {
  font-size: 0.7675rem;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.date-stamp strong {
  font-family: var(--display);
  font-size: 4rem;
  font-weight: 500;
  line-height: 1.05;
  padding: 2px 0 5px;
}

.handoff-card .tool-copy {
  max-width: 70%;
}

.handoff-visual {
  position: absolute;
  top: 50%;
  right: 5%;
  display: flex;
  width: 33%;
  align-items: center;
  transform: translateY(-50%);
}

.person-dot {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border: 1px solid var(--charcoal);
  border-radius: 50%;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
}

.handoff-line {
  position: relative;
  display: flex;
  height: 1px;
  flex: 1;
  align-items: center;
  justify-content: space-around;
  background: var(--charcoal);
}

.handoff-line span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--charcoal);
  transition: transform 0.25s ease;
}

.handoff-card:hover .handoff-line span:nth-child(1) {
  transform: translateX(8px);
}

.handoff-card:hover .handoff-line span:nth-child(3) {
  transform: translateX(-8px);
}

.closing-note {
  padding: 135px 0 145px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.closing-note > p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.8675rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.word-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.word-row span:last-child {
  color: var(--clay);
  font-style: italic;
}

.word-row svg {
  width: 90px;
  flex: 0 0 90px;
  fill: none;
  stroke: var(--rose);
  stroke-width: 1.5;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 120px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9075rem;
}

.footer-brand {
  color: var(--charcoal);
}

footer p {
  margin: 0;
}

footer p a {
  color: var(--charcoal);
  border-bottom: 1px solid var(--line);
}

.top-link {
  justify-self: end;
}

a:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 5px;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 90px;
  }

  .hero-copy {
    padding-right: 0;
  }

  .hero-object {
    width: min(100%, 620px);
    min-height: 520px;
    margin: 45px auto 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .section-heading > p {
    max-width: 520px;
  }

  .tool-card-featured,
  .calculator-card,
  .date-card,
  .handoff-card {
    grid-column: span 6;
  }

  .tool-card-featured {
    min-height: 540px;
  }

  .calculator-card,
  .date-card,
  .handoff-card {
    min-height: 450px;
  }

  .handoff-card .tool-copy {
    max-width: none;
  }

  .handoff-visual {
    position: relative;
    top: auto;
    right: auto;
    width: 85%;
    align-self: center;
    transform: none;
  }

  .word-row {
    flex-direction: column;
    gap: 12px;
  }

  .word-row svg {
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  .site-header,
  main,
  footer {
    width: min(100% - 32px, 1240px);
  }

  .site-header {
    min-height: 76px;
  }

  .brand {
    font-size: 1.0875rem;
  }

  .brand-logo {
    width: 102px;
  }

  .back-link {
    font-size: 0;
  }

  .back-link::before {
    content: "UnOffice";
    font-size: 0.8475rem;
  }

  .hero {
    min-height: auto;
    padding: 72px 0 62px;
  }

  h1 {
    font-size: clamp(4rem, 19vw, 5.7rem);
  }

  .hero-intro {
    font-size: 1.2875rem;
  }

  .hero-object {
    min-height: 390px;
    margin-top: 35px;
  }

  .card-back {
    left: 10%;
    width: 80%;
  }

  .card-front {
    left: 12%;
    width: 77%;
    padding-inline: 8%;
  }

  .asterisk {
    right: 0;
    bottom: 2%;
    width: 52px;
  }

  .playground {
    padding: 85px 0;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .section-heading h2 {
    font-size: 3.7rem;
  }

  .tool-grid {
    display: block;
  }

  .tool-card {
    min-height: 430px;
    margin-bottom: 14px;
    padding: 24px;
  }

  .tool-card-featured {
    min-height: 570px;
  }

  .mini-calculator {
    margin-right: -24px;
    margin-bottom: -24px;
    margin-left: -24px;
  }

  .mini-calculator div {
    padding-inline: 24px;
  }

  .tool-copy {
    gap: 18px;
  }

  .tool-copy h3 {
    font-size: 2.35rem;
  }

  .card-arrow {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .closing-note {
    padding: 100px 0;
  }

  .word-row {
    font-size: 2.3rem;
  }

  footer {
    grid-template-columns: 1fr auto;
    gap: 18px;
    padding: 30px 0;
  }

  footer p {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
