/* ════════════════════════════════════════════════
   HarborFrame Labs — harborframelabs.com
   Dark navy + electric-blue brand (tracks the HF logo/icon).
   Dark hero / about / footer; a single light "Our Apps" band
   in the middle, matching the studio concept design.
   ════════════════════════════════════════════════ */

:root {
    /* Brand blues (from the HF mark) */
    --blue:        #2b7bff;
    --blue-bright: #4d94ff;
    --blue-dark:   #1a5fe0;
    --blue-soft:   #e8f0ff;   /* tint for the light section */

    /* Navy scale — dark surfaces */
    --navy-950:    #060c1c;
    --navy-900:    #0a1430;
    --navy-850:    #0d1a38;
    --navy-800:    #101f42;
    --navy-700:    #17284d;
    --navy-line:   #24345c;   /* hairline on dark */

    /* Light section */
    --bg-light:    #f4f7fb;
    --bg-light-2:  #eaf1f9;
    --surface:     #ffffff;
    --surface-soft:#f8fbff;

    /* Text */
    --text-on-dark:      #eef3fb;
    --muted-on-dark:     #a9b8d4;
    --text:              #12203f;   /* on light */
    --muted:             #5a6b85;   /* on light */
    --line:              #d8e4f0;
    --line-strong:       #bfd1e4;

    --shadow:      0 18px 44px rgba(4, 12, 30, .16);
    --shadow-soft: 0 10px 24px rgba(4, 12, 30, .10);
    --shadow-dark: 0 22px 50px rgba(0, 0, 0, .40);

    --radius:      20px;
    --radius-sm:   14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Trebuchet MS', 'Segoe UI', Verdana, Arial, sans-serif;
    color: var(--text-on-dark);
    background: var(--navy-900);
    min-height: 100vh;
}

body.menu-open { overflow: hidden; }

a { color: var(--blue-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

/* ─── Header ─────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 16, 38, .86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--navy-line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand img.logo {
    height: 52px;
    width: auto;
    display: block;
}
/* icon-only fallback mark (used on 404 / compact spots) */
.brand img.icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--muted-on-dark);
    font-weight: 600;
    font-size: .92rem;
    transition: color .15s, background .15s;
}
.nav-links a:hover { color: #fff; background: rgba(43, 123, 255, .12); text-decoration: none; }
.nav-links a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    background: var(--navy-800);
    border: 1px solid var(--navy-line);
    border-radius: 12px;
    cursor: pointer;
    padding: 10px 9px;
}
.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--text-on-dark);
    border-radius: 2px;
    margin: 4px 0;
    transition: transform .2s, opacity .2s;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 82vw);
    background: var(--navy-850);
    box-shadow: -16px 0 40px rgba(0, 0, 0, .45);
    transform: translateX(105%);
    transition: transform .25s ease;
    z-index: 80;
    padding: 70px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid var(--navy-line);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer .drawer-label {
    color: var(--muted-on-dark);
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
}
.mobile-drawer nav { display: flex; flex-direction: column; }
.mobile-drawer nav a {
    color: var(--text-on-dark);
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
}
.mobile-drawer nav a:hover { background: rgba(43, 123, 255, .12); text-decoration: none; }

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 20, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 70;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

/* ─── Buttons ────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .1s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #fff;
    box-shadow: 0 10px 22px rgba(43, 123, 255, .32);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(43, 123, 255, .42); }

/* Secondary on dark surfaces */
.btn-secondary {
    background: rgba(255, 255, 255, .04);
    color: var(--text-on-dark);
    border-color: var(--navy-line);
}
.btn-secondary:hover { background: rgba(43, 123, 255, .12); border-color: var(--blue); }

/* Outline button used on the light apps band */
.btn-outline {
    background: transparent;
    color: var(--blue-dark);
    border-color: var(--line-strong);
    border-radius: 10px;
}
.btn-outline:hover { background: var(--blue-soft); border-color: var(--blue); }

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

/* ─── Kicker labels ──────────────────────────── */

