/* ------------------------------------------------------------------ */
/*  heycirql homepage — shared styles                                   */
/*  Editorial personal-journal aesthetic, matching the app.             */
/* ------------------------------------------------------------------ */

:root {
  --text:         #5b5268;
  --text-h:       #1a1124;
  --bg:           #ece7f5;
  --bg-card:      #f6f3fb;
  --border:       #d6cce8;
  --accent:       #7c3aed;
  --accent-light: rgba(124, 58, 237, 0.09);
  --accent-faint: rgba(124, 58, 237, 0.18);

  --sans:     'DM Sans', -apple-system, system-ui, sans-serif;
  --heading:  'Instrument Serif', Georgia, 'Times New Roman', serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text:         #a79cb8;
    --text-h:       #ede7f7;
    --bg:           #140d1f;
    --bg-card:      #1e1530;
    --border:       #352b4a;
    --accent:       #a78bfa;
    --accent-light: rgba(167, 139, 250, 0.12);
    --accent-faint: rgba(167, 139, 250, 0.22);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;

  /* Soft radial glow behind the hero that fades into the lavender. */
  background-image:
    radial-gradient(circle at 50% 38%, var(--accent-light) 0%, transparent 55%);
}

/* ------------------------------------------------------------------ */
/*  Wordmark — two-tone "hey cirql". Parent controls size/style.       */
/* ------------------------------------------------------------------ */

.wordmark-prefix {
  color: var(--text);
  opacity: 0.55;
}

