/* StringFlow - public website styles. Built on the app variables in app.css. */

html { scroll-behavior: smooth; }

.site-body {
    min-height: 100%;
    background: #fff;
    color: var(--text);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: 12px;
    z-index: 1000;
    transform: translateY(-140%);
    background: var(--primary);
    color: #fff;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(228, 231, 236, .9);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    width: min(1160px, calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 18px;
    font-weight: 750;
    letter-spacing: 0;
}

.site-brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--primary-soft);
}

.site-brand__mark svg {
    width: 23px;
    height: 23px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a,
.site-login-menu__toggle {
    color: #3b4251;
    text-decoration: none;
    font-weight: 620;
    font-size: 13.5px;
    padding: 9px 11px;
    border-radius: 8px;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-login-menu__toggle:hover,
.site-login-menu.is-open .site-login-menu__toggle,
.site-login-menu:focus-within .site-login-menu__toggle {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.site-login-menu {
    position: relative;
}

.site-login-menu__toggle {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.site-login-menu__toggle span {
    font-size: 10px;
}

.site-login-menu__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 198px;
    display: none;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.site-login-menu:hover .site-login-menu__menu,
.site-login-menu:focus-within .site-login-menu__menu,
.site-login-menu.is-open .site-login-menu__menu {
    display: block;
}

.site-login-menu__menu a {
    display: block;
    padding: 10px 11px;
    white-space: nowrap;
}

.site-nav__mobile-login {
    display: none;
}

.site-nav__cta {
    color: #fff !important;
    background: var(--primary) !important;
    border: 1px solid var(--primary);
}

.site-nav__cta:hover { background: var(--primary-dark) !important; }

.site-menu {
    display: none;
    appearance: none;
    border: 1px solid var(--border);
    background: var(--surface);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.site-menu span:not(.sr-only) {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.hero {
    position: relative;
    min-height: calc(100svh - 96px);
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #f1f6ff;
    border-bottom: 1px solid var(--border);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(247, 250, 255, .72);
    z-index: 1;
}

.hero-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.scene-shell {
    position: absolute;
    right: max(-80px, -4vw);
    top: 54px;
    width: min(950px, 76vw);
    height: 540px;
    display: grid;
    grid-template-columns: 178px 1fr;
    background: #fff;
    border: 1px solid #dce4f0;
    border-radius: 8px;
    box-shadow: 0 26px 80px rgba(47, 111, 237, .18);
}

.scene-sidebar {
    padding: 24px 18px;
    border-right: 1px solid var(--border);
    background: #f8fafc;
}

.scene-logo {
    width: 92px;
    height: 16px;
    border-radius: 5px;
    background: var(--primary);
    margin-bottom: 28px;
}

.scene-sidebar span {
    display: block;
    height: 34px;
    border-radius: 8px;
    background: #edf2fb;
    margin-bottom: 11px;
}

.scene-sidebar span:first-of-type { background: var(--primary-soft); }

.scene-main { padding: 24px; }

.scene-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.scene-toolbar strong {
    font-size: 18px;
    color: #111827;
}

.scene-toolbar div {
    display: flex;
    gap: 8px;
}

.scene-toolbar span {
    width: 58px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
}

.scene-toolbar span:first-child {
    background: var(--primary);
    border-color: var(--primary);
}

.scene-calendar {
    height: 410px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.scene-calendar span {
    position: relative;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.scene-calendar span:nth-child(7n) { border-right: 0; }
.scene-calendar span:nth-last-child(-n + 7) { border-bottom: 0; }

.scene-calendar .has-lesson::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 34px;
    height: 28px;
    border-radius: 7px;
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
}

.scene-calendar b {
    position: absolute;
    z-index: 1;
    left: 16px;
    top: 40px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
}

.scene-floating {
    position: absolute;
    z-index: 2;
    width: 206px;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 18px 44px rgba(16, 24, 40, .14);
}

.scene-floating span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.scene-floating strong {
    display: block;
    font-size: 20px;
}

.scene-floating i {
    display: block;
    height: 6px;
    margin-top: 10px;
    border-radius: 6px;
    background: #edf2fb;
}

.scene-floating i:nth-of-type(2) { width: 72%; }
.scene-floating i:nth-of-type(3) { width: 52%; background: #fce7f3; }

.scene-floating--invoice {
    right: 120px;
    bottom: 58px;
}

.scene-floating--payment {
    right: 520px;
    bottom: 92px;
}

.scene-floating--payment strong {
    font-size: 16px;
    color: #15803d;
}

.hero__content {
    position: relative;
    z-index: 2;
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 76px 0 74px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 760;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: 56px;
    line-height: 1.04;
    letter-spacing: 0;
}

.hero__lead {
    max-width: 690px;
    margin: 22px 0 0;
    color: #374151;
    font-size: 20px;
    line-height: 1.55;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.btn--site {
    min-height: 44px;
    padding: 11px 17px;
    border-radius: 8px;
    font-size: 14px;
}

.btn--light {
    background: #fff;
    border-color: #d7deea;
    color: var(--text);
}

.btn--light:hover {
    background: #f8fafc;
    border-color: var(--border-strong);
}

.hero__note {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 13.5px;
}

.hero-student-link {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 13.5px;
}

.hero-student-link a {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.hero-student-link a:hover {
    text-decoration: underline;
}

.section {
    padding: 82px 0;
    background: #fff;
}

.section--intro { padding: 54px 0 72px; }
.section--soft { background: #f8fafc; }
.section--free { background: #f6f9ff; }

.section__inner {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.section__head {
    max-width: 720px;
    margin-bottom: 30px;
}

.section h2,
.legal-page h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.18;
    letter-spacing: 0;
}

.section__head p:not(.section-kicker),
.intro p,
.security p,
.free-panel p,
.legal-hero p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.intro {
    max-width: 850px;
}

.intro h2 {
    max-width: 680px;
    margin-bottom: 16px;
}

.feature-grid,
.preview-grid,
.why-grid {
    display: grid;
    gap: 14px;
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.preview,
.why-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.feature-card {
    position: relative;
    padding: 18px 18px 18px 50px;
}

.feature-card__icon {
    position: absolute;
    left: 18px;
    top: 19px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e7f6ec;
    color: #15803d;
    font-weight: 800;
    font-size: 13px;
}

.feature-card h3,
.preview h3,
.why-item h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
}

.feature-card p,
.preview p,
.why-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview {
    padding: 14px;
}

.preview-shot {
    position: relative;
    margin: 0 0 16px;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.preview-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-shot__button {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    cursor: zoom-in;
    font: inherit;
}

.preview-shot__button:focus-visible {
    outline: 3px solid rgba(47, 111, 237, .45);
    outline-offset: -4px;
}

.preview-shot__zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(17, 24, 39, .82);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .14s ease, transform .14s ease;
}

.preview-shot__button:hover .preview-shot__zoom,
.preview-shot__button:focus-visible .preview-shot__zoom {
    opacity: 1;
    transform: translateY(0);
}

.preview-shot__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(47, 111, 237, .08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(47, 111, 237, .08) 1px, transparent 1px),
        #f8fbff;
    background-size: 28px 28px;
}

.preview h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview h3 span {
    flex: 0 0 auto;
}

.screenshot-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.screenshot-lightbox[hidden] {
    display: none;
}

.screenshot-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .68);
}

.screenshot-lightbox__dialog {
    position: relative;
    width: min(1120px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .28);
}

.screenshot-lightbox__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.screenshot-lightbox__title {
    margin: 0;
    flex: 1;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.screenshot-lightbox__close {
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.screenshot-lightbox__close:hover,
.screenshot-lightbox__close:focus-visible {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.screenshot-lightbox__body {
    display: flex;
    justify-content: center;
    overflow: auto;
    padding: 14px;
    background: #f8fafc;
}

.screenshot-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 94px);
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.mock {
    height: 190px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.mock--agenda {
    padding: 14px;
}

.mock-bar {
    height: 22px;
    width: 46%;
    border-radius: 7px;
    background: var(--primary);
    margin-bottom: 12px;
}

.mock-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 35px;
    gap: 7px;
}

.mock-days span,
.mock-days b {
    display: block;
    border-radius: 7px;
    background: #edf2fb;
}

.mock-days b:nth-of-type(1) { background: var(--primary-soft); }
.mock-days b:nth-of-type(2) { background: #fce7f3; }
.mock-days b:nth-of-type(3) { background: #e7f6ec; }

.mock--invoice {
    padding: 18px;
}

.mock--invoice div {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--primary-soft);
    margin-bottom: 18px;
}

.mock--invoice span,
.mock--invoice strong,
.mock--payments span,
.mock--payments b {
    display: block;
    height: 10px;
    border-radius: 8px;
    background: #e5e7eb;
    margin-bottom: 12px;
}

.mock--invoice span:nth-of-type(1) { width: 72%; }
.mock--invoice span:nth-of-type(2) { width: 88%; }
.mock--invoice span:nth-of-type(3) { width: 58%; }
.mock--invoice strong { width: 38%; height: 16px; margin-left: auto; background: var(--primary); }

.mock--payments {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
}

.mock--payments span {
    height: 26px;
    border-radius: 8px;
}

.mock--payments span:nth-child(1) { width: 100%; background: #e7f6ec; }
.mock--payments span:nth-child(2) { width: 78%; background: var(--primary-soft); }
.mock--payments span:nth-child(3) { width: 55%; background: #fef3c7; }
.mock--payments b { width: 34%; height: 18px; margin-bottom: 0; background: #15803d; }

.why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.why-item {
    padding: 24px;
}

.focus-section {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, 1fr);
    gap: 48px;
    align-items: start;
}

.focus-copy h2 {
    margin-bottom: 16px;
}

.focus-copy p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.focus-cta {
    margin-top: 12px;
}

.section--security {
    background: #f8fafc;
}

.security {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, 1fr);
    gap: 48px;
    align-items: start;
}

.security h2 {
    margin-bottom: 16px;
}

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.check-list li {
    position: relative;
    padding: 14px 16px 14px 42px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 16px;
    top: 14px;
    color: var(--primary);
    font-weight: 800;
}

.free-panel h2,
.final-cta h2 { margin-bottom: 12px; }

.free-panel p,
.final-cta p { max-width: 780px; }

.faq {
    max-width: 900px;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.faq-list summary {
    cursor: pointer;
    padding: 18px 20px;
    font-weight: 700;
    list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
    content: "+";
    float: right;
    color: var(--primary);
    font-size: 19px;
    line-height: 1;
}

.faq-list details[open] summary::after { content: "−"; }

.faq-list p {
    margin: 0;
    padding: 0 20px 18px;
    color: var(--muted);
    line-height: 1.65;
}

.section--cta {
    background: #1f2937;
}

.final-cta {
    text-align: left;
}

.final-cta .section-kicker { color: #93c5fd; }
.final-cta h2 { color: #fff; max-width: 760px; }

.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 34px 0;
}

.site-footer__inner {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.site-brand--footer {
    margin-bottom: 10px;
}

.site-footer__brand p {
    margin: 4px 0;
    color: var(--muted);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-end;
    gap: 10px 16px;
}

.site-footer__links a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 650;
}

.site-footer__links a:hover { text-decoration: underline; }

.legal-hero {
    padding: 76px 0 48px;
    background: #f6f9ff;
    border-bottom: 1px solid var(--border);
}

.legal-hero h1 {
    margin-bottom: 12px;
    font-size: 44px;
}

.legal-content {
    max-width: 880px;
}

.legal-content article {
    padding: 26px 0;
    border-bottom: 1px solid var(--border);
}

.legal-content article:first-child { padding-top: 0; }
.legal-content article:last-child { border-bottom: 0; }

.legal-content h2 {
    font-size: 22px;
    margin: 0 0 12px;
}

.legal-content p,
.legal-content li,
.legal-content address {
    color: #4b5563;
    font-size: 16px;
    line-height: 1.72;
}

.legal-content p {
    margin: 0 0 12px;
}

.legal-content p:last-child { margin-bottom: 0; }

.legal-content address {
    font-style: normal;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.legal-content ul {
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 980px) {
    .site-menu { display: inline-flex; }

    .site-nav {
        position: absolute;
        left: 20px;
        right: 20px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow-md);
    }

    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 12px; }
    .site-login-menu { display: none; }
    .site-nav__mobile-login { display: block; }

    .hero h1 { font-size: 44px; max-width: 650px; }
    .hero__lead { font-size: 18px; max-width: 620px; }
    .scene-shell { width: 900px; right: -360px; opacity: .72; }
    .scene-floating--payment { right: 230px; }

    .feature-grid,
    .preview-grid,
    .why-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .security {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .focus-section {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 680px) {
    .site-header__inner,
    .section__inner,
    .site-footer__inner,
    .hero__content {
        width: min(100% - 28px, 1160px);
    }

    .site-header__inner { min-height: 64px; }
    .site-nav { top: 64px; left: 14px; right: 14px; }

    .hero {
        min-height: calc(100svh - 82px);
        align-items: flex-start;
    }

    .hero__content {
        padding: 56px 0 58px;
    }

    .hero h1 {
        font-size: 38px;
        line-height: 1.08;
    }

    .hero__lead {
        font-size: 17px;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn--site {
        justify-content: center;
        white-space: normal;
    }

    .scene-shell {
        top: 210px;
        right: -580px;
        opacity: .48;
    }

    .scene-floating { display: none; }

    .section {
        padding: 58px 0;
    }

    .section--intro { padding-top: 42px; }

    .section h2,
    .legal-page h1 {
        font-size: 28px;
    }

    .legal-hero h1 {
        font-size: 34px;
    }

    .feature-grid,
    .preview-grid,
    .why-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding-right: 16px;
    }

    .site-footer__inner {
        flex-direction: column;
    }

    .site-footer__links {
        justify-content: flex-start;
    }
}
