:root {
  color-scheme: light;
  /* Mirrors the Tablehand Druid app theme (constants/theme.ts, light) */
  --ink: #18211b;
  --muted: #516056;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-muted: #eceee8;
  --selected: #e0eadf;
  --accent-soft: #d9ead7;
  --spruce: #3b6e48;
  --spruce-deep: #2f5a3a;
  --warning: #9b5316;
  --line: rgba(24, 33, 27, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 700;
}

.brand img {
  display: block;
  border-radius: var(--radius);
}

.brand span {
  font-size: 1.06rem;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 500;
}

.site-nav a {
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

/* Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100svh - 200px);
  padding: clamp(48px, 7vw, 100px) clamp(18px, 5vw, 72px);
  background: var(--bg);
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--spruce-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.4rem);
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

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

.button.primary {
  background: var(--spruce);
  color: #f7faf6;
  border-color: var(--spruce);
}

.button.primary:hover {
  background: var(--spruce-deep);
  border-color: var(--spruce-deep);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.button.secondary:hover {
  background: var(--surface-muted);
  border-color: rgba(24, 33, 27, 0.18);
}

/* App phone preview ---------------------------------------------------- */
.tabletop-preview {
  min-width: 0;
}

.app-phone {
  position: relative;
  width: min(100%, 312px);
  margin: 0 auto;
  padding: 12px;
  border-radius: 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(24, 33, 27, 0.16);
}

.app-phone-screen {
  overflow: hidden;
  border-radius: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.app-phone-screen img {
  display: block;
  width: 100%;
  height: auto;
}

/* Sections ------------------------------------------------------------- */
.section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.product-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.copy-block p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.text-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--spruce-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(59, 110, 72, 0.4);
  text-underline-offset: 5px;
}

/* Principles ----------------------------------------------------------- */
.principles {
  background: var(--bg);
}

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

.principle-list article {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.principle-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--spruce-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.principle-list h3 {
  margin: 28px 0 0;
  font-size: 1.3rem;
}

.principle-list p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Privacy page --------------------------------------------------------- */
.privacy-content {
  max-width: 680px;
}

.privacy-content h1 {
  margin: 0 0 32px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}

.privacy-content h2 {
  max-width: none;
  margin: 36px 0 0;
  font-size: 1.2rem;
}

.privacy-content p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.privacy-content a {
  color: var(--spruce-deep);
  text-decoration: underline;
  text-decoration-color: rgba(59, 110, 72, 0.4);
  text-underline-offset: 3px;
}

/* Footer --------------------------------------------------------------- */
.site-footer {
  padding: 30px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.brand.compact span {
  color: var(--ink);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--spruce-deep);
  text-decoration: underline;
  text-decoration-color: rgba(59, 110, 72, 0.35);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--spruce);
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
  .site-header {
    position: static;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.86rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 44px;
  }

  .split,
  .principle-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
  }

  .site-nav a {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .hero,
  .section {
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14vw, 3.6rem);
  }

  .button {
    width: min(100%, 20rem);
  }

  .app-phone {
    width: min(100%, 280px);
  }

  .section h2 {
    font-size: 1.8rem;
    line-height: 1.14;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .button,
  .site-nav a {
    transition: none;
  }
}
