@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap');

/* ================================================================
   Etyr landing — minimalist light · Playfair serif + Inter
   ================================================================ */
:root {
  --bg: #Faf9f6;
  --surface: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --line-s: rgba(0, 0, 0, 0.16);
  --text: #1a1a1c;
  --muted: #6b6b72;
  --accent: #d946ef;
  --accent-s: rgba(217, 70, 239, 0.08);
  --success: #16a34a;
  --rad: 16px;
  --serif: 'Playfair Display', Georgia, "Times New Roman", serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", "Fira Code", monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --maxw: 1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
  background: var(--bg); 
  color: var(--text); 
  font: 16px/1.65 var(--sans); 
  -webkit-font-smoothing: antialiased; 
  overflow-x: hidden; 
}

/* Subtle grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

main, header.nav, footer { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Nav -------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 48px);
  background: rgba(250, 249, 246, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 600 22px var(--serif);
  letter-spacing: -0.01em;
}
.wordmark-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-s);
  border-radius: 10px;
  font: italic 18px var(--serif);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.nav-links { display: flex; gap: 32px; font-size: 14.5px; color: var(--muted); font-weight: 500; }
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }

/* Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font: 600 15px/1.15 var(--sans);
  letter-spacing: 0.01em;
  transition: transform 0.18s cubic-bezier(0.18, 0.9, 0.24, 1.12), box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { 
  background: var(--text); 
  color: #fff; 
  box-shadow: 0 8px 24px rgba(0,0,0,0.1); 
}
.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 12px 32px rgba(217, 70, 239, 0.15); 
}
.btn-secondary { 
  border: 1px solid var(--line-s); 
  background: var(--surface); 
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.btn-secondary:hover { 
  border-color: var(--accent); 
  background: var(--accent-s); 
  transform: translateY(-1px); 
}
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* Section scaffolding ---------------------------------------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 12vw, 160px) clamp(20px, 5vw, 48px); }
.section-head { max-width: 680px; margin-bottom: clamp(48px, 8vw, 80px); }
.eyebrow { 
  font: 600 12px var(--mono); 
  letter-spacing: 0.2em; 
  text-transform: uppercase; 
  color: var(--accent); 
  margin-bottom: 20px; 
}
.section-title, .cta-title, .hero-title { 
  font: 500 clamp(38px, 6vw, 64px)/1.1 var(--serif); 
  letter-spacing: -0.02em; 
}
.hero-title { font-size: clamp(52px, 9vw, 100px); line-height: 1.05; }

/* Hero ------------------------------------------------------------- */
.hero { 
  max-width: var(--maxw); 
  margin: 0 auto; 
  padding: clamp(80px, 12vw, 160px) clamp(20px, 5vw, 48px) 0; 
  text-align: center; 
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-title-line { display: block; }
.hero-sub { 
  max-width: 620px; 
  margin: 32px auto 0; 
  color: var(--muted); 
  font-size: 19px; 
  line-height: 1.6;
}
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 48px; }
.hero-meta { width: 100%; font: 12.5px var(--mono); color: var(--muted); letter-spacing: 0.04em; margin-top: 12px; }