.kicker {
    display: inline-block;
    color: var(--blue-bright);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.kicker--light { color: var(--blue); }

/* ─── Hero ────────────────────────────────────── */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1000px 500px at 80% -10%, rgba(43, 123, 255, .22), transparent 60%),
        radial-gradient(700px 400px at 100% 40%, rgba(43, 123, 255, .12), transparent 60%),
        linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
}
/* faint network / plexus texture on the right of the hero */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(120, 170, 255, .35) 1px, transparent 1.4px);
    background-size: 34px 34px;
    -webkit-mask-image: linear-gradient(105deg, transparent 42%, #000 100%);
    mask-image: linear-gradient(105deg, transparent 42%, #000 100%);
    opacity: .5;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 88px 0 68px;
    max-width: 640px;
}
.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(2.4rem, 5.4vw, 3.9rem);
    line-height: 1.04;
    letter-spacing: -1px;
    font-weight: 800;
}
.hero h1 .accent { color: var(--blue-bright); display: block; }

.hero .lead {
    color: var(--muted-on-dark);
    font-size: 1.12rem;
    line-height: 1.6;
    margin: 0;
    max-width: 46ch;
}

/* ─── Three pillars (Harbor / Frame / Labs) ──── */

.pillars {
    position: relative;
    z-index: 1;
    margin: 6px 0 -56px;   /* pull up to overlap hero bottom like the concept */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: rgba(13, 26, 56, .82);
    backdrop-filter: blur(6px);
    border: 1px solid var(--navy-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-dark);
    overflow: hidden;
}
.pillar {
    padding: 26px 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid var(--navy-line);
}
.pillar:last-child { border-right: none; }
.pillar .pillar-icon {
    width: 42px;
    height: 42px;
    color: var(--blue-bright);
    margin-bottom: 6px;
}
.pillar h3 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 800;
}
.pillar .pillar-sub { color: var(--blue-bright); font-weight: 700; font-size: .92rem; }
.pillar p { margin: 4px 0 0; color: var(--muted-on-dark); font-size: .92rem; line-height: 1.55; }

.hero-wrap { padding-bottom: 78px; } /* room for the overlapping pillars */

/* ─── Sections ────────────────────────────────── */

.section { padding: 64px 0; }

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 34px;
}
.section-header h2 {
    margin: 8px 0 8px;
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
    letter-spacing: -.4px;
}
.section-header p { margin: 0; line-height: 1.6; }

/* Light band (Our Apps) */
.section--light {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-light-2) 100%);
    color: var(--text);
}
.section--light .section-header p { color: var(--muted); }

/* Dark band (About) */
.section--dark {
    background:
        radial-gradient(800px 400px at 12% 10%, rgba(43, 123, 255, .14), transparent 60%),
        var(--navy-950);
}

/* ─── Apps grid ──────────────────────────────── */

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.app-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform .15s, box-shadow .15s;
    position: relative;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.app-card .app-art {
    padding: 26px 20px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-card .app-art img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 16px;
}
.app-card .app-art img.app-art-cover {
    width: 74px;
    height: 74px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}
