/* Homepage: a calm, full-width introduction to Rules learning. */
.shell--home { width: 100%; max-width: none; padding: 0; }
.rr-home { --rr-width: 1280px; }
.rr-container { width: min(var(--rr-width), calc(100% - 80px)); margin-inline: auto; }
.rr-home p { line-height: 1.7; }
.rr-home .eyebrow { font: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0; margin: 0 0 20px; }
.rr-home h2 { font-size: clamp(30px, 3vw, 43px); line-height: 1.15; letter-spacing: -1.6px; margin: 0; }
.rr-home h3 { font-size: 21px; line-height: 1.3; letter-spacing: -.5px; }
.rr-home .button { gap: 20px; min-height: 52px; padding-inline: 25px; }
.rr-text-link { display: inline-flex; align-items: center; gap: 18px; font-size: 15px; font-weight: 750; text-decoration: none; }
.rr-text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.rr-home a:focus-visible, .rr-home button:focus-visible, .rr-home summary:focus-visible { outline: 3px solid var(--green); outline-offset: 6px; }
.rr-home section[id] { scroll-margin-top: 110px; }
.rr-hero { position: relative; isolation: isolate; background: #f8f6ef; overflow: hidden; border-bottom: 1px solid #d4ddca; }
.rr-hero__inner { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr); gap: clamp(30px, 3vw, 48px); align-items: center; min-height: 690px; padding-block: 48px clamp(180px, 10vw, 220px); }
/* Keep the foreground green inside the banner, below the copy and carousel. */
.rr-hero__landscape { position: absolute; z-index: -1; inset: auto 0 0; height: clamp(360px, 28vw, 600px); background: url('/images/home-hero-course.png') center bottom / cover no-repeat; mask-image: linear-gradient(transparent, #000 42%); opacity: .8; }
.rr-hero__copy { position: relative; z-index: 2; padding-bottom: 24px; }
.rr-hero h1 { margin: 0 0 26px; font-size: clamp(48px, 4.1vw, 68px); line-height: 1.04; letter-spacing: -3px; font-weight: 800; }
.rr-hero .rr-lead { max-width: 510px; color: #485e51; font-size: 19px; line-height: 1.65; margin: 0; }
.rr-hero .actions { margin-top: 30px; gap: 26px; align-items: center; }
.rr-hero__visual { --rr-image-size: clamp(230px, 18vw, 300px); --rr-overlap: clamp(32px, 3vw, 56px); min-width: 0; display: grid; grid-template-columns: minmax(0, 360px) calc(var(--rr-image-size) - var(--rr-overlap)); justify-content: end; align-items: center; }
.rr-example { position: relative; z-index: 2; min-width: 0; background: #fff; padding: clamp(18px, 1.5vw, 24px); border: 1px solid #e3e8df; border-radius: 16px; box-shadow: 0 16px 38px #10241b12; }
.rr-example__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rr-example__top > span:last-child { font-size: 8px; font-weight: 700; letter-spacing: 1px; color: var(--muted); }
.rr-example .badge { font-size: 10px; padding: 6px 10px; }
.rr-example__panels { display: grid; }
.rr-example-panel { grid-area: 1 / 1; min-width: 0; visibility: hidden; opacity: 0; transition: opacity .3s ease; }
.rr-example-panel.is-current { visibility: visible; opacity: 1; }
.rr-example h2 { font-size: clamp(20px, 1.6vw, 25px); line-height: 1.3; letter-spacing: -.6px; margin: 22px 0; }
.rr-answer { display: flex; gap: 10px; align-items: center; padding: 12px 10px; margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; line-height: 1.45; font-weight: 650; }
.rr-answer__letter { font-size: 11px; color: var(--muted); font-weight: 500; }
.rr-answer--correct { background: #edf6f0; border-color: #7da28b; }
.rr-answer b { flex-shrink: 0; margin-left: auto; display: grid; place-items: center; border-radius: 50%; width: 20px; height: 20px; color: white; background: var(--green); }
/* Account for the overlap in the grid so the visible group meets the content's right edge. */
.rr-carousel { position: relative; z-index: 1; min-width: 0; width: var(--rr-image-size); height: max(clamp(520px, 43vw, 780px), calc(var(--rr-image-size) * 2.5)); transform: translateX(calc(-1 * var(--rr-overlap))); }
.rr-scenario { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; padding: 0; border: 4px solid white; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 30px #10241b18; margin: 0; background: #d6e1c9; cursor: pointer; font: inherit; transition: transform .85s cubic-bezier(.22,.61,.36,1), opacity .45s ease; }
.rr-scenario picture { display: block; width: 100%; height: 100%; }
.rr-scenario img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.rr-scenario__caption { position: absolute; right: 8px; top: 8px; color: white; background: #173b2bed; padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: 650; }
.rr-scenario.is-down-1 .rr-scenario__caption, .rr-scenario.is-down-2 .rr-scenario__caption { top: auto; bottom: 8px; }
.rr-scenario.is-up-1 { z-index: 3; opacity: 1; transform: translate(-50%, -133%) scale(.88) rotate(2deg); }
.rr-scenario.is-centre { z-index: 5; opacity: 1; transform: translate(-50%, -50%) rotate(-1deg); box-shadow: 0 18px 34px #10241b22; }
.rr-scenario.is-down-1 { z-index: 3; opacity: 1; transform: translate(-50%, 33%) scale(.88) rotate(1.5deg); }
.rr-scenario.is-up-2 { z-index: 1; opacity: 0; pointer-events: none; transform: translate(-50%, -148%) scale(.76) rotate(-2deg); }
.rr-scenario.is-down-2 { z-index: 1; opacity: 0; pointer-events: none; transform: translate(-50%, 48%) scale(.76) rotate(-1.5deg); }
.rr-carousel-controls { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; font-size: 11px; color: var(--muted); }
.rr-carousel-controls[hidden] { display: none; }
.rr-carousel-controls button { padding: 8px 0; border: 0; background: none; color: var(--green-dark); font: inherit; font-weight: 700; cursor: pointer; }
.rr-carousel-controls button:hover { text-decoration: underline; }
.rr-carousel-controls [data-pause] { margin-left: auto; }
.rr-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 1600px) and (min-height: 850px) {
    .rr-carousel { height: max(clamp(660px, 42vw, 780px), calc(var(--rr-image-size) * 2.7)); }
    .rr-scenario.is-up-1 { transform: translate(-50%, -100%) scale(.88) rotate(2deg); }
    .rr-scenario.is-down-1 { transform: translate(-50%, 0%) scale(.88) rotate(1.5deg); }
    .rr-scenario.is-up-2, .rr-scenario.is-down-2 { opacity: 1; pointer-events: auto; }
}
@media (max-width: 1179px) {
    .rr-hero__inner { grid-template-columns: 1fr; min-height: 650px; padding-block: 64px 210px; }
    .rr-hero__visual { display: none; }
    .rr-hero__copy { max-width: 650px; }
    .rr-desktop-break { display: none; }
    .rr-hero h1 { font-size: clamp(48px, 6vw, 68px); }
    .rr-hero .rr-lead { max-width: 600px; }
}
.rr-section { padding-block: 90px; }
.rr-section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: end; margin-bottom: 44px; }
.rr-section-heading > p { color: var(--muted); margin: 0; max-width: 540px; font-size: 16px; }
.rr-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 42px; }
.rr-benefit { border-top: 1px solid #cdd8cc; padding-top: 24px; }
.rr-benefit h3 { margin: 0 0 14px; }
.rr-benefit p { margin: 0; font-size: 15px; color: var(--muted); max-width: 360px; }
.rr-audiences { background: #ecefe5; border-block: 1px solid #dfe4d8; padding-block: 72px; }
.rr-audience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rr-audience { display: flex; flex-direction: column; align-items: start; background: #fafbf7; border: 1px solid #d6dfcf; border-radius: 10px; padding: 28px 24px 24px; text-decoration: none; color: var(--ink); transition: background .18s, border-color .18s, transform .18s; }
.rr-audience:hover { background: white; border-color: #6b9078; transform: translateY(-3px); }
.rr-audience h3 { font-size: 19px; margin: 0 0 12px; }
.rr-audience p { font-size: 14px; color: var(--muted); margin: 0 0 26px; }
.rr-audience > span { width: 100%; border-top: 1px solid #dfe5d9; padding-top: 18px; margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; font-weight: 750; color: var(--green-dark); }
.rr-juniors { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.rr-juniors__image { margin: 0; position: relative; overflow: hidden; border-radius: 12px; background: #d2ddc5; aspect-ratio: 1.1; }
.rr-juniors__image img { width: 100%; height: 100%; object-fit: cover; }
.rr-juniors__copy > p:not(.eyebrow) { font-size: 16px; color: var(--muted); }
.rr-juniors__copy h2 { margin-bottom: 24px; }
.rr-faq { display: grid; grid-template-columns: .75fr 1.25fr; gap: 90px; padding-block: 10px 90px; }
.rr-faq > div > p:not(.eyebrow) { color: var(--muted); font-size: 15px; }
.rr-faq details { border-top: 1px solid #cdd8cc; }
.rr-faq details:last-child { border-bottom: 1px solid #cdd8cc; }
.rr-faq summary { position: relative; list-style: none; cursor: pointer; padding: 23px 34px 23px 0; font-weight: 650; font-size: 16px; line-height: 1.5; }
.rr-faq summary::-webkit-details-marker { display: none; }
.rr-faq summary::after { content: '+'; position: absolute; right: 2px; top: 22px; font-size: 22px; color: var(--green); font-weight: 400; }
.rr-faq details[open] summary::after { content: '−'; }
.rr-faq details p { margin: 0 25px 25px 0; color: var(--muted); font-size: 15px; }
.rr-closing { background: #163e2d; color: #fff; padding-block: 60px; }
.rr-closing .eyebrow { color: #d4e7a0; }
.rr-closing__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.rr-closing__inner > div:last-child { display: grid; gap: 18px; justify-items: center; }
.rr-closing .button { color: var(--ink); background: var(--lime); border-color: var(--lime); min-width: 220px; }
.rr-closing .rr-text-link { color: #e0e9db; font-size: 13px; }
.rr-closing a:focus-visible { outline-color: var(--lime); }
@media (max-width: 1150px) {
    .rr-section-heading, .rr-juniors, .rr-faq { gap: 50px; }
    .rr-audience-grid, .rr-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
    .rr-container { width: calc(100% - 48px); }
    .rr-hero__inner { grid-template-columns: 1fr; gap: 0; padding-block: 48px 180px; }
    .rr-hero__copy { max-width: 650px; }
    .rr-hero h1 { font-size: clamp(46px, 7vw, 64px); letter-spacing: -2.8px; }
    .rr-desktop-break { display: none; }
    .rr-hero .rr-lead { max-width: 600px; font-size: 18px; }
    .rr-section { padding-block: 60px; }
    .rr-section-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 34px; }
    .rr-benefits { gap: 24px; }
    .rr-juniors { gap: 30px; }
    .rr-juniors__image { aspect-ratio: .8; }
    .rr-faq { grid-template-columns: 1fr; gap: 20px; padding-bottom: 60px; }
    .rr-faq h2 br { display: none; }
    .rr-closing__inner { align-items: start; }
}
@media (max-width: 560px) {
    .rr-container { width: calc(100% - 40px); }
    .rr-hero__inner { padding-top: 38px; }
    .rr-hero h1 { font-size: clamp(41px, 11.2vw, 58px); }
    .rr-hero .rr-lead { font-size: 16px; }
    .rr-hero .actions { gap: 18px; }
    .rr-hero .button { padding-inline: 18px; gap: 12px; }
    .rr-hero .rr-text-link { font-size: 13px; gap: 8px; }
    .rr-hero__landscape { height: 300px; background-position: left bottom; }
    .rr-section-heading h2 br { display: none; }
    .rr-benefits { grid-template-columns: 1fr; gap: 28px; }
    .rr-benefit p { max-width: none; }
    .rr-audiences { padding-block: 48px; }
    .rr-audience-grid { grid-template-columns: 1fr; gap: 12px; }
    .rr-audience { padding: 24px; }
    .rr-audience p { margin-bottom: 20px; }
    .rr-audience > span { font-size: 13px; }
    .rr-juniors { grid-template-columns: 1fr; }
    .rr-juniors__image { aspect-ratio: 1.2; }
    .rr-faq summary { font-size: 15px; }
    .rr-closing__inner { flex-direction: column; gap: 28px; }
    .rr-closing h2 { font-size: 32px; }
    .rr-closing__inner > div:last-child { justify-items: start; }
}
@media (prefers-reduced-motion: reduce) { .rr-audience, .rr-scenario, .rr-example-panel { transition: none; } .rr-audience:hover { transform: none; } }
