/* ============================================================
   Alvi Software — Coming Soon
   Light premium theme · brand colors from the Alvi logo
   HTML5 + CSS3 only (no JavaScript)
   ============================================================ */

/* ------------------------------------------------------------
   1. Design tokens (CSS variables)
   ------------------------------------------------------------ */
:root {
    /* Brand colors (sampled from the Alvi logo) */
    --indigo: #3d3fae;
    --purple: #8b3da8;
    --red: #ef4a34;

    /* Neutrals */
    --bg: #ffffff;
    --bg-soft: #f7f8fc;
    --card: #ffffff;
    --border: #e8eaf3;
    --heading: #191b2e;
    --text: #23263a;
    --muted: #5f6577;

    /* Gradients */
    --grad-brand: linear-gradient(95deg, var(--indigo) 0%, var(--purple) 50%, var(--red) 100%);

    /* Effects */
    --glow-indigo: 0 14px 34px rgba(61, 63, 174, 0.28);
    --shadow-card: 0 10px 30px rgba(25, 27, 46, 0.06);
    --shadow-card-hover: 0 18px 44px rgba(61, 63, 174, 0.14);

    /* Shape & motion */
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Typography */
    --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

ul {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: rgba(61, 63, 174, 0.18);
}

/* Keyboard focus — high-visibility ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------
   3. Decorative background
      (soft brand tints, grid pattern, floating blobs)
   ------------------------------------------------------------ */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--bg);
}

/* Gentle animated gradient wash in brand tints */
.bg__aurora {
    position: absolute;
    inset: -20%;
    background: linear-gradient(
        120deg,
        rgba(61, 63, 174, 0.07),
        rgba(139, 61, 168, 0.05),
        rgba(239, 74, 52, 0.07),
        rgba(61, 63, 174, 0.07)
    );
    background-size: 300% 300%;
    animation: aurora-shift 22s ease-in-out infinite;
}

/* Subtle technology grid, faded out towards the edges */
.bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(61, 63, 174, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 63, 174, 0.05) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 38%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 70% at 50% 38%, #000 35%, transparent 100%);
}

/* Floating blurred color blobs */
.bg__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.16;
    animation: blob-drift 18s ease-in-out infinite alternate;
}

.bg__blob--1 {
    width: 460px;
    height: 460px;
    background: var(--indigo);
    top: -160px;
    left: -120px;
}

.bg__blob--2 {
    width: 420px;
    height: 420px;
    background: var(--red);
    bottom: -140px;
    right: -100px;
    animation-delay: -6s;
}

.bg__blob--3 {
    width: 320px;
    height: 320px;
    background: var(--purple);
    top: 40%;
    left: 60%;
    animation-delay: -12s;
    animation-duration: 24s;
}

/* ------------------------------------------------------------
   4. Page layout
   ------------------------------------------------------------ */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px) clamp(20px, 5vw, 48px);
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(44px, 7vh, 70px);
    padding: clamp(36px, 6vh, 70px) 0;
}

/* ------------------------------------------------------------
   5. Header — brand & launch status
   ------------------------------------------------------------ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    animation: fade-down 0.8s var(--ease) both;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand__logo img {
    width: clamp(104px, 12vw, 132px);
    height: auto;
    transition: transform 0.35s var(--ease);
}

.brand:hover .brand__logo img {
    transform: translateY(-2px) scale(1.02);
}

/* Status pill with pulsing live dot */
.status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--indigo);
    background: rgba(61, 63, 174, 0.06);
    border: 1px solid rgba(61, 63, 174, 0.18);
    border-radius: 999px;
    padding: 9px 18px;
    white-space: nowrap;
}

.status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px rgba(239, 74, 52, 0.7);
    animation: pulse 1.6s ease-in-out infinite;
}

/* ------------------------------------------------------------
   6. Hero
   ------------------------------------------------------------ */
.hero {
    text-align: center;
}

/* Small badge above the heading */
.hero__badge {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    background: rgba(239, 74, 52, 0.07);
    border: 1px solid rgba(239, 74, 52, 0.25);
    border-radius: 999px;
    padding: 9px 22px;
    margin-bottom: clamp(22px, 4vh, 32px);
    animation: fade-up 0.8s var(--ease) 0.15s both;
}

.hero__title {
    font-size: clamp(34px, 6.5vw, 64px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -1px;
    color: var(--heading);
    margin-bottom: clamp(18px, 3vh, 24px);
    animation: fade-up 0.8s var(--ease) 0.25s both;
}

/* Gradient text highlight (logo gradient) */
.gradient-text {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    max-width: 600px;
    margin: 0 auto clamp(28px, 5vh, 38px);
    font-size: clamp(15px, 2vw, 17px);
    font-weight: 400;
    color: var(--muted);
    line-height: 1.8;
    animation: fade-up 0.8s var(--ease) 0.35s both;
}

.hero__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    animation: fade-up 0.8s var(--ease) 0.45s both;
}

/* ------------------------------------------------------------
   7. Buttons — gradient, glow & shine sweep
   ------------------------------------------------------------ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    padding: 15px 36px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* Shine sweep across the button on hover */
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -130%;
    width: 55%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-22deg);
    transition: left 0.65s var(--ease);
}

.btn:hover::after {
    left: 150%;
}

.btn--primary {
    color: #ffffff;
    background: var(--grad-brand);
    background-size: 150% 100%;
    box-shadow: var(--glow-indigo);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-position 0.5s var(--ease);
}

.btn--primary:hover {
    transform: translateY(-3px);
    background-position: 100% 0;
    box-shadow: 0 18px 44px rgba(139, 61, 168, 0.38);
}

/* ------------------------------------------------------------
   8. Services — light cards matching the brand style
   ------------------------------------------------------------ */
