/* ==========================================================================
   Altechmind AT-Maintenance Mode — Frontend Styles
   Design: Deep Space Luxury — Cormorant Garamond + DM Sans
   ========================================================================== */

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

/* --- Root Variables (overridden by inline <style> from PHP) -------------- */
:root {
    --amm-bg-start:  #070b18;
    --amm-bg-end:    #0d1b3e;
    --amm-accent:    #e8b86d;
    --amm-text:      #f0f4ff;

    /* Derived */
    --amm-text-muted:  rgba(240, 244, 255, 0.55);
    --amm-card-bg:     rgba(255, 255, 255, 0.04);
    --amm-card-border: rgba(255, 255, 255, 0.08);
    --amm-card-glow:   rgba(232, 184, 109, 0.15);
    --amm-radius:      12px;
    --amm-radius-lg:   20px;

    /* Typography scale */
    --amm-font-display: 'Cormorant Garamond', Georgia, serif;
    --amm-font-body:    'DM Sans', system-ui, sans-serif;
}

/* --- Base --------------------------------------------------------------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.amm-body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--amm-bg-start) 0%, var(--amm-bg-end) 100%);
    color: var(--amm-text);
    font-family: var(--amm-font-body);
    font-weight: 300;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

/* Screen reader only */
.amm-sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Animated Stars Background ------------------------------------------ */
.amm-stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.amm-stars__layer {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.8) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 75% 45%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 20% 85%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 65% 70%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 42% 95%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 8%  50%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,0.8) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 40%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 38% 30%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 92% 55%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 18% 37%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 72% 88%, rgba(255,255,255,0.6) 0%, transparent 100%);
    background-size: 100% 100%;
}

.amm-stars__layer--1 { animation: amm-twinkle 4s ease-in-out infinite alternate; }
.amm-stars__layer--2 { animation: amm-twinkle 6s ease-in-out infinite alternate-reverse; opacity: 0.7; }
.amm-stars__layer--3 { animation: amm-twinkle 8s ease-in-out infinite alternate; opacity: 0.5; }

@keyframes amm-twinkle {
    0%   { opacity: 0.4; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.03); }
}

/* --- Gradient Orbs ------------------------------------------------------ */
.amm-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.amm-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
}

.amm-orb--1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--amm-accent), transparent 70%);
    top: -200px; right: -200px;
    animation: amm-orb-float 12s ease-in-out infinite;
}

.amm-orb--2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #4f7fe8, transparent 70%);
    bottom: -150px; left: -150px;
    animation: amm-orb-float 16s ease-in-out infinite reverse;
}

.amm-orb--3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    top: 40%; left: 40%;
    animation: amm-orb-float 10s ease-in-out infinite;
    opacity: 0.1;
}

@keyframes amm-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -30px) scale(1.05); }
    66%       { transform: translate(-20px, 20px) scale(0.97); }
}

/* --- Container ---------------------------------------------------------- */
.amm-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) clamp(24px, 5vw, 48px) clamp(40px, 6vw, 64px);
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Header / Logo ------------------------------------------------------ */
.amm-header {
    margin-bottom: 48px;
    width: 100%;
}

.amm-logo-link {
    display: inline-block;
}

.amm-logo {
    max-height: 56px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.amm-logo:hover { opacity: 1; }

.amm-site-name {
    font-family: var(--amm-font-display);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amm-text);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.amm-site-name:hover { opacity: 1; }

/* --- Icon --------------------------------------------------------------- */
.amm-icon-wrap {
    margin-bottom: 28px;
}

.amm-icon {
    width: clamp(48px, 8vw, 64px);
    height: clamp(48px, 8vw, 64px);
    color: var(--amm-accent);
    opacity: 0.85;
    filter: drop-shadow(0 0 16px var(--amm-card-glow));
    animation: amm-icon-pulse 3s ease-in-out infinite;
}

@keyframes amm-icon-pulse {
    0%, 100% { opacity: 0.85; filter: drop-shadow(0 0 16px var(--amm-card-glow)); }
    50%       { opacity: 1;    filter: drop-shadow(0 0 28px var(--amm-card-glow)); }
}

/* --- Headline ----------------------------------------------------------- */
.amm-headline {
    font-family: var(--amm-font-display);
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--amm-text);
    margin-bottom: 24px;
    text-shadow: 0 2px 40px rgba(0,0,0,0.4);
    max-width: 600px;
}

/* --- Divider ------------------------------------------------------------ */
.amm-divider {
    width: 64px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--amm-accent), transparent);
    margin: 0 auto 28px;
    border-radius: 2px;
}

/* --- Message ------------------------------------------------------------ */
.amm-message {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.75;
    color: var(--amm-text-muted);
    max-width: 520px;
    margin-bottom: 48px;
    font-weight: 300;
}

/* --- Countdown ---------------------------------------------------------- */
.amm-countdown {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 16px);
    margin-bottom: 48px;
    flex-wrap: wrap;
    justify-content: center;
}

.amm-countdown__unit {
    background: var(--amm-card-bg);
    border: 1px solid var(--amm-card-border);
    border-radius: var(--amm-radius);
    padding: clamp(16px, 3vw, 24px) clamp(20px, 4vw, 32px);
    min-width: clamp(70px, 16vw, 100px);
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.amm-countdown__unit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
}

