:root {
  --bg: #0b0b0c;
  --text: #d8c3a5;
  --muted: #b9a690;
  --maxw: 820px;
  /* iOS safe area inset for notch devices */
  --safe-top: env(safe-area-inset-top);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Lora", ui-serif, Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: grid;
  place-items: center;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(8,8,9,0.3) 100%);
  opacity: 0.8;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>');
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: 0.035;
}

main {
  width: min(92vw, var(--maxw));
  padding: 6vh 4vw;
  /* Ensure content clears fixed top buttons and iOS safe area */
  padding-top: calc(6vh + 56px + var(--safe-top));
}

h1 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  font-size: clamp(2rem, 4vw + 1rem, 3.8rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

h2 {
  margin: 1.2rem 0 0.5rem;
  font-weight: 500;
  font-size: clamp(1.2rem, 1.4vw + 0.9rem, 1.6rem);
  color: var(--muted);
}

p {
  margin: 0 0 0.9rem 0;
  font-size: clamp(1.1rem, 1.2vw + 0.8rem, 1.4rem);
  line-height: 1.55;
}

.underline {
  font-style: normal;
  text-decoration: none;
  color: #7d3022;
  background-image: linear-gradient(180deg, #9a3a27 0%, #7d3022 60%, #5a2218 100%);
}

@supports (-webkit-background-clip: text) {
  .underline {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

@supports (background-clip: text) {
  .underline { background-clip: text; color: transparent; }
}

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

hr {
  border: none;
  border-top: 1px solid rgba(216,195,165,0.22);
  margin: 2.2rem auto 1.9rem;
  width: min(88%, 720px);
}

blockquote {
  margin: 1rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid rgba(216,195,165,0.35);
}

blockquote p { margin: 0 0 0.4rem 0; }
cite {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 0.95em;
  letter-spacing: 0.02em;
}

@media (min-height: 800px) {
  main { padding-top: 10vh; padding-bottom: 10vh; padding-top: calc(10vh + 56px + var(--safe-top)); }
}

/* Reduce top padding on small screens while accounting for safe area */
@media (max-width: 600px) {
  main { padding-top: calc(60px + var(--safe-top)); }
}

/* Supporting section (index) */
.supporting { margin-top: 0.4rem; }
.supporting h2 {
  margin: 0 0 0.6rem 0;
  font-weight: 500;
  font-size: clamp(1.1rem, 1vw + 0.8rem, 1.3rem);
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.supporting blockquote + blockquote { margin-top: 1.6rem; }

/* Language selector */
.lang-selector { position: fixed; top: 12px; right: 12px; z-index: 1000; font-family: inherit; top: calc(12px + var(--safe-top)); }
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(216,195,165,0.25);
  background: rgba(16,16,18,0.6);
  color: #f0e7dc;
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 120ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.lang-toggle:hover {
  transform: translateY(-1px);
  background: rgba(24,24,26,0.7);
  border-color: rgba(216,195,165,0.35);
  box-shadow: 0 6px 18px rgba(0,0,0,0.32);
}
.lang-toggle:active { transform: translateY(0); }

.lang-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 200ms ease;
  margin-left: 2px;
}
.lang-selector.open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  background: rgba(16,16,18,0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border: 1px solid rgba(216,195,165,0.25);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: opacity 200ms ease, visibility 200ms ease, transform 200ms ease;
}
.lang-selector.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #f0e7dc;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 150ms ease, color 150ms ease;
  border-radius: 8px;
  margin: 4px;
}
.lang-option:hover { background: rgba(216,195,165,0.12); color: #fff; }
.lang-option.active { background: rgba(216,195,165,0.18); color: #fff; }
.lang-flag { font-size: 1.1rem; width: 18px; text-align: center; }

/* Back link */
a.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(216,195,165,0.25);
  background: rgba(16,16,18,0.6);
  color: #f0e7dc;
  text-decoration: none;
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
}
a.back:hover { border-color: rgba(216,195,165,0.35); background: rgba(24,24,26,0.7); }

/* Fixed Contact button top-left */
.contact-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  top: calc(12px + var(--safe-top));
}

/* Q&A / callouts */
.objection {
  background: rgba(216,195,165,0.09);
  border-left: 2px solid rgba(216,195,165,0.45);
  padding: 1.05rem 1.2rem 1.05rem 2.6rem;
  margin: 1.4rem 0 1rem;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.3rem);
  line-height: 1.6;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.response {
  background: rgba(216,195,165,0.045);
  border-left: 2px solid rgba(216,195,165,0.28);
  padding: 1.1rem 1.2rem 1rem;
  margin: 1rem 0;
  border-radius: 0 10px 10px 0;
  position: relative;
  overflow: hidden;
}
.response .verse { margin: 0; padding-left: 0; border-left: none; }
.response .verse > p:first-child { margin-top: 0; }
.response .verse + .verse { margin-top: 2rem; }

/* Structured verse blocks */
.verse { margin-top: 1.2rem; padding-left: 0; border-left: none; }
.verse p { margin: 0.35rem 0; }
.vnum { color: var(--text); font-size: 0.85em; vertical-align: super; margin-right: 6px; }

.quotation {
  margin: 1.1rem auto;
  max-width: clamp(40ch, 66%, 66ch);
  padding: 0 5ch;
  display: grid;
  row-gap: 0.4rem;
}
.quote-left { text-align: left; justify-self: start; margin: 0.3rem 0; margin-left: -1ch; }
.quote-right { text-align: right; justify-self: end; margin: 0.3rem 0; }
.foot { font-style: italic; font-size: 0.8em; vertical-align: super; color: var(--text); margin-left: 2px; }

/* Index artwork */
.artwork {
  width: min(92vw, var(--maxw));
  margin: 2vh auto 0;
  padding: 1vh 0;
  display: grid;
  place-items: center;
}
.artwork img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border: 1px solid rgba(216,195,165,0.22);
  background: #111;
}
.artwork figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

/* Index FAQ */
.faq { width: 100%; margin: 2rem auto 0; }
.faq h2 {
  margin: 0 0 0.6rem 0;
  font-weight: 500;
  font-size: clamp(1.1rem, 1vw + 0.8rem, 1.3rem);
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.faq-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(216,195,165,0.25);
  background: rgba(16,16,18,0.6);
  color: #f0e7dc;
  text-decoration: none;
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  transition: transform 120ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.faq .faq-card + .faq-card { margin-top: 12px; }
.faq-card:hover {
  transform: translateY(-1px);
  background: rgba(24,24,26,0.7);
  border-color: rgba(216,195,165,0.35);
  box-shadow: 0 6px 18px rgba(0,0,0,0.32);
}
.faq-title { font-size: clamp(1.05rem, 0.9vw + 0.8rem, 1.25rem); letter-spacing: 0.02em; }
.faq-arrow { font-size: 1.3rem; opacity: 0.85; transition: transform 160ms ease, opacity 160ms ease; }
.faq-card:hover .faq-arrow { transform: translateX(2px); opacity: 1; }

/* Misc */
.lead-question { font-size: clamp(1.2rem, 1.4vw + 0.9rem, 1.6rem); }

/* Contact form */
.contact-form { width: 100%; max-width: 720px; }
.form-field { display: grid; gap: 8px; margin: 0 0 14px 0; }
.form-field label {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(216,195,165,0.25);
  background: rgba(16,16,18,0.6);
  color: #f0e7dc;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(216,195,165,0.4);
  background: rgba(24,24,26,0.7);
  box-shadow: 0 6px 18px rgba(0,0,0,0.32);
}

