/* ===========================================
   Marandre — "The Tactile Archive" Design System
   Coming Soon Landing Page
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ===========================================
   Design Tokens
   =========================================== */

:root {
    /* Brand Colors */
    --primary: #3A4D39;
    --primary-dark: #243624;
    --on-primary: #FFFFFF;

    --secondary: #A67C52;
    --secondary-dark: #7C5730;

    --tertiary: #C5A059;
    --tertiary-fixed: #FFDEA5;
    --on-tertiary-fixed: #261900;

    /* Surface Hierarchy */
    --background: #FCF9F4;
    --surface: #FCF9F4;
    --surface-lowest: #FFFFFF;
    --surface-low: #F6F3EE;
    --surface-high: #EDEBE6;
    --surface-highest: #E5E2DD;

    /* On Surface */
    --on-surface: #1C1C19;
    --on-surface-variant: #44483E;

    /* Outline */
    --outline: #747871;
    --outline-variant: #C3C8BF;

    /* Typography */
    --font-serif: 'Noto Serif', Georgia, 'Times New Roman', serif;
    --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* "Slow & Intentional" Transitions */
    --ease-slow: 400ms ease-in-out;
    --ease-medium: 300ms ease-in-out;

    /* Ambient Elevation */
    --shadow-ambient: 0 20px 40px rgba(28, 28, 25, 0.06);
    --shadow-float: 0 8px 24px rgba(28, 28, 25, 0.08);
    --shadow-glow: 0 4px 16px rgba(28, 28, 25, 0.04);

    /* Radii */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* ===========================================
   Reset & Base
   =========================================== */

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--on-surface);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Organic canvas/grain texture overlay — 3-5% opacity as per design system */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 512px 512px;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: multiply;
}

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

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

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

input {
    font-family: inherit;
    border: none;
    background: none;
    outline: none;
}

/* ===========================================
   Page Layout
   =========================================== */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: var(--space-4) var(--space-8) var(--space-12);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===========================================
   Header
   =========================================== */

.site-header {
    padding: var(--space-6) var(--space-8);
    position: relative;
    z-index: 10;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    transition: transform var(--ease-slow);
    text-decoration: none;
    max-height: 80px;
}

.logo-mark:hover {
    transform: scale(1.02);
}

.logo-mark img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

/* Fallback monogram removed in favor of direct logo visibility */
.logo-mark::after {
    display: none;
}

/* ===========================================
   Hero Section — Intentional Asymmetry
   =========================================== */

.hero {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: var(--space-12);
    align-items: center;
    width: 100%;
}

/* --- Left Column: Text Content --- */

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    padding-right: var(--space-8);
}

/* Artisan Story Chip — "Próximamente" badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--primary);
    color: var(--on-primary);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    width: fit-content;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.badge-icon {
    font-size: 0.85rem;
    animation: sparkle 3s ease-in-out infinite;
}

.hero-heading {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    font-weight: 400;
    line-height: 1.12;
    color: var(--on-surface);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-heading em {
    font-style: italic;
    color: var(--primary);
}

.hero-description {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.75;
    color: var(--outline);
    max-width: 420px;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* --- Email Capture Section --- */

.email-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.email-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-surface);
}

.email-form {
    display: flex;
    gap: var(--space-3);
    align-items: stretch;
}

.email-input-wrapper {
    flex: 1;
    position: relative;
    max-width: 280px;
}

.email-input {
    width: 100%;
    padding: var(--space-3) var(--space-1);
    font-size: 0.95rem;
    color: var(--on-surface);
    border-bottom: 1.5px solid rgba(116, 120, 113, 0.3);
    transition: border-color var(--ease-slow);
    background: transparent;
}

.email-input::placeholder {
    color: var(--outline-variant);
    font-weight: 300;
}

.email-input:focus {
    border-bottom-color: var(--secondary);
}

/* Honeypot anti-spam field */
.honey-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Primary CTA — pill shape with gradient sheen */
.submit-btn {
    padding: var(--space-3) var(--space-8);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--on-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-full);
    transition: all var(--ease-slow);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: 130px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary-dark));
    opacity: 0;
    transition: opacity var(--ease-slow);
    border-radius: inherit;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-float);
}

.submit-btn:hover::before {
    opacity: 1;
}

.submit-btn span {
    position: relative;
    z-index: 1;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.email-disclaimer {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--outline-variant);
}

/* Form feedback messages */
.form-feedback {
    display: none;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
}

