/* =========================================================
   SoloBuild — base styles
   ========================================================= */

:root {
    --bg: #1a1a1f;                /* solid dark gray site background */
    --banner-bg: #0e0e10;         /* slightly darker than body so the banner sits above it */
    --surface: #232328;           /* cards, inputs */
    --surface-hover: #2a2a30;
    --rule: rgba(255, 255, 255, 0.08);
    --rule-strong: rgba(255, 255, 255, 0.18);
    --chrome: rgba(255, 255, 255, 0.55);
    --chrome-bright: #ffffff;
    --menu-text: #e8e8e8;
    --menu-text-dim: rgba(232, 232, 232, 0.7);
    --text-dim: rgba(232, 232, 232, 0.6);

    /* Logo-derived accents */
    --accent-cyan: #3aa9ff;
    --accent-cyan-bright: #6cc4ff;
    --accent-orange: #ff8a3d;
    --accent-orange-bright: #ffa766;

    /* Status colors */
    --success: #4ade80;
    --error: #ff7676;

    --banner-height-mobile: 64px;
    --banner-height-desktop: 96px;
}

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

html, body {
    background-color: var(--bg);
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--menu-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* =========================================================
   Sticky banner (always visible)
   ========================================================= */

.banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--banner-height-mobile);
    background: var(--banner-bg);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

@media (min-width: 768px) {
    .banner {
        height: var(--banner-height-desktop);
    }
}

.banner-inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

.banner-image-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.banner-image {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

/* =========================================================
   Binary digit fill — flanks the logo, fades toward the banner edges
   Populated by main.js on load and on resize.
   ========================================================= */

.banner-binary {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: stretch;
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, 'Courier New', monospace;
    font-size: 11px;
    line-height: 13px;
    letter-spacing: 0;
    /* Mobile-first: logo occupies middle ~60% of viewport. Band peaks
       sit at 18% / 82% — right at the logo's visible edges — so digits
       reach the logo at near-full opacity (no gap). Inner fade tails
       extend to 32% / 68%, which is entirely UNDER the logo so the
       fade-out is hidden. Outer fade region (0→18%) gives the long
       gradual fade the user wants on the screen-edge side.
       Desktop overrides below at >=768px (logo proportionally narrower). */
    mask-image: linear-gradient(to right,
        transparent 0%,
        black 18%,
        transparent 32%,
        transparent 68%,
        black 82%,
        transparent 100%);
    -webkit-mask-image: linear-gradient(to right,
        transparent 0%,
        black 18%,
        transparent 32%,
        transparent 68%,
        black 82%,
        transparent 100%);
}

@media (min-width: 768px) {
    .banner-binary {
        mask-image: linear-gradient(to right,
            transparent 0%,
            black 17%,
            transparent 39%,
            transparent 61%,
            black 83%,
            transparent 100%);
        -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 17%,
            transparent 39%,
            transparent 61%,
            black 83%,
            transparent 100%);
    }
}

.bin-col {
    flex: 0 0 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.bin-col span {
    display: block;
}

/* =========================================================
   Hamburger button
   ========================================================= */

.hamburger {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    transition: background 0.2s ease;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--chrome);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.2s ease;
}

.hamburger:hover span {
    background: var(--chrome-bright);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
    .hamburger {
        right: 28px;
        width: 50px;
        height: 50px;
    }
    .hamburger span {
        width: 26px;
    }
}

/* =========================================================
   Menu drawer
   ========================================================= */

.menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 240px;
    background: var(--banner-bg);
    border-left: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    border-bottom-left-radius: 4px;
    box-shadow: -4px 8px 22px rgba(0, 0, 0, 0.5);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.menu ul {
    list-style: none;
    padding: 8px 0;
}

.menu li + li {
    border-top: 1px solid var(--rule);
}

.menu-link {
    display: block;
    padding: 16px 24px;
    color: var(--menu-text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: color 0.2s ease, background 0.2s ease;
}

.menu-link:hover,
.menu-link:focus {
    color: var(--chrome-bright);
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

/* =========================================================
   Page content (sits below the fixed banner)
   ========================================================= */

.content {
    padding-top: var(--banner-height-mobile);
    min-height: 100vh;
}

@media (min-width: 768px) {
    .content {
        padding-top: var(--banner-height-desktop);
    }
}

/* =========================================================
   Layout helpers
   ========================================================= */

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 32px;
    }
}

/* Anchored sections align their top edge with the banner bottom. The
   section's own padding-top creates the breathing room between the banner
   and the heading, so we keep that small. */
.section,
.hero,
#contact-status {
    scroll-margin-top: var(--banner-height-mobile);
}

@media (min-width: 768px) {
    .section,
    .hero,
    #contact-status {
        scroll-margin-top: var(--banner-height-desktop);
    }
}

.section {
    padding: 28px 0 64px;
    border-top: 1px solid var(--rule);
}

@media (min-width: 768px) {
    .section {
        padding: 36px 0 96px;
    }
}

.eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

/* =========================================================
   Section heads (used by every section)
   ========================================================= */

.section-head {
    margin-bottom: 40px;
    max-width: 720px;
}

.section-head h2 {
    font-size: clamp(1.625rem, 3.2vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--chrome-bright);
    margin-bottom: 12px;
}

.section-lede {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--menu-text-dim);
    max-width: 60ch;
}

@media (min-width: 768px) {
    .section-lede {
        font-size: 1.0625rem;
    }
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
    padding: 56px 0 56px;
}

@media (min-width: 768px) {
    .hero {
        padding: 96px 0 80px;
    }
}

