/* ==========================================================================
   Rectangle One — homepage
   Port of the "Modern Academy Luminary" design (design/stitch_lms_homepage_redesign)
   into plain CSS. Scoped under .r1h so it cannot leak into other pages.
   Depends on the tokens in public/css/r1-theme.css.
   ========================================================================== */

.r1h {
    font-family: var(--r1-font);
    background-color: var(--r1-cream);
    color: var(--r1-ink);
}

.r1h-container {
    width: 100%;
    max-width: var(--r1-container);
    margin: 0 auto;
    padding: 0 2rem;
}

.r1h-section {
    padding: 4rem 0;
}

.r1h-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--r1-brown);
}

.r1h-h2 {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.015em;
    font-weight: 700;
    color: var(--r1-ink);
    margin: 0.5rem 0 0;
}

.r1h-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Header
   ========================================================================== */

.r1h-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: var(--r1-header-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.r1h-header-inner {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.r1h-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}



/* logo comes from Settings('logo') — see the header markup */
.r1h-brand-logo {
    height: 44px;
    width: auto;
    display: block;
}

.r1h-brand-name {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--r1-ink);
    line-height: 1.1;
}




.r1h-search {
    display: none;
    flex: 1;
    max-width: 28rem;
    margin: 0 1rem;
}

.r1h-search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--r1-surface);
    border-radius: var(--r1-radius-base);
    padding: 0.5rem 1rem;
    box-shadow: var(--r1-shadow-sm);
}

.r1h-search-box input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
    color: var(--r1-ink);
}

.r1h-search-box input::placeholder { color: var(--r1-warm-gray); }

.r1h-nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.r1h-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--r1-text-variant);
    text-decoration: none;
    transition: color 0.15s ease;
}

.r1h-nav a:hover { color: var(--r1-ink); }

.r1h-nav a.is-active {
    color: var(--r1-blue);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--r1-blue);
    padding-bottom: 2px;
}

.r1h-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.r1h-icon-btn {
    position: relative;
    padding: 0.5rem;
    border-radius: var(--r1-radius-base);
    color: var(--r1-ink);
    text-decoration: none;
}

.r1h-icon-btn:hover { background: var(--r1-surface-3); }

.r1h-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: var(--r1-radius-full);
    background: var(--r1-gold-light);
    color: var(--r1-ink);
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.r1h-link-quiet {
    font-size: 14px;
    font-weight: 600;
    color: var(--r1-text-variant);
    text-decoration: none;
    white-space: nowrap;
}

.r1h-link-quiet:hover { color: var(--r1-ink); }

.r1h-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--r1-radius-full);
    background: var(--r1-primary-strong);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.r1h-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--r1-radius-base);
    font-size: 14px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.r1h-btn-primary {
    background: var(--r1-blue);
    color: #fff;
    box-shadow: 0 8px 20px -4px rgba(40, 107, 240, 0.35);
}

.r1h-btn-primary:hover { background: var(--r1-blue-deep); color: #fff; }

.r1h-btn-outline {
    background: transparent;
    border: 1.5px solid var(--r1-blue);
    color: var(--r1-blue);
}

.r1h-btn-outline:hover { background: rgba(40, 107, 240, 0.06); }

.r1h-btn-quiet {
    background: var(--r1-surface-2);
    color: var(--r1-ink);
}

.r1h-btn-quiet:hover { background: var(--r1-surface-4); }

.r1h-btn-gold {
    background: var(--r1-gold);
    color: var(--r1-ink);
}

.r1h-btn-gold:hover { background: var(--r1-gold-light); }

/* ==========================================================================
   Hero
   ========================================================================== */

.r1h-hero {
    padding: 7rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.r1h-pill-announce {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: var(--r1-radius-full);
    background: var(--r1-surface);
    box-shadow: var(--r1-shadow-sm);
    margin-bottom: 1rem;
}

.r1h-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--r1-radius-full);
    background: var(--r1-gold);
    display: inline-block;
}

.r1h-pill-announce .r1h-eyebrow { color: var(--r1-gold); }

.r1h-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
}

.r1h-hero-title {
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: var(--r1-ink);
    margin: 0 0 1rem;
}

.r1h-hero-title em {
    font-style: normal;
    color: var(--r1-blue);
}

.r1h-hero-text {
    font-size: 16px;
    line-height: 26px;
    color: var(--r1-text-variant);
    max-width: 34rem;
    margin-bottom: 1.5rem;
}

