/*
 * klozt site — shared styles.
 *
 * Editorial palette mirrors src/design/tokens.ts in the mobile app:
 *   background  #F6F2E9  warm cream
 *   surface     #FFFCF6  paper
 *   ink         #1C1916  warm near-black
 *   inkSoft     #3A332C
 *   inkMuted    #7A7268
 *   divider     #E0D7C2
 *   accent      #B8965A  signature gold
 *   accentSoft  #F0E2C6
 *
 * Display font: Fraunces 72pt SemiBold — same face the app bundles, served
 * here via Google Fonts so the site loads quickly without hosting the TTF.
 * Body font: system-ui.
 */

:root {
  --bg: #F6F2E9;
  --surface: #FFFCF6;
  --ink: #1C1916;
  --ink-soft: #3A332C;
  --ink-muted: #7A7268;
  --divider: #E0D7C2;
  --accent: #B8965A;
  --accent-deep: #8E7037;
  --accent-soft: #F0E2C6;
  --max-prose: 640px;
  --max-content: 720px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg);
  color: var(--ink-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 64px 24px 48px;
}

/* Display serif — applied to hero wordmark and section headings. */
.serif {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 0;
}

/* Typography scale */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

h1.display {
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

h1.doc-title {
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 8px;
  margin-bottom: 12px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 36px;
  margin-bottom: 12px;
}

h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 24px;
  margin-bottom: 8px;
}

p {
  margin-bottom: 14px;
  max-width: var(--max-prose);
}

ul {
  margin: 0 0 14px;
  padding-left: 20px;
  max-width: var(--max-prose);
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
  transition: color 120ms ease;
}

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

/* Landing hero */
.hero {
  text-align: center;
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 48px;
}

.hero .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  background: var(--ink);
  border-radius: 22px;
  margin-bottom: 24px;
}

.hero .mark span {
  font-family: "Fraunces", Georgia, serif;
  font-size: 62px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero .tagline {
  font-size: 18px;
  color: var(--ink-soft);
  margin-top: 8px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature grid (used on index) */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 32px 0 48px;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 20px 24px;
}

.feature h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.feature p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* Accent callout (privacy/values block) */
.accent-card {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 48px 0;
  max-width: var(--max-prose);
}

.accent-card .eyebrow {
  color: var(--accent-deep);
  margin-bottom: 8px;
}

.accent-card p {
  color: var(--ink);
  margin-bottom: 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--divider);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

footer .links {
  margin-bottom: 8px;
}

footer .links a {
  margin: 0 8px;
}

footer .copyright {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  color: var(--ink-muted);
}

/* Document pages (privacy, terms) */
.doc {
  max-width: var(--max-prose);
}

.doc .draft-banner {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 16px 0 32px;
  font-size: 13px;
  color: var(--ink-muted);
  font-style: italic;
  max-width: var(--max-prose);
}

.doc .back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.doc .back-link:hover {
  color: var(--accent-deep);
}

/* Tables (privacy policy) — scroll inside their own box on narrow screens so
   the page never scrolls sideways. */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
  max-width: var(--max-prose);
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 14px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
}

th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--bg);
}

tr:last-child td {
  border-bottom: 0;
}

/* Short summary list at the top of a document */
.doc .summary {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 20px 24px 8px;
  margin: 24px 0 32px;
}

.doc .summary li {
  margin-bottom: 10px;
}

/* Placeholder that must be filled before launch — deliberately visible */
.fill-me {
  background: var(--accent-soft);
  border-bottom: 2px solid var(--accent);
  padding: 0 4px;
}

/* Buttons and calls to action */
.cta {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 999px;
  margin: 8px 8px 8px 0;
}

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

.cta.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.cta.secondary:hover {
  color: var(--accent-deep);
  border-color: var(--accent-deep);
}

.hero .actions {
  margin-top: 24px;
}

.hero .note {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 12px;
}

/* Step list (support / delete-account) */
ol.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  max-width: var(--max-prose);
}

ol.steps li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
}

ol.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Header nav shared by every page */
header.site {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.site .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

header.site .brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

header.site nav a {
  margin-left: 16px;
  font-size: 14px;
  text-decoration: none;
}

header.site nav a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  header.site nav a {
    margin-left: 10px;
    font-size: 13px;
  }
}
