/* ============================================================
   CORE STYLESHEET — MILO SOFTWARE & APPS
   "Obsidian editorial" — dark, warm-gold accent, Fraunces display.
   ============================================================ */

:root {
    --color-bg:              #0b0d10;
    --color-surface:         #111419;
    --color-surface-raised:  #171b21;
    --color-border:          rgba(255,255,255,0.09);
    --color-border-subtle:   rgba(255,255,255,0.06);
    --color-text-primary:    #efece6;   /* warm ivory */
    --color-text-secondary:  #b4b1a9;
    --color-text-muted:      #807d75;
    --color-accent:          #6db1f0;   /* warm gold — the single signature */
    --color-accent-dim:      rgba(109,177,240,0.12);
    --color-accent-hover:    #8ec6f7;
    --color-success:         #3fbf8f;
    --color-red:             #ef4b4b;   /* the family red — used as a glowing spark */
    --color-red-glow:        rgba(239,75,75,0.75);

    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 18px 48px -20px rgba(0,0,0,0.7);

    --font-body:    "Inter", system-ui, -apple-system, sans-serif;
    --font-display: "Fraunces", Georgia, serif;

    --max-width: 1080px;
    --header-height: 68px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background:
        radial-gradient(1000px 720px at 82% -14%, rgba(109,177,240,0.05), transparent 60%),
        radial-gradient(760px 560px at 8% 112%, rgba(239,75,75,0.03), transparent 62%),
        linear-gradient(180deg, #0c0e12 0%, #08090b 100%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
/* fine grain — tactile, human-designed */
body::after {
    content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: rgba(109,177,240,0.26); color: #fff; }

/* ============================================================ TYPOGRAPHY */
h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}
h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
}
h3 { font-size: 1.05rem; font-weight: 600; color: var(--color-text-primary); letter-spacing: -0.01em; }
p  { color: var(--color-text-secondary); line-height: 1.75; }

.lead { font-size: 1.2rem; color: var(--color-text-secondary); line-height: 1.7; max-width: 58ch; }

.label {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--color-accent);
}

/* ============================================================ LAYOUT */
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
#site-main { flex: 1; max-width: var(--max-width); margin: 0 auto; width: 100%; padding: 3.5rem 1.5rem; }
.section { padding: 3.5rem 0; border-bottom: 1px solid var(--color-border-subtle); }
.section:last-child { border-bottom: none; }

/* ============================================================ HEADER */
#site-header {
    height: var(--header-height);
    background: rgba(11,13,16,0.72);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    max-width: var(--max-width); margin: 0 auto; height: 100%;
    display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem;
}

/* ============================================================ BRAND */
.brand-corner { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.brand-mark { height: 30px; width: 30px; display: block; }
.brand-logo { height: 28px; width: auto; display: block; }   /* legacy raster fallback */
.brand-wordmark {
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
    letter-spacing: -0.01em; color: var(--color-text-primary); white-space: nowrap;
}
/* the family mark: a glowing red dot inside the "o" of Milo */
.brand-wordmark .wm-o { position: relative; display: inline-block; line-height: 1; }
.brand-wordmark .wm-o::after {
    content: ""; position: absolute; left: 49%; top: 48%; transform: translate(-50%, -50%);
    width: 0.155em; height: 0.155em; border-radius: 50%;
    background: var(--color-red); box-shadow: 0 0 5px 0.5px var(--color-red-glow);
}

/* ============================================================ NAVIGATION */
.primary-nav { display: flex; align-items: center; gap: 0.25rem; }
.with-dropdown { position: relative; }
.with-dropdown > a, .account-link {
    display: block; padding: 0.4rem 0.8rem; font-size: 0.9rem; font-weight: 500;
    color: var(--color-text-secondary); border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease; cursor: pointer;
}
.with-dropdown > a:hover, .with-dropdown.is-open > a, .account-link:hover {
    color: var(--color-text-primary); background: var(--color-surface-raised);
}
.dropdown-menu {
    display: none; position: absolute; top: calc(100% + 8px); left: 0;
    background: #12151a; border: 1px solid var(--color-border); border-radius: var(--radius-md);
    padding: 0.4rem; min-width: 168px; box-shadow: var(--shadow-card); z-index: 200;
}
.account-corner .dropdown-menu { left: auto; right: 0; }
.with-dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block; padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500;
    color: var(--color-text-secondary); border-radius: var(--radius-sm);
    transition: color 0.12s ease, background 0.12s ease;
}
.dropdown-menu a:hover { color: var(--color-text-primary); background: var(--color-surface-raised); }
.account-corner { position: relative; flex-shrink: 0; }