.r1h-search-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--r1-surface);
    padding: 0.375rem;
    border-radius: var(--r1-radius-xl);
    box-shadow: var(--r1-shadow-md);
    margin-bottom: 1.5rem;
}

.r1h-search-panel .r1h-search-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    padding: 0.5rem 0.75rem;
}

.r1h-search-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
    color: var(--r1-ink);
}

.r1h-search-panel input::placeholder { color: var(--r1-warm-gray); }

.r1h-search-panel select {
    border: 0;
    outline: 0;
    background: var(--r1-surface-2);
    color: var(--r1-ink);
    font-size: 12px;
    font-weight: 600;
    padding: 0.625rem 0.75rem;
    border-radius: var(--r1-radius-base);
    cursor: pointer;
}

.r1h-trust {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.r1h-avatars { display: flex; }

.r1h-avatars span,
.r1h-avatars b {
    width: 36px;
    height: 36px;
    border-radius: var(--r1-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-left: -8px;
    border: 2px solid var(--r1-page-bg);
    box-shadow: var(--r1-shadow-sm);
}

.r1h-avatars > *:first-child { margin-left: 0; }
.r1h-avatars .a-ink { background: var(--r1-panel); color: var(--r1-gold-light); }
.r1h-avatars .a-blue { background: var(--r1-primary-strong); color: #fff; }
.r1h-avatars .a-bronze { background: var(--r1-brown); color: #fff; }
.r1h-avatars .a-sky { background: var(--r1-sky); color: #003289; font-size: 11px; }

.r1h-rating-line {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 14px;
    font-weight: 700;
    color: var(--r1-ink);
}

.r1h-rating-line i { color: var(--r1-gold-light); }

/* ==========================================================================
   Featured slider
   ========================================================================== */

.r1h-slider {
    position: relative;
    background: var(--r1-surface);
    border-radius: var(--r1-radius-lg);
    box-shadow: var(--r1-shadow-xl);
    overflow: hidden;
}

.r1h-slider-track {
    height: 4px;
    background: var(--r1-surface-2);
}

.r1h-slider-progress {
    height: 100%;
    width: 33.33%;
    background: var(--r1-blue);
    transition: width 0.3s ease;
}

.r1h-slide {
    display: none;
    padding: 1.5rem;
}

.r1h-slide.is-active { display: block; }

.r1h-slide-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.r1h-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--r1-radius-full);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.r1h-tag-gold { background: #ffdea6; color: #271900; }
.r1h-tag-muted { background: var(--r1-surface-3); color: var(--r1-ink); font-weight: 700; }

.r1h-slide-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--r1-ink);
    letter-spacing: -0.015em;
}

.r1h-slide-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.r1h-slide-title {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--r1-ink);
    margin: 0 0 0.25rem;
}

.r1h-slide-text {
    font-size: 14px;
    line-height: 22px;
    color: var(--r1-text-variant);
    margin-bottom: 1rem;
}

.r1h-instructor-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--r1-radius-base);
    background: var(--r1-surface-3);
    margin-bottom: 1rem;
}

.r1h-instructor-chip .r1h-chip-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--r1-radius-base);
    background: var(--r1-panel);
    color: var(--r1-gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.r1h-chip-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--r1-ink);
}

.r1h-chip-role {
    display: block;
    font-size: 13px;
    color: var(--r1-text-variant);
}

.r1h-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.r1h-metrics-row .r1h-eyebrow { color: var(--r1-outline); }

.r1h-metric-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--r1-ink);
}

.r1h-preview {
    position: relative;
    border-radius: var(--r1-radius-base);
    overflow: hidden;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--r1-panel);
}

.r1h-preview-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.r1h-preview-scrim {
    position: absolute;
    inset: 0;
    background: rgba(42, 37, 37, 0.4);
}

.r1h-play {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: var(--r1-radius-full);
    background: var(--r1-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    box-shadow: var(--r1-shadow-md);
    transition: transform 0.15s ease;
}

.r1h-play:hover { transform: scale(1.05); background: var(--r1-primary-strong); }

.r1h-preview-time {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(42, 37, 37, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.r1h-slide-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.r1h-slide-actions .r1h-actions-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.r1h-note {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 13px;
    color: var(--r1-text-variant);
}

.r1h-slider-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: var(--r1-hairline);
}

.r1h-slider-nav .r1h-nav-btns { display: flex; gap: 0.5rem; }

.r1h-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r1-radius-full);
    border: 1px solid var(--r1-outline-variant);
    background: transparent;
    color: var(--r1-ink);
    cursor: pointer;
}

