/* ============================================
   A&S Good Behavior LLC - Design System
   Disruptive Editorial Redesign
   ============================================ */

/* Design Tokens */
:root {
    /* Warm palette — derived from logo orange #F7941D */
    --warm-50: #fff8ee;
    --warm-100: #feecd3;
    --warm-200: #fdd9a7;
    --warm-300: #f9be6e;
    --warm-400: #F7A033;
    --warm-500: #F2921D;
    --warm-600: #d47a12;
    --warm-700: #b0610e;
    --warm-800: #8c4c0f;
    --warm-900: #5c3209;

    /* Cool palette — derived from logo navy #2B3990 + cyan #00AEEF */
    --cool-50: #eef4fc;
    --cool-100: #d0e2f7;
    --cool-200: #a3c8f0;
    --cool-300: #5fa3e0;
    --cool-400: #0098D4;
    --cool-500: #1B2A6B;
    --cool-600: #162358;
    --cool-700: #111C47;
    --cool-800: #0D1536;
    --cool-900: #0D1B3E;

    /* Neutrals (warm undertone) */
    --neutral-50: #faf9f7;
    --neutral-100: #f3f1ed;
    --neutral-200: #e8e4de;
    --neutral-300: #d4cfc6;
    --neutral-400: #b0a999;
    --neutral-500: #8a8275;
    --neutral-600: #6b6459;
    --neutral-700: #4d4840;
    --neutral-800: #33302b;
    --neutral-900: #1c1a17;

    /* Functional */
    --white: #ffffff;
    --black: #0a0a0a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;

    /* Gradients */
    --gradient-warm: linear-gradient(135deg, #F2921D 0%, #f9be6e 100%);
    --gradient-cool: linear-gradient(135deg, #1B2A6B 0%, #0098D4 100%);
    --gradient-editorial: linear-gradient(160deg, #0D1B3E 0%, #1B2A6B 40%, #0098D4 100%);
    --gradient-dark-warm: linear-gradient(135deg, #0D1B3E 0%, #1B2A6B 60%, #0098D4 100%);

    /* Typography */
    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;

    /* Type scale (ratio ~1.25) */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: clamp(2.5rem, 5vw, 4.5rem);
    --text-7xl: clamp(3rem, 6vw, 6rem);

    /* Spacing (8px grid) */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(10,10,10,0.06);
    --shadow-md: 0 4px 20px rgba(10,10,10,0.08);
    --shadow-lg: 0 10px 40px rgba(10,10,10,0.1);
    --shadow-xl: 0 20px 60px rgba(10,10,10,0.14);
    --shadow-warm: 0 10px 40px rgba(242,146,29,0.2);

    /* Borders */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.2s;
    --duration-base: 0.4s;
    --duration-slow: 0.8s;
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--neutral-800);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: default;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--duration-fast) var(--ease-out);
}

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--cool-900);
}

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

/* ============================================
   Typography Utilities
   ============================================ */

.text-gradient-warm {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-500);
    margin-bottom: var(--space-md);
}

.section-tag::before,
.section-tag::after {
    content: '';
    width: 1.5rem;
    height: 2px;
    background: var(--warm-500);
}

.section-header-ed {
    max-width: 700px;
    margin: 0 auto var(--space-4xl);
    text-align: center;
}

.section-header-ed h2 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-lg);
}

.section-header-ed p {
    font-size: var(--text-lg);
    color: var(--neutral-500);
    line-height: 1.8;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-sm);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-out);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn-warm {
    background: var(--warm-500);
    color: var(--white);
}

.btn-warm:hover {
    background: var(--warm-600);
    box-shadow: var(--shadow-warm);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--cool-900);
    border: 2px solid var(--neutral-300);
}

.btn-ghost:hover {
    border-color: var(--cool-500);
    color: var(--cool-500);
}

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

.btn-primary:hover {
    background: var(--cool-600);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: var(--text-base);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ============================================
   Preloader
   ============================================ */

#preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cool-900);
    transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none;
}

.loader {
    text-align: center;
}

.loader-logo {
    animation: loaderSpin 1.5s var(--ease-in-out) infinite;
}

.loader-circle {
    animation: loaderDraw 1.5s var(--ease-out) forwards;
}

.loader-img {
    animation: loaderFadeIn 0.8s 0.4s var(--ease-out) forwards;
}

@keyframes loaderDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes loaderFadeIn {
    to { opacity: 1; }
}

@keyframes loaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Custom Cursor
   ============================================ */

.cursor-outer,
.cursor-inner {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .cursor-outer {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 40px;
        height: 40px;
        border: 1.5px solid var(--warm-500);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        opacity: 0;
        transition: opacity 0.3s, width 0.3s var(--ease-spring), height 0.3s var(--ease-spring), border-color 0.3s;
        transform: translate(-50%, -50%);
    }

    .cursor-inner {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 6px;
        height: 6px;
        background: var(--warm-500);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        opacity: 0;
        transform: translate(-50%, -50%);
    }

    body:hover .cursor-outer,
    body:hover .cursor-inner {
        opacity: 1;
    }

    .cursor-outer.hovering {
        width: 60px;
        height: 60px;
        border-color: var(--cool-500);
        background: rgba(10, 94, 120, 0.05);
    }
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-lg) 0;
    transition: all var(--duration-base) var(--ease-out);
}

.navbar.scrolled {
    padding: var(--space-sm) 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 10;
}

