/* Critiqa Landing — DM Sans + clean, sharp aesthetic */

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

:root {
  --bg: #F6EDD9;
  --bg-alt: #EDE4D0;
  --bg-dark: #2C2418;
  --text: #2C2418;
  --text-secondary: #6B5D4D;
  --text-muted: #9A8B78;
  --text-on-dark: #E8DFD0;
  --accent: #244BAD;
  --accent-light: rgba(36, 75, 173, 0.10);
  --accent-glow: rgba(36, 75, 173, 0.4);
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --max-w: 72rem;
  --narrow: 40rem;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Oranienbaum', serif;
  --font-hand: 'Homemade Apple', cursive;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: var(--narrow); }

/* --- Header --- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(246,237,217,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.3s ease;
}
.header.hidden { transform: translateY(-100%); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 3.5rem;
}
.logo {
  font-family: var(--font); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.logo-img { width: 1.2rem; height: 1.2rem; }
.nav { display: flex; gap: 2rem; }
.nav a { font-size: 0.9rem; color: var(--text-secondary); transition: color 0.2s; }
.nav a:hover { color: var(--text); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 2.5rem;
  border-radius: var(--radius);
  font-weight: 500; font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer; border: none;
}
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; width: 100%; }
.btn-primary {
  background: var(--accent-light); color: var(--accent); font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid rgba(0,0,0,0.15);
}
.btn-outline:hover { border-color: rgba(0,0,0,0.3); }
.btn-on-dark {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.btn-on-dark:hover {
  background: #fff;
  color: var(--bg-dark);
  border-color: #fff;
}

/* --- Hero --- */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.8rem; font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-badge i { font-size: 0.9rem; }
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-ctas { display: flex; gap: 0.75rem; justify-content: center; }

