/* ==========================================================================
   Joaninha - Uniformes Profissionais Portugueses
   Clean, elegant, family-oriented design
   ========================================================================== */

/* CSS Custom Properties */
:root {
    /* Colors - Warm, inviting palette */
    --color-black: #0a0a0a;
    --color-white: #ffffff;
    --color-cream: #f8f7f4;
    --color-cream-dark: #efeee9;
    --color-accent: #c4956a;
    --color-accent-light: rgba(196, 149, 106, 0.15);
    --color-accent-dark: #a67b5b;
    --color-text: #1a1a1a;
    --color-text-light: #555555;
    --color-text-muted: #888888;
    --color-border: rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

    /* Spacing - 8px base grid */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 3rem;     /* 48px */
    --space-6: 4rem;     /* 64px */
    --space-7: 6rem;     /* 96px */
    --space-8: 8rem;     /* 128px */

    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 800px;

    /* Transitions */
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.6, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

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

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

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-cream);
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-black);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    z-index: 9999;
    transition: top var(--duration-normal) var(--ease-out);
}

.skip-link:focus {
    top: var(--space-2);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
}

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

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

address {
    font-style: normal;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-3);
    }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-3) 0;
    transition: all var(--duration-normal) var(--ease-out);
}

.navbar.dark {
    background: transparent;
}

.navbar.light {
    background: rgba(248, 247, 244, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-white);
    transition: color var(--duration-normal) var(--ease-out);
}

.navbar.light .logo-text {
    color: var(--color-text);
}

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

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--duration-fast) var(--ease-out);
    position: relative;
}

.navbar.light .nav-links a {
    color: var(--color-text-light);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--duration-normal) var(--ease-out);
}

.nav-links a:hover {
    color: var(--color-white);
}

.navbar.light .nav-links a:hover {
    color: var(--color-text);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: all var(--duration-normal) var(--ease-out);
    transform-origin: center;
}

.navbar.light .mobile-menu-toggle span {
    background: var(--color-text);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-black);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-4);
        opacity: 0;
        visibility: hidden;
        transition: all var(--duration-normal) var(--ease-out);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--color-white);
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-black);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(196, 149, 106, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: var(--space-8) 0;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: var(--space-4);
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    max-width: 560px;
    margin-bottom: var(--space-5);
}

.hero-cta {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-5);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}

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

.btn-primary:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    background: transparent;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

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

.btn-secondary:hover {
    background: var(--color-text);
    color: var(--color-white);
}

.btn-full {
    width: 100%;
}

/* ==========================================================================
   Section Styles
   ========================================================================== */
section {
    padding: var(--space-8) 0;
}

@media (max-width: 768px) {
    section {
        padding: var(--space-6) 0;
    }
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--space-3);
}

.section-intro {
    margin-bottom: var(--space-6);
}

.section-intro.center {
    text-align: center;
}

/* ==========================================================================
   Story Section
   ========================================================================== */
.story {
    background: var(--color-cream);
}

.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
    align-items: start;
}

@media (max-width: 968px) {
    .story-content {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }
}

.story-text .lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

.story-text p {
    color: var(--color-text-light);
    margin-bottom: var(--space-3);
}

.story-text .signature {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--color-text);
    margin-top: var(--space-5);
}

.highlight {
    background: linear-gradient(to bottom, transparent 50%, var(--color-accent-light) 50%);
    padding: 0 4px;
}

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

/* ==========================================================================
   Services Section
   ========================================================================== */
.services {
    background: var(--color-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

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

.service-card {
    background: var(--color-cream);
    padding: var(--space-5);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--color-accent);
    transition: height var(--duration-slow) var(--ease-out);
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 400;
    color: var(--color-accent);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: var(--space-3);
}

.service-content h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-1);
}

