:root {
  color-scheme: light;
  --ink: #262220;
  --ink-soft: #6b625b;
  --paper: #f6f2ea;
  --border: rgba(38, 34, 32, 0.14);
  --accent: #a85d3b;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 3rem 1.25rem;
}

.hero {
  display: grid;
  justify-items: center;
  gap: 1.75rem;
  text-align: center;
  max-width: 30rem;
}

.hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  letter-spacing: 0.03em;
  color: var(--ink);
}

.tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.tool-card {
  display: grid;
  gap: 0.3rem;
  width: 14rem;
  padding: 0 0 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.4);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(38, 34, 32, 0.1);
}

.tool-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 7.875rem;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(160deg, rgba(38, 34, 32, 0.05), rgba(38, 34, 32, 0.09));
  border-bottom: 1px solid var(--border);
}

.tool-media img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  object-position: center 42%;
}

.metronome-icon svg {
  width: auto;
  height: 6.6rem;
  min-height: 0;
  overflow: visible;
}

.mini-device-shadow {
  fill: rgba(61, 31, 15, 0.16);
}

.mini-device-case {
  filter: drop-shadow(0 6px 10px rgba(61, 31, 15, 0.2));
}

.mini-scale-ticks line {
  stroke: rgba(246, 241, 232, 0.24);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.mini-pendulum-rod,
.mini-pendulum-pivot {
  fill: #f6f1e8;
}

.mini-pendulum-weight {
  fill: var(--accent);
}

.mini-pendulum-swing {
  transform-origin: 120px 246px;
  animation: mini-swing 1.3s ease-in-out infinite;
}

@keyframes mini-swing {
  0%,
  100% {
    transform: rotate(-15deg);
  }
  50% {
    transform: rotate(15deg);
  }
}

/* A small static replica of the /tuner/ strobe wheel, frozen green as if
   reading a perfectly in-tune A4 — built from the same half-circle wedge
   construction (see the inline script at the end of the page), just with
   far fewer segments since it only needs to read clearly at icon size. */
.tuner-icon-svg {
  height: 6.6rem;
  width: auto;
  display: block;
  overflow: visible;
}

.tuner-icon-case {
  filter: drop-shadow(0 4px 7px rgba(61, 31, 15, 0.22));
}

.tuner-icon-wedges path {
  fill: #6f8f52;
}

.tuner-icon-wedges-alt path {
  fill: #8fae6a;
}

.tuner-icon-base {
  fill: url(#homeTunerCaseGradient);
}

.tuner-icon-hub {
  fill: #f6f1e8;
}

/* A blue "A4" label layered on top of the icon (last in paint order), so
   the tool reads as a tuner at a glance rather than a generic dial. */
.tuner-icon-a4 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 54px;
  fill: #3f7fc9;
  paint-order: stroke fill;
  stroke: #f6f1e8;
  stroke-width: 6px;
  stroke-linejoin: round;
}

.tool-name {
  margin-top: 0.85rem;
  padding: 0 1.4rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
}

.tool-desc {
  padding: 0 1.4rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.footer {
  font-size: 0.85rem;
}

.footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.1rem;
  transition: color 160ms ease, border-color 160ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }

  .mini-pendulum-swing {
    animation: none;
  }
}
