/* ===== Color + font system ===== */
:root {
    --navy: #0b2545;
    --teal: #13a89e;
    --teal-dark: #0f766e;
    --sand: #f4efe6;
    --white: #ffffff;
    --text: #1f2933;
    --radius: 12px;
    --max-width: 1100px;
    --font-body: "Inter", system-ui, sans-serif;
    --font-head: "Poppins", system-ui, sans-serif;
}

/* ===== Base ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
}

h1,
h2,
h3,
.logo {
    font-family: var(--font-head);
    letter-spacing: -0.02em;
}

a {
    color: var(--teal);
}

section {
    padding: 80px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 24px;
    text-align: center;
}

/* ===== Header / nav ===== */
header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}

.logo img {
    display: block;
    height: 50px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

nav ul a {
    color: var(--white);
    text-decoration: none;
}

nav ul a:hover {
    color: var(--teal);
}

/* ===== Hero ===== */
#hero {
    position: relative;
    overflow: hidden;
    max-width: none;
    min-height: 90vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 48px;
    text-align: left;
    padding-left: max(20px, calc((100% - var(--max-width)) / 2));
    padding-right: max(20px, calc((100% - var(--max-width)) / 2));
    color: var(--white);
    padding-top: 120px;
    padding-bottom: 160px;
    background: linear-gradient(135deg, #0b2545 0%, #134e6f 55%, #13a89e 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

.eyebrow {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    line-height: 1.1;
}

.highlight {
    background: linear-gradient(90deg, #5eead4, #a7f3d0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 620px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Soft glowing shapes */
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    z-index: 1;
    animation: float 12s ease-in-out infinite;
}

.glow-1 {
    width: 420px;
    height: 420px;
    background: #13a89e;
    top: -100px;
    left: -120px;
}

.glow-2 {
    width: 360px;
    height: 360px;
    background: #3b82f6;
    bottom: -60px;
    right: -100px;
    animation-delay: -6s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(40px, 30px);
    }
}

/* Wave divider */
.wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 2;
}

/* Respect users who turn off motion */
@media (prefers-reduced-motion: reduce) {
    .glow {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    background: var(--teal-dark);
    color: var(--white);
    padding: 14px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ===== Cards ===== */
#services,
#work {
    max-width: none;
}

#services {
    background: var(--sand);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(11, 37, 69, 0.08);
    border-top: 4px solid var(--teal);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 37, 69, 0.15);
}

.card h3 {
    color: var(--navy);
    margin-bottom: 8px;
}

.icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--navy), var(--teal));
}

.icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--white);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== Work / project showcase ===== */
.project {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.browser {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 24px 60px rgba(11, 37, 69, 0.25);
    transition: transform 0.3s ease;
}

.browser:hover {
    transform: translateY(-6px) rotate(-0.5deg);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #e5e9f0;
}

.browser-bar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f87171;
}

.browser-bar span:nth-child(2) {
    background: #fbbf24;
}

.browser-bar span:nth-child(3) {
    background: #34d399;
}

.browser-url {
    margin-left: 12px;
    flex: 1;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--white);
    font-size: 0.8rem;
    color: #64748b;
}

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

.eyebrow-dark {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
}

.project-info h3 {
    font-size: 1.8rem;
    color: var(--navy);
    margin: 8px 0 12px;
}

.project-info p {
    margin-bottom: 24px;
}

@media (max-width: 800px) {
    .project {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ===== How it works ===== */
.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    counter-reset: none;
}

.step {
    position: relative;
    text-align: center;
    padding: 24px 16px;
}

.step-num {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 50%;
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--navy), var(--teal));
    box-shadow: 0 0 0 8px rgba(19, 168, 158, 0.15);
}

.step h3 {
    color: var(--navy);
    margin-bottom: 8px;
}

/* ===== Smooth scrolling + header offset ===== */
html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 70px;
}

/* ===== Contact ===== */
#contact {
    text-align: center;
}

#contact p {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* ===== Footer ===== */
footer {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 24px 20px;
    font-size: 0.9rem;
    opacity: 0.95;
}

/* ===== Accessibility: visible keyboard focus ===== */
a:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

/* ===== Mobile menu ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 700px) {
    nav {
        position: relative;
    }

    .logo {
        white-space: nowrap;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--navy);
        text-align: center;
    }

    nav ul.open {
        display: flex;
    }

    nav ul a {
        display: block;
        padding: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Hamburger turns into an X */
    .menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ===== Contact form ===== */
