/* ========================================
   Emma Calley - Medical Writer & Plain English Specialist
   Clone Template - Edit as needed
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #FFFFFF;
    --color-bg-alt: #FFF8F5;
    --color-text: #1A1A1A;
    --color-text-light: #555555;
    --color-accent: #E8917A;
    --color-accent-dark: #D0725A;
    --color-accent-light: #FDEEE8;
    --color-heading: #1A1A1A;
    --color-muted: #777777;
    --color-border: #E8E8E8;
    --color-btn-text: #FFFFFF;
    --font-heading: 'Inter Display', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --section-gap: 100px;
}

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

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

a {
    color: var(--color-accent-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.25;
    color: var(--color-heading);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

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

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

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}

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

.btn--primary:hover {
    background: var(--color-accent-dark);
    color: var(--color-btn-text);
    transform: translateY(-1px);
}

.btn--outline {
    background: transparent;
    border-color: var(--color-accent);
    color: var(--color-accent-dark);
}

.btn--outline:hover {
    background: var(--color-accent);
    color: var(--color-btn-text);
}

/* --- Header / Nav --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--color-heading);
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--color-accent);
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav__link {
    color: var(--color-text-light);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 4px 0;
}

.nav__link:hover,
.nav__link--active {
    color: var(--color-accent-dark);
}

.nav__cta {
    margin-left: 8px;
}

/* Mobile nav toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

@media (max-width: 809px) {
    .nav__toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 24px;
        transform: translateY(-110%);
        transition: transform 0.3s ease;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    .nav.open {
        transform: translateY(0);
    }

    .nav__list {
        flex-direction: column;
        gap: 16px;
    }

    .nav__cta {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* --- Hero Section --- */
.hero {
    padding-top: 160px;
    padding-bottom: 80px;
}

.hero__inner {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    align-items: center;
}

.hero__content {
    max-width: none;
}

.hero__tag {
    display: inline-block;
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
    letter-spacing: 0.03em;
}

.hero__title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 32px;
    color: var(--color-text-light);
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image img {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

@media (max-width: 809px) {
    .hero {
        padding-top: 120px;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero__content {
        max-width: 100%;
        text-align: center;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__image {
        order: -1;
    }

    .hero__image img {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* --- Quote Block --- */
.quote-block {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

.quote-block__text {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-style: italic;
    color: var(--color-text-light);
    line-height: 1.6;
}

.quote-block__attr {
    margin-top: 16px;
    font-size: 0.95rem;
    font-style: normal;
    color: var(--color-muted);
}

/* --- Services Section --- */
.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.service-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 8px 30px rgba(232, 145, 122, 0.12);
    transform: translateY(-2px);
}

.service-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.service-card__title {
    margin-bottom: 10px;
}

.service-card__desc {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Differentiators / Why Hire --- */
.diff-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.diff-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.diff-item__num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-btn-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.diff-item__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.diff-item__desc {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- Testimonials --- */
.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 48px;
}

.testimonial {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--color-border);
}

.testimonial__text {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--color-text-light);
}

.testimonial__author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-heading);
}

/* --- FAQ --- */
.faq__list {
    max-width: 800px;
    margin: 48px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item__question {
    width: 100%;
    background: none;
    border: none;
    padding: 24px 0;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
}

.faq-item__question::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--color-accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.open .faq-item__question::after {
    content: '−';
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-item.open .faq-item__answer {
    max-height: 300px;
}

.faq-item__answer p {
    padding-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Process / Pillars --- */
.process__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-top: 48px;
}

.process-step {
    text-align: center;
}

.process-step__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.process-step__title {
    margin-bottom: 10px;
}

.process-step__desc {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- CTA Banner --- */
.cta-banner {
    text-align: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: var(--color-btn-text);
    padding: 80px 24px;
    border-radius: 16px;
    margin: var(--section-gap) auto;
    max-width: var(--max-width);
}

.cta-banner h2 {
    color: var(--color-btn-text);
    margin-bottom: 16px;
}

.cta-banner p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.cta-banner .btn {
    background: var(--color-bg);
    color: var(--color-accent-dark);
}

.cta-banner .btn:hover {
    background: var(--color-heading);
    color: var(--color-btn-text);
}

/* --- Contact --- */
.contact__form {
    max-width: 640px;
    margin: 48px auto 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
    background: var(--color-bg);
    color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

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

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

/* --- Footer --- */
.footer {
    background: var(--color-heading);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 40px;
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.footer__brand p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer__heading {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: 12px;
}

.footer__links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

.footer__bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

@media (max-width: 809px) {
    .footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }
.animate-in:nth-child(5) { animation-delay: 0.4s; }
.animate-in:nth-child(6) { animation-delay: 0.5s; }

/* --- Misc --- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.section-header__title {
    margin-bottom: 12px;
}

.section-header__desc {
    font-size: 1.1rem;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 24px auto;
    border-radius: 2px;
}

/* --- Client logos / base --- */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.client-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}

.client-card__name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
}

.client-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* --- Portfolio --- */
.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.portfolio-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.portfolio-card__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--color-bg-alt);
}

.portfolio-card__body {
    padding: 24px;
}

.portfolio-card__title {
    margin-bottom: 8px;
}

.portfolio-card__desc {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.portfolio-card__client {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent-dark);
}

@media (max-width: 809px) {
    .portfolio__grid {
        grid-template-columns: 1fr;
    }
}

/* --- About page specific --- */
.about__bio {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.about__portrait {
    flex-shrink: 0;
    width: 380px;
    min-width: 380px;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.about__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.about__bio > div:last-child {
    flex: 1;
    min-width: 0;
}

@media (max-width: 809px) {
    .about__bio {
        flex-direction: column;
        gap: 32px;
    }

    .about__portrait {
        width: 300px;
        height: 400px;
        margin: 0 auto;
    }
}

.qualifications__list {
    list-style: none;
    margin-top: 24px;
}

.qualifications__list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.qualifications__list li:last-child {
    border-bottom: none;
}

/* --- Rates table --- */
.rates-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.rate-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.rate-card__icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.rate-card__title {
    margin-bottom: 12px;
}

.rate-card__desc {
    font-size: 0.95rem;
}

/* --- Smooth scroll offset for fixed header --- */
section[id] {
    scroll-margin-top: 80px;
}
