@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Inter:wght@400;500;600&family=Dancing+Script:wght@400;700&family=Pinyon+Script&display=swap');

:root {
    --color-primary: #E91E63;    /* Magenta */
    --color-secondary: #D4E157;  /* Lime */
    --color-accent: #E1BEE7;    /* Lavender */
    --color-pink-light: #F8C8D1; /* Light Pink */
    --color-dark: #000000;
    --color-white: #FFFFFF;
    
    --font-display: 'Syne', sans-serif;
    --font-heading: 'Pinyon Script', cursive;
    --font-accent: 'Dancing Script', cursive;
    --font-body: 'Inter', sans-serif;
    
    --section-padding: 100px;
    --grid-gap: 20px;
    --transition-snappy: 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-white);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* The Ardour Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Texture Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.15;
    pointer-events: none;
    z-index: 999;
}

#cursorGlow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(233, 30, 99, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

/* Typography Scale */
h1, .display-large {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 12vw, 9rem);
    line-height: 0.9;
    text-transform: none;
    letter-spacing: -0.02em;
    font-weight: 400;
    color: var(--color-white);
}

.display-serif {
    font-family: var(--font-accent);
    font-style: normal;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.05em;
    display: inline-block;
    font-size: 1.1em;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    font-weight: 800;
}

.text-italic {
    font-family: var(--font-accent);
    font-style: normal;
    font-weight: 400;
    position: relative;
    display: inline-block;
    font-size: 1.1em;
}

.text-italic::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--color-secondary);
    z-index: -1;
    opacity: 0.6;
    transform: skewX(-15deg);
    clip-path: polygon(2% 10%, 98% 5%, 100% 90%, 0% 95%);
}

.label-small {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em; /* High tracking for labels */
    opacity: 0.6;
    margin-bottom: 5px;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: var(--section-padding) 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

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

/* Component: Step Transitions */
.portal-step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-snappy);
}

.portal-step.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Component: Interactive Cards */
.choice-card {
    background: var(--color-white);
    padding: 40px;
    border-top: 4px solid var(--color-dark);
    cursor: pointer;
    transition: all var(--transition-snappy);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    height: 100%;
}

.choice-card:hover {
    background: var(--color-pink-light);
    transform: translateY(-10px);
}

.choice-card.selected {
    background: var(--color-dark);
    color: var(--color-white);
}

.choice-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Component: Rating Scale */
.rating-scale {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.rating-btn {
    flex: 1;
    padding: 15px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    border: 2px solid var(--color-dark);
    cursor: pointer;
    transition: all var(--transition-snappy);
    text-transform: uppercase;
}

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

.rating-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: scale(1.05);
}

/* Form Elements */
.input-massive {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 6px solid var(--color-dark); /* Thicker border for better visibility */
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    padding: 20px 0;
    outline: none;
    text-transform: uppercase;
    transition: border-color var(--transition-snappy);
}

.input-massive:focus {
    border-color: var(--color-primary);
}

.toggle-wrapper {
    background: var(--color-white);
    padding: 50px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    transition: all var(--transition-snappy);
    border-bottom: 4px solid var(--color-dark);
}

.toggle-wrapper:hover {
    background: var(--color-pink-light);
    transform: translateY(-5px);
}

.textarea-elegant {
    width: 100%;
    background: var(--color-accent);
    border: 4px solid var(--color-dark); /* Added border for structure */
    padding: 40px;
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 500;
    min-height: 300px;
    outline: none;
    resize: none;
}

/* Progress Indicator */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: var(--color-primary);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Buttons */
.btn-ardour {
    font-family: var(--font-display);
    padding: 22px 60px;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all var(--transition-snappy);
    display: inline-block;
}

.btn-black { background: var(--color-dark); color: var(--color-white); }
.btn-black:hover { background: var(--color-primary); }

.btn-magenta { background: var(--color-primary); color: var(--color-white); }
.btn-magenta:hover { background: var(--color-dark); }

