/* ============================================================
   TINY TREASURES BY MJ — Design System
   Color palette derived from the blush-pink + terracotta logo
   ============================================================ */

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

/* ── Design Tokens ──────────────────────────────────────── */
:root {
    /* Brand Colors */
    --blush-50: #FEF4F2;
    --blush-100: #FBE8E4;
    --blush-200: #F4C5C0;
    --blush-300: #ECA09A;
    --blush-400: #E07E77;
    --terracotta: #C85A36;
    --terracotta-dk: #A84628;
    --terracotta-lt: #D4735E;
    --cream: #FDF8F5;
    --cream-warm: #FAF6F2;
    --clay-beige: #E8D5C4;
    --clay-beige-dk: #D4BCA8;
    --muted-rose: #C9847A;

    /* Text */
    --text-primary: #2D2320;
    --text-secondary: #6B5A56;
    --text-muted: #9B8B87;
    --text-on-dark: #FDF8F5;

    /* Semantic */
    --bg-page: var(--cream-warm);
    --bg-card: #FFFFFF;
    --bg-section-alt: var(--blush-50);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(45, 35, 32, 0.06);
    --shadow-md: 0 8px 24px rgba(45, 35, 32, 0.10);
    --shadow-lg: 0 20px 60px rgba(45, 35, 32, 0.14);
    --shadow-xl: 0 32px 80px rgba(45, 35, 32, 0.18);
    --shadow-glow: 0 0 40px rgba(200, 90, 54, 0.15);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 96px;
    --space-4xl: 128px;

    /* Typography Scale */
    --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: 2rem;
    --text-4xl: 2.75rem;
    --text-5xl: 3.75rem;
    --text-6xl: 5rem;

    /* Transitions */
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1.0);
    --ease-in-out: cubic-bezier(0.4, 0.0, 0.2, 1.0);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);
    --duration-fast: 150ms;
    --duration-base: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 800ms;
}

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

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-page);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul,
ol {
    list-style: none;
}

/* ── Typography ─────────────────────────────────────────── */
.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-body {
    font-family: 'Inter', sans-serif;
}

.font-accent {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

.text-display {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.text-heading-xl {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 600;
}

.text-heading-lg {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
}

.text-heading-md {
    font-size: clamp(1.25rem, 2.5vw, 1.875rem);
    font-weight: 600;
}

.text-accent {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-style: italic;
    color: var(--terracotta);
}

.label-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta);
}

/* ── Layout Utilities ───────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 5vw, 4rem);
}

.container-narrow {
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 5vw, 4rem);
}

.section {
    padding-block: clamp(4rem, 8vw, 7rem);
}

.section-alt {
    background-color: var(--bg-section-alt);
}

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

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

/* ── Section Headers ────────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header .label-tag {
    display: inline-block;
    margin-bottom: var(--space-md);
}

.section-header h2 {
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.section-header p {
    max-width: 560px;
    margin-inline: auto;
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.85rem 2rem;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--duration-base) var(--ease-spring);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0;
    transition: opacity var(--duration-fast);
}

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

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--terracotta);
    color: #fff;
    box-shadow: 0 4px 20px rgba(200, 90, 54, 0.35);
}

.btn-primary:hover {
    background: var(--terracotta-dk);
    box-shadow: 0 8px 30px rgba(200, 90, 54, 0.45);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--terracotta);
    color: #fff;
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: var(--text-xs);
}

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

/* ── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-base) var(--ease-out),
        transform var(--duration-base) var(--ease-out);
}

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

/* ── Dividers & Decorative ──────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-block: var(--space-xl);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--clay-beige), transparent);
}

.divider-icon {
    font-size: 1.25rem;
    opacity: 0.6;
}

/* ── Badges ─────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.badge-blush {
    background: var(--blush-100);
    color: var(--terracotta);
}

.badge-clay {
    background: var(--clay-beige);
    color: var(--text-secondary);
}

/* ── Stars ──────────────────────────────────────────────── */
.stars {
    color: #F59E0B;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* ── Scroll Indicator ───────────────────────────────────── */
.scroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--terracotta);
    display: inline-block;
    margin-inline: 3px;
}

/* ── Grain Texture Overlay ──────────────────────────────── */
.grain::after {
    content: '';
    position: absolute;
    inset: 0;
    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)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ── Nav ────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem clamp(1rem, 5vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--duration-slow) var(--ease-out),
        box-shadow var(--duration-slow) var(--ease-out),
        padding var(--duration-slow) var(--ease-out);
}

.nav.scrolled {
    background: rgba(253, 248, 245, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), var(--shadow-sm);
    padding: 0.85rem clamp(1rem, 5vw, 4rem);
}

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

.nav-logo img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform var(--duration-base) var(--ease-spring);
}

.nav-logo img:hover {
    transform: scale(1.08) rotate(-3deg);
}

.nav-logo-text {
    font-family: 'Playfair Display', serif;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav.on-hero .nav-logo-text {
    color: #fff;
}

.nav.on-hero:not(.scrolled) .nav-links a {
    color: rgba(255, 255, 255, 0.85);
}

.nav.on-hero:not(.scrolled) .nav-cta {
    display: none;
}

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

.nav-links a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    transition: color var(--duration-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: var(--terracotta);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--duration-base) var(--ease-spring);
}

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

.nav-links a:hover::after {
    transform: scaleX(1);
}

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

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

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

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
.nav-mobile {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--cream);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-out);
}

.nav-mobile.open {
    display: flex;
    opacity: 1;
}

.nav-mobile a {
    font-family: 'Playfair Display', serif;
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--text-primary);
    transition: color var(--duration-fast);
}

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

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ── 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;
    }
}