:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --fg: #14110f;
  --muted: #6b6764;
  --accent: #2a2724;
  --accent-soft: #efece6;
  --border: #e8e4dc;
  --shadow: 0 1px 2px rgba(20, 17, 15, 0.04), 0 8px 24px rgba(20, 17, 15, 0.04);
  --shadow-hover: 0 2px 4px rgba(20, 17, 15, 0.06), 0 12px 32px rgba(20, 17, 15, 0.08);
  --max: 760px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.75rem 4rem;
}

h1, h2, h3 {
  font-family: ui-serif, "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", "Droid Serif", Times, serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}

p { margin: 1rem 0; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}
a:hover { opacity: 0.7; }

ul, ol { padding-left: 1.5rem; }
li { margin: 0.4rem 0; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ──────── HOME ──────── */

.home {
  padding-top: 6rem;
}

.hero { text-align: center; margin-bottom: 5rem; }

.hero .title {
  font-family: ui-serif, "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 4rem);
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  color: var(--fg);
}

.hero .tagline {
  font-family: ui-serif, "Iowan Old Style", Baskerville, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
}

/* Featured Wordy card */

.featured {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
  margin-bottom: 5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.featured::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--fg), transparent);
  opacity: 0.5;
}

.featured .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
}

.featured-name {
  font-style: italic;
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.featured-desc {
  font-size: 1.08rem;
  color: var(--fg);
  margin: 0 auto 2rem;
  max-width: 480px;
  line-height: 1.6;
}

.featured-links {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

/* Section heading */

.section-heading {
  font-size: 1.15rem;
  font-weight: 500;
  font-style: italic;
  text-align: center;
  color: var(--muted);
  margin: 0 0 2rem;
  letter-spacing: 0.01em;
}

/* App grid */

.more-apps { margin-bottom: 5rem; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.app-grid li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.app-grid li:hover {
  box-shadow: var(--shadow);
  border-color: #d8d2c5;
}

.app-grid .name {
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.app-grid .badges {
  display: inline-flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--bg);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.badge:hover {
  background: var(--fg);
  color: #fff;
  border-color: var(--fg);
  opacity: 1;
}
.badge svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--fg);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--fg);
  color: #fff;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover {
  background: transparent;
  color: var(--fg);
  opacity: 1;
}
.btn.btn-secondary {
  background: transparent;
  color: var(--fg);
}
.btn.btn-secondary:hover {
  background: var(--fg);
  color: #fff;
}

.btn-text {
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--muted);
  padding: 0.5rem 0.5rem;
}
.btn-text:hover { color: var(--fg); opacity: 1; }

/* Support */

.support {
  text-align: center;
  margin-bottom: 5rem;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.support h2 {
  font-style: italic;
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}
.support p { margin: 0; color: var(--muted); }
.support a { color: var(--fg); font-weight: 500; }

/* Footer / legal links */

.footer {
  text-align: center;
}

.legal-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.legal-buttons a {
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.legal-buttons a:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
  opacity: 1;
}

.legal-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 520px;
  line-height: 1.5;
}
.legal-note strong { color: var(--fg); }

/* ──────── LEGAL PAGES ──────── */

.legal { padding: 4rem 1.75rem 4rem; }

.legal h1 {
  text-align: center;
  font-style: italic;
  font-size: clamp(2.25rem, 5vw, 3rem);
  margin: 0 0 0.5rem;
}
.legal .meta {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 2.5rem;
  font-style: italic;
}

.legal h2 {
  font-size: 1.4rem;
  font-style: italic;
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.legal h3 {
  font-size: 1.08rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  font-style: normal;
  letter-spacing: 0;
  margin: 2rem 0 0.75rem;
}

.legal p, .legal li { font-size: 0.97rem; }

.callout {
  margin: 2.5rem 0 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--fg);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout ul { margin: 0.5rem 0 1rem; }

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.legal th, .legal td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.legal tr:last-child td { border-bottom: 0; }
.legal th { background: var(--accent-soft); font-weight: 600; }

.legal hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.legal .back {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}
.legal .back a {
  color: var(--muted);
  text-decoration: none;
}
.legal .back a:hover { color: var(--fg); opacity: 1; }

/* ──────── MOBILE ──────── */

@media (max-width: 600px) {
  main { padding: 3rem 1.25rem 3rem; }
  .home { padding-top: 3rem; }
  .hero { margin-bottom: 3.5rem; }
  .featured { padding: 2rem 1.5rem; margin-bottom: 3.5rem; }
  .more-apps, .support { margin-bottom: 3.5rem; }
  .app-grid { grid-template-columns: 1fr; }
  .app-grid li { padding: 0.85rem 1rem; }
  .legal { padding: 2.5rem 1.25rem 3rem; }
  .legal h2 { font-size: 1.25rem; }
  .legal table { font-size: 0.82rem; }
  .legal th, .legal td { padding: 0.5rem 0.6rem; }
}