.logo img {
    width: 48px;
    height: 48px;
    transition: transform var(--duration-base) var(--ease-spring);
}

.navbar.scrolled .logo img {
    width: 40px;
    height: 40px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--cool-900);
    line-height: 1.2;
}

.navbar:not(.scrolled) .logo-name {
    color: var(--white);
}

.logo-tagline {
    font-size: var(--text-xs);
    color: var(--neutral-400);
    letter-spacing: 0.02em;
}

.navbar:not(.scrolled) .logo-tagline {
    color: rgba(255,255,255,0.7);
}

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

.nav-links > li > a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--neutral-600);
    padding: var(--space-sm) 0;
    position: relative;
    transition: color var(--duration-fast);
}

.navbar:not(.scrolled) .nav-links > li > a {
    color: rgba(255,255,255,0.85);
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: var(--warm-500);
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--warm-500);
    transition: width var(--duration-base) var(--ease-out);
}

.nav-links > li > a:hover::after,
.nav-links > li > a.active::after {
    width: 100%;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm) 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-base) var(--ease-out);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    color: var(--neutral-700);
    transition: all var(--duration-fast);
}

.dropdown-menu a:hover {
    color: var(--warm-500);
    background: var(--warm-50);
    padding-left: calc(var(--space-lg) + 4px);
}

.dropdown > a .fa-chevron-down {
    font-size: 0.6em;
    margin-left: 4px;
    transition: transform var(--duration-fast);
}

.dropdown:hover > a .fa-chevron-down {
    transform: rotate(180deg);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px solid var(--neutral-300);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--neutral-700);
    transition: all var(--duration-fast);
}

.navbar:not(.scrolled) .lang-btn {
    border-color: rgba(255,255,255,0.3);
    color: var(--white);
}

.lang-btn:hover {
    border-color: var(--warm-500);
}

.lang-btn .fa-chevron-down {
    font-size: 0.55em;
    transition: transform var(--duration-fast);
}

.lang-selector.open .lang-btn .fa-chevron-down {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all var(--duration-base) var(--ease-out);
}

.lang-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--neutral-700);
    width: 100%;
    transition: background var(--duration-fast);
}

.lang-option:hover {
    background: var(--warm-50);
    color: var(--warm-600);
}

.nav-cta {
    font-size: var(--text-sm) !important;
    padding: 0.625rem 1.5rem !important;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--neutral-800);
    border-radius: 2px;
    transition: all var(--duration-base) var(--ease-out);
}

.navbar:not(.scrolled) .mobile-toggle span {
    background: var(--white);
}

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

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

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

/* ============================================
   Back to Top
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cool-500);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--duration-base) var(--ease-out);
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--warm-500);
    transform: translateY(-4px);
}

/* ============================================
   WhatsApp Float
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transition: all var(--duration-base) var(--ease-spring);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.4);
}

/* ============================================
   Form Styles
   ============================================ */

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

.form-group-float {
    position: relative;
    margin-bottom: var(--space-lg);
}

.form-group-float input,
.form-group-float textarea,
.form-group-float select {
    width: 100%;
    padding: 1rem 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--neutral-800);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--neutral-200);
    outline: none;
    transition: border-color var(--duration-base);
}

.form-group-float input:focus,
.form-group-float textarea:focus,
.form-group-float select:focus {
    border-bottom-color: var(--warm-500);
}

.form-group-float label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: var(--text-base);
    color: var(--neutral-400);
    pointer-events: none;
    transition: all var(--duration-base) var(--ease-out);
}

.form-group-float input:focus ~ label,
.form-group-float input:not(:placeholder-shown) ~ label,
.form-group-float textarea:focus ~ label,
.form-group-float textarea:not(:placeholder-shown) ~ label,
.form-group-float select:focus ~ label,
.form-group-float select:valid ~ label {
    top: -0.75rem;
    font-size: var(--text-xs);
    color: var(--warm-500);
    font-weight: 600;
}

.form-group-float select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

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

.form-status {
    display: none;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
}

.form-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.form-status.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* ============================================
   Map
   ============================================ */

/* Map inside contact section */
.contact-split-map {
    margin-top: var(--space-2xl);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 180px;
    border: 1px solid rgba(255,255,255,0.1);
    filter: brightness(0.8) contrast(1.1);
    transition: filter var(--duration-slow);
}

.contact-split-map:hover {
    filter: brightness(1) contrast(1);
}

.contact-split-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html { scroll-behavior: auto; }

    .cursor-outer, .cursor-inner { display: none !important; }
}

/* ============================================
   Responsive: Tablet
   ============================================ */

@media (max-width: 1024px) {
    .nav-links,
    .nav-actions .nav-cta {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        background: var(--cool-900);
        z-index: 5;
        align-items: center;
        justify-content: center;
        gap: var(--space-xl);
    }

    .nav-links.active > li > a {
        color: var(--white) !important;
        font-size: var(--text-2xl);
        font-family: var(--font-display);
    }

    .nav-links.active .dropdown-menu {
        position: static;
        transform: none;
        background: transparent;
        box-shadow: none;
        padding: var(--space-sm) 0;
        opacity: 1;
        visibility: visible;
    }

    .nav-links.active .dropdown-menu a {
        color: rgba(255,255,255,0.7);
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Responsive: Mobile
   ============================================ */

@media (max-width: 640px) {
    :root {
        --space-xl: 1.25rem;
    }

    .section-header-ed h2 {
        font-size: var(--text-4xl);
    }

    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: var(--text-sm);
    }
}
