/* EnglishUp public site: the landing page, the explanation pages and the legal pages (body.site).
   The app screens keep app.css alone. One bold element: the "screen" with a subtitle line, because the
   correction in the chat looks like a film subtitle and Israeli teens already read English through subtitles. */

.site {
  --screen: #141c36;
  --screen-ink: #e9eefb;
  --screen-soft: #aab5d3;
  --screen-line: #2a3557;
  --screen-bubble: #222c4d;
  --display: 'Karantina', var(--he);
  --wrap: 74rem;
}
@media (prefers-color-scheme: dark) {
  .site { --screen: #0b1124; --screen-line: #26324f; --screen-bubble: #1a2341; }
}

.site section + section { margin-top: 0; }
.site h1, .site h2 { letter-spacing: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 20;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { top: .75rem; }

/* header */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.head-row { position: relative; display: flex; align-items: center; gap: 2.25rem; min-height: 4.25rem; }
.logo {
  display: inline-flex; align-items: center; gap: .12rem; direction: ltr;
  font: 700 1.4rem/1 var(--en); color: var(--ink); text-decoration: none;
}
.logo .up { background: var(--sub-ink); color: #1d2433; padding: .16rem .32rem .1rem; border-radius: 5px; }
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a, .head-login { color: var(--ink); text-decoration: none; font-weight: 500; padding: .6rem 0; }
.site-nav a:hover, .head-login:hover, .site-nav a[aria-current='page'] {
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .45em; text-decoration-color: var(--action);
}
.head-cta { margin-inline-start: auto; display: flex; align-items: center; gap: 1.25rem; }
.head-signup { padding: .75rem 1.15rem; font-size: .95rem; }
.menu { display: none; }
.menu summary {
  list-style: none; cursor: pointer; width: 2.75rem; height: 2.75rem; border-radius: 10px;
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after {
  display: block; width: 1.1rem; height: 2px; background: var(--ink); border-radius: 2px; position: relative;
}
.menu summary span::before, .menu summary span::after { content: ''; position: absolute; }
.menu summary span::before { top: -6px; }
.menu summary span::after { top: 6px; }
.menu[open] summary span { background: transparent; }
.menu[open] summary span::before { top: 0; transform: rotate(45deg); }
.menu[open] summary span::after { top: 0; transform: rotate(-45deg); }
.menu nav {
  position: absolute; inset-inline: 0; top: 100%;
  display: grid; padding: .25rem 1.25rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line);
}
.menu nav a { padding: .9rem 0; color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
.menu nav a:last-child { border-bottom: 0; }

@media (max-width: 1060px) {
  .site-nav, .head-login { display: none; }
  .menu { display: block; }
  .head-row { gap: .75rem; }
  .head-cta { gap: .75rem; }
  .head-signup { padding: .65rem .9rem; font-size: .9rem; }
}

/* the hero */
.hero { padding: 4.5rem 0 5.5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4.5rem; align-items: center; }
.hero h1 { font: 700 clamp(3rem, 5.6vw, 5rem)/.95 var(--display); margin: 0 0 1.6rem; text-wrap: balance; }
.hero h1 span { display: block; }
.hero-what { font-size: 1.35rem; line-height: 1.45; font-weight: 600; margin: 0 0 .8rem; max-width: 33rem; }
.hero-lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 33rem; margin: 0 0 2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1rem; }
.btn-big { padding: 1.1rem 1.6rem; font-size: 1.1rem; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.cta-note { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* the screen: a real exchange, the correction shown as a subtitle in its lower third */
.screen {
  position: relative; margin: 0; min-height: 27rem; overflow: hidden;
  background: var(--screen); color: var(--screen-ink);
  border: 1px solid var(--screen-line); border-radius: 22px;
  box-shadow: 0 40px 80px -40px rgba(20, 28, 54, .6);
}
.screen-top {
  display: flex; align-items: center; gap: .6rem; padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--screen-line); font-size: .95rem; color: var(--screen-soft);
}
.screen-top .avatar {
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--sub-ink); color: #1d2433; font: 700 .95rem/1 var(--en);
}
.screen-top strong { color: var(--screen-ink); font-family: var(--en); }
.screen-top .voice { margin-inline-start: auto; font-size: 1.1rem; }
.screen-log { display: grid; gap: .75rem; padding: 1.25rem 1.25rem 7.5rem; }
.screen .msg { display: flex; max-width: 82%; }
.screen .msg.kid { justify-self: start; }   /* RTL: the kid's side is the right, the tutor's the left */
.screen .msg.tutor { justify-self: end; }
.screen .bubble { padding: .7rem .95rem; border-radius: 18px; font: 1.05rem/1.45 var(--en); }
.screen .kid .bubble { background: var(--action); color: var(--action-ink); border-top-right-radius: 6px; }
.screen .tutor .bubble { background: var(--screen-bubble); color: var(--screen-ink); border-top-left-radius: 6px; }
.subtitle { position: absolute; inset-inline: 1.25rem; bottom: 1.5rem; margin: 0; text-align: center; }
.subtitle span.line {
  display: inline-block; padding: .45rem 1rem .5rem; border-radius: 6px;
  background: rgba(0, 0, 0, .74); color: var(--sub-ink); text-shadow: 0 1px 0 #000;
  font: 700 1.3rem/1.35 var(--en);
}
.subtitle del { color: #c9d2e6; font-weight: 400; text-decoration-thickness: 1px; }
.subtitle .why { display: block; margin-top: .2rem; font: 400 .98rem/1.4 var(--he); color: #e8ecf5; text-shadow: none; }

@media (prefers-reduced-motion: no-preference) {
  .screen .m1, .screen .m2, .screen .m3, .subtitle span.line { animation: enter .5s ease-out both; }
  .screen .m1 { animation-delay: .25s; }
  .screen .m2 { animation-delay: 1.1s; }
  .subtitle span.line { animation-delay: 1.9s; }
  .screen .m3 { animation-delay: 2.7s; }
}
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 880px) {
  .hero { padding: 2.5rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-what { font-size: 1.2rem; }
  .screen { min-height: 0; }
  .subtitle span.line { font-size: 1.1rem; }
}

/* sections */
.band { padding: 5.5rem 0; }
.band + .band { border-top: 1px solid var(--line); }
.band h2 { font: 700 clamp(2.4rem, 4.4vw, 3.6rem)/1 var(--display); margin: 0 0 1rem; }
.band .intro { color: var(--ink-soft); font-size: 1.12rem; max-width: 40rem; margin: 0 0 2.75rem; }
.more { font-weight: 600; }
@media (max-width: 880px) { .band { padding: 3.75rem 0; } .band .intro { margin-bottom: 2rem; } }

/* the four steps: a real sequence, joined by a line */
.steps-row { list-style: none; margin: 0 0 2.25rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; counter-reset: step; }
.steps-row::before { content: ''; position: absolute; top: 1.45rem; inset-inline: 1.45rem calc((100% - 6rem) / 4 - 1.45rem); border-top: 2px dashed var(--line); }
.steps-row li { counter-increment: step; position: relative; }
.steps-row li::before {
  content: counter(step); position: relative; z-index: 1;
  display: grid; place-items: center; width: 2.9rem; height: 2.9rem; margin-bottom: 1.1rem; border-radius: 50%;
  background: var(--sub-bg); color: var(--sub-ink); font: 700 1.2rem/1 var(--en); box-shadow: 0 0 0 6px var(--paper);
}
.steps-row h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
.steps-row p { margin: 0; color: var(--ink-soft); }
@media (max-width: 880px) {
  .steps-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps-row::before { display: none; }
  .steps-row li { display: grid; grid-template-columns: 2.9rem 1fr; column-gap: 1rem; }
  .steps-row li::before { grid-row: span 2; margin: 0; }
}

/* what the parent sees: text and a sample of the child's page */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4.5rem; align-items: center; }
.checks { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; gap: .85rem; }
.checks li { position: relative; padding-inline-start: 1.9rem; }
.checks li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .42em; width: 1rem; height: .55rem;
  border-inline-start: 3px solid var(--action); border-bottom: 3px solid var(--action); transform: rotate(-45deg) scaleX(-1);
}
.mock { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; }
.mock-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.1rem; }
.mock-head strong { font-size: 1.3rem; }
.mock-head span { color: var(--ink-soft); font-size: .95rem; }
.mock .numbers { margin: .2rem 0 1.25rem; }
.mock-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.mock .mock-label { font-size: .92rem; color: var(--ink-soft); font-weight: 600; margin: 0 0 .35rem; }
.mock .plain { padding-inline-start: 1.1rem; }
.mock-words { grid-column: 1 / -1; }
.mock figcaption { margin-top: 1rem; color: var(--ink-soft); font-size: .88rem; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 2.5rem; } }

/* for teens */
.band-kid { background: var(--kid); }
.band-kid .more { color: var(--ink); text-decoration-color: var(--action); }
.band-kid + .band { border-top: 0; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin: 0 0 2.5rem; }
.trio h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
.trio p { margin: 0; }
.band:not(.band-kid) .trio p { color: var(--ink-soft); }
@media (max-width: 880px) { .trio { grid-template-columns: 1fr; gap: 1.5rem; } }

/* questions */
.faq-short { max-width: 46rem; }

/* the closing band */
.band-end { background: var(--screen); color: var(--screen-ink); text-align: center; border-top: 0; }
.band + .band-end { border-top: 0; }
.band-end h2 { color: var(--screen-ink); }
.band-end p { color: var(--screen-soft); margin: 0 auto 2rem; max-width: 34rem; font-size: 1.1rem; }
.band-end .btn { background: var(--sub-ink); color: #1d2433; }

/* explanation and legal pages */
.page-hero { padding: 3.75rem 0 2.75rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-hero h1 { font: 700 clamp(2.8rem, 5.5vw, 4.4rem)/.95 var(--display); margin: 0 0 1rem; }
.page-hero p { color: var(--ink-soft); font-size: 1.15rem; max-width: 42rem; margin: 0; }
.article { max-width: 44rem; padding: 2.75rem 0 4.5rem; }
.article h2 { font-size: 1.35rem; margin: 2.5rem 0 .6rem; }
.article h2:first-child { margin-top: 0; }
.article p, .article li { line-height: 1.7; }
.article .door { margin-top: .5rem; }
.article .see-also { margin-top: 2.5rem; }

/* footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 3.5rem 0 2.25rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }
.foot-about p { color: var(--ink-soft); max-width: 22rem; margin: .9rem 0 0; }
.foot-grid h2 { font: 600 .9rem/1.2 var(--he); color: var(--ink-soft); margin: 0 0 .6rem; }
.foot-grid nav { display: grid; align-content: start; }
.foot-grid nav a { color: var(--ink); text-decoration: none; padding: .5rem 0; }
.foot-grid nav a:hover { text-decoration: underline; }
.foot-legal {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2.75rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .9rem;
}
.foot-legal a { color: var(--ink-soft); }
@media (max-width: 880px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .foot-about { grid-column: 1 / -1; }
}

.more-next { margin-inline-start: 1.25rem; }
.after-faq { margin: 1.5rem 0 0; }

.nw { white-space: nowrap; }
.site .num { font-family: var(--en); font-weight: 700; font-size: .8em; }
.band h2, .page-hero h1 { text-wrap: balance; }
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .site-head { background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.hero-cap { margin: .9rem 0 0; color: var(--ink-soft); font-size: .9rem; text-align: center; }

/* /how as the ads' landing page: the landing hero's type and sample, a quieter top, and the sign-up button
   full width on a phone so it is the first thing a thumb finds */
.how-hero { padding: 3.5rem 0 4rem; border-bottom: 1px solid var(--line); }
.how-hero .cta-row { margin-top: .25rem; }
@media (max-width: 880px) {
  .how-hero { padding: 1.75rem 0 2.75rem; }
  .how-hero h1 { margin-bottom: 1.1rem; }
  .how-hero .hero-lead { margin-bottom: 1.5rem; }
}
@media (max-width: 560px) {
  .how-hero .cta-row .btn { flex: 1 1 100%; }
}
.article .mid-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.1rem; margin: 2rem 0 0; }
.article .mid-cta span { color: var(--ink-soft); font-size: .95rem; }

/* the topic pages (/english/<slug>, the Google search ads): the /how hero with the topic's own exchange. The screen
   lays out as a column so one or two subtitle lines sit at its foot, however long the exchange is */
@media (max-width: 380px) {  /* a 360-wide Android phone: the button and the age note stay on the first screen */
  .topic-hero h1 { font-size: 2.6rem; margin-bottom: .9rem; }
  .topic-hero .hero-lead { margin-bottom: 1.1rem; }
}
.topic-hero h1 .lat { display: inline; font-family: var(--en); font-size: .78em; letter-spacing: .01em; }  /* "AI": see fmt.latin */
.screen-topic { display: flex; flex-direction: column; }
.screen-topic .screen-log { padding-bottom: 1.5rem; }
.screen-topic .subtitle { position: static; margin-top: auto; padding: 0 1.25rem 1.5rem; display: grid; gap: .5rem; justify-items: center; }
.screen .rec { display: block; margin-bottom: .2rem; text-align: left; font: 600 .8rem/1.3 var(--he); opacity: .85; }
.topic-steps { margin: 0 0 1rem; }
.article .topic-note {
  margin: 1.5rem 0 0; padding: 1rem 1.15rem; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); border-inline-start: 5px solid var(--sub-ink);
}
.topic-more { margin-top: 2.5rem; }
.topic-more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.topic-more li { margin: 0; }
.topic-more a {
  display: inline-block; padding: .6rem .95rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.3;
}
.topic-more a:hover { border-color: var(--action); color: var(--action); }
