/* ============================================
   Knownframe — knownframe.com
   Brand: monochrome, structured, calm, minimal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* --- Tokens --- */
:root {
  --font-body: 'Inter', -apple-system, 'Helvetica Neue', sans-serif;

  /* Brand palette — light (WCAG AA verified) */
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #2b2b2b;
  --text-secondary: #606060;
  --text-tertiary: #737373;       /* 4.71:1 on #f5f5f5, 5.13:1 on #fff */
  --accent: #c4501e;              /* 5.12:1 on #f5f5f5, 5.58:1 on #fff */
  --accent-hover: #a8431a;
  --border: #e0e0e0;
  --border-light: #ebebeb;
  --dot-color: rgba(43, 43, 43, 0.025);
  --code-bg: #ebebeb;
  --shadow: 0 1px 4px rgba(43, 43, 43, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --surface: #242424;
    --text: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-tertiary: #8a8a8a;     /* 4.56:1 on #1a1a1a, 4.07:1 on #242424 */
    --accent: #e8733a;            /* 5.74:1 on #1a1a1a, 5.12:1 on #242424 */
    --accent-hover: #f0845a;
    --border: #333333;
    --border-light: #2a2a2a;
    --dot-color: rgba(232, 232, 232, 0.018);
    --code-bg: #2a2a2a;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  }
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Base --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot-color) 0.8px, transparent 0.8px);
  background-size: 32px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.6em;
}

h2 {
  font-size: 1.2rem;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--text);
}

h3 {
  font-size: 1.05rem;
  margin-top: 1.8em;
  margin-bottom: 0.4em;
  color: var(--text);
}

p {
  margin-bottom: 1.1em;
  color: var(--text-secondary);
}

strong {
  font-weight: 600;
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--accent);
}

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

ul, ol {
  padding-left: 1.4em;
  margin-bottom: 1.1em;
}

li {
  margin-bottom: 0.35em;
  color: var(--text-secondary);
}

li strong {
  color: var(--text);
}

code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

hr {
  border: none;
  border-top: 1px solid var(--border-light);
  max-width: 60px;
  margin: 2.5em 0;
}

/* --- Layout --- */
.page-wrapper {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
  padding: 2.5rem 0 0;
  margin-bottom: 1rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.nav-links .nav-link + .nav-link {
  border-left: 1px solid var(--border);
  padding-left: 0.95rem;
}

.site-wordmark {
  display: block;
  height: 28px;
  width: auto;
  margin-right: auto;
  color: var(--text);
}

.site-wordmark:hover {
  color: var(--accent);
}

.site-wordmark a {
  text-decoration: none;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s ease;
  letter-spacing: 0.01em;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
}

.nav-link[aria-current="page"] {
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}

/* --- Main content --- */
main {
  padding: 2.5rem 0 4rem;
}

/* --- Hero (index only) --- */
.hero {
  padding: 4rem 0 2rem;
}

.hero .tagline {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  max-width: 440px;
  border-left: 2px solid var(--accent);
  padding-left: 1.2em;
}

/* --- Product card --- */
.product-list {
  display: grid;
  gap: 1.2rem;
  margin: 2rem 0;
}

.product-list .product-card {
  margin: 0;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  padding: 2rem 2.2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
}

a.product-card-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.product-card-link:hover,
a.product-card-link:focus-visible {
  border-left-width: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

a.product-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.product-card-cta {
  color: var(--accent);
  font-weight: 600;
}

a.product-card-link:hover .product-card-cta,
a.product-card-link:focus-visible .product-card-cta {
  text-decoration: underline;
}

.product-card-icon {
  display: block;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.1em;
}

.product-card-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-card-body {
  flex: 1;
  min-width: 0;
}

.product-card h2,
.product-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.product-card h3 a {
  text-decoration-color: var(--border);
}

.product-card h3 a:hover {
  text-decoration-color: var(--accent);
}

.product-card p {
  margin-bottom: 0.6em;
}

.product-card p:last-child {
  margin-bottom: 0;
}

.product-card .label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(196, 80, 30, 0.08);
  border: none;
  border-radius: 3px;
  padding: 0.2em 0.55em;
  margin-bottom: 1em;
  line-height: 1;
}

/* --- Buttons --- */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.4rem;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  border-radius: 5px;
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.button-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.button-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* --- App marketing --- */
.app-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 1.6rem;
}

