/* =========================================================================
   jordanwaeles.com — custom theme
   Dark, refined, engineering-precise. Sky blue accents.
   ========================================================================= */

:root {
    /* Surfaces */
    --bg-base:        #06080f;
    --bg-elev-1:      #0c111c;
    --bg-elev-2:      #131a28;
    --bg-card:        rgba(18, 25, 41, 0.55);
    --bg-card-hover:  rgba(24, 33, 54, 0.7);

    /* Lines */
    --line-faint:     rgba(255, 255, 255, 0.06);
    --line-soft:      rgba(255, 255, 255, 0.10);
    --line-strong:    rgba(255, 255, 255, 0.18);

    /* Text */
    --text-primary:   #e6edf6;
    --text-secondary: #aab4c5;
    --text-muted:     #6e7a91;
    --text-faint:     #4a5468;

    /* Accent — sky blue family */
    --accent:         #38bdf8;          /* sky-400 */
    --accent-bright:  #7dd3fc;          /* sky-300 */
    --accent-deep:    #0ea5e9;          /* sky-500 */
    --accent-soft:    rgba(56, 189, 248, 0.14);
    --accent-glow:    rgba(56, 189, 248, 0.45);

    /* Typography */
    --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Bootstrap overrides */
    --bs-body-bg: var(--bg-base);
    --bs-body-color: var(--text-secondary);
    --bs-link-color: var(--accent);
    --bs-link-hover-color: var(--accent-bright);
    --bs-border-color: var(--line-soft);
    --bs-emphasis-color: var(--text-primary);
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.65;
    font-feature-settings: 'ss01', 'cv11';
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

::selection {
    background: var(--accent-soft);
    color: var(--accent-bright);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 160ms var(--ease);
}
a:hover { color: var(--accent-bright); }

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.text-muted-2 { color: var(--text-muted) !important; }
.text-accent  { color: var(--accent) !important; }

/* Mono label / "eyebrow" used above section headings */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.eyebrow::before {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.7;
}

.section-counter {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2000;
    background: var(--accent);
    color: var(--bg-base);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
}

/* -------------------------------------------------------------------------
   Atmospheric background — subtle, never distracting
   ------------------------------------------------------------------------- */

.bg-atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* Fine dot grid for engineering texture */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 80%);
}

/* Faint film grain for warmth */
.bg-grain {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15  0 0 0 0 0.18  0 0 0 0 0.25  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
}

/* Three large, very blurred radial gradient "glows" */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.55;
    will-change: transform;
}

.bg-glow--one {
    top: -10rem;
    right: -8rem;
    width: 38rem;
    height: 38rem;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(56, 189, 248, 0) 65%);
    animation: drift-1 26s ease-in-out infinite alternate;
}

.bg-glow--two {
    bottom: -14rem;
    left: -10rem;
    width: 44rem;
    height: 44rem;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, rgba(14, 165, 233, 0) 70%);
    animation: drift-2 32s ease-in-out infinite alternate;
}

.bg-glow--three {
    top: 40%;
    left: 50%;
    width: 28rem;
    height: 28rem;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.10) 0%, rgba(125, 211, 252, 0) 70%);
    transform: translate(-50%, -50%);
    opacity: 0.35;
    animation: drift-3 40s ease-in-out infinite alternate;
}

@keyframes drift-1 {
    from { transform: translate(0,   0)    scale(1); }
    to   { transform: translate(-3rem, 4rem) scale(1.1); }
}
@keyframes drift-2 {
    from { transform: translate(0,   0)    scale(1); }
    to   { transform: translate(4rem, -3rem) scale(1.08); }
}
@keyframes drift-3 {
    from { transform: translate(-50%, -50%) scale(1); }
    to   { transform: translate(-45%, -55%) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .bg-glow { animation: none !important; }
    html { scroll-behavior: auto; }
}

/* -------------------------------------------------------------------------
   Header / Navbar
   ------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    background: rgba(6, 8, 15, 0.65);
    border-bottom: 1px solid var(--line-faint);
}

.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
.navbar-brand:hover { color: var(--text-primary); }

.brand-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15), 0 0 18px var(--accent-glow);
    animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.10), 0 0 18px var(--accent-glow); }
    50%      { box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.18), 0 0 26px var(--accent-glow); }
}

.brand-text { font-weight: 600; }
.brand-tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.3rem;
}

.navbar-nav .nav-link {
    color: var(--text-secondary);
    font-size: 0.94rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 160ms var(--ease);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus { color: var(--text-primary); }

.navbar-nav .nav-link.active { color: var(--accent); }
.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.2rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.7;
}

.navbar-toggler {
    border: 1px solid var(--line-soft);
    padding: 0.4rem 0.55rem;
}
.navbar-toggler:focus { box-shadow: 0 0 0 0.2rem var(--accent-soft); }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28230, 237, 246, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

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

.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    transition: all 180ms var(--ease);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.88rem; }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }

.btn-accent {
    background: var(--accent);
    color: #02131f;
    border-color: var(--accent);
    box-shadow: 0 4px 24px -8px var(--accent-glow);
}
.btn-accent:hover,
.btn-accent:focus {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
    color: #02131f;
    transform: translateY(-1px);
    box-shadow: 0 8px 32px -8px var(--accent-glow);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--text-primary);
}
.btn-ghost:hover,
.btn-ghost:focus {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

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

.hero {
    padding: 6rem 0 5rem;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero h1 .accent-text {
    background: linear-gradient(120deg, var(--accent-bright) 0%, var(--accent) 50%, var(--accent-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 42rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

.hero-meta {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--line-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}
.hero-meta strong {
    color: var(--text-primary);
    font-weight: 500;
    display: block;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    margin-top: 0.15rem;
}

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */

.section {
    padding: 5rem 0;
    position: relative;
}
.section-header {
    margin-bottom: 3rem;
    max-width: 50rem;
}
.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}
.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 38rem;
}

