/*
 * Excelano.com Styles
 * Author: David M. Anderson
 * Built with AI assistance (Claude, Anthropic)
 */

@import url('../brand.css');
@import url('../axe/axe.css');


/* ============================================
   BASE OVERRIDES
   Excelano-specific adjustments to axe defaults.
   ============================================ */

html {
    scroll-padding-top: var(--nav-height);
}

/* All lists unstyled by default; individual components re-enable as needed */
ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}


/* ============================================
   LAYOUT
   ============================================ */

main {
    max-width: none;
    padding: 0;
}

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

.section {
    padding: var(--space-lg) 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-heading {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.section-sub {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}


/* ============================================
   NAVIGATION
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-nav-bg);
    color: var(--color-nav-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    gap: var(--space-md);
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.nav-links {
    display: none;
    gap: var(--space-md);
    align-items: center;
}

.nav-links a {
    color: var(--color-nav-text);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.15s;
    opacity: 0.85;
}

.nav-links a:hover {
    color: var(--color-highlight);
    opacity: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    color: var(--color-nav-text);
    font-size: 0.85rem;
    transition: border-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
    border-color: var(--color-highlight);
    color: var(--color-highlight);
}

.theme-toggle-icon::before {
    content: '☀';
}

[data-theme="dark"] .theme-toggle-icon::before {
    content: '☽';
}

/* Hamburger */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-hamburger span {
    display: block;
    height: 2px;
    background: var(--color-nav-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

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

/* Drawer — extends the dark nav on mobile when hamburger is open. */
.nav-drawer {
    display: none;
    background: var(--color-nav-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: var(--space-sm) var(--space-md);
}

.nav-drawer.open {
    display: block;
}

.nav-drawer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-drawer-links a {
    display: block;
    color: var(--color-nav-text);
    padding: 0.5rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav-drawer-links a:last-child {
    border-bottom: none;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .nav-hamburger {
        display: none;
    }

    .nav-drawer {
        display: none !important;
    }
}


/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.15s, transform 0.1s;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-highlight {
    background: var(--highlight);
    color: #1a1a1a;
}

.btn-highlight:hover {
    background: var(--highlight-dark);
}


/* ============================================
   HERO

   Multi-variant. The inline script in <head> sets
   html[data-hero="N"]; rules below show only variant N and apply a
   solid background. Two background treatments alternate across the
   eight variants (brand spec: no gradients). Change is deliberately
   subtle — some visitors will never notice it.
   ============================================ */

.hero {
    background: var(--bg-hero);
    color: var(--text-light);
    padding: var(--space-xl) 0;
}

/* Show only the chosen variant. Default hidden to prevent any flash
   if JS is disabled or the data-hero attribute isn't set. */
.hero-variant { display: none; }

html[data-hero="0"] .hero-variant[data-variant="0"],
html[data-hero="1"] .hero-variant[data-variant="1"],
html[data-hero="2"] .hero-variant[data-variant="2"],
html[data-hero="3"] .hero-variant[data-variant="3"],
html[data-hero="4"] .hero-variant[data-variant="4"],
html[data-hero="5"] .hero-variant[data-variant="5"],
html[data-hero="6"] .hero-variant[data-variant="6"],
html[data-hero="7"] .hero-variant[data-variant="7"] {
    display: block;
}

/* No-JS fallback: if data-hero never gets set, show variant 0. */
html:not([data-hero]) .hero-variant[data-variant="0"] {
    display: block;
}

/* Background alternation — odd-indexed variants get the deeper purple. */
html[data-hero="1"] .hero,
html[data-hero="3"] .hero,
html[data-hero="5"] .hero,
html[data-hero="7"] .hero {
    background: var(--hero-deep);
}

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: flex-start;
}

.hero-text {
    max-width: 640px;
}

.hero-headline {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    color: #fff;
}

.hero-logo {
    height: 40px;
    width: auto;
    margin-bottom: var(--space-md);
}

.hero-sub {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(240, 239, 233, 0.8);
    margin-bottom: var(--space-md);
}

.hero-text > .btn {
    margin-top: var(--space-md);
}

.hero-photo {
    width: 100%;
    max-width: 320px;
}

.hero-photo-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .hero-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hero-photo {
        flex-shrink: 0;
    }
}


/* ============================================
   TESTIMONIALS
   ============================================ */

/* Wrapper around the swiper so the nav arrows live outside the
   swiper's overflow: hidden and can sit in the gutter beside the card. */
.testimonials-frame {
    position: relative;
    padding: 0 3.5rem;
}

.testimonials-swiper {
    padding-bottom: 3rem !important;
}

.testimonial {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
}

.testimonial p {
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.testimonial footer {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: normal;
}

.swiper-button-prev,
.swiper-button-next {
    color: var(--accent) !important;
}

/* Pin arrows to the frame gutters. Arrows live outside the swiper now,
   so Swiper's overflow: hidden no longer clips them. */
.swiper-button-prev { left: 0 !important; }
.swiper-button-next { right: 0 !important; }

.swiper-pagination-bullet-active {
    background: var(--accent) !important;
}


/* ============================================
   WORK
   ============================================ */

/* Filter bar above the grid. Pills render as pure text until
   clickable; active state fills with accent color. */
.work-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--space-md);
}

.work-filter-pill {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.work-filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.work-filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Grid sizes to the visible card count. Default at each breakpoint
   is 1/2/3 columns; data-count="1" and "2" override on wider screens
   so a lightly filtered view doesn't leave empty tracks. */
.work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

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

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

.work-grid[data-count="1"] {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
}

@media (min-width: 960px) {
    .work-grid[data-count="2"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.work-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
}

.work-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.work-card-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.22rem 0.6rem;
    border-radius: 100px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
}

/* Tertiary gold variant for open source and in-development tags.
   Brand reserves gold as a sparing accent; open-source markers are
   exactly the kind of distinct voice it's there for. */
.work-card-tag-open {
    background: color-mix(in srgb, var(--tertiary) 22%, transparent);
    color: var(--tertiary-dark);
}

.work-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.work-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.work-card-details {
    list-style: disc;
    padding-left: 1.2rem;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.work-card-details li {
    margin-bottom: 0.3rem;
}

.work-card-client {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.work-card-client a {
    color: var(--accent);
    text-transform: none;
    letter-spacing: normal;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.work-card-client a:hover {
    color: var(--accent-dark);
}

.work-card-tool {
    border-style: dashed;
}



/* ============================================
   HOW I WORK
   ============================================ */

.how-i-work-inner {
    max-width: 780px;
}

.how-i-work-inner p {
    margin-bottom: var(--space-sm);
    color: var(--text);
}


/* ============================================
   ABOUT
   ============================================ */

.about-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.about-photo {
    flex-shrink: 0;
    width: 100%;
    max-width: 280px;
    align-self: flex-start;
}

.about-photo-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.about-text p {
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.about-credentials {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.credential strong {
    display: block;
    font-size: 0.95rem;
}

.credential span {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.about-clients-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.25rem !important;
}

@media (min-width: 768px) {
    .about-inner {
        flex-direction: row;
        align-items: flex-start;
    }
}


/* ============================================
   CONTACT
   ============================================ */

.contact-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.contact-text p {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.contact-direct {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-direct a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Honeypot — visually hidden, still accessible to screen readers so bots fill it */
.fie1d {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-field input,
.form-field textarea {
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
    color: var(--text);
    transition: border-color 0.15s;
    width: 100%;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-status {
    font-size: 0.9rem;
    min-height: 1.4rem;
}

.form-status.success { color: #1a8a4a; }
.form-status.error   { color: #c0392b; }

@media (min-width: 768px) {
    .contact-inner {
        grid-template-columns: 1fr 1.5fr;
    }
}


/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

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