/* =============================================================================
   Insight Limmud — app page
   -----------------------------------------------------------------------------
   Scoped to .app-landing. Follows the same rules as the rest of the site:
   no outlined boxes, grouping by whitespace, tint and type scale. The page
   runs edge to edge in full-width bands, like the home page.

   Everything here reads from the tokens in theme.css, so the light theme and
   the high-contrast themes come for free.
   ============================================================================= */

@import url('/css/theme.css');

.app-landing {
    max-width: none;
    padding: 0;
}

/* Bands carry their own padding and tint, so they meet without a gap. */
main.app-landing > section + section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.ilm-band {
    padding-block: clamp(var(--sp-8), 6vw, var(--sp-10));
}

.ilm-band--tint {
    background-color: var(--band);
}

.ilm-inner {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.ilm-inner--narrow {
    max-width: var(--content-narrow);
}

/* -----------------------------------------------------------------------------
   Hero
   -----------------------------------------------------------------------------
   The braille field behind the title is decorative: a dot grid at low opacity,
   drawn in CSS so there is no image to load and nothing for a screen reader to
   announce.
   -------------------------------------------------------------------------- */
.ilm-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(var(--sp-9), 9vw, var(--sp-11));
    background-color: var(--surface-sunken);
}

.ilm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(70% 90% at 12% 0%, var(--brand-wash-strong) 0%, transparent 62%),
        radial-gradient(60% 80% at 92% 10%, var(--accent-wash) 0%, transparent 60%);
}

.ilm-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.5;
    background-image:
        radial-gradient(currentColor 1.5px, transparent 1.6px),
        radial-gradient(currentColor 1.5px, transparent 1.6px);
    background-size: 1.5rem 2.25rem, 1.5rem 2.25rem;
    background-position: 0 0, 0.6rem 0.75rem;
    color: var(--hairline-strong);
    mask-image: linear-gradient(170deg, transparent 38%, #000 100%);
    -webkit-mask-image: linear-gradient(170deg, transparent 38%, #000 100%);
}

.ilm-hero__inner {
    position: relative;
    max-width: 44rem;
}

.ilm-hero h1 {
    margin: 0;
    font-size: var(--text-display);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
}

.ilm-hero__hebrew {
    display: block;
    margin-top: var(--sp-2);
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 600;
    line-height: 1.2;
    color: var(--accent);
}

.ilm-hero .lede {
    margin-top: var(--sp-5);
    max-width: 38ch;
    font-size: var(--text-lg);
    color: var(--ink-muted);
}

.ilm-hero .button-group {
    margin-top: var(--sp-7);
}

/* The one-line status note under the buttons. */
.ilm-note {
    margin-top: var(--sp-5);
    font-size: var(--text-sm);
    color: var(--ink-subtle);
}

/* -----------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */
.ilm-head {
    max-width: 46ch;
    margin-bottom: clamp(var(--sp-6), 4vw, var(--sp-8));
}

.ilm-head h2 {
    margin: 0;
}

.ilm-head p {
    margin-top: var(--sp-4);
    margin-bottom: 0;
    font-size: var(--text-lg);
    color: var(--ink-muted);
}

/* -----------------------------------------------------------------------------
   Card grid — the three things the app exists to fix
   -------------------------------------------------------------------------- */
.ilm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
    gap: var(--sp-4);
}

.ilm-card {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: clamp(var(--sp-5), 3vw, var(--sp-6));
    border: 0;
    border-radius: var(--r-lg);
    background-color: var(--surface);
}

.ilm-card h3 {
    margin: 0;
    font-size: var(--text-h4);
}

.ilm-card p {
    margin: 0;
    color: var(--ink-muted);
}

/* The numeral sitting above each card title. */
.ilm-card__num {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--tracking-wide);
    color: var(--accent);
}

/* -----------------------------------------------------------------------------
   Two-column split
   -------------------------------------------------------------------------- */
.ilm-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(var(--sp-6), 5vw, var(--sp-9));
    align-items: start;
}

.ilm-split > div > :first-child {
    margin-top: 0;
}

.ilm-split h2,
.ilm-split h3 {
    margin-top: 0;
}

.ilm-split p {
    color: var(--ink-muted);
}

/* -----------------------------------------------------------------------------
   The cycle diagram
   -----------------------------------------------------------------------------
   A single paragraph's layers, in the order one chord walks them. The arrows
   are drawn with ::after and hidden from assistive tech; the list itself is an
   ordered list, which already carries the sequence.
   -------------------------------------------------------------------------- */
.ilm-cycle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--ink);
}

.ilm-cycle li {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin: 0;
    color: inherit;
}

