/**
 * MeshPhase Styles
 */

:root {
    --bg: #000000;
    --bg-elev: #0a0a0f;
    --bg-elev-2: #12121a;
    --text: #ffffff;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --accent: #00b8ff;
    --accent-hover: #33c7ff;
    --accent-dim: rgba(0, 184, 255, 0.15);
    --border: #1f1f29;
    --border-strong: #2a2a38;
    --danger: #ef4444;
    --success: #22c55e;
    --radius: 10px;
    --radius-lg: 16px;
    --max: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    gap: 1.5rem;
}

.brand {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 1.1rem;
    color: var(--text);
}

.brand-text span { display: inline-block; }
.brand-accent { color: var(--accent); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.25rem 0;
    position: relative;
}

.nav-link:hover { color: var(--text); }

.nav-link.active {
    color: var(--text);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform .2s ease, opacity .2s ease;
}

/* Main */
.site-main { flex: 1; }

/* Hero */
.hero {
    position: relative;
    padding: 4rem 1.5rem 5rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(0, 184, 255, 0.12), transparent 60%);
    pointer-events: none;
}

.hero-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
}

.hero-image {
    width: 100%;
    max-width: 520px;
    justify-self: center;
    filter: drop-shadow(0 0 60px rgba(0, 184, 255, 0.18));
}

.hero-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-content h1 .accent { color: var(--accent); }

.hero-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
}

.slogan-step {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text);
}

.slogan-step.accent { color: var(--accent); }

.slogan-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    opacity: 0.85;
}

.slogan-step.accent .slogan-icon { opacity: 1; }

.slogan-arrow {
    width: 0.75em;
    height: 0.75em;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.7;
}

.slogan-icon-ship { width: 1.15em; height: 1.15em; }

.ship-steam { transform-origin: center; }
.ship-steam-1 { animation: ship-puff 2.2s ease-in-out infinite; }
.ship-steam-2 { animation: ship-puff 2.2s ease-in-out infinite .35s; }
.ship-steam-3 { animation: ship-puff 2.2s ease-in-out infinite .7s; }

.ship-wave  { animation: ship-rock 3s ease-in-out infinite; transform-origin: center; }

@keyframes ship-puff {
    0%   { opacity: 0;   transform: translateY(2px); }
    30%  { opacity: .9;  transform: translateY(0); }
    70%  { opacity: .6;  transform: translateY(-1px); }
    100% { opacity: 0;   transform: translateY(-3px); }
}

@keyframes ship-rock {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-1.2px); }
}

@media (prefers-reduced-motion: reduce) {
    .ship-steam, .ship-wave { animation: none; }
    .ship-steam { opacity: .8; }
}

.hero-content p.lead {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 36ch;
    margin-bottom: 2rem;
}

.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--accent);
    color: #001018;
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #001018;
    box-shadow: 0 0 24px rgba(0, 184, 255, 0.45);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn[disabled],
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.btn-more-soon .dots {
    display: inline-flex;
    margin-left: 2px;
}
.btn-more-soon .dots span {
    animation: more-soon-dot 1.4s ease-in-out infinite;
    opacity: 0.2;
}
.btn-more-soon .dots span:nth-child(2) { animation-delay: .2s; }
.btn-more-soon .dots span:nth-child(3) { animation-delay: .4s; }

@keyframes more-soon-dot {
    0%, 60%, 100% { opacity: 0.2; }
    30%           { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-more-soon .dots span { animation: none; opacity: 0.6; }
}

/* Sections */
.section {
    padding: 4rem 1.5rem;
    scroll-margin-top: 80px;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-sub {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 60ch;
}

/* Contact card */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2.5rem;
    align-items: start;
}

.contact-info {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.contact-info h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.contact-info ul { list-style: none; }
.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-top: 1px solid var(--border);
}
.contact-info li:first-child { border-top: 0; }
.contact-info li a { color: var(--text); }
.contact-info li a:hover { color: var(--accent); }

/* Form */
.form {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field { display: grid; gap: 0.4rem; }

.field label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.field input,
.field textarea {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius);
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}

.field textarea { min-height: 140px; resize: vertical; }

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.field.checkbox {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.6rem;
}
.field.checkbox label {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.field.checkbox input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); }

.label-hint {
    color: var(--text-dim);
    font-weight: 400;
    font-size: 0.8rem;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.captcha-row img {
    height: 54px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: #fff;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(-60deg);
}

.hidden { display: none !important; }

.form-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

/* Legal pages */
.legal {
    padding: 3rem 1.5rem 4rem;
}
.legal .container { max-width: 820px; }

.legal h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}
.legal h2 {
    font-size: 1.2rem;
    margin: 2rem 0 0.75rem;
    color: var(--text);
}
.legal h3 {
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
    color: var(--text);
}
.legal p, .legal li {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.legal ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.legal strong { color: var(--text); font-weight: 600; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 2rem;
    margin-top: auto;
    background: var(--bg-elev);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
}

.footer-brand .brand-text {
    font-weight: 700;
    letter-spacing: 0.08em;
}

.footer-tag {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.footer-nav {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--accent); }

.copyright {
    color: var(--text-dim);
    font-size: 0.85rem;
    text-align: right;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-content p.lead { margin-inline: auto; }
    .hero-ctas { justify-content: center; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .copyright { text-align: center; }
}

@media (max-width: 640px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1rem;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .15s ease, transform .15s ease;
    }
    .site-nav.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .nav-link { padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--border); }
    .nav-link:last-child { border-bottom: 0; }
    .nav-link.active::after { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 1rem 3rem; }
    .section { padding: 3rem 1rem; }
}