/* Entrance choreography */
.hero .eyebrow, .hero-title, .hero-sub, .hero-ctas, .demo { opacity: 0; animation: rise 800ms cubic-bezier(0.18, 0.9, 0.24, 1.12) forwards; }
.hero .eyebrow { animation-delay: 50ms; }
.hero-title { animation-delay: 150ms; }
.hero-sub { animation-delay: 250ms; }
.hero-ctas { animation-delay: 350ms; }
.demo { animation-delay: 450ms; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* Demo card -------------------------------------------------------- */
.demo { position: relative; margin: clamp(64px, 10vw, 120px) auto 0; max-width: 800px; text-align: left; }
.demo-stage { 
  position: relative; 
  background: var(--surface); 
  border: 1px solid var(--line); 
  border-radius: 24px; 
  padding: clamp(32px, 6vw, 64px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.03);
}
.demo-sentence p { font: clamp(22px, 3.5vw, 32px)/1.7 var(--serif); color: var(--text); }
.demo-word { 
  border: none; 
  background: none; 
  padding: 0; 
  font: inherit; 
  font-family: var(--serif); 
  color: var(--text); 
  border-bottom: 2px solid var(--accent-s); 
  padding-bottom: 2px; 
  border-radius: 4px; 
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; 
}
.demo-word:hover, .demo-word:focus-visible { 
  background: var(--accent-s); 
  color: var(--accent); 
  border-bottom-color: transparent; 
  outline: none; 
}
.demo-tip { 
  position: absolute; 
  top: -16px; 
  right: 32px; 
  font: 600 11.5px var(--mono); 
  letter-spacing: 0.12em; 
  text-transform: uppercase; 
  color: var(--accent); 
  background: var(--surface); 
  padding: 6px 16px; 
  border: 1px solid var(--line); 
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

/* Tooltip mock styling (injected by app.js, simulating the dark theme isolated) */
.demo-tooltip { 
  position: absolute; 
  z-index: 10; 
  width: min(340px, calc(100vw - 40px)); 
  background: #141414; 
  border: 1px solid rgba(255,255,255,0.08); 
  border-radius: 20px; 
  box-shadow: 0 24px 64px rgba(0,0,0,0.15), 0 8px 24px rgba(0,0,0,0.05); 
  transform-origin: top center; 
  animation: pop 250ms cubic-bezier(0.18, 0.9, 0.24, 1.12) both; 
  color: #fff;
  font-family: var(--sans);
}
.demo-tooltip[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
/* The interior of the demo tooltip is styled by tooltip-real.css which we'll let handle itself mostly, 
   but we add some basic resets here in case */

/* Feature grid ----------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { 
  background: var(--surface); 
  border: 1px solid var(--line); 
  border-radius: 24px; 
  padding: 40px 32px; 
  transition: transform 0.3s cubic-bezier(0.18, 0.9, 0.24, 1.12), border-color 0.3s ease, box-shadow 0.3s ease; 
}
.card:hover { 
  transform: translateY(-6px); 
  border-color: var(--line-s); 
  box-shadow: 0 16px 48px rgba(0,0,0,0.03);
}
.card-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--accent-s);
  color: var(--accent);
  margin-bottom: 24px;
}
.card-icon-wrapper svg { width: 28px; height: 28px; }
.card h3 { font: 500 24px var(--serif); margin: 0 0 12px; color: var(--text); }
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.card em { font-style: italic; color: var(--text); }

/* Showcase --------------------------------------------------------- */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.showcase .section-head { grid-column: 1 / -1; margin-bottom: 40px; }
.showcase-caption { font-size: 17px; color: var(--muted); line-height: 1.7; }
.mono-detail { font: 500 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-top: 24px; display: inline-block; padding: 6px 14px; background: var(--accent-s); border-radius: 999px; }

/* Privacy ---------------------------------------------------------- */
.privacy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.privacy-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; }
.privacy-card h3 { font: 500 20px var(--serif); margin-bottom: 12px; color: var(--text); }
.privacy-card p { color: var(--muted); font-size: 15px; }
.privacy-note { margin-top: 40px; font-size: 15.5px; text-align: center; font-weight: 500; }
.privacy-note a { color: var(--accent); border-bottom: 1px dashed rgba(217, 70, 239, 0.4); transition: border-color 0.2s ease; }
.privacy-note a:hover { border-color: var(--accent); }

/* CTA -------------------------------------------------------------- */
.cta { text-align: center; padding: clamp(100px, 15vw, 200px) 20px; background: var(--surface); border-radius: 40px; margin: 40px auto 80px; max-width: calc(var(--maxw) - 40px); box-shadow: 0 20px 80px rgba(0,0,0,0.02); border: 1px solid var(--line); }
.cta .hero-ctas { margin-top: 40px; }
.cta .hero-meta { margin-top: 20px; }

/* Footer ----------------------------------------------------------- */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px clamp(20px, 5vw, 48px); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); font-weight: 500; }
.footer a { transition: color 0.2s ease; }
.footer a:hover { color: var(--text); }
.footer-meta { font: 12.5px var(--mono); letter-spacing: 0.04em; }

/* Scroll reveal (data-reveal) -------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 0.8s cubic-bezier(0.18, 0.9, 0.24, 1.12), transform 0.8s cubic-bezier(0.18, 0.9, 0.24, 1.12); }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* Responsive ------------------------------------------------------- */
@media(max-width: 860px) {
  .showcase { grid-template-columns: 1fr; gap: 48px; }
  .showcase .showcase-panel { order: -1; }
}
@media(max-width: 720px) {
  .nav-links { display: none; }
  .cta { border-radius: 24px; padding: 60px 20px; margin: 20px auto 40px; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; }
}
