/* ============================================
   ENCODIUS - Component Styles
   Buttons, Forms, Cards, Tabs
   ============================================ */

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, #2F6FED, #1D4ED8);
    color: #FFFFFF;
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.3);
}

.btn--primary:hover {
    color: #FFFFFF;
    box-shadow: 0 12px 28px rgba(29, 78, 216, 0.42);
    transform: translateY(-1px);
}

.btn--ghost-dark {
    background: transparent;
    color: var(--dark-ink);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn--ghost-dark:hover {
    border-color: var(--dark-ink-muted);
    color: var(--dark-ink-muted);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

.btn:focus-visible {
    outline-offset: 3px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    display: grid;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-muted);
}

.form-input {
    width: 100%;
    padding: 13px 14px;
    font-size: 16px;
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-input::placeholder {
    color: var(--ink-faint);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.form-input--textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form {
    display: grid;
    gap: 18px;
}

.form-privacy {
    margin: -4px 4px 0;
    color: var(--ink-faint);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.form-privacy a {
    font-weight: 600;
}

.form-status {
    text-align: left;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: none;
    margin-top: 4px;
}

.form-status.success {
    display: block;
    background: #E9F5EE;
    color: #12734B;
    border: 1px solid #C7E6D4;
}

.form-status.error {
    display: block;
    background: #FCECEC;
    color: #C62B2B;
    border: 1px solid #F3C9C9;
}

/* ============================================
   FRAME - screenshot / image panel
   ============================================ */
.frame {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(12, 16, 23, 0.04);
}

.frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================
   STATUS DOT
   ============================================ */
.status-line {
    margin-top: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--ink-muted);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    animation: encodiusPulse 2.6s ease-in-out infinite;
}

@keyframes encodiusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.82); }
}

@media (prefers-reduced-motion: reduce) {
    .status-dot { animation: none; }
}

/* ============================================
   TEAM
   ============================================ */
.team-member__photo {
    aspect-ratio: 4 / 5;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-inset);
}

.team-member__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}

.team-member__name {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 16px;
}

.team-member__role {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-muted);
    margin-top: 4px;
}

/* ============================================
   HOW IT WORKS - interactive step tabs + crossfade media
   ============================================ */
.how-media {
    margin-top: 56px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 30px 70px rgba(10, 24, 50, 0.14);
    position: relative;
    /* All four screenshots are exported at 3200x1960, so the window matches
       them exactly: no letterboxing, no cropping, and the frame never
       changes size between steps. Keep this in sync if the exports change. */
    aspect-ratio: 80 / 49;
    background: var(--dark-bg);
}

.how-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease;
}

.how-media img.is-active {
    opacity: 1;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
    margin-top: 20px;
}

.how-step {
    /* Buttons vertically centre their content box when stretched, which
       left the numbers sitting at a different height in every card.
       Column flex pins the content to the top instead. */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: var(--ink);
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.how-step__number {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 12px;
    background: var(--accent-bg);
    color: var(--accent);
}

.how-step__title {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.how-step__desc {
    /* Takes the leftover height so every card ends level */
    flex: 1 1 auto;
    font-size: 13px;
    opacity: 0.75;
    margin-top: 4px;
    line-height: 1.4;
}

.how-step.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
    box-shadow: 0 12px 28px rgba(29, 78, 216, 0.28);
}

.how-step.is-active .how-step__number {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

/* Share one set of row tracks across all four cards, so the number,
   title and description bands each line up horizontally even when a
   title wraps to two lines in one card and not the others. Flex above
   is the fallback where subgrid is unavailable. */
@supports (grid-template-rows: subgrid) {
    @media (min-width: 1101px) {
        .how-steps {
            grid-template-rows: auto auto 1fr;
            row-gap: 0;
        }

        .how-step {
            display: grid;
            grid-template-rows: subgrid;
            grid-row: span 3;
        }
    }
}

/* ============================================
   COMPONENTS RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .how-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .how-steps {
        grid-template-columns: minmax(0, 1fr);
    }
    .team-member__photo {
        aspect-ratio: 1;
    }
}