.r1h-nav-btn:hover { background: var(--r1-surface-2); }

.r1h-slide-count {
    font-size: 13px;
    color: var(--r1-text-variant);
}

/* ==========================================================================
   Value props / metrics bar
   ========================================================================== */

.r1h-valueprops {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.r1h-valueprop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.r1h-valueprop-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r1-radius-base);
    background: rgba(40, 107, 240, 0.1);
    color: var(--r1-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.r1h-valueprop h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--r1-ink);
}

.r1h-valueprop p {
    margin: 0;
    font-size: 13px;
    color: var(--r1-text-variant);
}

/* ==========================================================================
   Categories
   ========================================================================== */

.r1h-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.r1h-cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    padding: 1.5rem;
    border-radius: var(--r1-radius-lg);
    background: var(--r1-surface);
    border: var(--r1-hairline);
    box-shadow: var(--r1-shadow-md);
    color: var(--r1-ink);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.r1h-cat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--r1-shadow-lg);
    color: var(--r1-ink);
    text-decoration: none;
}

.r1h-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r1-radius-base);
    background: var(--r1-surface-3);
    color: var(--r1-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.r1h-cat-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--r1-ink);
}

.r1h-cat-count {
    font-size: 13px;
    color: var(--r1-blue-muted);
}

/* ==========================================================================
   Course cards
   ========================================================================== */

.r1h-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.r1h-filter {
    padding: 0.5rem 1rem;
    border-radius: var(--r1-radius-full);
    border: 1px solid var(--r1-outline-variant);
    background: transparent;
    color: var(--r1-text-variant);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.r1h-filter.is-active {
    background: var(--r1-panel);
    border-color: var(--r1-ink);
    color: #fff;
}

.r1h-course-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.r1h-course-card {
    display: flex;
    flex-direction: column;
    background: var(--r1-surface);
    border: var(--r1-hairline);
    border-radius: var(--r1-radius-lg);
    overflow: hidden;
    box-shadow: var(--r1-shadow-md);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.r1h-course-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--r1-shadow-lg);
}

.r1h-course-thumb {
    position: relative;
    height: 170px;
    background-color: var(--r1-panel);
    background-size: cover;
    background-position: center;
}

.r1h-course-price {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--r1-radius-base);
    background: var(--r1-panel);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.r1h-course-flag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--r1-radius-full);
    background: var(--r1-gold);
    color: var(--r1-ink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.r1h-course-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;
}

.r1h-course-body h3 {
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
    margin: 0.375rem 0 0.5rem;
    color: var(--r1-ink);
}

.r1h-course-stars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 13px;
    color: var(--r1-gold);
    margin-bottom: 0.75rem;
}

.r1h-course-stars span { color: var(--r1-text-variant); }

.r1h-course-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: var(--r1-hairline);
    font-size: 12px;
    color: var(--r1-blue-muted);
}

.r1h-course-meta .r1h-btn { margin-left: auto; padding: 0.5rem 0.875rem; font-size: 12px; }

/* ==========================================================================
   Instructors
   ========================================================================== */

.r1h-instructor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.r1h-instructor-card {
    background: var(--r1-surface);
    border: var(--r1-hairline);
    border-radius: var(--r1-radius-lg);
    overflow: hidden;
    box-shadow: var(--r1-shadow-md);
}

.r1h-instructor-media {
    height: 220px;
    background: var(--r1-panel);
    color: var(--r1-gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
}

.r1h-instructor-body { padding: 1.25rem; }

.r1h-instructor-body h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
    color: var(--r1-ink);
}

.r1h-instructor-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: var(--r1-hairline);
    font-size: 13px;
    color: var(--r1-blue-muted);
}

.r1h-featured-instructor {
    background: var(--r1-panel);
    border-radius: var(--r1-radius-lg);
    padding: 2rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.r1h-featured-instructor h3 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.r1h-featured-instructor p { color: var(--r1-warm-gray); margin: 0; }

.r1h-featured-instructor .r1h-eyebrow { color: var(--r1-gold-light); }

/* ==========================================================================
   Testimonials
   ========================================================================== */

.r1h-testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.r1h-testimonial {
    background: var(--r1-surface);
    border: var(--r1-hairline);
    border-radius: var(--r1-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--r1-shadow-md);
}

.r1h-testimonial .r1h-quote {
    font-size: 14px;
    line-height: 22px;
    color: var(--r1-text-variant);
    margin-bottom: 1rem;
}

.r1h-testimonial-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: var(--r1-hairline);
}