.contact-form {
    max-width: 560px;
    margin: 24px auto 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.contact-form label {
    font-weight: 600;
    color: var(--navy);
    margin-top: 8px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    font: inherit;
    padding: 12px;
    border: 1px solid #cbd2d9;
    border-radius: 8px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: 3px solid var(--teal);
    border-color: var(--teal);
}

.contact-form .btn {
    border: none;
    cursor: pointer;
    margin-top: 16px;
    align-self: center;
}

/* ===== Fade in on scroll ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== Hero device mockup ===== */
.hero-visual {
    position: relative;
    z-index: 2;
    animation: float 8s ease-in-out infinite;
}

.laptop-screen {
    background: #111827;
    border-radius: 14px 14px 0 0;
    padding: 12px 12px 14px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.laptop-screen img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.laptop-base {
    height: 14px;
    margin: 0 -6%;
    background: linear-gradient(#d1d5db, #9ca3af);
    border-radius: 0 0 12px 12px;
}

.phone {
    position: absolute;
    width: 26%;
    aspect-ratio: 9 / 19;
    right: -6%;
    bottom: -12%;
    background: #111827;
    border-radius: 22px;
    padding: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
}

/* Stack on tablets and phones */
@media (max-width: 900px) {
    #hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        max-width: 480px;
        margin: 0 auto;
    }
}

.portfolio {
    padding: 80px 20px;
    text-align: center
}

.portfolio-intro {
    max-width: 560px;
    margin: 12px auto 40px
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto
}

.project-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    text-align: left
}

.project-card img {
    width: 100%;
    height: auto;
    display: block
}

.project-info {
    padding: 24px
}

.project-type {
    color: #666;
    font-size: .9rem;
    margin: 4px 0 12px
}

.project-card {
    max-width: 720px;
    margin: 0 auto
}

.project-card img {
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: top
}

@media (max-width: 600px) {
    .hero-visual {
        padding: 0 12% 10% 2%;
        animation-name: float-small;
    }

    .phone {
        right: 0;
        bottom: -4%;
    }
}

@keyframes float-small {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(14px, 10px);
    }
}

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

@media (min-width: 601px) and (max-width: 1200px) {
    .hero-visual {
        padding-right: 6%;
        animation-name: float-small;
    }

    .phone {
        right: 0;
    }
}

/* Packages */
.section-intro {
    max-width: 40rem;
    margin: 0 auto 8px;
}

.packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    max-width: var(--max-width);
    margin: 40px auto 0;
    align-items: stretch;
}

.package {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(11, 37, 69, 0.08);
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.package:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 37, 69, 0.15);
}

.package h3 {
    color: var(--navy);
    font-size: 1.4rem;
}

.price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--navy);
    margin: 8px 0 16px;
}

.price span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

.package ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}

.package li {
    padding: 8px 0 8px 28px;
    position: relative;
    border-bottom: 1px solid #eef1f5;
}

.package li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--teal);
    font-weight: 700;
}

.package .btn {
    text-align: center;
}

.package.featured {
    border: 2px solid var(--teal);
    transform: scale(1.03);
    box-shadow: 0 16px 40px rgba(11, 37, 69, 0.18);
}

.package.featured:hover {
    transform: scale(1.03) translateY(-4px);
}

.badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--teal-dark);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
}

.package-extras {
    max-width: 46rem;
    margin: 32px auto 0;
}

@media (max-width: 700px) {

    .package.featured,
    .package.featured:hover {
        transform: none;
    }
}

/* Animated hero: staggered fade-up */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

#hero .eyebrow,
#hero h1,
#hero p,
#hero .hero-buttons {
    animation: fade-up 0.8s ease-out both;
}

#hero .eyebrow {
    animation-delay: 0.1s;
}

#hero h1 {
    animation-delay: 0.3s;
}

#hero p {
    animation-delay: 0.55s;
}

#hero .hero-buttons {
    animation-delay: 0.8s;
}

@media (prefers-reduced-motion: reduce) {

    #hero .eyebrow,
    #hero h1,
    #hero p,
    #hero .hero-buttons {
        animation: none;
    }
}

/* Animated hero: shimmer on highlight text */
#hero .highlight {
    background: linear-gradient(90deg, #5eead4 0%, #a7f3d0 25%, #ffffff 50%, #a7f3d0 75%, #5eead4 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% center;
    }
}

@media (prefers-reduced-motion: reduce) {
    #hero .highlight {
        animation: none;
    }
}

/* Process timeline */
.steps {
    position: relative;
}

.step-num {
    position: relative;
    z-index: 1;
}

.steps::before {
    content: "";
    position: absolute;
    background: linear-gradient(90deg, var(--navy), var(--teal));
    border-radius: 3px;
    transition: transform 1.2s ease-out 0.3s;
}

/* Desktop: four in a row, line across */
@media (min-width: 900px) {
    .steps {
        grid-template-columns: repeat(4, 1fr);
    }

    .steps::before {
        top: 52px;
        left: 12.5%;
        right: 12.5%;
        height: 3px;
        transform: scaleX(0);
        transform-origin: left;
    }

    .steps.visible::before {
        transform: scaleX(1);
    }
}

/* Phones and tablets: stacked, line down the left */
@media (max-width: 899px) {
    .steps {
        grid-template-columns: 1fr;
        gap: 8px;
        max-width: 520px;
        margin: 0 auto;
    }

    .step {
        text-align: left;
        padding: 24px 0 24px 84px;
    }

    .step-num {
        position: absolute;
        left: 0;
        top: 24px;
        margin: 0;
    }

    .steps::before {
        top: 52px;
        bottom: 52px;
        left: 27px;
        width: 3px;
        background: linear-gradient(180deg, var(--navy), var(--teal));
        transform: scaleY(0);
        transform-origin: top;
    }

    .steps.visible::before {
        transform: scaleY(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .steps::before {
        transition: none;
        transform: none;
    }
}

/* Speed proof badge */
.scores {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
    max-width: 760px;
    margin: 32px auto 0;
}

.scores li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--navy);
}

.score {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 6px solid #0cce6b;
    background: #e8faf0;
    color: #0a7a3f;
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 800;
}

.proof-note {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #4b5563;
    text-align: center;
}