.amm-countdown__unit:hover {
    border-color: rgba(232, 184, 109, 0.3);
    box-shadow: 0 4px 24px rgba(232, 184, 109, 0.1);
}

.amm-countdown__number {
    font-family: var(--amm-font-display);
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 600;
    color: var(--amm-accent);
    line-height: 1;
    display: block;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease;
}

.amm-countdown__number.amm-flip {
    animation: amm-num-flip 0.15s ease;
}

@keyframes amm-num-flip {
    0%   { transform: translateY(-6px); opacity: 0.6; }
    100% { transform: translateY(0);    opacity: 1; }
}

.amm-countdown__label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amm-text-muted);
    display: block;
    margin-top: 6px;
    font-weight: 500;
}

.amm-countdown__sep {
    font-family: var(--amm-font-display);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--amm-accent);
    opacity: 0.4;
    font-weight: 300;
    align-self: flex-start;
    margin-top: clamp(10px, 2vw, 16px);
    animation: amm-sep-blink 1s ease-in-out infinite;
}

@keyframes amm-sep-blink {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 0.15; }
}

/* --- Subscribe ---------------------------------------------------------- */
.amm-subscribe-wrap {
    width: 100%;
    max-width: 480px;
    margin-bottom: 36px;
}

.amm-subscribe-label {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amm-text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.amm-subscribe-form {
    width: 100%;
}

/* Honeypot */
.amm-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
    tab-index: -1;
}

.amm-subscribe-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.amm-subscribe-input {
    flex: 1;
    background: var(--amm-card-bg);
    border: 1px solid var(--amm-card-border);
    border-radius: var(--amm-radius);
    color: var(--amm-text);
    font-family: var(--amm-font-body);
    font-size: 0.9rem;
    font-weight: 300;
    padding: 14px 20px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    min-width: 0;
}

.amm-subscribe-input::placeholder { color: var(--amm-text-muted); }

.amm-subscribe-input:focus {
    border-color: rgba(232, 184, 109, 0.5);
    box-shadow: 0 0 0 3px rgba(232, 184, 109, 0.1);
}

.amm-subscribe-btn {
    background: var(--amm-accent);
    color: #0a0f1e;
    border: none;
    border-radius: var(--amm-radius);
    font-family: var(--amm-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 14px 24px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.amm-subscribe-btn:hover {
    background: #f0c87a;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(232, 184, 109, 0.35);
}

.amm-subscribe-btn:active { transform: translateY(0); }

.amm-subscribe-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.amm-subscribe-btn__spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(10,15,30,0.3);
    border-top-color: #0a0f1e;
    border-radius: 50%;
    animation: amm-spin 0.6s linear infinite;
}

.amm-subscribe-btn.amm-loading .amm-subscribe-btn__text { display: none; }
.amm-subscribe-btn.amm-loading .amm-subscribe-btn__spinner { display: inline-block; vertical-align: middle; }

@keyframes amm-spin {
    to { transform: rotate(360deg); }
}

.amm-subscribe-msg {
    min-height: 22px;
    margin-top: 10px;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.amm-subscribe-msg--success { color: #6ee7b7; }
.amm-subscribe-msg--error   { color: #fca5a5; }

/* --- Contact link ------------------------------------------------------- */
.amm-contact { margin-bottom: 28px; }

.amm-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amm-text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: 0.02em;
}

.amm-contact-link svg { flex-shrink: 0; }

.amm-contact-link:hover { color: var(--amm-accent); }

/* --- Social ------------------------------------------------------------- */
.amm-social {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.amm-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: var(--amm-card-bg);
    border: 1px solid var(--amm-card-border);
    border-radius: 50%;
    color: var(--amm-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.amm-social-link svg { width: 16px; height: 16px; fill: currentColor; }

.amm-social-link:hover {
    color: var(--amm-accent);
    border-color: rgba(232, 184, 109, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 184, 109, 0.15);
}

/* --- Footer ------------------------------------------------------------- */
.amm-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px 24px;
    width: 100%;
}

.amm-footer p {
    font-size: 0.72rem;
    color: rgba(240, 244, 255, 0.22);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.amm-footer a {
    color: rgba(240, 244, 255, 0.35);
    text-decoration: none;
    transition: color 0.2s ease;
}

.amm-footer a:hover { color: var(--amm-accent); }

/* --- Entrance animations ------------------------------------------------ */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(.22,.68,0,1.2), transform 0.6s cubic-bezier(.22,.68,0,1.2);
}

[data-animate="fade-down"] {
    transform: translateY(-16px);
}

[data-animate="scale-x"] {
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;
}

[data-animate].amm-visible {
    opacity: 1;
    transform: translateY(0) scaleX(1);
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 600px) {
    .amm-subscribe-row { flex-direction: column; }
    .amm-subscribe-btn { width: 100%; justify-content: center; }

    .amm-countdown {
        gap: 6px;
    }

    .amm-countdown__sep { display: none; }

    .amm-countdown__unit {
        min-width: 68px;
        padding: 14px 16px;
    }
}

@media (max-width: 400px) {
    .amm-headline { font-size: 2rem; }
}

/* --- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    [data-animate] {
        opacity: 1;
        transform: none;
    }
}