.hero-title {
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: var(--chrome-bright);
    max-width: 18ch;
    margin-bottom: 20px;
}

.hero-accent {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    font-size: clamp(1rem, 1.6vw, 1.1875rem);
    line-height: 1.55;
    color: var(--menu-text-dim);
    max-width: 56ch;
    margin-bottom: 32px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* =========================================================
   Services / pillars
   ========================================================= */

.pillars {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .pillars {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.pillar {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 28px 24px;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.pillar:hover {
    border-color: var(--rule-strong);
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.pillar-icon {
    width: 44px;
    height: 44px;
    color: var(--accent-cyan);
    margin-bottom: 18px;
}

.pillar-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pillar:nth-child(2) .pillar-icon {
    color: var(--accent-orange);
}

.pillar h3 {
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--chrome-bright);
    margin-bottom: 10px;
    letter-spacing: -0.005em;
}

.pillar p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--menu-text-dim);
}

/* =========================================================
   Why solo
   ========================================================= */

.why-grid {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .why-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.why-card {
    position: relative;
    padding: 24px 24px 22px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
}

.why-num {
    display: block;
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
    font-size: 0.8125rem;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    letter-spacing: 0.06em;
}

.why-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--chrome-bright);
    margin-bottom: 6px;
}

.why-card p {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--menu-text-dim);
}

/* =========================================================
   About
   ========================================================= */

.about-body p {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--menu-text);
    max-width: 64ch;
}

.about-body p + p {
    margin-top: 18px;
}

/* =========================================================
   Process (numbered steps)
   ========================================================= */

.process {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    counter-reset: none;
}

@media (min-width: 768px) {
    .process {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.process-step {
    position: relative;
    padding: 22px 22px 20px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.process-num {
    display: inline-block;
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
    font-size: 0.75rem;
    color: var(--accent-orange);
    margin-bottom: 8px;
    letter-spacing: 0.08em;
}

.process-step h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--chrome-bright);
    margin-bottom: 6px;
}

.process-step p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--menu-text-dim);
}

/* =========================================================
   Recent work
   ========================================================= */

.work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

.work-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-status {
    align-self: flex-start;
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--rule-strong);
}

.work-status-live {
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.08);
}

.work-status-progress {
    color: var(--accent-orange);
    border-color: rgba(255, 138, 61, 0.4);
    background: rgba(255, 138, 61, 0.08);
}

.work-card h3 {
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--chrome-bright);
    letter-spacing: -0.005em;
}

.work-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--menu-text-dim);
    flex-grow: 1;
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--accent-cyan);
    text-decoration: none;
    margin-top: 4px;
    width: fit-content;
}

.work-link:hover {
    color: var(--accent-cyan-bright);
    text-decoration: underline;
}

.work-link svg {
    width: 14px;
    height: 14px;
}

.work-link-pending {
    color: var(--text-dim);
    font-style: italic;
    cursor: default;
}

/* =========================================================
   Contact section
   ========================================================= */

.section-contact {
    padding-bottom: 96px;
}

@media (min-width: 768px) {
    .section-contact {
        padding-bottom: 120px;
    }
}

/* =========================================================
   Flash messages
   ========================================================= */

.messages {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.message {
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--rule-strong);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.message-success {
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.08);
    color: var(--success);
}

.message-error {
    border-color: rgba(255, 118, 118, 0.4);
    background: rgba(255, 118, 118, 0.08);
    color: var(--error);
}

/* =========================================================
   Contact form
   ========================================================= */

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

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--menu-text-dim);
    text-transform: uppercase;
}

.optional-tag {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-dim);
    margin-left: 4px;
}

.required-asterisk {
    color: var(--accent-orange);
    margin-left: 3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: 6px;
    padding: 12px 14px;
    color: var(--chrome-bright);
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.15s ease, background 0.15s ease,
                box-shadow 0.15s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group input:hover,
.form-group textarea:hover {
    background: var(--surface-hover);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: var(--surface-hover);
    box-shadow: 0 0 0 3px rgba(58, 169, 255, 0.18);
}

/* iOS Safari / Chrome autofill yellow override.
   See ~/Projects/_shared/docs/FRONTEND_PATTERNS.md § "iOS Safari autofill yellow background". */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:active,
.form-group input:-webkit-autofill:focus,
.form-group textarea:-webkit-autofill,
.form-group input:autofill,
.form-group textarea:autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
            box-shadow: 0 0 0 1000px var(--surface) inset;
    -webkit-text-fill-color: var(--chrome-bright);
    caret-color: var(--chrome-bright);
    transition: background-color 5000s ease-in-out 0s;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

.contact-method-note {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-top: -8px;
}

/* =========================================================
   Honeypot — visually hidden but still in the DOM.
   Don't use display:none/visibility:hidden — sophisticated bots skip those.
   ========================================================= */

.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, transform 0.05s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-orange));
    color: #0e0e10;
    align-self: flex-start;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--accent-cyan-bright), var(--accent-orange-bright));
    outline: none;
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 3px rgba(58, 169, 255, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--menu-text);
    border-color: var(--rule-strong);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--chrome-bright);
    color: var(--chrome-bright);
    outline: none;
}

.btn-ghost:focus-visible {
    box-shadow: 0 0 0 3px rgba(58, 169, 255, 0.25);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    border-top: 1px solid var(--rule);
    padding: 32px 0;
    background: var(--banner-bg);
}

.site-footer p {
    font-size: 0.8125rem;
    color: var(--text-dim);
    text-align: center;
    letter-spacing: 0.02em;
}
