/* ============================================================
   RTF Journal — Global Stylesheet
   Reading Through Feelings

   Palette:
     primary    #8B9DC7 (soft periwinkle)
     accent     #C7A08B (warm terracotta for CTAs)
     bg         #FAFBFD (near-white)
     ink        #2A2A2C (dark gray)

   Fonts:
     Heading — DM Serif Display (warm serif)
     Body    — DM Sans (clean sans-serif)
   ============================================================ */

/* --- Reset ------------------------------------------------- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background-color: #FAFBFD;
  color: #2A2A2C;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }

a {
  color: #6A7FAA;
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover { color: #B8896F; }

/* --- Typography -------------------------------------------- */

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  color: #2A2A2C;
}

h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem); }

p {
  max-width: 38em;
  color: #5A5A5E;
}

/* --- Utility ----------------------------------------------- */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Fade-in animation ------------------------------------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in       { animation: fadeUp 0.65s cubic-bezier(0.16,1,0.3,1) both; }
.fade-in--d1   { animation-delay: 0.08s; }
.fade-in--d2   { animation-delay: 0.2s; }
.fade-in--d3   { animation-delay: 0.35s; }
.fade-in--d4   { animation-delay: 0.5s; }

/* --- Breathing dots ---------------------------------------- */

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50%      { transform: scale(1.2); opacity: 0.8; }
}

.dot-row {
  display: flex; gap: 7px; justify-content: center;
  margin: 2rem 0;
}

.dot-row span {
  width: 5px; height: 5px; border-radius: 50%;
  background: #8B9DC7;
  animation: breathe 3.2s ease-in-out infinite;
}
.dot-row span:nth-child(2) { animation-delay: 0.35s; }
.dot-row span:nth-child(3) { animation-delay: 0.7s; }

/* --- Buttons ----------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.85em 1.8em;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform 0.18s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.18s ease,
              background-color 0.18s ease;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,0.1); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--primary { background: #2A2A2C; color: #fff; }
.btn--primary:hover { background: #3a3a3d; color: #fff; }

.btn--accent { background: #C7A08B; color: #fff; }
.btn--accent:hover { background: #B8896F; color: #fff; }

.btn--outline {
  background: transparent; color: #2A2A2C;
  border: 1.5px solid #E4E6EB;
}
.btn--outline:hover { border-color: #8B9DC7; color: #6A7FAA; }

.btn svg { width: 19px; height: 19px; flex-shrink: 0; }

/* --- Sticky header ----------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,251,253,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #E4E6EB;
  padding: 0.85rem 0;
}

.site-header .wrap {
  max-width: 760px; margin: 0 auto;
  padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}

.site-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.15rem; color: #2A2A2C;
  letter-spacing: -0.01em;
}
.site-logo span { color: #8B9DC7; }

/* --- Page wrapper ------------------------------------------ */

.page-wrap {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2.5rem 1.25rem;
  text-align: center;
}

/* --- Brand block ------------------------------------------- */

.brand { margin-bottom: 2rem; }

.brand-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(145deg, #8B9DC7 0%, #B3C2E0 60%, #C2CCE0 100%);
  margin: 0 auto 0.75rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(139,157,199,0.28);
}
.brand-icon svg { width: 36px; height: 36px; color: #fff; }

.brand-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.2rem; color: #2A2A2C;
}

.brand-tagline {
  font-size: 0.78rem; color: #8B9DC7;
  font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; margin-top: 0.2rem;
}

/* --- Content card (landing pages) -------------------------- */

.content-card {
  max-width: 440px; width: 100%;
  background: #fff;
  border-radius: 22px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 36px rgba(139,157,199,0.1);
  border: 1px solid rgba(139,157,199,0.08);
}

.content-icon {
  width: 58px; height: 58px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,157,199,0.15), rgba(139,157,199,0.08));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.content-icon svg { width: 28px; height: 28px; color: #8B9DC7; }

.content-card h1 {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem);
  margin-bottom: 0.65rem;
}

