/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green-primary: #7DC242;
    --green-dark:    #1A5C2A;
    --green-mid:     #2E8B4A;
    --text-dark:     #1a1a1a;
    --text-mid:      #4a4a4a;
    --bg-light:      #f8f9fa;
    --border:        #e0e0e0;
    --white:         #ffffff;
    --radius:        8px;
    --shadow:        0 2px 12px rgba(0,0,0,0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.6;
}

/* ---- Header ---- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: var(--green-dark);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.header-logo-img {
    height: 36px;
    width: 36px;
}

.header-logo-text {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-nav {
    display: flex;
    gap: 28px;
}

.header-nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--green-primary);
}

/* ---- Hero ---- */
.hero {
    padding: 100px 24px 72px;
    background: linear-gradient(135deg, var(--green-dark) 0%, #2a7a40 100%);
    color: var(--white);
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
}

.hero-sub {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.error-banner {
    background: rgba(255,255,255,0.15);
    border-left: 4px solid #ff6b6b;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.95rem;
    margin-top: 8px;
}

/* ---- Form card ---- */
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    color: var(--text-dark);
}

.form-card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--green-dark);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-mid);
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(125,194,66,0.18);
}

.field-error {
    display: block;
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 4px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.btn-primary:hover {
    background: var(--green-mid);
}

.form-note {
    font-size: 0.8rem;
    color: var(--text-mid);
    margin-top: 12px;
}

.form-note a {
    color: var(--green-mid);
    text-decoration: none;
}

.form-note a:hover {
    text-decoration: underline;
}

/* ---- Registering / loading state ---- */
.registering-state {
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center;
    color: var(--text-dark);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.registering-state p {
    margin-top: 24px;
    font-size: 0.95rem;
    color: var(--text-mid);
}

.loader {
    border: 4px solid #e0e0e0;
    border-top: 4px solid var(--green-primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---- Ribbon screenshot ---- */
.ribbon-section {
    background: var(--green-dark);
    padding: 60px 24px;
}

.ribbon-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.ribbon-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.ribbon-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
}

.ribbon-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ---- Features ---- */
.features-section {
    padding: 80px 24px;
    background: var(--white);
}

.features-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    display: block;
    text-align: center;
    padding: 32px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.feature-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.feature-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.6;
}

/* ---- Install section ---- */
.install-section {
    padding: 80px 24px;
    background: var(--bg-light);
}

.install-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.install-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.install-step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--green-primary);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.step-img {
    width: 100%;
    max-width: 240px;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.install-step p {
    font-size: 0.875rem;
    color: var(--text-mid);
}

/* ---- Footer ---- */
.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.8);
    padding: 32px 24px;
    text-align: center;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-inner > p {
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--green-primary);
}

/* ---- Legal / EULA / Attribution pages ---- */
.legal-section {
    padding: 100px 24px 80px;
    background: var(--white);
}

.legal-inner {
    max-width: 800px;
    margin: 0 auto;
}

.legal-inner h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--text-mid);
    margin-bottom: 32px;
}

.legal-inner h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-top: 40px;
    margin-bottom: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.legal-inner h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 24px;
    margin-bottom: 8px;
}

.legal-inner p {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.75;
    margin-bottom: 12px;
}

.legal-inner ul {
    padding-left: 24px;
    margin-bottom: 12px;
}

.legal-inner ul li {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.75;
    margin-bottom: 6px;
}

.legal-inner a {
    color: var(--green-mid);
    text-decoration: none;
}

.legal-inner a:hover {
    text-decoration: underline;
}

/* Attribution rows */
.attrib-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0 24px;
}

.attrib-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-mid);
}

.attrib-row img {
    flex-shrink: 0;
}

/* ---- Video pages ---- */
.video-section {
    padding: 100px 24px 80px;
    background: var(--white);
}

.video-section-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.video-section-inner h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 12px;
}

.video-section-inner > p {
    font-size: 1rem;
    color: var(--text-mid);
    margin-bottom: 32px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    margin-bottom: 28px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.btn-secondary-dark {
    display: inline-block;
    padding: 10px 22px;
    background: transparent;
    color: var(--green-dark);
    border: 2px solid var(--green-dark);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-secondary-dark:hover {
    background: var(--green-dark);
    color: var(--white);
}

/* ---- Features page ---- */
.features-hero {
    padding: 100px 24px 72px;
    background: linear-gradient(135deg, var(--green-dark) 0%, #2a7a40 100%);
    color: var(--white);
    text-align: center;
}

.features-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.features-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
}

.features-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 28px;
}

.feat-detail-section {
    padding: 80px 24px;
    background: var(--white);
}

.feat-detail-inner {
    max-width: 900px;
    margin: 0 auto;
}

.feat-detail-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 32px;
    align-items: start;
    scroll-margin-top: 76px;
}

