/*
 * dex pages on marianpavel.ro/dexonline/. Built on the site's shared /assets/site.css; this adds the app's own look:
 * Literata (the font the app uses, subset to Latin + Romanian, SIL OFL: fonts/OFL.txt) and its navy/ember colors.
 */

@font-face { font-family: "Literata"; src: url("fonts/literata-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

.app-dex {
  --accent: #1d3b6f;
  --ember: #c4562b;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --tint: #e3ebf8; /* the app's "Cuvântul zilei" card */
}
@media (prefers-color-scheme: dark) {
  .app-dex { --accent: #9cb8ec; --accent-ink: #0e0f11; --ember: #f0a07a; --tint: #1b2537; }
}

.app-dex h1, .app-dex h2, .app-dex h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }
.app-dex .section h2 { letter-spacing: -0.025em; }

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

.wordmark { margin: 0 0 8px; font: 600 clamp(4.5rem, 11vw, 7.5rem)/0.9 var(--serif); letter-spacing: -0.035em; color: var(--accent); }
.wordmark span { color: var(--ember); }

/* The pitch is written as a dictionary entry, styled like the app's definitions. */
.entry { max-width: 540px; margin: 26px 0 32px; font: 400 clamp(1.08rem, 1.7vw, 1.24rem)/1.65 var(--serif); }
.entry b, .dex-def b { font-weight: 600; }
.entry .ab, .dex-def .ab { color: var(--muted); }

.fan.is-hero { height: clamp(420px, 48vw, 600px); }
.fan.is-hero .device { width: clamp(160px, 18.5vw, 232px); }

/* ---------- Search demo ---------- */

.dex-demo {
  width: min(420px, 100%); padding: 20px; border-radius: calc(var(--radius) + 4px);
  background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  min-height: 640px; /* room for the longest example, so the page doesn't jump while it types */
}
@media (max-width: 640px) { .dex-demo { min-height: 720px; } }
.dex-search {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; border-radius: 999px;
  border: 2px solid var(--accent); font-size: 1.05rem;
}
.dex-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.dex-caret { width: 2px; height: 1.2em; margin-left: -8px; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.dex-suggest { min-height: 44px; margin: 10px 0 0; padding: 0; list-style: none; }
.dex-suggest li {
  display: flex; align-items: center; gap: 14px; padding: 9px 6px; border-radius: 10px; font-size: 1rem;
  animation: rise 0.35s both;
}
.dex-suggest li:nth-child(2) { animation-delay: 0.06s; } .dex-suggest li:nth-child(3) { animation-delay: 0.12s; }
.dex-suggest li:nth-child(4) { animation-delay: 0.18s; } .dex-suggest li:nth-child(5) { animation-delay: 0.24s; }
.dex-suggest li:nth-child(6) { animation-delay: 0.3s; }
.dex-suggest li.is-picked { background: var(--tint); }
.dex-suggest svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dex-suggest b { font-weight: 650; }
.dex-note { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 0.9rem; color: var(--accent); background: var(--tint); animation: rise 0.35s both; }
.dex-def { margin-top: 14px; padding: 18px 20px; border-radius: 18px; background: var(--tint); animation: rise 0.45s both; }
.dex-def h3 { margin: 0 0 8px; font-size: 1.6rem; color: var(--accent); }
.dex-def p { margin: 0; font: 400 0.98rem/1.6 var(--serif); }
.dex-def .src { margin-top: 10px; font: 500 0.8rem/1 var(--font); color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .dex-suggest li, .dex-note, .dex-def { animation: none; }
  .dex-caret { animation: none; }
}

.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.examples button {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); font-size: 0.92rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.examples button span { color: var(--muted); }
.examples button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---------- Credits ---------- */

.support-card + .support-card { margin-top: 16px; }
