:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #1c1a17;
  --muted: #77716a;
  --line: #ebe5dc;
  --accent: #d94f31;
  --shadow: 0 1px 2px rgb(40 30 20 / 0.04), 0 8px 24px rgb(40 30 20 / 0.06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161513;
    --card: #201e1b;
    --text: #f2eee8;
    --muted: #9c958c;
    --line: #2e2b27;
    --accent: #f07a5c;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

:root[data-theme="dark"] {
  --bg: #161513;
  --card: #201e1b;
  --text: #f2eee8;
  --muted: #9c958c;
  --line: #2e2b27;
  --accent: #f07a5c;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.top,
main,
.foot {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 24px;
}

.top {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-block: 24px;
}

.pill {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.pill:hover {
  color: var(--text);
  border-color: var(--muted);
}

.pill svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.pill .sun,
:root[data-theme="dark"] .pill .moon {
  display: none;
}

:root[data-theme="dark"] .pill .sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill .moon {
    display: none;
  }

  :root:not([data-theme="light"]) .pill .sun {
    display: block;
  }
}

main {
  flex: 1;
}

.hero {
  margin: clamp(48px, 12vw, 120px) 0 clamp(48px, 9vw, 96px);
  font-size: clamp(40px, 8vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 96px;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:has(.cover):hover {
  transform: translateY(-4px);
}

.card img {
  display: block;
  width: 64px;
  height: 64px;
}

.card h2 {
  margin: 24px 0 8px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card p {
  flex: 1;
  text-wrap: pretty;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.go {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.go.soon {
  color: var(--muted);
  font-weight: 500;
}

.cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

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

.foot {
  display: flex;
  gap: 20px;
  padding-block: 32px;
  color: var(--muted);
  font-size: 13px;
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .products {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

@media (max-width: 480px) {
  .top,
  main,
  .foot {
    padding-inline: 16px;
  }

  .card {
    padding: 24px;
  }
}

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