:root {
  --paper: #F5EFE3;
  --ink: #1A1715;
  --muted: #6B6259;
  --accent: #8B6F47;
  --line: rgba(26, 23, 21, 0.15);
}

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.lang-switch {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  gap: 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 10;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-switch a:hover,
.lang-switch a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
}

header.page-head {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.45em;
  margin-bottom: 1.25rem;
  padding-left: 0.45em; /* visual centering with letter-spacing */
}

.page-title {
  font-style: italic;
  font-weight: 400;
  font-size: 1.85rem;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.updated {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

section {
  margin-bottom: 2.25rem;
}

h3 {
  font-style: italic;
  font-weight: 600;
  font-size: 1.2rem;
  margin: 2.25rem 0 0.6rem;
}

h4 {
  font-weight: 600;
  font-size: 0.98rem;
  margin: 1.25rem 0 0.4rem;
  color: var(--ink);
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin: 0 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

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

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

code, .email {
  font-family: 'Courier New', Menlo, monospace;
  background: rgba(26, 23, 21, 0.06);
  padding: 0.1em 0.45em;
  border-radius: 2px;
  font-size: 0.92em;
}

.callout {
  background: rgba(139, 111, 71, 0.08);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

footer p {
  margin-bottom: 0.4rem;
}

footer a {
  color: var(--muted);
}

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

/* ===========================================
   HOME / LANDING PAGE
   =========================================== */

body.home {
  background:
    radial-gradient(ellipse at top, rgba(255, 248, 232, 0.5), transparent 60%),
    var(--paper);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container.narrow {
  max-width: 640px;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 2rem;
  position: relative;
}

.hero-inner {
  max-width: 640px;
  width: 100%;
}

.brand-xl {
  font-size: 2.25rem;
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  margin-bottom: 2rem;
}

.hero-tagline {
  font-style: italic;
  font-size: 1.8rem;
  line-height: 1.45;
  margin-bottom: 2rem;
  font-weight: 400;
}

.muted-italic {
  color: var(--muted);
}

.hero-divider {
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin: 2rem 0;
  opacity: 0.6;
}

.hero-sub {
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  font-size: 1.2rem;
  color: var(--muted);
  opacity: 0.5;
  animation: scroll-bounce 2.2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(8px); opacity: 0.8; }
}

/* FEATURED QUOTE */
.featured {
  padding: 5rem 1.5rem 6rem;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(139, 111, 71, 0.04),
    transparent
  );
}

.featured-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.quote-card {
  padding: 2rem 1rem;
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.quote-card.fade-in {
  animation: fade-in 0.8s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.quote-text {
  font-style: italic;
  font-size: 1.7rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  color: var(--ink);
  font-weight: 400;
}

.quote-attr {
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-style: italic;
  margin-bottom: 0;
}

.quote-dots {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 2rem;
}

.quote-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  border: none;
  opacity: 0.35;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.quote-dot:hover {
  opacity: 0.7;
}

.quote-dot.active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.25);
}

/* SECTION HEADERS */
.section-title {
  font-style: italic;
  font-weight: 500;
  font-size: 1.85rem;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 1rem;
  max-width: 38rem;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* EXPLAINER */
.explainer {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.feature {
  text-align: center;
}

.feature-num {
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.feature-title {
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.feature p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* PHILOSOPHICAL TYPES */
.types {
  padding: 6rem 0;
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.type-card {
  background: rgba(139, 111, 71, 0.04);
  border: 1px solid rgba(139, 111, 71, 0.15);
  border-radius: 4px;
  padding: 1.5rem 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.type-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(139, 111, 71, 0.08);
}

.type-card h3 {
  font-style: italic;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--ink);
}

.type-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 0;
}

/* DOWNLOAD BADGES */
.download {
  padding: 5rem 0 6rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.7rem 1.3rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  min-width: 170px;
  text-align: left;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.badge:hover:not(.badge-disabled) {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.badge-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-style: dashed;
}

.badge-prefix {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-style: italic;
  opacity: 0.75;
}

.badge-store {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 0.1rem;
}

/* SITE FOOTER */
.site-footer {
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-brand {
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.4em;
  padding-left: 0.4em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.footer-meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.65;
  margin-bottom: 0;
  letter-spacing: 0.1em;
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-blur {
  filter: blur(6px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-blur.in {
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-blur {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .scroll-hint,
  .quote-card.fade-in {
    animation: none;
  }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 600px) {
  .brand-xl {
    font-size: 1.75rem;
    letter-spacing: 0.4em;
  }
  .hero-tagline {
    font-size: 1.45rem;
  }
  .quote-text {
    font-size: 1.3rem;
  }
  .section-title {
    font-size: 1.55rem;
  }
  .types-grid {
    grid-template-columns: 1fr;
  }
  .explainer, .types, .download {
    padding: 4rem 0;
  }
  .hero {
    padding: 3rem 1.25rem 2rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1A1715;
    --ink: #F5EFE3;
    --muted: rgba(245, 239, 227, 0.55);
    --accent: #C9A878;
    --line: rgba(245, 239, 227, 0.15);
  }
  code, .email {
    background: rgba(245, 239, 227, 0.08);
  }
  .callout {
    background: rgba(201, 168, 120, 0.08);
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  main { padding: 4rem 1.25rem 4rem; }
  .lang-switch { top: 0.85rem; right: 0.85rem; }
  .brand { font-size: 1.25rem; letter-spacing: 0.4em; }
  .page-title { font-size: 1.6rem; }
}
