/* ==========================================================================
   Zymmy App — Design System
   Monochrome, local-first aesthetic aligned with Minimal Counter.
   ========================================================================== */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-subtle: #f4f4f5;
  --surface-hover: #efeff1;
  --ink: #111113;
  --ink-secondary: #52525b;
  --ink-muted: #6b6b73;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --accent: #111113;
  --accent-ink: #ffffff;
  --badge-bg: #f4f4f5;
  --badge-ink: #3f3f46;
  --shadow-sm: 0 1px 2px rgba(17, 17, 19, 0.04);
  --shadow-md: 0 8px 30px rgba(17, 17, 19, 0.06);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --max-width: 980px;
  --max-width-prose: 720px;
  --header-height: 64px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e10;
    --surface: #18181b;
    --surface-subtle: #16161a;
    --surface-hover: #1f1f24;
    --ink: #f4f4f5;
    --ink-secondary: #d4d4d8;
    --ink-muted: #a1a1aa;
    --border: #27272a;
    --border-strong: #3f3f46;
    --accent: #f4f4f5;
    --accent-ink: #0e0e10;
    --badge-bg: #232329;
    --badge-ink: #d4d4d8;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #0e0e10;
  --surface: #18181b;
  --surface-subtle: #16161a;
  --surface-hover: #1f1f24;
  --ink: #f4f4f5;
  --ink-secondary: #d4d4d8;
  --ink-muted: #a1a1aa;
  --border: #27272a;
  --border-strong: #3f3f46;
  --accent: #f4f4f5;
  --accent-ink: #0e0e10;
  --badge-bg: #232329;
  --badge-ink: #d4d4d8;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font-family: inherit;
  color: inherit;
}

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

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--prose {
  max-width: var(--max-width-prose);
}

main {
  flex: 1;
}

/* Header / Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand__mark svg {
  width: 16px;
  height: 16px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-subtle);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  margin-left: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-muted);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun {
  display: none;
}

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

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

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

/* Hero Section */
.hero {
  padding: 84px 0 56px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  margin-bottom: 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.hero__title {
  margin: 0 0 18px;
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.hero__subtitle {
  margin: 0 0 28px;
  max-width: 54ch;
  font-size: 1.075rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease,
    border-color 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  opacity: 0.9;
}

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Section Headers */
.section {
  padding: 40px 0 64px;
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section__meta {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* Featured App Showcase Card */
.app-showcase {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.app-showcase__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.app-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.app-tagline {
  margin: 2px 0 0;
  font-size: 0.925rem;
  color: var(--ink-muted);
}

.app-description {
  margin: 0 0 20px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-size: 0.8rem;
  font-weight: 500;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.feature-list svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--ink);
  flex-shrink: 0;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Interactive Minimal Counter Preview */
.preview-panel {
  border-radius: 20px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 310px;
}

.preview-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.preview-panel__label {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.preview-panel__reset {
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.preview-panel__reset:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.preview-counter {
  text-align: center;
  padding: 24px 0;
}

.preview-counter__value {
  display: inline-block;
  font-size: clamp(3.4rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  transition: transform 0.12s ease;
}

.preview-counter__value.is-bumping {
  transform: scale(1.06);
}

.preview-counter__hint {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.preview-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.counter-btn {
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background-color 0.15s ease,
    border-color 0.15s ease;
  user-select: none;
}

.counter-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.counter-btn:active {
  transform: scale(0.96);
}

.counter-btn--plus {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.counter-btn--plus:hover {
  opacity: 0.92;
  background: var(--accent);
  border-color: var(--accent);
}

/* Principles Grid */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card__body {
  margin: 0;
  font-size: 0.925rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Privacy Index List */
.policy-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.policy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease,
    background-color 0.15s ease;
}

.policy-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.policy-item__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.policy-item__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.policy-item__meta {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.policy-item__arrow {
  color: var(--ink-muted);
  flex-shrink: 0;
}

/* Privacy Policy Article Page */
.page-header {
  padding: 52px 0 32px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-title {
  margin: 0 0 10px;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-meta {
  margin: 0;
  font-size: 0.925rem;
  color: var(--ink-muted);
}

.summary-box {
  margin: 32px 0 36px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.summary-box__title {
  margin: 0 0 12px;
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-grid li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.925rem;
  color: var(--ink-secondary);
}

.summary-grid svg {
  width: 16px;
  height: 16px;
  color: var(--ink);
  flex-shrink: 0;
}

.prose {
  padding-bottom: 72px;
}

.prose section {
  margin-top: 32px;
}

.prose h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.prose p {
  margin: 0 0 12px;
  color: var(--ink-secondary);
  line-height: 1.72;
}

.prose ul {
  margin: 8px 0 14px;
  padding-left: 20px;
  color: var(--ink-secondary);
}

.prose li {
  margin-bottom: 6px;
  line-height: 1.65;
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.prose a:hover {
  text-decoration-color: var(--ink);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

/* 404 Page */
.not-found {
  padding: 96px 0;
  text-align: center;
}

.not-found__code {
  margin: 0 0 12px;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.not-found__text {
  margin: 0 auto 28px;
  max-width: 42ch;
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: auto;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Responsive */
@media (max-width: 820px) {
  .app-showcase {
    grid-template-columns: 1fr;
    padding: 24px;
  }

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

@media (max-width: 560px) {
  .container {
    padding: 0 18px;
  }

  .hero {
    padding: 56px 0 36px;
  }

  .feature-list,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .nav__link {
    padding: 6px 8px;
    font-size: 0.875rem;
  }
}

/* Print Styles (handy for archiving privacy policies) */
@media print {
  .site-header,
  .site-footer,
  .theme-toggle,
  .breadcrumb {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .summary-box {
    border: 1px solid #cccccc;
    box-shadow: none;
  }
}
