:root {
    --color-primary: #1A237E;
    /* Deep navy blue */
    --color-accent: #00BCD4;
    /* Vibrant cyan */
    --color-bg: #F5F5F5;
    /* Light gray */
    --color-text: #0F172A;
    /* Slate-900 */
    --color-text-muted: #475569;
    /* Slate-600 */
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(26, 35, 126, 0.15);
    --max-width: 1160px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Account for fixed header */
main {
    padding-top: 64px;
}

@media (max-width: 768px) {
    main {
        padding-top: 60px;
    }
}

@media (max-width: 640px) {
    main {
        padding-top: 56px;
    }
}

.container {
    max-width: var(--max-width);
    padding: 0 20px;
    margin: 0 auto;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(245, 245, 245, 0.8);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid rgba(2, 6, 23, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), #283593);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    font-weight: 700;
    font-size: 20px;
    color: var(--color-primary);
}

.brand-app {
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text-muted);
}

.nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
}

.nav a:hover {
    color: var(--color-primary);
}

/* Mobile nav toggle */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(2, 6, 23, 0.08);
    background: #fff;
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--color-text);
    display: block;
    position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--color-text);
}

.menu-toggle span::before {
    top: -6px;
}

.menu-toggle span::after {
    top: 6px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--color-accent);
    color: #003A44;
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    color: var(--color-primary);
    background: transparent;
    border: 1px solid rgba(26, 35, 126, 0.25);
}

.btn-small {
    padding: 8px 12px;
    font-weight: 600;
    border: 1px solid rgba(26, 35, 126, 0.2);
    color: var(--color-primary);
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

/* Hero */
.hero {
    position: relative;
    overflow: clip;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(0, 188, 212, 0.20), transparent 60%),
        radial-gradient(1000px 500px at 20% 0%, rgba(26, 35, 126, 0.12), transparent 55%),
        var(--color-bg);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    padding: 80px 0 60px;
}

.hero-copy h1 {
    font-size: 40px;
    line-height: 1.15;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    color: #0B1029;
}

.hero-copy .subheadline {
    color: var(--color-text-muted);
    font-size: 18px;
    margin: 0 0 24px 0;
}

.cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-art {
    min-height: 320px;
    border-radius: var(--radius);
    background:
        radial-gradient(120px 120px at 20% 30%, rgba(0, 188, 212, .3), transparent 60%),
        radial-gradient(160px 160px at 70% 60%, rgba(26, 35, 126, .25), transparent 65%),
        linear-gradient(140deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .4));
    border: 1px solid rgba(26, 35, 126, 0.18);
    box-shadow: var(--shadow-md);
}

/* Ensure hero image fills container and inherits rounding/shadow */
.hero-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.section,
#home,
#about,
#features,
#contact {
    scroll-margin-top: 90px;
}

/* Sections */
.section {
    padding: 72px 0;
}

.section-title {
    font-size: 28px;
    margin: 0 0 12px 0;
    letter-spacing: -0.01em;
}

.lead {
    font-size: 18px;
    color: var(--color-text-muted);
    max-width: 72ch;
}

/* Features */
.section-features .feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
    margin: 38px 0;
}

/* Explicit alternating layout */
.section-features .feature .feature-copy {
    grid-column: 1;
}

.section-features .feature .feature-media {
    grid-column: 2;
}

.section-features .feature-alt .feature-copy {
    grid-column: 2;
}

.section-features .feature-alt .feature-media {
    grid-column: 1;
}

.feature-copy h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
}

.feature-copy p {
    margin: 0;
    color: var(--color-text-muted);
}

.feature-media.placeholder {
    height: 260px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.08), rgba(0, 188, 212, 0.08));
    border: 1px dashed rgba(2, 6, 23, 0.12);
}

/* Screenshot microanimations */
.feature-media {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    transition: transform .3s ease, box-shadow .3s ease;
    animation: floatY 6s ease-in-out infinite;
    box-shadow: var(--shadow-md);
}

.feature-media::before {
    content: '';
    position: absolute;
    inset: -20% -60% -20% -60%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, 0) 60%);
    transform: translateX(-60%) rotate(8deg);
    pointer-events: none;
    animation: sheenMove 5.5s ease-in-out infinite;
}

.feature-media:hover {
    transform: perspective(900px) rotateX(2deg) rotateY(-3deg) translateY(-2px);
    box-shadow: 0 20px 40px rgba(26, 35, 126, 0.18);
}

