/* SyncOps holding site. Palette carried over from the design mockup (navy + teal). */

:root {
    color-scheme: dark;

    --navy-900: #0a1628;
    --card: rgba(20, 35, 55, 0.8);
    --card-border: rgba(0, 160, 176, 0.2);
    --divider: rgba(0, 160, 176, 0.12);
    --teal: #00a0b0;
    --teal-soft: #4db8a8;
    --text: #ffffff;
    --text-body: #c4cad0;
    --muted: #a0a8b0;
    --placeholder: #7d8a94;
    --field: rgba(50, 70, 90, 0.6);
    --field-focus: rgba(50, 70, 90, 0.9);
    --field-border: rgba(0, 160, 176, 0.3);
    --danger: #ff6b6b;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

html {
    background: var(--navy-900);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    color: var(--text);
    background: var(--navy-900);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--teal);
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Galaxy background (home only) ---------- */

/* The same navy as the page, which home.js also paints every frame, so the canvas never shows as a different colour. */
.galaxy {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: var(--navy-900);
}

/* ---------- Layout ---------- */

.page {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.card {
    background: var(--card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ---------- Hero ---------- */

.hero {
    text-align: center;
    padding: clamp(56px, 11vh, 112px) 0 clamp(40px, 7vh, 64px);
}

.hero-logo {
    width: min(300px, 72vw);
    margin: 0 auto;
}

.hero h1 {
    margin: 36px auto 0;
    max-width: 22ch;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.hero-actions {
    margin-top: 32px;
}

/* ---------- Buttons ---------- */

/* Navy text, not white: white on this teal measures ~3.2:1, under the 4.5:1 body-text minimum. */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    font: 600 15px/1.2 var(--font);
    color: var(--navy-900);
    background: linear-gradient(135deg, var(--teal-soft) 0%, var(--teal) 100%);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow 0.2s, filter 0.2s;
}

/* Elevation by shadow only. A translate on the hovered element makes it flicker under a resting pointer. */
.button:hover {
    box-shadow: 0 8px 24px rgba(0, 160, 176, 0.35);
    filter: brightness(1.06);
    text-decoration: none;
}

.button:active {
    filter: brightness(0.96);
}

.button[disabled] {
    cursor: progress;
    opacity: 0.8;
}

.button-block {
    width: 100%;
    margin-top: 8px;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(10, 22, 40, 0.3);
    border-top-color: var(--navy-900);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.button.is-busy .spinner {
    display: inline-block;
}

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

/* ---------- Consultation form ---------- */

.consultation {
    max-width: 520px;
    margin: 0 auto;
    padding: 44px 40px 36px;
    scroll-margin-top: 24px;
}

.consultation h2 {
    margin-bottom: 30px;
    font-size: 24px;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.required {
    color: var(--danger);
}

.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    font: 14px/1.4 var(--font);
    color: var(--text);
    background: var(--field);
    border: 1px solid var(--field-border);
    border-radius: 6px;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.field textarea {
    min-height: 112px;
    resize: vertical;
    line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--placeholder);
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--teal);
    background: var(--field-focus);
    box-shadow: 0 0 0 3px rgba(0, 160, 176, 0.15);
}

.field [aria-invalid='true'] {
    border-color: var(--danger);
}

.field-error {
    margin-top: 6px;
    color: var(--danger);
    font-size: 12.5px;
}

.field-error:empty {
    display: none;
}

/* Off-screen rather than display:none, which some bots skip. */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alt-contact {
    margin-top: 24px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* ---------- Toast ---------- */

.toast-region {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 50;
    width: min(440px, calc(100% - 32px));
    transform: translateX(-50%);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: rgba(20, 35, 55, 0.97);
    border: 1px solid var(--teal-soft);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.toast-error {
    border-color: var(--danger);
}

.toast-icon {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--teal-soft);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-close {
    flex-shrink: 0;
    margin-left: auto;
    padding: 0 4px;
    font-size: 20px;
    line-height: 1;
    color: var(--muted);
    background: none;
    border: 0;
    cursor: pointer;
}

.toast-close:hover {
    color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
    .toast {
        animation: toast-in 0.25s ease-out;
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* ---------- Header (legal pages) ---------- */

.site-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 16px;
}

.site-header img {
    width: 140px;
}

.back-link {
    font-size: 14px;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* ---------- Legal pages ---------- */

.prose {
    max-width: 788px;
    margin: 8px auto 0;
    padding: 44px 48px 48px;
}

.prose h1 {
    font-size: clamp(26px, 4vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.prose .updated {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.prose h2 {
    margin-top: 36px;
    font-size: 19px;
    line-height: 1.3;
}

.prose h3 {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.3;
}

.prose p,
.prose li {
    color: var(--text-body);
    font-size: 15.5px;
    line-height: 1.7;
}

.prose p {
    margin-top: 12px;
}

.prose ul {
    margin: 12px 0 0;
    padding-left: 22px;
}

.prose li + li {
    margin-top: 6px;
}

/* ---------- Contact page ---------- */

/* Three columns on a desktop, stacked on a phone. */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px 32px;
    margin-top: 28px;
}

.contact-details dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.contact-details dd {
    margin-top: 6px;
    color: var(--text-body);
    font-size: 17px;
    line-height: 1.6;
}

.contact-details address {
    font-style: normal;
}

.contact-map {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 260px;
    margin-top: 32px;
    background: var(--field);
    border: 1px solid var(--card-border);
    border-radius: 8px;
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 72px;
    padding: 40px 16px 36px;
    border-top: 1px solid var(--divider);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.site-footer img {
    width: 120px;
    margin: 0 auto 18px;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 14px;
    list-style: none;
}

.footer-legal {
    max-width: 100ch;
    margin: 6px auto 0;
    font-size: 12px;
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
    .consultation {
        padding: 32px 20px 28px;
    }

    .consultation h2 {
        font-size: 21px;
    }

    .prose {
        padding: 30px 20px 34px;
    }

    .site-header img {
        width: 116px;
    }

    .site-footer {
        margin-top: 56px;
    }
}