.ilm-cycle__layer {
    padding: 0.4rem 0.9rem;
    border-radius: var(--r-pill);
    background-color: var(--surface-hover);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* The main text is the layer you start on, so it reads as the anchor. */
.ilm-cycle li:first-child .ilm-cycle__layer {
    background-color: var(--brand-wash-strong);
}

/* Markup rather than ::after content: pseudo-element text is announced by
   some screen readers, and these arrows are purely decorative. */
.ilm-cycle__arrow {
    color: var(--ink-subtle);
    font-size: var(--text-sm);
}

/* The chord itself, set as a key. */
.ilm-chord {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5ch;
    padding: 0.3rem 0.75rem;
    border-radius: var(--r-sm);
    background-color: var(--surface-hover);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
}

.ilm-dots {
    font-size: 1.25em;
    line-height: 1;
    color: var(--accent);
}

/* -----------------------------------------------------------------------------
   Plain fact lists — hardware, features
   -------------------------------------------------------------------------- */
.ilm-facts {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--ink-muted);
}

.ilm-facts li {
    margin: 0;
}

.ilm-facts li + li {
    margin-top: var(--sp-6);
}

.ilm-facts strong {
    display: block;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: 700;
    line-height: var(--lh-snug);
}

.ilm-facts span {
    display: block;
    margin-top: var(--sp-1);
}

/* A compact two-column feature list for the short items. */
.ilm-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
    gap: var(--sp-5) var(--sp-6);
    margin: 0;
    padding: 0;
    list-style: none;
}

.ilm-features li {
    margin: 0;
    color: var(--ink-muted);
}

.ilm-features strong {
    display: block;
    margin-bottom: var(--sp-1);
    color: var(--ink);
    font-weight: 600;
}

/* Device chips. */
.ilm-devices {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin: var(--sp-5) 0 0;
    padding: 0;
    list-style: none;
}

.ilm-devices li {
    margin: 0;
    padding: 0.4rem 0.9rem;
    border-radius: var(--r-pill);
    background-color: var(--surface);
    color: var(--ink);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* -----------------------------------------------------------------------------
   Pull quote / single statement band
   -------------------------------------------------------------------------- */
.ilm-statement {
    max-width: 34ch;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 700;
    line-height: var(--lh-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
}

.ilm-statement + p {
    margin-top: var(--sp-5);
    max-width: 52ch;
    color: var(--ink-muted);
}

/* -----------------------------------------------------------------------------
   Closing call to action
   -------------------------------------------------------------------------- */
.ilm-cta {
    text-align: center;
}

.ilm-cta h2 {
    margin: 0;
}

.ilm-cta p {
    margin: var(--sp-4) auto 0;
    max-width: 46ch;
    color: var(--ink-muted);
}

.ilm-cta .button-group {
    justify-content: center;
    margin-top: var(--sp-7);
}

/* -----------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 52rem) {
    .ilm-split {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ilm-card {
        transition: none;
    }
}


/* -----------------------------------------------------------------------------
   Screenshot gallery (added with the 2026 rewrite)
   Every image carries a full description in its alt text; the figcaption is the
   short title. Phone shots are narrower than tablet shots, so they get their
   own column width.
   -------------------------------------------------------------------------- */
.ilm-gallery__title {
    margin: var(--sp-7) 0 var(--sp-4);
}

.ilm-gallery {
    display: grid;
    gap: var(--sp-6) var(--sp-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.ilm-gallery--phone {
    grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr));
}

.ilm-gallery--tablet {
    grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
}

.ilm-gallery li {
    margin: 0;
}

.ilm-gallery figure {
    margin: 0;
}

/* A phone screenshot is about 2.2 times as tall as it is wide, so at `width:
   100%` on a phone one of them is taller than the whole viewport: you scroll
   through a single picture and the caption that explains it is off screen.
   Reported 2026-11-09 as the screenshots being squashed.

   `max-height` with `width: auto` bounds the tall axis and lets the width
   follow, so nothing is ever distorted — the aspect ratio is kept by the
   browser rather than by a second number here that could drift from the file.
   `max-width: 100%` keeps the narrow axis in its column on a wide screen. */
.ilm-gallery img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(68vh, 34rem);
    height: auto;
    margin-inline: auto;
    border-radius: var(--r-lg, 1rem);
    background-color: var(--surface);
}

.ilm-gallery figcaption {
    margin-top: var(--sp-2);
    color: var(--ink-muted);
    font-size: var(--text-sm);
}

/* The App Store button, once the admin has switched it on. */
.ilm-appstore {
    display: inline-block;
}