.content-card p {
  font-size: 0.94rem; line-height: 1.65;
  margin-bottom: 1.25rem;
}
.content-card p:last-of-type { margin-bottom: 1.75rem; }

/* --- CTA button (landing pages) ---------------------------- */

.cta-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: #2A2A2C; color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.94rem; font-weight: 600;
  border: none; border-radius: 14px;
  text-decoration: none; width: 100%; max-width: 280px;
  transition: background 0.2s ease, transform 0.15s ease;
}
.cta-button:hover { background: #3a3a3d; color: #fff; transform: translateY(-1px); }
.cta-button:active { transform: translateY(0); }
.cta-button svg { width: 18px; height: 18px; flex-shrink: 0; }

.secondary-link {
  display: inline-block; margin-top: 0.85rem;
  font-size: 0.8rem; color: #8B9DC7; font-weight: 500;
}
.secondary-link:hover { text-decoration: underline; }

/* --- Divider ----------------------------------------------- */

.divider {
  width: 36px; height: 2px;
  background: rgba(139,157,199,0.22);
  border-radius: 1px;
  margin: 0 auto 1.25rem;
}

/* --- Background glow --------------------------------------- */

.bg-glow {
  position: fixed; top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(139,157,199,0.07) 0%, transparent 70%);
  pointer-events: none; z-index: -1;
}

/* --- Footer ------------------------------------------------ */

footer {
  text-align: center;
  padding: 1.5rem 1.25rem;
  font-size: 0.75rem; color: #A0A0A4;
  border-top: 1px solid #E4E6EB;
}
footer a { color: #8B9DC7; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ============================================================
   Index page — hero, features, quote, CTA
   ============================================================ */

.hero {
  max-width: 560px; width: 100%;
  margin-bottom: 2.5rem;
}

.hero h1 { margin-bottom: 0.85rem; }

.hero h1 em {
  font-style: normal;
  color: #8B9DC7;
}

.hero > p {
  font-size: 1.05rem;
  margin: 0 auto 2rem;
  max-width: 460px;
}

.hero .btn-group {
  display: flex; gap: 0.75rem;
  justify-content: center; flex-wrap: wrap;
}

/* Feature grid */

.features {
  display: grid; grid-template-columns: 1fr;
  gap: 0.85rem;
  max-width: 500px; width: 100%;
  margin-bottom: 2.5rem;
}

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

.feature {
  background: #fff;
  border-radius: 18px;
  padding: 1.4rem 1.2rem;
  text-align: left;
  border: 1px solid rgba(139,157,199,0.08);
  box-shadow: 0 1px 10px rgba(139,157,199,0.06);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(139,157,199,0.13);
}

.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(139,157,199,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.7rem;
}
.feature-icon svg { width: 20px; height: 20px; color: #8B9DC7; }

.feature h3 {
  font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem;
  font-family: 'DM Sans', sans-serif;
}

.feature p {
  font-size: 0.82rem; line-height: 1.55;
}

/* Pull quote */

.pull-quote {
  max-width: 480px; width: 100%;
  padding: 1.5rem 1rem;
  margin-bottom: 2.5rem;
}

.pull-quote blockquote {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.55rem);
  color: #2A2A2C;
  font-style: italic;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.pull-quote cite {
  font-style: normal; font-size: 0.82rem;
  color: #9D9DA0;
}

/* CTA section */

.cta-section {
  max-width: 520px; width: 100%;
  text-align: center;
  background: linear-gradient(180deg, #FAFBFD 0%, #F5F3F0 100%);
  border-radius: 22px;
  padding: 2.5rem 1.5rem;
  margin-bottom: 2rem;
}

.cta-section h2 { margin-bottom: 0.5rem; }
.cta-section p { margin: 0 auto 1.75rem; }

/* --- Responsive -------------------------------------------- */

@media (min-width: 768px) {
  .content-card { padding: 2.75rem 2.5rem; }
  .brand-icon { width: 80px; height: 80px; border-radius: 20px; }
  .brand-icon svg { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .hero .btn-group {
    flex-direction: column; align-items: center;
  }
}
