/* === GLOBALTONECARE.COM - Scandinavian Sonic Care === */

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

:root {
    --birch-white: #f7f3ee;
    --wool-cream: #ece5d5;
    --acoustic-teal: #5b9a8b;
    --amber-resonance: #c8956c;
    --charcoal-soft: #3d3d3d;
    --muted-stone: #8a8a7a;
    --deep-fjord: #2c3e50;
    --pale-frequency: #daf0ea;
}

html { scroll-behavior: smooth; }

body {
    background: var(--birch-white);
    color: var(--charcoal-soft);
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.25rem);
    line-height: 2.0;
    overflow-x: hidden;
}

/* Paper grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    filter: url(#noise);
    opacity: 0.025;
    pointer-events: none;
    z-index: 0;
}

/* === NAV RAIL === */
.nav-rail {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-rail.visible { opacity: 1; }

.nav-line {
    position: absolute;
    width: 1px;
    height: 100%;
    background: var(--acoustic-teal);
    opacity: 0.3;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--acoustic-teal);
    background: transparent;
    z-index: 1;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-dot.active { background: var(--acoustic-teal); }

/* === ZONES === */
.zone { position: relative; z-index: 1; }

/* === SECTION 1: HERO === */
.hero-zone {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--birch-white);
}

.hero-content { text-align: center; width: 80%; max-width: 800px; }

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-brand.visible { opacity: 1; }

.brand-name {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.4em;
    color: var(--deep-fjord);
    text-transform: lowercase;
}

.ear-glyph { flex-shrink: 0; }

.sine-wave { width: 60%; height: 50px; margin: 24px auto 0; display: block; }

.hero-wave path {
    stroke-dasharray: 1800;
    stroke-dashoffset: 1800;
    transition: stroke-dashoffset 1.5s ease-out;
}

.hero-wave.drawn path { stroke-dashoffset: 0; }
.hero-wave.flowing path { animation: waveFlow 4s linear infinite; }

@keyframes waveFlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -300; }
}

.scroll-chevron {
    margin-top: 60px;
    opacity: 0;
    animation: breathe 3s ease-in-out infinite;
}

.scroll-chevron.visible { opacity: 1; }

@keyframes breathe {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* === SECTION 2: LISTENING ROOM === */
.listening-zone {
    min-height: 100vh;
    padding: 120px 60px;
    background: var(--birch-white);
}

.listening-split { display: flex; gap: 60px; max-width: 1100px; margin: 0 auto; }

.listening-text {
    width: 60%;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.listening-text.visible { opacity: 1; }

.section-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--charcoal-soft);
    margin-bottom: 32px;
}

.body-narrative {
    font-size: clamp(1rem, 1.1vw, 1.25rem);
    line-height: 2.0;
    color: var(--charcoal-soft);
}

.frequency-bars { width: 40%; display: flex; align-items: center; }

.freq-svg { width: 100%; height: 600px; }

.freq-bar {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-out;
}

.freq-bar.visible { transform: scaleX(1); }

/* === SECTION 3: FREQUENCY GRID === */
.grid-zone {
    padding: 100px 60px;
    background: var(--birch-white);
}

.grid-heading { text-align: center; margin-bottom: 60px; }

.frequency-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.grid-cell {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    transition: background-color 0.3s ease-out;
}

.cell-cream { background: var(--birch-white); }
.cell-wool { background: var(--wool-cream); }

.grid-cell:hover { background: var(--pale-frequency); }

.cell-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease-out;
}

.grid-cell:hover .cell-icon { transform: scale(1.08); }

.cell-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-stone);
}

.cell-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--charcoal-soft);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.grid-cell.visible .cell-desc { opacity: 1; transform: translateY(0); }

.tall-cell { grid-row: span 2; }

/* === SECTION 4: OVERTONE STRIP === */
.overtone-zone {
    padding: 60px 0;
    background: var(--wool-cream);
    background-image: radial-gradient(circle, var(--muted-stone) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0;
    /* dot grid at 15% opacity */
    position: relative;
}

.overtone-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--wool-cream);
    opacity: 0.85;
}

.overtone-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 20vw;
    padding: 40px 10vw;
    position: relative;
    z-index: 1;
}

.overtone-scroll::-webkit-scrollbar { display: none; }

.overtone-panel {
    flex: 0 0 80vw;
    max-width: 700px;
    scroll-snap-align: center;
    text-align: center;
    padding: 40px;
}

.overtone-quote {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    color: var(--deep-fjord);
    line-height: 1.5;
    margin-bottom: 20px;
    text-wrap: balance;
}

.wave-divider { width: 200px; height: 10px; margin: 0 auto 16px; display: block; }

.overtone-attr {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--muted-stone);
    text-transform: uppercase;
}

.scroll-indicator {
    position: relative;
    width: 200px;
    height: 2px;
    background: var(--muted-stone);
    opacity: 0.3;
    margin: 20px auto 0;
    z-index: 1;
}

.scroll-thumb {
    width: 40px;
    height: 2px;
    background: var(--acoustic-teal);
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.1s linear;
}

/* === SECTION 5: FOOTER === */
.footer-zone {
    min-height: 100vh;
    background: var(--deep-fjord);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
}

.footer-watermark {
    position: absolute;
    font-family: 'DM Serif Display', serif;
    font-size: clamp(4rem, 10vw, 10rem);
    letter-spacing: 0.2em;
    color: var(--birch-white);
    opacity: 0.04;
    text-transform: lowercase;
    white-space: nowrap;
    pointer-events: none;
}

.footer-wave {
    width: 60%;
    margin-bottom: 40px;
}

.footer-wave path {
    stroke-dasharray: 1800;
    stroke-dashoffset: 1800;
}

.footer-wave.drawn path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 2s ease-out;
}

.footer-wave.flowing path {
    animation: waveFlowSlow 8s linear infinite;
}

@keyframes waveFlowSlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -300; }
}

.footer-content {
    text-align: center;
    z-index: 2;
    position: relative;
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.footer-content.visible { opacity: 1; }

.footer-heading {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.5rem, 3vw, 3rem);
    color: var(--birch-white);
    letter-spacing: 0.12em;
    text-transform: lowercase;
    margin-bottom: 20px;
}

.footer-text {
    font-size: 1rem;
    color: var(--birch-white);
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto 24px;
}

.footer-contact {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: var(--amber-resonance);
}

.ear-glyph-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .listening-split { flex-direction: column; }
    .listening-text, .frequency-bars { width: 100%; }
    .frequency-grid { grid-template-columns: 1fr; }
    .tall-cell { grid-row: span 1; }
    .nav-rail { display: none; }
    .brand-name { letter-spacing: 0.15em; }
}
