@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/young-serif-latin.woff2") format("woff2");
}

:root {
  --black: #161616;
  --white: #ffffff;
  --time: #ded2c1;
  --time-ink: #4f3322;
  --meizo: #dedee0;
  --meizo-ink: #29292b;
  --pomodoro: #88e7b2;
  --pomodoro-ink: #171918;
  --serif: "Young Serif", Georgia, serif;
  --mono: Menlo, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --app-icon-spring: cubic-bezier(0.22, 1.65, 0.36, 1);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --app-icon-spring: linear(
      0, 0.1696, 0.5205, 0.8641,
      1.0975, 1.1974, 1.1921, 1.1298,
      1.055, 0.9964, 0.9648, 0.9581,
      0.9673, 0.9825, 0.9964, 1.0052,
      1.0086, 1.0078, 1.0049, 1.0018, 1
    );
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
}

body {
  background: var(--black);
  color: var(--black);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--black);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.wordmark {
  margin: 0;
  padding: 10px 15px 9px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  color: var(--black);
  font-size: 12px;
  line-height: 1.25;
}

.products {
  display: grid;
  min-height: 100svh;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(24px, 3vw, 48px);
  border-left: 1px solid rgba(0, 0, 0, 0.22);
  text-align: center;
  text-decoration: none;
}

.product:first-child {
  border-left: 0;
}

.product--time {
  background: var(--time);
  color: var(--time-ink);
}

.product--meizo {
  background: var(--meizo);
  color: var(--meizo-ink);
}

.product--pomodoro {
  background: var(--pomodoro);
  color: var(--pomodoro-ink);
}

.product__body {
  position: relative;
  z-index: 2;
  width: 100%;
}

.product__visual {
  display: block;
  width: fit-content;
  margin: 0 auto clamp(28px, 4vw, 52px);
}

.product__icon {
  display: block;
  width: clamp(112px, 11vw, 180px);
  height: auto;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 22%;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  filter: grayscale(1) contrast(1.04);
  opacity: 0.82;
  transform-origin: 35% 70%;
  transition:
    box-shadow 260ms ease,
    filter 260ms ease,
    opacity 260ms ease,
    transform 650ms var(--app-icon-spring);
}

.product h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 4.8vw, 78px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.product p {
  margin: 22px 0 0;
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.35;
}

.product__visual:hover .product__icon,
.product:focus-visible .product__icon {
  box-shadow: 0 14px 22px -8px rgba(0, 0, 0, 0.28);
  filter: grayscale(0) contrast(1);
  opacity: 1;
  transform: translateY(-7px) rotate(var(--app-rotation, -5deg)) scale(1.04);
}

.speed-field {
  position: fixed;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.speed-field.is-active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.product:focus-visible {
  z-index: 1;
  outline: 4px solid var(--black);
  outline-offset: -4px;
}

@media (max-width: 760px) {
  .site-header {
    position: fixed;
    top: 16px;
  }

  .products {
    grid-template-columns: 1fr;
  }

  .product {
    min-height: 76svh;
    border-top: 1px solid rgba(0, 0, 0, 0.22);
    border-left: 0;
  }

  .product:first-child {
    min-height: 100svh;
    border-top: 0;
  }

  .product__icon {
    width: clamp(116px, 36vw, 170px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
    filter: grayscale(0) contrast(1);
    opacity: 1;
    transition: none;
  }

  .product__visual:hover .product__icon,
  .product:focus-visible .product__icon {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
    filter: grayscale(0) contrast(1);
    opacity: 1;
    transform: none;
  }

  .product h2 {
    font-size: clamp(52px, 16vw, 76px);
  }

  .product p {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
