/* ============================================
   IRVIN Electronics — Clean Minimalist Design
   Palette: Terracotta + Sand
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --color-terracotta: #B85843;
    --color-terracotta-light: #D4806E;
    --color-terracotta-dark: #8C4030;
    --color-sand: #F5EDE4;
    --color-sand-light: #FAF6F1;
    --color-sand-dark: #E8DDD2;
    --color-warm-white: #FDFCFA;
    --color-text: #2C2420;
    --color-text-light: #6B5B53;
    --color-text-muted: #9A8A82;
    --color-border: #E8DDD2;
    
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 1px 3px rgba(44, 36, 32, 0.06);
    --shadow-md: 0 4px 20px rgba(44, 36, 32, 0.08);
    --shadow-lg: 0 8px 40px rgba(44, 36, 32, 0.10);
    
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-warm-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    background: var(--color-terracotta);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    z-index: 1000;
    font-size: 0.875rem;
    font-weight: 500;
}

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

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-text);
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-lg);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all var(--transition);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--color-terracotta-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    border-color: var(--color-terracotta);
    color: var(--color-terracotta);
}

.btn-full {
    width: 100%;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.logo-mark {
    flex-shrink: 0;
}

.main-nav ul {
    display: none;
    list-style: none;
    gap: var(--space-lg);
}

.main-nav a {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--color-text-light);
    transition: color var(--transition);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-terracotta);
    transition: width var(--transition);
}

.main-nav a:hover {
    color: var(--color-terracotta);
}

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

/* --- Mobile Nav Toggle --- */
.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-xs);
    z-index: 101;
}

.nav-toggle-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text);
    transition: all var(--transition);
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* --- Hero --- */
.hero {
    padding-top: calc(72px + var(--space-2xl));
    padding-bottom: var(--space-2xl);
    background: var(--color-sand-light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(184, 88, 67, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

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

.hero-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.hero-label::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--color-terracotta);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.08;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.hero-title em {
    font-style: italic;
    color: var(--color-terracotta);
}

.hero-subtitle {
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    line-height: 1.7;
    color: var(--color-text-light);
    max-width: 520px;
    margin-bottom: var(--space-xl);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.hero-main-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 5/4;
}

.hero-cards {
    position: absolute;
    bottom: -24px;
    left: -16px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.stat-card {
    background: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 180px;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--color-terracotta);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* --- Section Spacing --- */
section {
    padding: var(--space-2xl) 0;
}

@media (min-width: 768px) {
    section {
        padding: var(--space-3xl) 0;
    }
}

/* --- Products --- */
.products {
    background: var(--color-warm-white);
}

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

.product-card {
    background: var(--color-sand-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
}

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

.product-image {
    overflow: hidden;
    aspect-ratio: 4/3;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card h3 {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 500;
    padding: var(--space-md) var(--space-lg) var(--space-xs);
}

.product-card p {
    padding: 0 var(--space-lg) var(--space-md);
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* --- Services --- */
.services {
    background: var(--color-sand-light);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.service-item {
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.service-item:hover {
    border-color: var(--color-terracotta-light);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-sand);
    border-radius: var(--radius-sm);
    color: var(--color-terracotta);
    margin-bottom: var(--space-md);
    transition: all var(--transition);
}

.service-item:hover .service-icon {
    background: var(--color-terracotta);
    color: white;
}

.service-item h3 {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.service-item p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* --- About --- */
.about {
    background: var(--color-warm-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.about-content .section-title {
    margin-bottom: var(--space-md);
}

.about-text {
    color: var(--color-text-light);
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about-text:last-child {
    margin-bottom: 0;
}

/* --- Testimonials --- */
.testimonials {
    background: var(--color-sand-light);
}

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

.testimonial-card {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
}

.testimonial-quote {
    margin-bottom: var(--space-md);
}

.testimonial-text {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    font-style: italic;
}

.testimonial-author {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* --- Contact --- */
.contact {
    background: var(--color-warm-white);
}

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

.contact-intro {
    font-size: 1.0625rem;
    color: var(--color-text-light);
    line-height: 1.75;
    margin-bottom: var(--space-lg);
}

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

.contact-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-sand);
    border-radius: var(--radius-sm);
    color: var(--color-terracotta);
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.6;
}

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

/* --- Contact Form --- */
.contact-form-wrapper {
    background: var(--color-sand-light);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.contact-form-wrapper h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8125rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text);
    background: white;
    transition: all var(--transition);
    outline: none;
}

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

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-terracotta);
    box-shadow: 0 0 0 3px rgba(184, 88, 67, 0.1);
}

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

.form-success {
    display: none;
    text-align: center;
    padding: var(--space-xl);
}

.form-success svg {
    margin: 0 auto var(--space-md);
}

.form-success h4 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-terracotta);
    margin-bottom: var(--space-xs);
}

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

/* --- Map --- */
.map-section {
    border-top: 1px solid var(--color-border);
}

.map-container {
    aspect-ratio: 16/7;
    filter: grayscale(0.3);
}

.map-container iframe {
    width: 100%;
    height: 100%;
}

/* --- Footer --- */
.footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer .logo {
    color: white;
    margin-bottom: var(--space-sm);
}

.footer-brand p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 280px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-links a {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-terracotta-light);
}

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

.footer-contact a {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

.footer-contact a:hover {
    color: var(--color-terracotta-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .reveal.revealed {
        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; }
}

/* --- Responsive: Tablet --- */
@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Responsive: Desktop --- */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
    
    .main-nav ul {
        display: flex;
    }
    
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
    
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }
    
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
    
    .footer-inner {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* --- Responsive: Large Desktop --- */
@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-cards {
        left: -32px;
        bottom: -32px;
    }
}
