:root {
  --ink: #1a1917;
  --ink-soft: #665f54;
  --paper: #eae5d8;
  --card: #ffffff;
  --accent: #9a4b32;
  --line: #d9d2bf;
  --hero-text: #f3efe3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.monogram {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

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

/* Hero */

.hero {
  background: var(--ink);
  padding: 96px 0 88px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--hero-text);
}

.tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  margin: 0 auto;
  color: rgba(243, 239, 227, 0.68);
  max-width: 46ch;
}

/* Apps */

.apps {
  padding: 32px 0 96px;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-align: center;
  margin: 0 0 32px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.app-icon {
  border-radius: 22%;
  border: 1px solid var(--line);
}

.app-card-body h3 {
  font-size: 1.35rem;
  margin: 0 0 8px;
}

.app-card-title-link {
  color: var(--ink);
  text-decoration: none;
}

.app-card-title-link:hover {
  color: var(--accent);
}

.app-card-body p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

/*
  Apple's App Store Marketing Guidelines require using the official badge
  artwork unmodified, at a minimum on-screen height of 40px, with clear
  space around it of at least 1/4 of the badge's height. No recoloring,
  angling, or animating the badge itself.
  https://developer.apple.com/app-store/marketing/guidelines/
*/
.store-badge-link {
  display: inline-block;
  opacity: 1;
  transition: opacity 0.15s ease;
}

.store-badge-link:hover {
  opacity: 0.8;
}

.store-badge {
  display: block;
  height: 47px;
  width: auto;
}

.app-card-placeholder {
  justify-content: center;
  border-style: dashed;
  color: var(--ink-soft);
}

.app-card-placeholder h3 {
  color: var(--ink-soft);
}

/* Simple content pages (privacy, support) */

.page {
  padding: 64px 0 96px;
}

.page h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 8px;
}

.page .updated {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 40px;
}

.page h2 {
  font-size: 1.25rem;
  margin: 40px 0 12px;
  color: var(--ink);
}

.page p,
.page li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.page ul {
  padding-left: 20px;
}

.page a {
  color: var(--accent);
}

.about-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
  width: 220px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.about-bio {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .about-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Footer */

footer {
  padding: 32px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 6px 0;
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.contact-link:hover {
  text-decoration: underline;
}

.legal {
  font-size: 0.75rem;
  color: #9a958c;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .nav-inner {
    flex-direction: column;
    gap: 16px;
  }

  .app-card {
    align-items: center;
    text-align: center;
  }
}

/* Per-app landing pages (e.g. parsley.html) */

.breadcrumb {
  padding: 20px 0 0;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.app-hero {
  padding: 56px 0 0;
  text-align: center;
  color: #fff;
}

.app-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-icon-lg {
  border-radius: 22%;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.app-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin: 20px 0 4px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 34ch;
}

.app-hero-screenshot {
  width: min(320px, 80vw);
  height: auto;
  margin-top: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.theme-parsley.app-hero {
  background: linear-gradient(180deg, #98c39e 0%, #b7d5bc 100%);
}

.theme-parsley .app-feature-text h2 {
  color: #395b50;
}

.app-features {
  padding: 80px 0;
}

.app-feature {
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 36px 0;
}

.app-feature:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.app-feature.reverse {
  flex-direction: row-reverse;
}

.app-feature img {
  width: min(260px, 42vw);
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.app-feature-text h2 {
  font-size: 1.6rem;
  margin: 0 0 12px;
}

.app-feature-text p {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 40ch;
}

.app-cta {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 64px 0;
  text-align: center;
}

.app-cta h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  max-width: 20ch;
  margin: 0 auto 24px;
}

@media (max-width: 640px) {
  .app-feature,
  .app-feature.reverse {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .app-feature img {
    width: min(260px, 70vw);
  }

  .app-feature-text p {
    margin: 0 auto;
  }
}
