/* =============================================
   Henwood Capital
   Black background, white text, bold editorial.
   Inspired by 500.co
   ============================================= */

:root {
    --black: #000000;
    --black-2: #0a0a0a;
    --black-3: #111111;
    --white: #ffffff;
    --muted: #8a8a8a;
    --muted-2: #b5b5b5;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.4);
    --accent: #ffffff;
    --max-width: 1280px;
    --header-h: 72px;
    --t: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }

body {
    margin: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--white);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--white); color: var(--black); }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--white);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.02;
    margin: 0 0 0.5em;
}

h1 {
    font-size: clamp(2.75rem, 7.5vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
}
h1 em {
    font-style: italic;
    font-weight: 300;
    font-family: 'Outfit', sans-serif;
}
h1 .num {
    font-style: italic;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-underline-offset: 8px;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted-2);
    margin-bottom: 28px;
}
.eyebrow .dot {
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
    display: inline-block;
}

.lead {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    color: var(--muted-2);
    max-width: 640px;
    line-height: 1.5;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: all var(--t);
    cursor: pointer;
    letter-spacing: -0.01em;
}
.btn .arrow {
    transition: transform var(--t);
    display: inline-block;
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}
.btn-primary:hover {
    background: transparent;
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: var(--line-strong);
}
.btn-ghost:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

.btn-block { width: 100%; justify-content: center; padding: 18px 24px; }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color var(--t), background var(--t);
}
.site-header.scrolled {
    border-bottom-color: var(--line);
    background: rgba(0, 0, 0, 0.85);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--white);
}
.brand-logo {
    height: 32px;
    width: auto;
    display: block;
}

.nav { display: flex; gap: 36px; }
.nav a {
    font-size: 0.95rem;
    color: var(--muted-2);
    transition: color var(--t);
    font-weight: 400;
}
.nav a:hover { color: var(--white); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 0;
    padding: 8px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: transform var(--t), opacity var(--t);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: calc(var(--header-h) + 80px) 0 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.hero h1 { max-width: 1100px; margin-bottom: 32px; }
.hero .lead { margin-bottom: 44px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; padding-bottom: 96px; }

.hero-marquee {
    border-top: 1px solid var(--line);
    padding: 28px 0;
    overflow: hidden;
    white-space: nowrap;
}
.marquee-track {
    display: inline-flex;
    gap: 28px;
    align-items: center;
    animation: marquee 40s linear infinite;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}
.marquee-track span:nth-child(even) { color: var(--muted); font-size: 0.9em; }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- Stats ---------- */
.stats {
    border-bottom: 1px solid var(--line);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 64px 32px;
    gap: 0;
}
.stat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 32px;
    border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--white);
}
.stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

/* ---------- Sections ---------- */
section { padding: 140px 0; }
.portfolio { padding-top: 140px; padding-bottom: 0; border-bottom: 1px solid var(--line); }
.about { border-bottom: 1px solid var(--line); }
.contact { padding-bottom: 140px; }

.section-head {
    max-width: 800px;
    margin: 0 0 80px;
}
.section-head h2 { margin-bottom: 24px; }
.section-sub { color: var(--muted-2); font-size: 1.1rem; max-width: 600px; }

/* ---------- Portfolio List (500.co style rows) ---------- */
.company-list {
    border-top: 1px solid var(--line);
    margin-bottom: 0;
}

.company-row {
    display: grid;
    grid-template-columns: 64px 120px 1fr 180px 110px;
    align-items: center;
    gap: 28px;
    padding: 28px 8px;
    border-bottom: 1px solid var(--line);
    transition: background var(--t), padding var(--t);
    cursor: pointer;
    position: relative;
}
.company-row:hover {
    background: var(--white);
    color: var(--black);
    padding-left: 24px;
    padding-right: 24px;
}
.company-row:hover .row-num,
.company-row:hover .row-sector { color: var(--black); }
.company-row:hover .row-name { color: var(--black); }
.company-row:hover .row-link { color: var(--black); }
.company-row:hover .row-link .arrow { transform: translate(4px, -4px); }
.company-row:hover .row-logo {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.04);
}
.company-row:hover .row-logo .logo-fallback { color: var(--black); }

.row-num {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.05em;
    transition: color var(--t);
}