/* --- Section --- */
.section { padding: 5rem 0; }
.section h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}
.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.section-dark h2 { color: #fff; }
.section-light { background: var(--bg-alt); }

/* --- Bento Grid --- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}
.bento-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}
.bento-card i {
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: block;
}
.bento-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.bento-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.bento-wide {
  grid-column: span 2;
  background: var(--bg-dark);
  color: #fff;
}
.bento-wide i { color: #fff; }
.bento-wide p { color: rgba(255,255,255,0.7); }

@media (hover: hover) and (pointer: fine) {
  .bento-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
  }
  .bento-wide:hover {
    box-shadow: 0 8px 32px rgba(36, 75, 173, 0.12);
  }
}

@media (max-width: 48rem) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-wide { grid-column: span 2; }
}

/* --- Empathy --- */
.empathy-blocks { margin: 2rem 0; }
.empathy-line {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.empathy-line em { color: #fff; font-style: italic; }
.empathy-cta {
  margin-top: 2.5rem;
  font-size: 1.3rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0;
}
.empathy-cta + .hero-ctas {
  margin-top: 1.5rem;
  justify-content: flex-start;
}

/* --- Diff Grid --- */
.diff-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; margin-top: 2rem;
}
.diff-item h4 {
  font-size: 1rem; font-weight: 600;
  margin-bottom: 0.4rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.diff-item h4 i { color: var(--accent); }
.diff-item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 2rem auto 0;
  align-items: stretch;
}
.pricing-card {
  background: var(--bg);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 1.5rem;
  padding: 2.2rem;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing-card .pricing-features {
  flex: 1;
}
.pricing-popular {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 8px var(--accent-light), 0 8px 40px rgba(0,0,0,0.08);
}
.pricing-popular-badge {
  position: absolute;
  top: -0.7rem; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem; font-weight: 600;
  padding: 0.2rem 0.9rem;
  border-radius: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pricing-label {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}
.pricing-amount { margin-bottom: 0.3rem; }
.price { font-size: 2.8rem; font-weight: 700; letter-spacing: -0.03em; }
.period { font-size: 0.95rem; color: var(--text-secondary); }
.pricing-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.save-badge {
  font-size: 0.7rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  margin-left: 0.2rem;
  font-weight: 600;
}
.pricing-features {
  list-style: none; text-align: left;
  margin-bottom: 1.5rem;
}
.pricing-features li {
  padding: 0.35rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.pricing-features li::before {
  content: '\2713';
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.5rem;
}
.pricing-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* --- FAQ --- */
.faq-list { margin-top: 2rem; }
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 1rem 0;
}
.faq-item summary {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '\2212';
}
.faq-item p {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Footer --- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.footer-links a:hover { color: var(--text); }

/* --- Custom Easing (Emil Kowalski) --- */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes clipReveal {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* Hero entrance — staggered, ease-out */
.hero-badge { animation: fadeUp 400ms var(--ease-out) both 100ms; }
.hero h1 { animation: fadeUp 500ms var(--ease-out) both 200ms; }
.hero-sub { animation: fadeUp 500ms var(--ease-out) both 320ms; }
.hero-ctas { animation: fadeUp 500ms var(--ease-out) both 440ms; }

/* Scroll-triggered reveal */
.bento-card,
.diff-item,
.empathy-line,
.faq-item,
.pricing-card {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.bento-card.visible,
.diff-item.visible,
.empathy-line.visible,
.faq-item.visible,
.pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger bento cards (50ms) */
.bento-card:nth-child(1) { transition-delay: 0ms; }
.bento-card:nth-child(2) { transition-delay: 50ms; }
.bento-card:nth-child(3) { transition-delay: 100ms; }
.bento-card:nth-child(4) { transition-delay: 150ms; }
.bento-card:nth-child(5) { transition-delay: 200ms; }
.bento-card:nth-child(6) { transition-delay: 250ms; }
.bento-card:nth-child(7) { transition-delay: 300ms; }
.bento-card:nth-child(8) { transition-delay: 350ms; }
.bento-card:nth-child(9) { transition-delay: 400ms; }
.bento-card:nth-child(10) { transition-delay: 450ms; }

/* Pricing/card hover — only on pointer devices */
@media (hover: hover) and (pointer: fine) {
  .pricing-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  }
  .pricing-popular:hover {
    box-shadow: 0 0 0 8px var(--accent-light), 0 12px 50px rgba(36, 75, 173, 0.10);
  }
}

/* Subtle grain texture on dark section */
.section-dark {
  position: relative;
}
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
.section-dark > * { position: relative; z-index: 1; }

/* Hero h1 entrance */
.hero h1 {
  font-family: var(--font-heading);
  animation: fadeUp 500ms var(--ease-out) both 200ms;
}

/* Empathy lines — fade up (clip-path removed, was hiding text) */

/* Button press — scale feedback */
.btn {
  transition: transform 160ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms ease;
}
.btn:active {
  transform: scale(0.97);
}

/* FAQ open — smooth height + fade */
.faq-item p {
  overflow: hidden;
  animation: fadeUp 250ms var(--ease-out);
}

/* Section headings — clip reveal on scroll */
.section h2 {
  clip-path: inset(0 0 0 0);
  transition: clip-path 500ms var(--ease-in-out);
}

/* Reduced motion — keep fades, remove transforms */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 200ms !important;
  }
  .bento-card, .diff-item, .empathy-line, .faq-item, .pricing-card {
    opacity: 0;
    transform: none;
  }
  .bento-card.visible, .diff-item.visible, .empathy-line.visible,
  .faq-item.visible, .pricing-card.visible {
    opacity: 1;
  }
  .empathy-line, .empathy-line.visible {
    clip-path: none;
  }
}

/* --- Waitlist Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal {
  background: var(--bg);
  border-radius: 1.2rem;
  padding: 2.5rem;
  max-width: 26rem;
  width: 100%;
  position: relative;
  animation: fadeUp 300ms var(--ease-out);
}
.modal h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}
.modal p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}
.modal-close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: none;
  font-size: 1.5rem; color: var(--text-muted);
  cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.waitlist-form {
  display: flex; gap: 0.5rem;
}
.waitlist-form input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 16px;
  outline: none;
  transition: border-color 200ms ease;
}
.waitlist-form input:focus {
  border-color: var(--accent);
}
.waitlist-form .btn {
  white-space: nowrap;
}
.modal-note {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.8rem;
  margin-bottom: 0;
  font-weight: 500;
}

/* --- Responsive --- */
@media (max-width: 48rem) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: 1.2rem 1.2rem 0 0;
    padding: 2rem 1.5rem 2.5rem;
    max-width: 100%;
    animation: slideUp 300ms var(--ease-out);
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .waitlist-form { flex-direction: column; }
  .waitlist-form .btn { width: 100%; }
}
@media (max-width: 48rem) {
  .hero { padding: 6rem 0 3rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn { width: 100%; max-width: 20rem; }
  .features-grid { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 24rem; }
  .pricing-popular { transform: none; }
  .nav { display: none; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}