.feat-detail-icon-wrap {
    text-align: center;
    padding-top: 6px;
}

.feat-detail-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.feat-detail-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 14px;
}

.feat-detail-content p {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.7;
    margin-bottom: 12px;
}

.feat-bullets {
    margin-top: 12px;
    padding-left: 20px;
}

.feat-bullets li {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 6px;
}

.feat-detail-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 48px 0;
}

/* ---- Also included ---- */
.also-section {
    padding: 80px 24px;
    background: var(--bg-light);
}

.also-inner {
    max-width: 900px;
    margin: 0 auto;
}

.also-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.also-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
}

.also-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 14px;
}

.also-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 10px;
}

.also-card p {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.6;
}

/* ---- Features page bottom CTA ---- */
.features-cta-section {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--green-dark) 0%, #2a7a40 100%);
    color: var(--white);
    text-align: center;
}

.features-cta-inner {
    max-width: 640px;
    margin: 0 auto;
}

.features-cta-inner h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.features-cta-inner p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 28px;
}

.features-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

/* ---- Email sent confirmation ---- */
.confirm-section {
    padding: 100px 24px 80px;
    background: linear-gradient(135deg, var(--green-dark) 0%, #2a7a40 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.confirm-inner {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

.confirm-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    text-align: center;
}

.confirm-icon {
    width: 72px;
    height: 72px;
    max-width: 72px;
    object-fit: contain;
    margin-bottom: 20px;
}

.confirm-card h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 20px;
}

.confirm-card p {
    font-size: 0.95rem;
    color: var(--text-mid);
    margin-bottom: 14px;
    line-height: 1.6;
}

.confirm-help {
    font-size: 0.875rem !important;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-top: 8px;
}

.confirm-help a {
    color: var(--green-mid);
    text-decoration: none;
}

.confirm-help a:hover {
    text-decoration: underline;
}

.confirm-sign {
    font-size: 0.9rem !important;
    color: var(--text-dark) !important;
    margin-top: 8px;
}

.confirm-sign span {
    font-size: 0.8rem;
    color: var(--text-mid);
}

/* ---- About / index.html ---- */
.about-section {
    padding: 100px 24px 80px;
    background: linear-gradient(135deg, var(--green-dark) 0%, #2a7a40 100%);
    color: var(--white);
}

.about-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    max-width: 720px;
}

.about-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
}

.about-content p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.about-cta {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
    width: auto;
    padding: 12px 24px;
}

.tsemed-logo-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: 12px;
}

/* ---- Staff section ---- */
.staff-section {
    padding: 80px 24px;
    background: var(--white);
}

.staff-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.staff-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.staff-photo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.staff-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 4px;
}

.staff-role {
    font-size: 0.85rem;
    color: var(--green-mid);
    font-weight: 600;
    margin-bottom: 10px;
}

.staff-info p {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.6;
}

.staff-info a {
    color: var(--green-mid);
    text-decoration: none;
}

.staff-info a:hover {
    text-decoration: underline;
}

/* ---- Contact section ---- */
.contact-section {
    padding: 80px 24px;
    background: var(--bg-light);
}

.contact-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.contact-details {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-details p {
    font-size: 1rem;
    color: var(--text-mid);
}

.contact-details a {
    color: var(--green-mid);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .install-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .feat-detail-card {
        grid-template-columns: 1fr;
    }

    .feat-detail-icon-wrap {
        text-align: left;
    }

    .also-grid {
        grid-template-columns: 1fr;
    }

    .about-inner {
        grid-template-columns: 1fr;
    }

    .tsemed-logo-img {
        width: 120px;
        height: 120px;
    }

    .staff-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 16px 48px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .install-steps {
        grid-template-columns: 1fr;
    }

    .header-nav {
        gap: 14px;
    }

    .header-nav a {
        font-size: 0.85rem;
    }

    .staff-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .confirm-section {
        padding: 80px 16px 48px;
    }

    .confirm-card {
        padding: 24px 16px;
    }

    .confirm-icon {
        width: 56px;
        height: 56px;
        max-width: 56px;
    }

    .confirm-card h1 {
        font-size: 1.3rem;
    }
}