/* Custom Checkbox/Toggle */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    padding: 20px;
    background: var(--color-pink-light);
}

.upload-box:hover {
    background: var(--color-accent);
    border-color: var(--color-primary) !important;
}

/* Recorder UI */
.btn-record {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    position: relative;
}

.btn-record.recording {
    background: white;
    transform: scale(0.9);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(233, 30, 99, 0); }
    100% { box-shadow: 0 0 0 0 rgba(233, 30, 99, 0); }
}

.record-icon {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-record.recording .record-icon {
    background: var(--color-primary);
    border-radius: 4px;
}

.vis-bar {
    width: 4px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 2px;
}

.recording .vis-bar {
    animation: vis-grow 0.5s ease-in-out infinite alternate;
}

.vis-bar:nth-child(2) { animation-delay: 0.1s; }
.vis-bar:nth-child(3) { animation-delay: 0.2s; }
.vis-bar:nth-child(4) { animation-delay: 0.3s; }
.vis-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes vis-grow {
    0% { height: 10px; }
    100% { height: 40px; }
}

/* Success Screen Overrides */
#successScreen h1 {
    font-size: clamp(5rem, 15vw, 10rem);
    background: linear-gradient(var(--color-secondary), var(--color-white));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
@keyframes slideInUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Interactive Corner Drawings (Masks) */
.corner-drawing {
    position: fixed;
    bottom: -30px;
    right: -30px;
    width: 180px;
    height: 180px;
    z-index: 50;
    pointer-events: none;
    mix-blend-mode: multiply;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.drawing-left {
    bottom: -30px;
    left: -30px;
    right: auto;
}

.drawing-shape {
    width: 100%;
    height: 100%;
    background: var(--color-secondary);
    clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);
    opacity: 0.8;
}

.drawing-magenta {
    background: var(--color-primary);
    clip-path: circle(50% at 50% 50%);
    width: 120px;
    height: 120px;
}

.drawing-squiggle {
    background: var(--color-dark);
    clip-path: polygon(0% 15%, 15% 15%, 15% 0%, 85% 0%, 85% 15%, 100% 15%, 100% 85%, 85% 85%, 85% 100%, 15% 100%, 15% 85%, 0% 85%);
    width: 60px;
    height: 60px;
    opacity: 0.4;
}

.drawing-blob {
    background: var(--color-accent);
    clip-path: circle(40% at 50% 50%);
    width: 400px;
    height: 400px;
    filter: blur(80px);
    opacity: 0.5;
    transition: all 1.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.emotion-token {
    position: fixed;
    pointer-events: none;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-primary);
    z-index: 1000;
    animation: float-up-fade 2s ease-out forwards;
    text-transform: uppercase;
    mix-blend-mode: difference;
}

@keyframes float-up-fade {
    0% { transform: translate(-50%, 0) scale(0.5); opacity: 0; }
    20% { transform: translate(-50%, -20px) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -150px) scale(1); opacity: 0; }
}

.drawing-ring {
    border: 15px solid var(--color-secondary);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    background: transparent;
}

.drawing-scribble {
    width: 150px;
    height: 150px;
    background: var(--color-primary);
    mask: url('https://raw.githubusercontent.com/google/material-design-icons/master/src/action/drawing/materialiconssharp/24px.svg'); /* This is just a placeholder idea, I'll use a clip-path instead */
    clip-path: polygon(10% 25%, 35% 25%, 35% 10%, 65% 10%, 65% 25%, 90% 25%, 90% 50%, 65% 50%, 65% 65%, 90% 65%, 90% 90%, 65% 90%, 65% 75%, 35% 75%, 35% 90%, 10% 90%, 10% 65%, 35% 65%, 35% 50%, 10% 50%);
    opacity: 0.2;
}