.form-feedback.is-visible {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

.form-feedback.success {
    background: rgba(58, 77, 57, 0.08);
    color: var(--primary);
}

.form-feedback.error {
    background: rgba(166, 124, 82, 0.08);
    color: var(--secondary-dark);
}

/* --- Right Column: Hero Visual --- */

.hero-visual {
    position: relative;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.hero-image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    max-height: 540px;
    margin-left: auto;
    box-shadow: var(--shadow-ambient);

    /* Beautiful woven textile gradient — shows when no hero.jpg is present */
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(255, 255, 255, 0.025) 20px,
            rgba(255, 255, 255, 0.025) 22px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(255, 255, 255, 0.025) 20px,
            rgba(255, 255, 255, 0.025) 22px
        ),
        linear-gradient(
            160deg,
            #d4b896 0%,
            #c5a059 20%,
            #a67c52 45%,
            #7c5730 70%,
            #3a4d39 100%
        );
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 8s ease;
}

.hero-image-container:hover img {
    transform: scale(1.03);
}

/* Glassmorphism quote card — overlapping the hero image */
.quote-card {
    position: absolute;
    bottom: -24px;
    left: -44px;
    background: rgba(252, 249, 244, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    max-width: 230px;
    box-shadow: var(--shadow-ambient);
    animation: floatCard 6s ease-in-out infinite;
    z-index: 2;
}

.quote-monogram {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: var(--space-2);
    font-weight: 700;
}

.quote-text {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--on-surface);
    font-weight: 400;
}

/* ===========================================
   Footer
   =========================================== */

.site-footer {
    padding: var(--space-6) var(--space-8);
    background: var(--surface-low);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    position: relative;
    z-index: 1;
}

.footer-copyright {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--outline);
}

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

.footer-social-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-surface);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    color: var(--on-surface);
    transition: all var(--ease-slow);
    position: relative;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--primary);
    opacity: 0;
    transition: opacity var(--ease-slow);
}

.social-link:hover {
    color: var(--on-primary);
    transform: translateY(-2px);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link svg {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
}

/* ===========================================
   Keyframe Animations
   =========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading state for submit button */
.submit-btn.is-loading span {
    visibility: hidden;
}

.submit-btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    z-index: 2;
}

/* ===========================================
   Responsive — Large Desktop (1440px+)
   =========================================== */

@media (min-width: 1440px) {
    .main-content {
        padding: var(--space-8) var(--space-16) var(--space-16);
    }

    .site-header {
        padding: var(--space-8) var(--space-16);
    }

    .site-footer {
        padding: var(--space-6) var(--space-16);
    }
}

/* ===========================================
   Responsive — Tablet Landscape (≤1024px)
   =========================================== */

@media (max-width: 1024px) {
    .hero {
        gap: var(--space-8);
    }

    .hero-content {
        padding-right: var(--space-4);
    }

    .quote-card {
        left: -20px;
        bottom: -16px;
        max-width: 200px;
        padding: var(--space-4) var(--space-5);
    }

    .hero-image-container {
        max-height: 460px;
    }
}

/* ===========================================
   Responsive — Tablet Portrait / Small (≤768px)
   =========================================== */

@media (max-width: 768px) {
    .site-header {
        padding: var(--space-4) var(--space-6);
    }

    .main-content {
        padding: var(--space-4) var(--space-6) var(--space-8);
        align-items: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
        align-items: center;
    }

    .hero-visual {
        order: -1;
        margin: 0 auto;
        max-width: 380px;
        width: 100%;
    }

    .hero-heading {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-description {
        max-width: 100%;
    }

    .email-section {
        width: 100%;
        align-items: center;
    }

    .email-form {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .email-input-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .submit-btn {
        width: 100%;
        padding: var(--space-4) var(--space-6);
        text-align: center;
    }

    .quote-card {
        left: auto;
        right: -12px;
        bottom: -16px;
        max-width: 190px;
    }

    .site-footer {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
        padding: var(--space-6);
    }
}

/* ===========================================
   Responsive — Mobile (≤480px)
   =========================================== */

@media (max-width: 480px) {
    .main-content {
        padding: var(--space-4) var(--space-4) var(--space-6);
    }

    .site-header {
        padding: var(--space-4);
    }

    .hero-heading {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .hero-image-container {
        aspect-ratio: 4 / 5;
    }

    .quote-card {
        right: -6px;
        bottom: -12px;
        max-width: 175px;
        padding: var(--space-3) var(--space-4);
    }

    .quote-text {
        font-size: 0.75rem;
    }

    .quote-monogram {
        font-size: 1.25rem;
    }

    .site-footer {
        padding: var(--space-4);
    }

    .footer-copyright {
        font-size: 0.6rem;
    }
}

/* ===========================================
   Accessibility — Reduced Motion
   =========================================== */

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