.app-card .app-body {
    padding: 6px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.app-card .app-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.app-card .app-emoji { font-size: 1.2rem; line-height: 1; }
.app-card h3 { margin: 0; font-size: 1.1rem; color: var(--text); }
.app-card .app-category {
    color: var(--blue);
    font-size: .82rem;
    font-weight: 700;
}
.app-card .desc {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.55;
    flex: 1;
}
.app-card .desc p { margin: 0; }
.app-card .card-link {
    color: var(--blue);
    font-weight: 700;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-top: 2px;
}
.app-card .card-link .arrow { transition: transform .15s; }
.app-card:hover .card-link .arrow { transform: translateX(3px); }
.app-card .beta-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--blue);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}
/* stretched click target */
.app-card .stretch { position: absolute; inset: 0; z-index: 1; }
.app-card .app-body .btnrow { position: relative; z-index: 2; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.apps-actions { text-align: center; margin-top: 30px; }

.empty-state {
    grid-column: 1 / -1;
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
}
.empty-state h3 { margin: 0 0 8px; color: var(--text); }
.empty-state .empty-hint { font-size: .9rem; }

.skeleton {
    background: linear-gradient(90deg, #eef3f9 0%, #f7fafd 50%, #eef3f9 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}
.skeleton-card { height: 240px; }

/* ─── About band ─────────────────────────────── */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-copy h2 {
    margin: 10px 0 16px;
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    letter-spacing: -.4px;
    max-width: 14ch;
}
.about-copy p { color: var(--muted-on-dark); line-height: 1.7; margin: 0 0 14px; }
.about-art {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.about-art img { max-width: 300px; width: 100%; filter: drop-shadow(0 10px 40px rgba(43, 123, 255, .35)); }

/* ─── Featured app (dynamic, on light band) ──── */

.featured-hero-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
    text-align: left;
    margin-bottom: 40px;
}
.featured-copy h2 { margin: 12px 0 12px; font-size: clamp(1.6rem, 3.2vw, 2.1rem); color: var(--text); letter-spacing: -.3px; }
.featured-copy .lead { color: var(--muted); line-height: 1.6; }
.featured-art img { max-width: 100%; max-height: 280px; object-fit: contain; margin: 0 auto; display: block; border-radius: 16px; }

/* ─── Simple content pages (about/help/legal) ── */

.simple-page { padding: 56px 0 72px; }
.simple-card {
    background: var(--navy-850);
    border: 1px solid var(--navy-line);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-dark);
}
.simple-card h1 {
    margin: 14px 0 14px;
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    letter-spacing: -.3px;
}
.simple-card h2 { margin: 30px 0 10px; font-size: 1.3rem; }
.simple-card .lead { color: var(--muted-on-dark); font-size: 1.08rem; line-height: 1.65; }
.simple-card p, .simple-card li { line-height: 1.7; color: var(--text-on-dark); }
.simple-card ul { padding-left: 22px; }
.simple-card p { color: var(--muted-on-dark); }
.simple-card strong { color: var(--text-on-dark); }

/* ─── Footer ─────────────────────────────────── */

.footer {
    background: var(--navy-950);
    border-top: 1px solid var(--navy-line);
    padding: 46px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    gap: 32px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--navy-line);
}
.footer-brand img { height: 34px; margin-bottom: 12px; }
.footer-brand p { color: var(--muted-on-dark); font-size: .9rem; line-height: 1.6; margin: 0; max-width: 30ch; }
.footer-col h4 {
    margin: 4px 0 14px;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-on-dark);
}
.footer-col a { display: block; color: var(--text-on-dark); font-size: .92rem; padding: 4px 0; }
.footer-col a:hover { color: var(--blue-bright); text-decoration: none; }

.footer-news p { color: var(--muted-on-dark); font-size: .9rem; line-height: 1.6; margin: 0 0 12px; }
.footer-news .news-row { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-news input {
    flex: 1;
    min-width: 150px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--navy-line);
    background: var(--navy-800);
    color: var(--text-on-dark);
    font-family: inherit;
    font-size: .92rem;
}
.footer-news input:focus { outline: none; border-color: var(--blue); }

.footer-bottom {
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted-on-dark);
    font-size: .86rem;
}
.footer-bottom a { color: var(--muted-on-dark); }
.footer-bottom a:hover { color: var(--blue-bright); }

/* Simplified single-row footer used on interior pages */
.footer-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--muted-on-dark);
    font-size: .88rem;
    flex-wrap: wrap;
}
.footer-shell a { color: var(--muted-on-dark); }
.footer-shell a:hover { color: var(--blue-bright); }

/* ─── Responsive ─────────────────────────────── */

@media (max-width: 920px) {
    .menu-toggle { display: block; }
    .nav-links { display: none; }

    .hero-inner { padding: 60px 0 40px; }
    .hero-wrap { padding-bottom: 60px; }
    .pillars { grid-template-columns: 1fr; margin-bottom: -40px; }
    .pillar { border-right: none; border-bottom: 1px solid var(--navy-line); }
    .pillar:last-child { border-bottom: none; }

    .about-grid { grid-template-columns: 1fr; gap: 28px; }
    .about-art { order: -1; }
    .featured-hero-card { grid-template-columns: 1fr; padding: 26px; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-news { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .simple-card { padding: 26px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