.app-hero h1 {
  font-size: 2.1rem;
  margin: 0.35em 0 0.45em;
}

.app-hero .label,
.not-found .label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(196, 80, 30, 0.08);
  border-radius: 3px;
  padding: 0.25em 0.6em;
  line-height: 1;
}

.app-hero-art {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.app-hero-art .product-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin: 0;
}

.app-preview,
.quiet-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.app-preview {
  padding: 1.35rem 1.45rem;
}

.app-preview span {
  display: block;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.app-preview strong {
  display: block;
  line-height: 1.35;
  margin-bottom: 0.55rem;
}

.app-preview p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

.feature-list {
  margin-top: 2.2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 1rem;
}

.feature-grid article {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

.feature-grid h3 {
  margin-top: 0;
}

.feature-grid p {
  font-size: 0.94rem;
  margin-bottom: 0;
}

.quiet-panel {
  margin-top: 2.5rem;
  padding: 1.6rem 1.8rem;
}

.quiet-panel h2 {
  margin-top: 0;
}

.quiet-panel p:last-child {
  margin-bottom: 0;
}

.product-screenshot {
  margin: 1.4rem 0 2.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Error page --- */
.not-found {
  padding: 4rem 0 5rem;
  max-width: 460px;
}

.not-found h1 {
  margin-top: 0.45em;
}

/* --- FAQ / details --- */
details {
  border-bottom: 1px solid var(--border-light);
  padding: 0.9em 0;
}

details:first-of-type {
  border-top: 1px solid var(--border-light);
}

summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 0.2em 0;
  transition: color 0.15s ease;
}

summary:hover {
  color: var(--accent);
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '+';
  flex-shrink: 0;
  display: inline-block;
  width: 1.2em;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
}

details[open] summary::before {
  content: '\2212';
}

details > div {
  padding: 0.6em 0 0.4em 1.8em;
}

details > div p {
  font-size: 0.94rem;
}

/* --- Contact grid --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.contact-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.contact-item:hover {
  border-color: var(--accent);
}

.contact-item .purpose {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 0.35em;
}

.contact-item a {
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}

.contact-item a:hover {
  color: var(--accent);
}

/* --- Policy sections --- */
.policy h2 {
  font-size: 1.15rem;
  margin-top: 2.2em;
}

.policy h2:first-of-type {
  margin-top: 1.5em;
}

.policy .effective-date {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* --- Back link --- */
.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-decoration: none;
  margin-bottom: 1.5em;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--text);
}

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

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* --- Accessibility: skip link --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5em 1em;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  z-index: 100;
  border-radius: 0 0 4px 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* --- Responsive --- */
@media (min-width: 520px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .page-wrapper {
    padding: 0 1.2rem;
  }

  .site-header nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .site-wordmark {
    height: 24px;
    flex: 1 0 100%;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links .nav-link + .nav-link {
    padding-left: 0.75rem;
  }

  .product-card {
    padding: 1.4rem 1.3rem;
    flex-direction: column;
    gap: 1rem;
  }

  .product-card-icon {
    width: 48px;
    height: 48px;
  }

  .app-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 2.5rem;
  }

  .app-hero h1 {
    font-size: 1.85rem;
  }

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

  .quiet-panel {
    padding: 1.35rem 1.3rem;
  }
}

/* --- Subtle entrance --- */
@media (prefers-reduced-motion: no-preference) {
  main {
    animation: fadeIn 0.35s ease-out;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