.wordmark-brand {
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/*  Layout                                                              */
/* ------------------------------------------------------------------ */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ------------------------------------------------------------------ */
/*  Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
  max-width: 560px;
  width: 100%;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 28px 56px;
}

.deleted-notice {
  display: inline-block;
  margin: 0 auto 32px;
  padding: 10px 18px;
  font-family: var(--heading);
  font-style: italic;
  font-size: 15px;
  color: var(--text-h);
  background: var(--accent-light);
  border: 1px solid var(--accent-faint);
  border-radius: 999px;
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* .deleted-notice has a more-specific rule than the UA's
   `[hidden] { display: none }`, so restate it explicitly. */
.deleted-notice[hidden] {
  display: none;
}

.hero-mark {
  font-family: var(--heading);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(80px, 18vmin, 168px);
  line-height: 0.92;
  letter-spacing: -0.012em;
  margin: 0 0 28px;
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-tagline {
  font-family: var(--heading);
  font-style: italic;
  font-size: clamp(22px, 3.4vmin, 28px);
  line-height: 1.25;
  color: var(--text-h);
  margin: 0 0 22px;
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

.hero-blurb {
  font-size: 17px;
  line-height: 1.65;
  max-width: 42ch;
  margin: 0 auto 40px;
  color: var(--text);
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 240ms both;
}

.cta {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 36px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 2px 0 rgba(124, 58, 237, 0.15), 0 12px 32px -12px rgba(124, 58, 237, 0.5);
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 360ms both;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(124, 58, 237, 0.18), 0 18px 40px -12px rgba(124, 58, 237, 0.6);
}

.cta:active {
  transform: translateY(0);
}

.cta-arrow {
  font-family: var(--heading);
  font-style: italic;
  font-size: 1.35em;
  line-height: 1;
  transition: transform 200ms ease;
}

.cta:hover .cta-arrow {
  transform: translateX(3px);
}

.cta-caption {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text);
  opacity: 0.7;
  font-style: italic;
  font-family: var(--heading);
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 480ms both;
}

/* ------------------------------------------------------------------ */
/*  Scroll hint                                                         */
/* ------------------------------------------------------------------ */

.scroll-hint {
  margin-top: 64px;
  padding-bottom: 24px;
  color: var(--text);
  opacity: 0.4;
  -webkit-animation: bounce 2s ease-in-out 1.5s infinite;
  animation: bounce 2s ease-in-out 1.5s infinite;
}

.scroll-hint svg {
  display: block;
}

@-webkit-keyframes bounce {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(6px); transform: translateY(6px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ------------------------------------------------------------------ */
/*  Feature sections                                                    */
/* ------------------------------------------------------------------ */

.features {
  width: 100%;
  max-width: 960px;
  padding: 0 28px;
  margin: 0 auto;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.feature:first-child {
  border-top: none;
}

/* Odd sections: screenshot left, copy right (default).
   Even sections: copy left, screenshot right. */
.feature:nth-child(even) {
  direction: rtl;
}

.feature:nth-child(even) > * {
  direction: ltr;
}

/* Text-only variant: single column, centred, no screenshot. */
.feature.feature-text-only {
  grid-template-columns: 1fr;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  direction: ltr;
}

.feature-copy h2 {
  font-family: var(--heading);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4vmin, 36px);
  line-height: 1.15;
  color: var(--text-h);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.feature-copy p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

/* ------------------------------------------------------------------ */
/*  Phone frame                                                         */
/* ------------------------------------------------------------------ */

.phone-frame {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: 28px;
  padding: 12px;
  box-shadow:
    0 1px 0 var(--border),
    0 8px 24px -8px rgba(0, 0, 0, 0.15),
    0 24px 48px -12px rgba(0, 0, 0, 0.1);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

/* Notch */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: var(--bg-card);
  border-radius: 0 0 14px 14px;
  z-index: 1;
}

/* ------------------------------------------------------------------ */
/*  Sticky CTA bar                                                      */
/* ------------------------------------------------------------------ */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}

.sticky-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sticky-cta .wordmark {
  font-family: var(--heading);
  font-style: italic;
  font-size: 22px;
  line-height: 1;
}

.sticky-cta .cta {
  padding: 10px 24px;
  font-size: 14px;
  animation: none;
}

/* ------------------------------------------------------------------ */
/*  Closing section                                                     */
/* ------------------------------------------------------------------ */

.closing {
  width: 100%;
  max-width: 560px;
  text-align: center;
  padding: 80px 28px 96px;
  margin: 0 auto;
}

.closing h2 {
  font-family: var(--heading);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 5vmin, 44px);
  line-height: 1.1;
  color: var(--text-h);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.closing p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 40px;
}

.closing .phone-frame {
  margin: 0 auto 48px;
}

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

footer {
  padding: 32px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
  opacity: 0.65;
  animation: fade 1200ms ease 800ms both;
}

footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 200ms ease, border-color 200ms ease;
}

footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

footer .dot {
  margin: 0 10px;
  opacity: 0.5;
}

/* ------------------------------------------------------------------ */
/*  Essay page (privacy)                                                */
/* ------------------------------------------------------------------ */

.essay {
  max-width: 64ch;
  width: 100%;
  margin: 0 auto;
  padding: 12px 0;
}

.essay-header {
  text-align: center;
  margin-bottom: 56px;
}

.essay-kicker {
  font-family: var(--heading);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
  margin: 0 0 8px;
}

.essay h1 {
  font-family: var(--heading);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(48px, 8vmin, 72px);
  line-height: 1;
  color: var(--text-h);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.essay .lede {
  font-family: var(--heading);
  font-style: italic;
  font-size: 20px;
  line-height: 1.45;
  color: var(--text-h);
  opacity: 0.78;
  margin: 0 auto;
  max-width: 48ch;
}

.essay h2 {
  font-family: var(--heading);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  color: var(--text-h);
  margin: 44px 0 14px;
  letter-spacing: -0.005em;
}

.essay p {
  font-size: 17px;
  line-height: 1.72;
  margin: 0 0 18px;
}

.essay a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-faint);
  transition: border-color 200ms ease;
}

.essay a:hover {
  border-bottom-color: var(--accent);
}

.essay strong {
  color: var(--text-h);
  font-weight: 600;
}

.essay .back {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 40px;
  font-family: var(--heading);
  font-style: italic;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  border-bottom: none;
  transition: color 200ms ease, transform 200ms ease;
}

.essay .back:hover {
  color: var(--accent);
  transform: translateX(-2px);
}

/* ------------------------------------------------------------------ */
/*  Mobile                                                              */
/* ------------------------------------------------------------------ */

@media (max-width: 520px) {
  main { padding: 0; }
  .hero { padding: 64px 20px 40px; }
  .hero-mark { font-size: 80px; }
  .hero-tagline { font-size: 20px; }
  .hero-blurb { font-size: 16px; }
  .cta { padding: 14px 28px; font-size: 14px; }
  .essay h1 { font-size: 44px; }
  .essay .lede { font-size: 18px; }
  .essay h2 { font-size: 24px; }
  .essay p { font-size: 16px; }
  .features { padding: 0 20px; }
  .feature {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 56px 0;
  }
  .feature:nth-child(even) { direction: ltr; }
  .feature-copy h2 { font-size: 26px; }
  .feature-copy p { font-size: 16px; }
  .sticky-cta { padding: 10px 16px; }
  .sticky-cta .wordmark { font-size: 18px; }
  .sticky-cta .cta { padding: 8px 18px; font-size: 13px; }
  .closing { padding: 56px 20px 64px; }
  .closing h2 { font-size: 28px; }
  .closing p { font-size: 16px; }
}

/* ------------------------------------------------------------------ */
/*  Motion                                                              */
/* ------------------------------------------------------------------ */

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

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 0.65; }
}

/* Scroll-reveal: sections start hidden, JS adds .is-visible */
.feature {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark,
  .hero-tagline,
  .hero-blurb,
  .cta,
  .cta-caption,
  .feature,
  .scroll-hint,
  footer {
    animation: none !important;
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}