.services {
    text-align: center;
    animation: fade-up 0.8s var(--ease) 0.55s both;
}

.services__title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 24px;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    text-align: left;
}

/* Horizontal card: icon tile + service name */
.service {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.service:hover {
    transform: translateY(-4px);
    background: var(--card);
    border-color: rgba(239, 74, 52, 0.45);
    box-shadow: var(--shadow-card-hover);
}

/* Icon tile — indigo at rest, red on hover (like the reference) */
.service__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: rgba(61, 63, 174, 0.09);
    color: var(--indigo);
    transition: background 0.3s ease, color 0.3s ease;
}

.service:hover .service__icon {
    background: rgba(239, 74, 52, 0.1);
    color: var(--red);
}

.service__icon svg {
    width: 21px;
    height: 21px;
}

.service__name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.4;
}

/* ------------------------------------------------------------
   9. Footer — copyright, contact, social circles
   ------------------------------------------------------------ */
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 28px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
    animation: fade-up 0.8s var(--ease) 0.65s both;
}

.footer__copy {
    font-size: 12.5px;
    color: var(--muted);
}

.footer__contact {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.footer__link {
    color: var(--text);
    font-weight: 500;
    transition: color 0.25s ease;
}

.footer__link:hover {
    color: var(--red);
}

.footer__link--static {
    cursor: default;
}

.footer__link--static:hover {
    color: var(--text);
}

.footer__sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted);
    opacity: 0.5;
}

/* Social icons — brand logos inside circles */
.socials {
    display: inline-flex;
    gap: 10px;
}

.socials__item {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}

.socials__item img {
    width: 16px;
    height: 16px;
}

.socials__item:hover {
    transform: translateY(-4px);
    border-color: var(--indigo);
    box-shadow: 0 10px 24px rgba(61, 63, 174, 0.22);
}

.socials__item:focus-visible {
    border-radius: 50%;
}

/* ------------------------------------------------------------
   10. Popup modal — "Start a Project" (JS-controlled)
   ------------------------------------------------------------ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Dimmed, blurred backdrop (click to close) */
.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(25, 27, 46, 0.45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: default;
}

/* Popup card */
.modal__card {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 30px);
    box-shadow: 0 40px 90px rgba(25, 27, 46, 0.35);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s var(--ease);
    /* Custom scrollbar (Firefox) — hidden until hover */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.modal__card:hover,
.modal__card:focus-within {
    scrollbar-color: rgba(120, 128, 145, 0.6) transparent;
}

/* Custom scrollbar (WebKit / Chromium) — grey, revealed on hover */
.modal__card::-webkit-scrollbar {
    width: 6px;
}

.modal__card::-webkit-scrollbar-track {
    background: transparent;
}

.modal__card::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
    transition: background 0.3s ease;
}

.modal__card:hover::-webkit-scrollbar-thumb,
.modal__card:focus-within::-webkit-scrollbar-thumb {
    background: rgba(120, 128, 145, 0.6);
}

.modal__card::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 128, 145, 0.9);
}

/* Top gradient accent line */
.modal__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--grad-brand);
}

/* JS-controlled open state */
.modal.is-open {
    visibility: visible;
    opacity: 1;
}

.modal.is-open .modal__card {
    transform: translateY(0) scale(1);
}

/* Success popup */
.modal__card--success {
    text-align: center;
    max-width: 400px;
}

.success__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 4px auto 16px;
    color: #fff;
    background: var(--grad-brand);
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(61, 63, 174, 0.35);
}

.success__icon svg {
    width: 32px;
    height: 32px;
}

.modal__card--success .btn {
    margin-top: 18px;
    width: 100%;
}

/* Close button */
.modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    font-size: 20px;
    line-height: 1;
    color: var(--muted);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}

.modal__close:hover {
    color: var(--red);
    border-color: rgba(239, 74, 52, 0.4);
    transform: rotate(90deg);
}

.modal__title {
    font-size: clamp(22px, 4vw, 27px);
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 6px;
}

.modal__text {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ------------------------------------------------------------
   11. Form fields
   ------------------------------------------------------------ */
.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

/* Email + phone side by side on wider screens */
.form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--heading);
}

.form__input {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    width: 100%;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form__input::placeholder {
    color: #9aa0b5;
}

.form__input:focus {
    outline: none;
    background: var(--card);
    border-color: var(--indigo);
    box-shadow: 0 0 0 4px rgba(61, 63, 174, 0.12);
}

.form__textarea {
    resize: vertical;
    min-height: 72px;
}

.form__submit {
    width: 100%;
    margin-top: 4px;
}

.form__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Submission status message */
.form__status {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    min-height: 1em;
}

.form__status--pending {
    color: var(--muted);
}

.form__status--success {
    color: #157347;
}

.form__status--error {
    color: var(--red);
}

/* ------------------------------------------------------------
   12. Keyframe animations
   ------------------------------------------------------------ */
@keyframes aurora-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes blob-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(60px, -50px) scale(1.1); }
    100% { transform: translate(-40px, 40px) scale(0.95); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

/* ------------------------------------------------------------
   13. Responsive breakpoints
   ------------------------------------------------------------ */

/* Laptop / small desktop */
@media (max-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }

    .brand {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 14px;
    }
}

/* Mobile */
@media (max-width: 560px) {
    .services__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero__actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero__actions .btn {
        width: 100%;
        max-width: 320px;
    }

    .form__row {
        grid-template-columns: 1fr;
    }

    .footer__contact {
        flex-direction: column;
        gap: 8px;
    }

    .footer__sep {
        display: none;
    }
}

/* ------------------------------------------------------------
   14. Accessibility — reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
