/* Home: the front page. An interlinear headline (a Spanish or Italian line, the English under it in the extension's
   gloss) beside a clipping of a real page read in Twinread; the reader picks the page's second language. Then the
   stories set in columns with hairline rules, the questions, and the closing line in the same two languages. */

#main.home { background: none; }

/* the page's second language: [data-g] holds one span per language; only the chosen one shows */
[data-g] > [lang="it"] { display: none; }
:root[data-gloss="it"] [data-g] > [lang="es"] { display: none; }
:root[data-gloss="it"] [data-g] > [lang="it"] { display: inline; }
:root[data-gloss="off"] [data-g] { display: none; }
:root[data-gloss="off"] .hero h1.gloss, :root[data-gloss="off"] .install-end h2.gloss { color: var(--ink); font-style: normal; font-weight: 600; background: none; }

/* hero: the headline column, a column rule, the clipping */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 480px); gap: 0 56px; max-width: var(--page); margin: 0 auto; padding: 60px var(--gut) 80px; align-items: center; }
.hero::before { align-self: stretch; }
.hero::before { content: ""; grid-column: 2; grid-row: 1; align-self: stretch; background: var(--rule); }
.hero-copy { grid-column: 1; grid-row: 1; min-width: 0; }
.foreign { margin: 6px 0 0; font-size: clamp(2.4rem, 1.2rem + 2.9vw, 3.9rem); line-height: 1.03; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }
.foreign > span { display: block; }
.hero h1.gloss { margin: 14px 0 0; width: fit-content; padding-bottom: 0.12em; font-size: clamp(1.8rem, 1rem + 2vw, 2.9rem); line-height: 1.1; font-weight: 450; letter-spacing: -0.02em; }
:root[data-gloss="off"] .hero h1.gloss { width: auto; font-size: clamp(2.4rem, 1.2rem + 2.9vw, 3.9rem); line-height: 1.03; letter-spacing: -0.03em; }

/* the language switch: three set words on one hairline, the chosen one underlined in the gloss colour */
.gloss-switch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: 22px 0 0; font-size: 0.98rem; }
.gloss-switch[hidden] { display: none; }
.gloss-switch > span { color: var(--muted); font-style: italic; }
.gloss-switch button { padding: 6px 0; min-height: 40px; background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
.gloss-switch button:hover { color: var(--ink); text-decoration-color: var(--line); }
.gloss-switch button[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration-color: var(--trans); }

.hero .lede { margin: 28px 0 30px; max-width: 34rem; font-size: 1.2rem; }
.hero .cta-row { gap: 10px; }
.hero .cta-note { margin: 16px 0 0; font-size: 0.95rem; color: var(--muted); }
.clip { grid-column: 3; grid-row: 1; margin: 6px 0 0; }
.clip img { width: 100%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.clip figcaption { margin-top: 12px; font-size: 0.92rem; font-style: italic; color: var(--muted); }

/* the stories: a twelve-column page, a hairline rule between the columns and between the rows */
.spread { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); width: calc(100% - 2 * var(--gut)); max-width: calc(var(--page) - 2 * var(--gut)); margin: 0 auto; border-top: 1px solid var(--ink); }
.story { padding: 30px 0 56px; min-width: 0; }
/* a pull-out between the stories: the fact and its gloss on the left, the detail on the right */
.story.band { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 56px; align-items: end; border-top: 1px solid var(--rule); }
.story.band > p { margin-bottom: 18px; color: var(--muted); }
.story.split { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 56px; align-items: center; border-top: 1px solid var(--rule); }
.story.split:first-child { border-top: 0; }
.story.split.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.story.split.flip > div { order: 2; }
.story.split.flip > figure { order: 1; }
.story h2 { font-size: clamp(1.7rem, 1.2rem + 1.2vw, 2.3rem); line-height: 1.1; letter-spacing: -0.022em; margin: 0; }
.story .gloss { width: fit-content; margin: 8px 0 16px; font-size: 1.2rem; }
.story p:not(.label):not(.fact) { max-width: 36rem; font-size: 1.08rem; }
.story .plate { width: fit-content; max-width: 100%; margin: 26px 0 0; background: none; border: 0; }
.story.split .plate { margin: 0; }
.plate img { border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.story a { white-space: nowrap; }
.story .also { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 1rem; font-style: italic; }
.fact { margin: 4px 0 0; font-size: clamp(1.9rem, 1.3rem + 1.4vw, 2.6rem); line-height: 1.08; font-weight: 500; letter-spacing: -0.02em; }
#on-device .gloss { font-size: 1.15rem; margin-bottom: 0; }

/* questions: the label and title in the side column, the answers in the text */
.questions { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 0 56px; width: calc(100% - 2 * var(--gut)); max-width: calc(var(--page) - 2 * var(--gut)); margin: 0 auto; padding: 64px 0 80px; border-top: 1px solid var(--ink); }
.q-head { grid-column: 1; }
.q-head h2 { font-size: 1.6rem; line-height: 1.15; margin: 0; }
.q-head .gloss { width: fit-content; margin-top: 6px; font-size: 1.05rem; }
.q-body { grid-column: 2; max-width: 46rem; }
.questions .faq { margin: 0; }

/* the closing line, in both languages */
.install-end { max-width: var(--page); margin: 0 auto; padding: 0 var(--gut) 96px; }
.end-in { padding-top: 48px; border-top: 5px double var(--ink); }
.install-end .foreign { margin: 0; font-size: clamp(2.2rem, 1.2rem + 2.8vw, 3.6rem); line-height: 1.04; letter-spacing: -0.028em; }
.install-end h2.gloss { width: fit-content; margin: 10px 0 30px; font-size: clamp(1.6rem, 1rem + 1.6vw, 2.4rem); font-weight: 450; }
.pricing-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-top: 26px; }
.pricing-line .price-note { margin: 0; font-size: 1.05rem; color: var(--ink); }
.pricing-line + .table-note { margin-top: 8px; max-width: 44rem; }

@media (min-width: 1700px) { .hero, .install-end { max-width: 1280px; } .spread, .questions { max-width: calc(1280px - 2 * var(--gut)); } .hero { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 520px); } }

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero::before { display: none; }
  .clip { grid-column: 1; grid-row: 2; margin-top: 44px; max-width: 620px; }
  .story.band { grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
  .story.band > p { margin-bottom: 0; }
  .story.split, .story.split.flip { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .story.split.flip > div { order: 1; }
  .story.split.flip > figure { order: 2; }
  .story.split .plate { max-width: 560px; }
}
@media (max-width: 860px) {
  .questions { padding-top: 48px; }
  .questions { grid-template-columns: minmax(0, 1fr); }
  .q-head, .q-body { grid-column: 1; }
  .q-head { margin-bottom: 8px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 36px; padding-bottom: 48px; }
  .hero .cta-row .btn, .install-end .btn { width: 100%; }
  .story { padding-bottom: 40px; }
  .gloss-switch { gap: 0 18px; }
  .gloss-switch > span { flex-basis: 100%; }
  .gloss-switch button { min-height: 44px; }
  .pricing-line a, .story a { display: inline-flex; align-items: center; min-height: 44px; }
}