@keyframes floatY {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes sheenMove {
    0% {
        transform: translateX(-70%) rotate(8deg);
        opacity: .0;
    }

    20% {
        opacity: .55;
    }

    50% {
        transform: translateX(70%) rotate(8deg);
        opacity: .0;
    }

    100% {
        transform: translateX(70%) rotate(8deg);
        opacity: .0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feature-media {
        animation: none;
        transition: none;
    }

    .feature-media::before {
        animation: none;
    }
}

/* CTA */
.section-cta {
    background: linear-gradient(180deg, rgba(0, 188, 212, 0.10), rgba(26, 35, 126, 0.08));
    border-top: 1px solid rgba(2, 6, 23, 0.06);
    border-bottom: 1px solid rgba(2, 6, 23, 0.06);
}

.cta-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.cta-copy h2 {
    margin: 0 0 8px 0;
}

.cta-copy p {
    margin: 0 0 8px 0;
    color: var(--color-text-muted);
}

.muted {
    color: var(--color-text-muted);
    font-size: 15px;
}

/* Forms */
.form {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.form input,
.form textarea,
.form select {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(2, 6, 23, 0.12);
    background: #fff;
    font-family: inherit;
}

.form textarea {
    resize: vertical;
}

/* Footer */
.site-footer {
    padding: 28px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-nav {
    display: flex;
    gap: 16px;
}

.footer-nav a {
    color: var(--color-text);
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--color-primary);
}

/* Team grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.team-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid rgba(2, 6, 23, 0.06);
    box-shadow: var(--shadow-sm);
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--color-primary), #283593);
}

/* Auth */
.auth-container {
    display: grid;
    place-items: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 28px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid rgba(2, 6, 23, 0.06);
    box-shadow: var(--shadow-md);
}

.auth-form {
    display: grid;
    gap: 14px;
    margin-top: 8px;
}

.auth-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.auth-form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(2, 6, 23, 0.12);
    background: #fff;
    font-family: inherit;
}

.auth-alt {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.auth-alt a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-alt a:hover {
    text-decoration: underline;
}

.auth-link-left {
    text-align: left;
}

.auth-link-right {
    text-align: right;
}

/* Mobile responsive for auth links - merged with main 480px breakpoint below */

/* Responsive */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-art {
        min-height: 240px;
    }

    .cta-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 48px 0;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

    .section-title {
        font-size: 28px;
    }

    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    .btn-lg {
        min-height: 48px;
        padding: 14px 24px;
    }
}

@media (max-width: 640px) {
    .header-inner {
        height: 56px;
        gap: 10px;
    }

    .hero-copy h1 {
        font-size: 32px;
    }

    .section {
        padding: 40px 0;
    }

    /* Normalize alternating layout on mobile for readability */
    .section-features .feature-alt {
        direction: ltr;
    }

    .feature-media:hover {
        transform: none;
    }

    .section-features .feature {
        grid-template-columns: 1fr;
        row-gap: 24px;
    }

    .section-features .feature .feature-copy,
    .section-features .feature .feature-media {
        grid-column: auto;
    }

    .feature-media {
        min-height: 240px;
    }

    .section-features .feature:not(.feature-alt) .feature-media {
        order: -1;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: inline-flex;
        min-width: 44px;
        min-height: 44px;
    }

    .nav {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(245, 245, 245, 0.98);
        backdrop-filter: saturate(180%) blur(8px);
        border-bottom: 1px solid rgba(2, 6, 23, 0.06);
        padding: 12px 20px 16px;
        flex-direction: column;
        gap: 12px;
        z-index: 95;
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        padding: 12px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .nav .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }

    .auth-card {
        margin: 0 16px;
        padding: 24px;
    }

    .auth-form input,
    .auth-form button {
        min-height: 44px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero-copy h1 {
        font-size: 28px;
    }

    .section-title {
        font-size: 24px;
    }

    .section {
        padding: 32px 0;
    }

    .auth-card {
        margin: 0 8px;
        padding: 20px;
    }

    .brand-name {
        font-size: 18px;
    }

    .btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-lg {
        min-height: 48px;
        padding: 14px 20px;
        font-size: 16px;
    }

    .auth-alt {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .auth-link-left,
    .auth-link-right {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .site-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        display: flex;
        justify-content: center;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

}

@media (max-width: 520px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .span-2 {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .header-inner {
        gap: 6px;
    }

    .brand-name {
        font-size: 16px;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 0 8px;
    }

    .hero-copy h1 {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .auth-card {
        margin: 0 4px;
        padding: 16px;
    }

    .brand-name {
        font-size: 16px;
    }

    .btn {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Subtle animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-copy,
.feature,
.cta-inner {
    animation: fadeInUp .6s ease both;
}

/* Global adjustment for section background */
#features {
    background-color: #EEEEEE;
}

/* Desktop adjustments for spacing */
@media (min-width: 769px) {
    #about {
        padding-bottom: 30px;
    }
}

hr {
    border: none;
    /* Remove the default border */
    height: 1px;
    /* Set the thickness */
    background-color: rgba(200, 200, 200, 0.5);
    /* Light grey color */
    margin: 20px 0;
    /* Add some spacing around the line if needed */
}