/* DictaMedic landing page — shared styles */
:root {
  --bg: #ffffff;
  --bg-elev: #f5f8ff;
  --bg-card: #ffffff;
  --ink: #0b1220;
  --ink-2: #1f2937;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e2e8f3;
  --line-soft: #eef2fa;
  --accent: #2e5bff;
  --accent-soft: #e8efff;
  --accent-ink: #1d4ed8;
  --warn: oklch(0.55 0.12 60);
  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "Geist", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --bg-elev: #111a2e;
  --bg-card: #15203a;
  --ink: #f8fafc;
  --ink-2: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --line: #1e2a44;
  --line-soft: #162039;
  --accent: #6b8cff;
  --accent-soft: #1b2952;
  --accent-ink: #a5bdff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.dm-mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dm-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.dm-serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }

/* CTAs */
.dm-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500; font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.15s;
  white-space: nowrap;
}
.dm-btn-primary { background: var(--ink); color: var(--bg); }
.dm-btn-primary:hover { transform: translateY(-1px); }
.dm-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.dm-btn-ghost:hover { background: var(--bg-elev); }
.dm-btn-arrow { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); display: inline-block; margin-left: 2px; }

/* Layout */
.dm-page { min-height: 100vh; }
.dm-container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.dm-container-narrow { max-width: 980px; margin: 0 auto; padding: 0 32px; }

/* Density */
[data-density="compact"] .dm-section { padding-block: 64px; }
[data-density="comfortable"] .dm-section { padding-block: 96px; }
[data-density="spacious"] .dm-section { padding-block: 140px; }

/* Type pairing */
[data-type-pair="editorial"] { --serif: "Newsreader", Georgia, serif; --sans: "Geist", sans-serif; }
[data-type-pair="grotesk"] { --serif: "Instrument Serif", Georgia, serif; --sans: "Geist", sans-serif; }
[data-type-pair="humanist"] { --serif: "Source Serif 4", Georgia, serif; --sans: "Work Sans", sans-serif; }

/* Nav */
.dm-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.dm-nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.dm-logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.dm-logo-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); position: relative; }
.dm-logo-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 2px; background: var(--accent); }
.dm-nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.dm-nav-links a:hover { color: var(--ink); }
.dm-nav-right { display: flex; align-items: center; gap: 16px; }

/* Lang toggle */
.dm-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; font-size: 12px; font-family: var(--mono); }
.dm-lang button { border: 0; background: transparent; padding: 4px 10px; border-radius: 999px; color: var(--muted); letter-spacing: 0.08em; }
.dm-lang button.active { background: var(--ink); color: var(--bg); }

/* Tag/badge */
.dm-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--bg-elev);
}
.dm-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

/* Hairline rule */
.dm-rule { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

/* Section header common */
.dm-section-head { display: flex; gap: 32px; align-items: baseline; margin-bottom: 56px; }
.dm-section-head .label { flex-shrink: 0; min-width: 200px; }
.dm-section-head .title { flex: 1; font-family: var(--serif); font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; max-width: 720px; }

/* Footer */
.dm-footer { padding: 80px 0 48px; border-top: 1px solid var(--line-soft); margin-top: 40px; }
.dm-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.dm-footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; font-weight: 500; }
.dm-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); }
.dm-footer ul a:hover { color: var(--accent-ink); }
.dm-footer-bottom { display: flex; justify-content: space-between; padding-top: 36px; margin-top: 56px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }

/* Mobile mockup wrapper */
.dm-phone-shell {
  border-radius: 44px;
  background: linear-gradient(180deg, #1a1a1a, #0a0a0a);
  padding: 10px;
  box-shadow: 0 30px 80px -30px rgba(15, 29, 24, 0.4), 0 0 0 1px rgba(0,0,0,0.05);
}
.dm-phone-screen {
  border-radius: 36px;
  overflow: hidden;
  background: #ffffff;
  position: relative;
}

/* Animated waveform */
.dm-wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.dm-wave span {
  display: block;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}
.dm-wave span:nth-child(1) { height: 30%; animation-delay: 0s; }
.dm-wave span:nth-child(2) { height: 90%; animation-delay: 0.1s; }
.dm-wave span:nth-child(3) { height: 50%; animation-delay: 0.2s; }
.dm-wave span:nth-child(4) { height: 70%; animation-delay: 0.3s; }
.dm-wave span:nth-child(5) { height: 40%; animation-delay: 0.4s; }
.dm-wave span:nth-child(6) { height: 80%; animation-delay: 0.5s; }
.dm-wave span:nth-child(7) { height: 35%; animation-delay: 0.6s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* FAQ */
.dm-faq-item { border-bottom: 1px solid var(--line-soft); padding: 24px 0; cursor: pointer; }
.dm-faq-item summary { list-style: none; display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; }
.dm-faq-item summary::-webkit-details-marker { display: none; }
.dm-faq-q { font-family: var(--serif); font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; }
.dm-faq-plus { font-family: var(--mono); font-size: 22px; color: var(--muted); flex-shrink: 0; line-height: 1.2; transition: transform 0.2s; display: inline-block; }
.dm-faq-item[open] .dm-faq-plus { transform: rotate(45deg); }
.dm-faq-a { padding: 18px 0 4px 56px !important; max-width: 720px; color: var(--muted); font-size: 16px; line-height: 1.65; display: block; margin-top: 8px; }

/* Section anchors */
section[id] { scroll-margin-top: 80px; }

/* Hide section by tweak */
[data-show-how="false"] #how,
[data-show-product="false"] #product,
[data-show-privacy="false"] #privacy,
[data-show-faq="false"] #faq { display: none; }

.dm-templates-grid { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .dm-templates-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 760px) { .dm-templates-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 520px) { .dm-templates-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 880px) {
  .dm-nav-links { display: none; }
  .dm-section-head { flex-direction: column; gap: 12px; }
  .dm-section-head .label { min-width: 0; }
  .dm-footer-grid { grid-template-columns: 1fr 1fr; }
}