.service-tagline {
    font-size: 0.875rem;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.service-content > p {
    color: var(--color-text-light);
    margin-bottom: var(--space-4);
}

.service-features {
    list-style: none;
}

.service-features li {
    font-size: 0.875rem;
    color: var(--color-text-light);
    padding: var(--space-1) 0;
    padding-left: var(--space-3);
    position: relative;
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
}

/* ==========================================================================
   Values Section
   ========================================================================== */
.values {
    background: var(--color-black);
    color: var(--color-white);
}

.values .section-label {
    color: var(--color-accent);
}

.values .section-title {
    color: var(--color-white);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    text-align: center;
}

@media (max-width: 768px) {
    .values-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

.value-card {
    padding: var(--space-4);
}

.value-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 400;
    color: var(--color-cream);
    line-height: 1;
    margin-bottom: var(--space-3);
}

.value-card h3 {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.value-card p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

/* ==========================================================================
   Trust Section
   ========================================================================== */
.trust {
    background: var(--color-cream-dark);
    text-align: center;
}

.trust-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: var(--space-6);
}

.trust-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-7);
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--color-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq {
    background: var(--color-white);
}

.faq-grid {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.faq-item {
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    transition: all var(--duration-normal) var(--ease-out);
}

.faq-item[open] {
    background: var(--color-white);
    box-shadow: var(--shadow-md);
}

.faq-item summary {
    padding: var(--space-3) var(--space-4);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-accent);
    transition: transform var(--duration-normal) var(--ease-out);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 var(--space-4) var(--space-4);
    color: var(--color-text-light);
    line-height: 1.8;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    background: var(--color-cream);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-7);
    align-items: start;
}

@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }
}

.contact-intro {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-5);
}

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

.contact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.contact-item p {
    color: var(--color-text);
    line-height: 1.6;
}

.contact-item a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 4px;
    transition: color var(--duration-fast) var(--ease-out);
}

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

/* Contact Form */
.contact-form-wrapper {
    background: var(--color-white);
    padding: var(--space-5);
    box-shadow: var(--shadow-lg);
}

.contact-form h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: var(--space-1);
}

.form-intro {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

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

.form-group {
    margin-bottom: var(--space-3);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-1);
}

.required {
    color: var(--color-accent);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-2);
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

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

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

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

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.05);
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.form-note {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-3);
    text-align: center;
}

/* ==========================================================================
   Map Section
   ========================================================================== */
.map-section {
    padding: 0;
}

.map-wrapper {
    position: relative;
}

.map-wrapper iframe {
    display: block;
    width: 100%;
    filter: grayscale(100%) contrast(1.1);
    transition: filter var(--duration-slow) var(--ease-out);
}

.map-wrapper:hover iframe {
    filter: grayscale(0%) contrast(1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: var(--space-7) 0 var(--space-5);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-7);
    margin-bottom: var(--space-6);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }
}

.footer-logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-white);
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--color-accent);
    margin-top: var(--space-1);
}

.footer-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-3);
    max-width: 360px;
    line-height: 1.7;
}

.footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.footer-column h4 {
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: var(--space-3);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: var(--space-2);
}

.footer-column a {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--duration-fast) var(--ease-out);
}

.footer-column a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-location {
    color: var(--color-accent);
}

/* ==========================================================================
   WhatsApp Widget
   ========================================================================== */
.whatsapp-widget {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all var(--duration-normal) var(--ease-out);
}

.whatsapp-widget:hover {
    transform: scale(1.1);
    background: var(--color-accent-dark);
}

.whatsapp-tooltip {
    position: absolute;
    right: 100%;
    margin-right: var(--space-2);
    background: var(--color-black);
    color: var(--color-white);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-fast) var(--ease-out);
}

.whatsapp-widget:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .whatsapp-widget {
        width: 54px;
        height: 54px;
        bottom: var(--space-3);
        right: var(--space-3);
    }

    .whatsapp-tooltip {
        display: none;
    }
}

/* ==========================================================================
   Animations & Utilities
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth reveal for staggered animations */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Print styles */
@media print {
    .navbar,
    .whatsapp-widget,
    .hero-scroll {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }
}