/* ============================================================ HERO */
.hero { padding: 6rem 0 4.5rem; display: flex; flex-direction: column; gap: 1.6rem; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-accent);
}
.hero-eyebrow::before { content: ''; display: block; width: 26px; height: 1px; background: var(--color-accent); }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 0.4rem; }
.hero-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.6rem; flex-wrap: wrap; }

/* ============================================================ BUTTONS */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.4rem;
    font-size: 0.9rem; font-weight: 600; border-radius: var(--radius-md);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    cursor: pointer; border: none; text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--color-accent-hover), var(--color-accent)); color: #06121f; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(109,177,240,0.55); filter: brightness(1.04); }
.btn-ghost { background: transparent; color: var(--color-text-secondary); border: 1px solid var(--color-border); }
.btn-ghost:hover { color: var(--color-text-primary); border-color: var(--color-text-muted); transform: translateY(-1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; pointer-events: none; transform: none; }

/* ============================================================ CARDS */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.card {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    padding: 1.6rem; display: flex; flex-direction: column; gap: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); border-color: rgba(255,255,255,0.14); }
.card-icon {
    width: 38px; height: 38px; background: var(--color-accent-dim); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; color: var(--color-accent);
}
.card-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.card h3 { font-size: 0.98rem; }
.card p { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.65; }
.card-link {
    margin-top: auto; padding-top: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--color-accent);
    display: inline-flex; align-items: center; gap: 0.3rem; transition: gap 0.15s ease;
}
.card-link:hover { gap: 0.55rem; }

/* Flagship product block */
.product-card {
    position: relative; overflow: hidden;
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(109,177,240,0.10), transparent 55%),
        linear-gradient(160deg, #14171d, #0e1013);
    border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    padding: 2.2rem; display: flex; flex-direction: column; gap: 1.1rem;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.product-card:hover { border-color: rgba(109,177,240,0.35); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.product-card h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.product-card p { color: var(--color-text-secondary); font-size: 0.98rem; }

/* ============================================================ CAPABILITY LIST */
.capability-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.capability-list li {
    display: flex; align-items: flex-start; gap: 0.8rem; padding: 1.15rem 1.2rem;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
    font-size: 0.92rem; color: var(--color-text-secondary); line-height: 1.5;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.capability-list li:hover { border-color: rgba(109,177,240,0.3); transform: translateY(-2px); }
.capability-list li svg { width: 19px; height: 19px; flex-shrink: 0; stroke: var(--color-accent); fill: none; stroke-width: 1.75; margin-top: 1px; }

/* ============================================================ PROSE (policies, contact, etc.) */
.prose-section { padding: 2rem 0; border-bottom: 1px solid var(--color-border-subtle); }
.prose-section:last-child { border-bottom: none; }
.prose-section h2 { margin-bottom: 0.75rem; }
.prose-section p { max-width: 62ch; }
.prose-section a { color: var(--color-accent); }

/* ============================================================ BADGE */
.badge {
    display: inline-block; padding: 0.25rem 0.7rem; font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase; border-radius: 999px;
    background: var(--color-surface-raised); color: var(--color-text-muted); border: 1px solid var(--color-border);
}
.badge-soon { background: var(--color-accent-dim); color: var(--color-accent); border-color: rgba(109,177,240,0.32); }
.badge-live { background: rgba(63,191,143,0.12); color: var(--color-success); border-color: rgba(63,191,143,0.35); }

/* ============================================================ MOTION */
.motion-section { opacity: 0; transform: translateY(14px); }
.motion-section.visible { opacity: 1; transform: none; transition: opacity 500ms ease, transform 500ms ease; }
.motion-section.visible[data-delay="1"] { transition-delay: 90ms; }
.motion-section.visible[data-delay="2"] { transition-delay: 180ms; }
.motion-section.visible[data-delay="3"] { transition-delay: 270ms; }
@media (prefers-reduced-motion: reduce) { .motion-section { transform: none; } .motion-section.visible { transition: opacity 200ms ease; } }

/* ============================================================ FOOTER */
#site-footer { border-top: 1px solid var(--color-border); padding: 2.75rem 1.5rem; background: rgba(255,255,255,0.015); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-brand { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--color-text-secondary); letter-spacing: -0.01em; text-transform: none; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.85rem; color: var(--color-text-muted); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--color-accent); }
.footer-note { font-size: 0.8rem; color: var(--color-text-muted); width: 100%; margin-top: 0.25rem; }

/* ============================================================ RESPONSIVE */
@media (max-width: 640px) {
    #site-main { padding: 2.5rem 1.1rem; }
    .hero { padding: 3.5rem 0 2.5rem; }
    .primary-nav { gap: 0; }
    .primary-nav .with-dropdown > a { padding: 0.4rem 0.55rem; font-size: 0.85rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}