.r1h-testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--r1-radius-full);
    background: var(--r1-surface-3);
    color: var(--r1-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ==========================================================================
   Become an instructor
   ========================================================================== */

.r1h-cta {
    position: relative;
    background: var(--r1-panel);
    border-radius: var(--r1-radius-xl);
    padding: 3rem 2rem;
    color: #fff;
    overflow: hidden;
}

.r1h-cta h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #fff;
    margin: 0.5rem 0 1rem;
    max-width: 40rem;
}

.r1h-cta p { color: var(--r1-warm-gray); max-width: 36rem; }

.r1h-cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.r1h-cta-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.r1h-cta-stats .r1h-eyebrow { color: var(--r1-gold-light); }

.r1h-cta-stats strong {
    display: block;
    font-size: 22px;
    color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 576px) {
    .r1h-search-panel { flex-direction: row; align-items: center; }
    .r1h-cat-grid { grid-template-columns: repeat(2, 1fr); }
    .r1h-course-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .r1h-slide-grid { grid-template-columns: 7fr 5fr; }
    .r1h-valueprops { grid-template-columns: repeat(4, 1fr); }
    .r1h-nav { display: flex; }
    .r1h-link-quiet { display: inline-flex; }
    .r1h-instructor-grid { grid-template-columns: repeat(2, 1fr); }
    .r1h-testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .r1h-hero-grid { grid-template-columns: 5fr 7fr; }
    .r1h-search { display: block; }
    .r1h-cat-grid { grid-template-columns: repeat(3, 1fr); }
    .r1h-course-grid { grid-template-columns: repeat(4, 1fr); }
    .r1h-instructor-grid { grid-template-columns: repeat(2, 1fr); }
    .r1h-testimonial-grid { grid-template-columns: repeat(3, 1fr); }
    .r1h-cta { padding: 3.5rem 3rem; }
}

@media (min-width: 1200px) {
    .r1h-instructor-grid { grid-template-columns: 5fr 7fr; }
}

@media (max-width: 767px) {
    .r1h-hero-title { font-size: 32px; line-height: 40px; }
    .r1h-h2 { font-size: 26px; line-height: 34px; }
    .r1h-slide-title { font-size: 26px; line-height: 34px; }
    .r1h-slide-price { font-size: 26px; }
    .r1h-section { padding: 2.5rem 0; }
    .r1h-container { padding: 0 1rem; }
}

/* ==========================================================================
   Header account menu (signed-in only)
   ========================================================================== */

.r1h-avatar {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: var(--r1-radius-full);
    background: var(--r1-primary-strong);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.r1h-avatar-img {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.r1h-user { position: relative; }

.r1h-user-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 190px;
    padding: 0.375rem;
    background: var(--r1-surface);
    border: var(--r1-hairline);
    border-radius: var(--r1-radius-base);
    box-shadow: var(--r1-shadow-xl);
    display: none;
    z-index: 1040;
}

.r1h-user:hover .r1h-user-menu,
.r1h-user:focus-within .r1h-user-menu { display: block; }

.r1h-user-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--r1-radius-base);
    font-size: 13px;
    font-weight: 500;
    color: var(--r1-text);
    text-decoration: none;
}

.r1h-user-menu a:hover { background: var(--r1-surface-2); color: var(--r1-text); }

/* keep the header from wrapping on narrow screens */
@media (max-width: 767px) {
    .r1h-hide-sm { display: none !important; }
}

/* ==========================================================================
   Polish pass — touch targets, focus visibility, motion
   ========================================================================== */

/* Minimum 44x44px touch targets for interactive controls */
.r1h-btn,
.r1h-icon-btn,
.r1h-filter,
.r1h-nav-btn {
    min-height: 44px;
}

.r1h-icon-btn {
    min-width: 44px;
}

.r1h-link-quiet {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* Visible focus ring for keyboard users */
.r1h-btn:focus-visible,
.r1h-icon-btn:focus-visible,
.r1h-filter:focus-visible,
.r1h-nav a:focus-visible,
.r1h-nav-btn:focus-visible,
.r1h-course-card:focus-visible,
.r1h-user-menu a:focus-visible {
    outline: 3px solid var(--r1-sky);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .r1h-btn,
    .r1h-icon-btn,
    .r1h-filter,
    .r1h-course-card {
        transition: none;
    }

    .r1h-course-card:hover {
        transform: none;
    }
}
