@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter.woff2') format('woff2');
}

/* The Fettledesk palette: warm neutrals and a rust accent. */
:root {
  color-scheme: light dark;
  --canvas: oklch(0.985 0.003 75);
  --surface: oklch(1 0 0);
  --line: oklch(0.92 0.005 75);
  --line-strong: oklch(0.87 0.007 75);
  --text: oklch(0.24 0.008 75);
  --text-2: oklch(0.45 0.01 75);
  --text-3: oklch(0.53 0.01 75);
  --accent: oklch(0.55 0.15 45);
  --accent-hover: oklch(0.51 0.15 45);
  --accent-text: oklch(0.5 0.14 45);
  --accent-subtle: oklch(0.965 0.02 50);
  --on-accent: oklch(1 0 0);
  --shadow: 0 1px 2px oklch(0.24 0.008 75 / 0.06), 0 8px 24px oklch(0.24 0.008 75 / 0.08);
  --radius: 10px;
  --page: 960px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: oklch(0.165 0.004 75);
    --surface: oklch(0.19 0.005 75);
    --line: oklch(0.27 0.006 75);
    --line-strong: oklch(0.32 0.007 75);
    --text: oklch(0.93 0.006 75);
    --text-2: oklch(0.77 0.008 75);
    --text-3: oklch(0.66 0.008 75);
    --accent: oklch(0.68 0.14 45);
    --accent-hover: oklch(0.72 0.14 45);
    --accent-text: oklch(0.74 0.13 50);
    --accent-subtle: oklch(0.26 0.04 45);
    --on-accent: oklch(0.165 0.004 75);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 8px 24px oklch(0 0 0 / 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 720px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in oklch, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 240ms var(--ease),
    box-shadow 240ms var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 16px oklch(0.165 0.004 75 / 0.06);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
}

.brand img {
  height: 22px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
}

.site-nav a {
  position: relative;
  color: var(--text-2);
  text-decoration: none;
  transition: color 150ms;
}

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

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

/* Hero */

.hero {
  padding: 120px 0 112px;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

/* "fettle." set like the wordmark, so it stands out from the lighter heading. */
.hero h1 .mark {
  font-weight: 600;
  letter-spacing: -0.04em;
}

.stop {
  color: var(--accent);
  margin-left: -0.04em;
}

.lede {
  margin-top: 28px;
  max-width: 34rem;
  font-size: 19px;
  color: var(--text-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 120ms,
    border-color 120ms,
    box-shadow 200ms var(--ease),
    transform 200ms var(--ease);
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--text-3);
}

.button:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 60ms;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 6px 18px color-mix(in oklch, var(--accent) 28%, transparent);
}

/* Sections */

main > section + section {
  border-top: 1px solid var(--line);
}

main > section:not(.hero) {
  padding: 96px 0;
}

.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}

h2 {
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 38px);
}

.product {
  display: flex;
  gap: 24px;
  margin-top: 40px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    border-color 200ms,
    box-shadow 200ms,
    transform 200ms var(--ease);
}

.product:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-mark {
  flex: none;
  width: 56px;
  height: 56px;
}

.product h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
}

.pill {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-3);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 1px 9px;
}

.product p {
  margin-top: 10px;
  max-width: 40rem;
  color: var(--text-2);
}

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 500;
}

.note {
  margin-top: 20px;
  font-size: 15px;
  color: var(--text-3);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.principles h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.principles h3::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  margin-bottom: 16px;
  border-radius: 3px;
  background: var(--accent);
}

.principles p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 15px;
}

.body {
  max-width: 42rem;
  margin-top: 20px;
  font-size: 17px;
  color: var(--text-2);
}

.body + .body {
  margin-top: 16px;
}

.contact {
  padding: 40px;
  border-radius: var(--radius);
  background: var(--accent-subtle);
  text-align: center;
}

.contact h2 {
  margin-top: 0;
}

.contact p {
  margin-top: 12px;
  color: var(--text-2);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 14px;
  color: var(--text-3);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer nav a {
  color: var(--text-2);
}

/* Not found */

.missing {
  padding: 140px 0;
}

.missing p {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 18px;
}

.missing .actions {
  margin-top: 28px;
}

/* Motion: the opening rises in, sections reveal as they scroll into view. */

.hero h1,
.hero .lede,
.hero .actions {
  animation: rise 700ms var(--ease) both;
}

.hero .lede {
  animation-delay: 90ms;
}

.hero .actions {
  animation-delay: 180ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 650ms var(--ease) var(--delay, 0ms),
    transform 650ms var(--ease) var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@view-transition {
  navigation: auto;
}

/* Phones */

@media (max-width: 720px) {
  .site-nav a:not(:last-child) {
    display: none;
  }

  .hero {
    padding: 80px 0 72px;
  }

  main > section:not(.hero) {
    padding: 72px 0;
  }

  .product {
    flex-direction: column;
    padding: 24px;
  }

  .principles {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact {
    padding: 32px 20px;
  }

  .site-nav a::after {
    display: none;
  }
}

/* Less motion: keep the gentle fades, drop anything that moves. */
@media (prefers-reduced-motion: reduce) {
  .hero h1,
  .hero .lede,
  .hero .actions {
    animation-name: fade;
  }

  .reveal,
  .button:hover,
  .button:active,
  .product:hover {
    transform: none;
  }

  .site-nav a::after {
    transform: none;
    opacity: 0;
    transition: opacity 200ms;
  }

  .site-nav a:hover::after {
    opacity: 1;
  }
}