/* Section divider line */
.section-divider {
    border-top: 1px solid var(--line-faint);
}

/* -------------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------------- */

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 1.75rem;
    height: 100%;
    transition: all 280ms var(--ease);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 280ms var(--ease);
}
.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--line-strong);
    transform: translateY(-2px);
}
.feature-card:hover::before { opacity: 0.6; }

.feature-card .icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* -------------------------------------------------------------------------
   Service section blocks (detailed services page)
   ------------------------------------------------------------------------- */

.service-block {
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-bottom: 1.5rem;
    transition: border-color 240ms var(--ease);
}
.service-block:hover { border-color: var(--line-strong); }

.service-block .service-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.service-block .service-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}
.service-block h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
}
.service-list li {
    padding-left: 1.6rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}
.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 0.7rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.7;
}
.service-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}
.service-list code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    color: var(--accent-bright);
    background: rgba(56, 189, 248, 0.08);
    padding: 0.05em 0.4em;
    border-radius: 4px;
}

/* -------------------------------------------------------------------------
   Stack / chips
   ------------------------------------------------------------------------- */

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}
.chip {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--bg-elev-1);
    border: 1px solid var(--line-soft);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    transition: all 180ms var(--ease);
}
.chip:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

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

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 240ms var(--ease);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.contact-card:hover {
    border-color: var(--accent);
    transform: translateX(2px);
    color: var(--text-primary);
}
.contact-card .icon-wrap {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.contact-card .contact-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.15rem;
}
.contact-card .contact-value {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.contact-form-wrap {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.form-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-control,
.form-control:focus {
    background: var(--bg-elev-1);
    border: 1px solid var(--line-soft);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.7rem 0.95rem;
    font-size: 0.96rem;
    transition: all 180ms var(--ease);
}
.form-control::placeholder { color: var(--text-faint); }
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: var(--bg-elev-2);
}

/* Honeypot — visually & semantically hidden from humans */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.alert {
    border-radius: 10px;
    border: 1px solid;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
}
.alert-success {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}
.alert-danger {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

/* -------------------------------------------------------------------------
   CTA block
   ------------------------------------------------------------------------- */

.cta-block {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.06) 0%, rgba(14, 165, 233, 0.02) 100%);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.10) 0%, transparent 60%);
    pointer-events: none;
}
.cta-block h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
    position: relative;
}
.cta-block p {
    color: var(--text-secondary);
    max-width: 32rem;
    margin: 0 auto 1.75rem;
    position: relative;
}
.cta-block .btn { position: relative; }

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

.site-footer {
    margin-top: 6rem;
    padding: 4rem 0 2.5rem;
    border-top: 1px solid var(--line-faint);
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    flex-shrink: 0;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-primary);
    font-weight: 600;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 22rem;
}

.footer-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 1rem;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-list li { margin-bottom: 0.55rem; }
.footer-list a {
    color: var(--text-secondary);
    font-size: 0.93rem;
    transition: color 160ms var(--ease);
}
.footer-list a:hover { color: var(--accent); }

.footer-rule {
    border: 0;
    border-top: 1px solid var(--line-faint);
    margin: 2.5rem 0 1.5rem;
    opacity: 1;
}

.footer-meta { color: var(--text-muted); font-size: 0.85rem; }

.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    margin-right: 0.5rem;
    vertical-align: middle;
    animation: pulse-green 2.6s ease-in-out infinite;
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
    50%      { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.20); }
}

/* -------------------------------------------------------------------------
   Reveal on load — staggered
   ------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: reveal 0.7s var(--ease) forwards;
}
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.15s; }
.reveal-3 { animation-delay: 0.25s; }
.reveal-4 { animation-delay: 0.35s; }
.reveal-5 { animation-delay: 0.45s; }

@keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { animation: none !important; opacity: 1; transform: none; }
    .brand-dot, .status-dot { animation: none !important; }
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(6, 8, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        margin-top: 1rem;
        border-radius: 10px;
        border: 1px solid var(--line-soft);
        padding: 1rem;
    }
    .navbar-nav .nav-link.active::after { display: none; }
}

@media (max-width: 767.98px) {
    .hero { padding: 4rem 0 3rem; }
    .section { padding: 3.5rem 0; }
    .service-block { padding: 1.75rem; }
    .cta-block { padding: 2rem 1.5rem; }
    .hero-meta { gap: 1.5rem; }
}