.drawing-dots {
    width: 100px;
    height: 100px;
    background-image: radial-gradient(var(--color-dark) 2px, transparent 2px);
    background-size: 15px 15px;
    opacity: 0.3;
}

.drawing-star {
    width: 80px;
    height: 80px;
    background: var(--color-secondary);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0.6;
}

.drawing-arrow {
    width: 100px;
    height: 40px;
    background: var(--color-dark);
    clip-path: polygon(0% 40%, 70% 40%, 70% 0%, 100% 50%, 70% 100%, 70% 60%, 0% 60%);
    opacity: 0.2;
    transform: rotate(15deg);
}

.paper-plane {
    position: fixed;
    width: 40px;
    height: 40px;
    background: var(--color-dark);
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%, 30% 50%);
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.5s;
}

@keyframes fly-across {
    0% { transform: translate(-100px, 100vh) rotate(45deg); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% { transform: translate(120vw, -20vh) rotate(10deg); opacity: 0; }
}

.paper-plane.flying {
    animation: fly-across 6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 3D Shapes */
.shape-3d {
    position: absolute; /* Changed to absolute to sit inside sections */
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
    filter: drop-shadow(20px 20px 30px rgba(0,0,0,0.1));
}

.sphere-3d {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--pastel-color), rgba(255,255,255,0.2));
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
}

.cube-3d {
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    transform: rotateX(-20deg) rotateY(20deg);
}

.cube-face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--pastel-color);
    opacity: 0.8;
    border: 1px solid rgba(255,255,255,0.5);
}

.cube-front  { transform: translateZ(50px); }
.cube-back   { transform: rotateY(180deg) translateZ(50px); filter: brightness(0.8); }
.cube-right  { transform: rotateY(90deg) translateZ(50px); filter: brightness(0.9); }
.cube-left   { transform: rotateY(-90deg) translateZ(50px); filter: brightness(0.7); }
.cube-top    { transform: rotateX(90deg) translateZ(50px); filter: brightness(1.1); }
.cube-bottom { transform: rotateX(-90deg) translateZ(50px); filter: brightness(0.6); }

/* Pastel Colors */
.pastel-mint { --pastel-color: #B2DFDB; }
.pastel-peach { --pastel-color: #FFCCBC; }
.pastel-lavender { --pastel-color: #D1C4E9; }
.pastel-blue { --pastel-color: #BBDEFB; }
.pastel-pink { --pastel-color: #F8BBD0; }
.pastel-yellow { --pastel-color: #FFF9C4; }
.pastel-green { --pastel-color: #DCEDC8; }

/* Floating Animation for 3D Shapes */
@keyframes float-3d {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(5deg); }
    66% { transform: translateY(15px) rotate(-5deg); }
}

.floating-3d {
    animation: float-3d 10s ease-in-out infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, -20px) rotate(5deg); }
}

.corner-drawing.floating {
    animation: float 6s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2, .grid-4 { grid-template-columns: 1fr; gap: 20px; }
    .section { padding: 80px 20px; text-align: center; }
    .container { padding: 0; }
    
    h1, .display-large { font-size: 3.5rem; line-height: 1.1; }
    h2 { font-size: 2.5rem; line-height: 1.2; }
    
    .choice-card { min-height: 200px; padding: 30px; text-align: center; }
    .rating-scale { gap: 10px; }
    .rating-btn { padding: 12px 5px; font-size: 0.9rem; }
    
    .btn-ardour { width: 100%; display: flex; justify-content: center; }
    div[style*="display: flex; gap: 20px;"] { flex-direction: column; width: 100%; }
    
    .shape-3d { opacity: 0.3; transform: scale(0.6); }
    .corner-drawing { display: none; } /* Hide doodles on mobile to reduce clutter */
    
    .recorder-container { width: 100%; padding: 20px; }
    .visualizer { gap: 4px; }
    .vis-bar { width: 6px; }
    
    header { padding: 20px; }
}
