/* ============================================
   FARMÀCIA RAMON XIRGU ALEIXANDRE
   Premium Dark Luxury — Charcoal + Coral
   ============================================ */

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

:root {
    --bg-primary: #0e0e10;
    --bg-secondary: #16161a;
    --bg-card: #1c1c21;
    --bg-elevated: #222228;
    --coral: #e07a5f;
    --coral-light: #e8956f;
    --coral-dark: #c4624a;
    --coral-glow: rgba(224, 122, 95, 0.15);
    --coral-glow-strong: rgba(224, 122, 95, 0.3);
    --gold: #c9a962;
    --gold-light: #d4b978;
    --text-primary: #f5f0eb;
    --text-secondary: #a8a4a0;
    --text-muted: #6b6764;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(224, 122, 95, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-coral: 0 8px 32px rgba(224, 122, 95, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

/* ── Background Effects ── */
.bg-glow {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(224, 122, 95, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.bg-glow::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.bg-grain {
    position: fixed;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* ── Typography ── */
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

.text-gradient {
    background: linear-gradient(135deg, var(--coral) 0%, var(--coral-light) 50%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-coral);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(224, 122, 95, 0.35);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    color: var(--text-primary);
    border-color: var(--coral);
    background: var(--coral-glow);
}

.btn--full {
    width: 100%;
    justify-content: center;
    padding: 16px 32px;
}

/* ── Header ── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: all var(--transition);
}

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

.header.scrolled {
    background: rgba(14, 14, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header.scrolled .header-inner {
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--coral);
}

/* ── Navigation ── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    transition: all var(--transition);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.hamburger {
    top: 50%;
    transform: translate(-50%, -50%);
}

.hamburger::before {
    content: '';
    top: -7px;
}

.hamburger::after {
    content: '';
    top: 7px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--coral-glow);
}

.nav-link--accent {
    color: var(--coral);
    font-weight: 500;
}

.nav-link--accent:hover {
    background: var(--coral-glow-strong);
    color: var(--coral-light);
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-trust {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.trust-item svg {
    color: var(--coral);
    flex-shrink: 0;
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
}

.hero-image-frame {
    position: absolute;
    inset: 16px -16px -16px 16px;
    border: 1px solid var(--coral);
    border-radius: var(--radius-xl);
    opacity: 0.25;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.hero-badge {
    position: absolute;
    bottom: -16px;
    left: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
}

.badge-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.badge-divider {
    color: var(--coral);
    font-size: 0.7rem;
}

/* Hero Scroll */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--coral), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ── About ── */
.about {
    padding: 120px 0;
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image-group {
    position: relative;
}

.about-image-main {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.about-image-secondary {
    position: absolute;
    bottom: -32px;
    right: -32px;
    width: 55%;
    border-radius: var(--radius-lg);
    border: 4px solid var(--bg-primary);
    box-shadow: var(--shadow-md);
}

.about-experience {
    position: absolute;
    top: -20px;
    right: -20px;
    background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    text-align: center;
    box-shadow: var(--shadow-coral);
}

.exp-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.exp-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.about-content {
    padding: 16px 0;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

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

.value-icon {
    color: var(--coral);
    flex-shrink: 0;
    margin-top: 2px;
}

.value-text h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.value-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Services ── */
.services {
    padding: 120px 0;
    position: relative;
    z-index: 2;
}

.services .section-header {
    text-align: center;
    margin-bottom: 64px;
}

.services .section-subtitle {
    margin: 0 auto;
}

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--coral), var(--gold));
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md), 0 0 60px var(--coral-glow);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    color: var(--coral);
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── CTA Section ── */
.cta-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 64px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--coral-glow) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 440px;
}

.cta-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.info-block {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-icon {
    color: var(--coral);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-block h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.info-block p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-block a {
    color: var(--coral);
    transition: color var(--transition);
}

.info-block a:hover {
    color: var(--coral-light);
}

.info-note {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
}

/* ── Contact ── */
.contact {
    padding: 120px 0;
    position: relative;
    z-index: 2;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 32px;
}

.contact-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.contact-map iframe {
    width: 100%;
    min-height: 280px;
}

/* ── Contact Form ── */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
}

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

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

.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.form-input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
    width: 100%;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--coral);
    background: rgba(224, 122, 95, 0.05);
    box-shadow: 0 0 0 3px var(--coral-glow);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

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

/* Form Success */
.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.form-success.visible {
    display: flex;
}

.success-icon {
    color: var(--coral);
}

.form-success h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-success p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
    position: relative;
    z-index: 2;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.7;
}

.footer-nav {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--coral);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

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

.footer-bottom a {
    color: var(--coral);
    transition: color var(--transition);
}

.footer-bottom a:hover {
    color: var(--coral-light);
}

/* ── Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-inner {
        gap: 48px;
    }
    
    .about-grid {
        gap: 48px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-card {
        padding: 48px;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 100px 32px 32px;
        gap: 4px;
        transition: right var(--transition);
        z-index: 999;
    }
    
    .nav-list.open {
        right: 0;
    }
    
    .nav-link {
        padding: 12px 0;
        font-size: 1rem;
    }
    
    .nav-link--accent {
        margin-top: 8px;
    }
    
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin: 0 auto 36px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-trust {
        justify-content: center;
    }
    
    .hero-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hero-image-frame {
        inset: 12px -12px -12px 12px;
    }
    
    .hero-badge {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image-secondary {
        right: 0;
        bottom: -24px;
    }
    
    .about-experience {
        right: -12px;
        top: -12px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-card {
        grid-template-columns: 1fr;
        padding: 36px 28px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 28px;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .about-image-secondary {
        width: 60%;
        right: -8px;
        bottom: -16px;
    }
    
    .about-experience {
        padding: 14px 18px;
    }
    
    .exp-number {
        font-size: 1.8rem;
    }
    
    .hero-trust {
        flex-direction: column;
        gap: 12px;
    }
}

/* ── Mobile overlay ── */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.nav-overlay.visible {
    opacity: 1;
    pointer-events: all;
}
