/*
 * Landing page: screenshots, questions and the closing call to action. The hero
 * copy, the store buttons and the word packs are styled in default.css, which the
 * rest of the site shares; the walkthrough video is in walkthrough.css, which
 * /extension/about shares.
 *
 * Pixels matter here. The screenshots are cut at the recording's own size and shown
 * at that size. The browser only ever shrinks them on screens too narrow to hold them.
 */

/* Features ---------------------------------------------------------------- */

.landing-feature,
.landing-faq {
  padding-block: clamp(3rem, 7vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}

.landing-feature {
  display: grid;
  align-items: center;
  gap: 2rem 3rem;
}

.landing-feature > * {
  min-width: 0;
}

.landing-feature h2,
.landing-faq h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.landing-feature__list {
  margin: 1rem 0 0;
  padding-left: 1.1em;
  color: var(--dim);
}

.landing-feature__list li {
  margin: 0.375rem 0;
}

.landing-feature__list b {
  color: var(--ink);
}

.landing-feature__list--inline {
  display: flex;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.375rem 1.75rem;
  list-style: none;
}

.landing-feature__list--inline li::before {
  color: var(--accent);
  font-family: var(--font-mono);
  content: "→ ";
}

.landing-feature--stacked .landing-feature__copy {
  max-width: 40rem;
}

.landing-feature--stacked .landing-shot {
  justify-self: center;
}

/* Screenshot left, copy right on a wide screen; the copy stays first in the DOM. */
@media (min-width: 980px) {
  .landing-feature:not(.landing-feature--stacked) {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .landing-feature:not(.landing-feature--stacked) .landing-feature__copy {
    order: 2;
  }
}

.landing-shot {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  background: #202124;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.landing-shot img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

/* Questions --------------------------------------------------------------- */

.landing-faq h2 {
  text-align: center;
}

.landing-faq__list {
  max-width: 47.5rem;
  margin: 2rem auto 0;
}

.landing-faq__list details {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.landing-faq__list summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.landing-faq__list summary::-webkit-details-marker {
  display: none;
}

.landing-faq__list summary::after {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1;
  content: "+";
}

.landing-faq__list details[open] summary::after {
  content: "–";
}

.landing-faq__list p {
  margin: 0.625rem 0 0;
  color: var(--dim);
}

.landing-faq__list a {
  color: var(--accent);
}

/* Word packs and the closing call to action ------------------------------- */

.landing-collections__more {
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
}

.landing-collections__more a {
  color: var(--accent);
}

.landing-cta {
  margin-block: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.landing-cta h2 {
  max-width: none;
}

.landing-cta__fallback {
  display: none;
}

/* "Add WordySpot to your browser" can't be done in a browser that cannot run it, such
   as desktop Safari (ws-store-both + ws-cannot-install). The hero keeps both stores
   there and says why; this closing section offers the account and the browser list. */
.ws-cannot-install .landing-cta .landing-install {
  display: none;
}

.ws-store-none .landing-cta__fallback,
.ws-cannot-install .landing-cta__fallback {
  display: flex;
}

.landing-cta .landing-cta__note a {
  color: var(--accent);
}
