/* ============================================
   LAVERTY PROD. — Stylesheet
   ============================================ */

:root {
    --color-bg: #faf9f7;
    --color-bg-dark: #1a1a1a;
    --color-text: #2c2c2c;
    --color-text-light: #e8e6e1;
    --color-muted: #4a4a4a;
    --color-muted-light: #a3a09a;
    --color-accent: #8b7355;
    --color-accent-hover: #6d5a43;
    --color-border: #e0ddd8;
    --color-border-dark: #333;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-decoration: none;
    letter-spacing: 0.15em;
}

.logo span {
    font-weight: 400;
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--color-muted-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #fff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--color-text-light);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-dark);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(139, 115, 85, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 115, 85, 0.05) 0%, transparent 50%);
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 750px;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--color-muted-light);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.25s;
    cursor: pointer;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-border-dark);
}

.btn-outline:hover {
    border-color: var(--color-muted-light);
    color: #fff;
}

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

.section {
    padding: 7rem 0;
}

.section-dark {
    background: var(--color-bg-dark);
    color: var(--color-text-light);
}

.section-dark + .section-dark {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.section-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.section h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 3rem;
}

.section-dark h2 {
    color: var(--color-text-light);
}

/* ---- About ---- */

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    color: var(--color-muted-light);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.detail p {
    color: var(--color-muted-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ---- Services ---- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.service-card {
    padding: 2.5rem 2rem;
    border: 1px solid var(--color-border-dark);
    border-radius: 3px;
    transition: border-color 0.3s;
}

.service-card:hover {
    border-color: var(--color-accent);
}

.service-icon {
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

.service-card p {
    color: var(--color-muted-light);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* ---- Publications ---- */

.publications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.pub-card {
    padding: 2.5rem;
    border: 1px solid var(--color-border-dark);
    border-radius: 3px;
    transition: border-color 0.3s;
}

.pub-card:hover {
    border-color: var(--color-accent);
}

.pub-icon {
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.pub-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text-light);
}

.pub-type {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: 1rem !important;
}

.pub-card p {
    color: var(--color-muted-light);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.pub-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.platform-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.25rem;
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    border: 1px solid var(--color-border-dark);
    border-radius: 2px;
    transition: all 0.25s;
}

.platform-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

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

.contact-content p {
    color: var(--color-muted-light);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

a.contact-item:hover {
    color: var(--color-accent);
}

.contact-item svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

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

.footer {
    background: #111;
    padding: 3rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.footer-reg {
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--color-muted-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* ---- Animations ---- */

/* Hero entrance */
.hero-tagline {
    animation: fadeUp 1s ease 0.2s both;
}

.hero h1 {
    animation: fadeUp 1s ease 0.5s both;
}

.hero-sub {
    animation: fadeUp 1s ease 0.8s both;
}

.hero-actions {
    animation: fadeUp 1s ease 1.1s both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.reveal-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-children.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-children.visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-children.visible > *:nth-child(4) { transition-delay: 0.45s; }

.reveal-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover lift effect */
.service-card,
.pub-card {
    transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.service-card:hover,
.pub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Button shimmer effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

/* Platform link hover */
.platform-link {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.platform-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Nav link underline animation */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Section label line animation */
.section-label {
    position: relative;
    display: inline-block;
}

.section-label::after {
    content: '';
    display: block;
    width: 2rem;
    height: 1px;
    background: var(--color-accent);
    margin-top: 0.75rem;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.visible .section-label::after,
.section-label:hover::after {
    width: 4rem;
}

/* Smooth logo hover */
.logo {
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .reveal-children > * { opacity: 1; transform: none; }
}

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

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

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        padding: 2rem;
        gap: 1.5rem;
    }

    .nav-links.open {
        display: flex;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 8rem 1.5rem 5rem;
    }

    .section {
        padding: 5rem 0;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .publications-grid {
        grid-template-columns: 1fr;
    }

    .pub-links {
        flex-direction: column;
    }
}