.row-logo {
    position: relative;
    width: 120px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--black-3);
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t), border-color var(--t);
    flex-shrink: 0;
}
.row-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.row-logo .logo-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    transition: color var(--t);
}
.row-logo.no-logo .logo-fallback { display: flex; }
.row-name {
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--white);
    line-height: 1.05;
    transition: color var(--t);
}
.row-bio {
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--muted-2);
    max-width: 720px;
    line-height: 1.5;
    transition: color var(--t);
}
.company-row:hover .row-bio { color: rgba(0, 0, 0, 0.7); }
.row-sector {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted-2);
    transition: color var(--t);
}
.row-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
    transition: color var(--t);
    justify-self: end;
}
.row-link .arrow {
    display: inline-block;
    transition: transform var(--t);
}

/* ---------- Founder ---------- */
.founder { border-bottom: 1px solid var(--line); }
.founder-grid {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 80px;
    align-items: start;
}

.founder-media { display: flex; flex-direction: column; gap: 16px; }
.founder-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
    background: var(--black-3);
    border: 1px solid var(--line);
}
.founder-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: grayscale(20%);
    transition: filter var(--t), transform 0.5s ease;
}
.founder-photo:hover img { filter: grayscale(0); transform: scale(1.02); }

.photo-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--white);
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 60%),
        var(--black-3);
}
.founder-photo.no-image .photo-fallback { display: flex; }

.founder-caption {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.founder-copy h2 { margin-bottom: 24px; }
.founder-lead {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    color: var(--white);
    line-height: 1.45;
    margin-bottom: 24px;
    max-width: 640px;
}
.founder-copy p { color: var(--muted-2); font-size: 1rem; max-width: 640px; }

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.about-copy h2 { margin-bottom: 24px; }
.about-copy p { color: var(--muted-2); font-size: 1.1rem; max-width: 480px; }

.about-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.about-points li {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 24px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    align-items: start;
}
.about-points li:last-child { border-bottom: 1px solid var(--line); }
.about-points .point-num {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
    padding-top: 4px;
    letter-spacing: 0.05em;
}
.about-points .point-body { min-width: 0; }
.about-points h3 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 600; color: var(--white); }
.about-points p { color: var(--muted-2); margin: 0; font-size: 0.95rem; line-height: 1.55; }

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.contact-copy p { color: var(--muted-2); font-size: 1.1rem; max-width: 420px; }

.contact-form {
    border: 1px solid var(--line);
    padding: 40px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    background: var(--black-2);
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
    font-size: 0.78rem;
    color: var(--muted-2);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.field .optional { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.78rem; }
.field input,
.field select,
.field textarea {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--white);
    padding: 10px 0;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--t);
    border-radius: 0;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-bottom-color: var(--white);
}
.field textarea { resize: vertical; min-height: 100px; }
.field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23ffffff' d='M6 8L0 0h12z'/></svg>"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 32px; cursor: pointer; }
.field select option { background: var(--black); color: var(--white); }

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-bottom-color: #ff6b6b; }

.error {
    font-size: 0.8rem;
    color: #ff8585;
    min-height: 1em;
}

.form-status {
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2em;
    color: var(--muted-2);
}
.form-status.success { color: var(--white); }
.form-status.error { color: #ff8585; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 32px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    color: var(--white);
}
.footer-brand img {
    height: 28px;
    width: auto;
    display: block;
}
.footer-copy { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- Reveal animation (no-op, always visible) ---------- */
.reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .about-grid,
    .contact-grid,
    .founder-grid { grid-template-columns: 1fr; gap: 56px; }
    .founder-media { max-width: 420px; }
}

@media (max-width: 820px) {
    .stats-grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 32px; }
    .stat { border-left: 0; border-top: 1px solid var(--line); padding: 32px 0 0; }
    .stat:first-child { border-top: 0; padding-top: 0; }
    section { padding: 96px 0; }
    .portfolio { padding-top: 96px; }
    .contact { padding-bottom: 96px; }

    .company-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 28px 8px;
    }
    .company-row:hover { padding-left: 12px; padding-right: 12px; }
    .row-num { order: 1; }
    .row-sector { order: 2; }
    .row-logo { order: 3; width: 110px; height: 56px; }
    .row-text { order: 4; }
    .row-link { order: 5; justify-self: start; }
    .row-num { font-size: 0.85rem; }
    .section-head { margin-bottom: 56px; }
}

@media (max-width: 720px) {
    .nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .site-header.menu-open .nav {
        display: flex;
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--black);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--line);
    }
    .site-header.menu-open .nav a {
        padding: 18px 32px;
        border-top: 1px solid var(--line);
    }
    .site-header.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-header.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .site-header.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .hero { padding-top: calc(var(--header-h) + 56px); }
    .hero-cta { padding-bottom: 64px; }
    .container { padding: 0 20px; }
    .contact-form { padding: 28px 24px; }
    .brand-logo { height: 26px; }
}
