/* =============================================
   Global Tone Care - Styles
   Colors from DESIGN.md:
     Pastel Lavender: #E4D9F0
     Warm Cream: #F8F3E8
     Professional Blue: #4A6A9D
     Care Coral: #D47B6A
     Neutral Charcoal: #2D2D38
     Success Mint: #5CAF8A
     Circuit Silver: #A0A0B0
   Fonts: Lora, Inter, IBM Plex Mono
   ============================================= */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #2D2D38;
    background-color: #F8F3E8;
    line-height: 1.75;
    overflow-x: hidden;
}

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

h1, h2, h3 {
    font-family: 'Lora', serif;
    letter-spacing: -0.01em;
}

.metric-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #F8F3E8 0%, #E4D9F0 60%, #E4D9F0 100%);
    z-index: 0;
    transition: background 0.3s ease;
}

/* Circuit Map */
.circuit-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
}

.circuit-line {
    stroke: #A0A0B0;
    stroke-width: 1;
    fill: none;
    opacity: 0.15;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.circuit-node {
    fill: #A0A0B0;
    opacity: 0;
    transform-origin: center;
}

/* Waveform */
.waveform-svg {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 2;
    opacity: 0;
}

.wave-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.wave-1 {
    stroke: rgba(74, 106, 157, 0.2);
}

.wave-2 {
    stroke: rgba(74, 106, 157, 0.12);
}

.wave-3 {
    stroke: rgba(212, 123, 106, 0.1);
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
}

.hero-title {
    font-family: 'Lora', serif;
    font-size: clamp(32px, 5.5vw, 64px);
    font-weight: 700;
    color: #2D2D38;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(15px, 1.8vw, 20px);
    font-weight: 400;
    color: #4A6A9D;
    opacity: 0.85;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #A0A0B0, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 0.8; transform: scaleY(1); }
}

/* ============================================
   Service Sections (Shared)
   ============================================ */

.service-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
}

.section-inner {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.service-card {
    background: rgba(255, 255, 255, 0.65);
    border-radius: 16px;
    padding: 56px 48px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 32px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-icon {
    width: 120px;
    height: 100px;
    margin-bottom: 32px;
}

.service-illustration {
    width: 100%;
    height: 100%;
}

.draw-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 0.8s ease;
}

.draw-dot {
    opacity: 0;
    transition: opacity 0.4s ease 0.6s;
}

.service-card.visible .draw-path {
    stroke-dashoffset: 0;
}

.service-card.visible .draw-dot {
    opacity: 1;
}

.service-title {
    font-size: clamp(26px, 4.5vw, 48px);
    font-weight: 600;
    color: #2D2D38;
    margin-bottom: 16px;
}

.service-description {
    font-size: clamp(15px, 1.5vw, 18px);
    color: #2D2D38;
    opacity: 0.8;
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.75;
}

/* Service Check - Background */
.service-check {
    background: linear-gradient(180deg, #E4D9F0 0%, #F8F3E8 100%);
}

/* Service Tune - Background */
.service-tune {
    background: #F8F3E8;
}

/* Service Global - Background */
.service-global {
    background: linear-gradient(180deg, #F8F3E8 0%, #E4D9F0 40%, #F8F3E8 100%);
}

/* ============================================
   Tone Meter (Check Section)
   ============================================ */

.tone-meter {
    max-width: 400px;
}

.tone-meter-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #A0A0B0;
    margin-bottom: 8px;
}

.tone-meter-bar {
    width: 100%;
    height: 8px;
    background: rgba(160, 160, 176, 0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tone-meter-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4A6A9D, #5CAF8A);
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card.visible .tone-meter-fill {
    width: 78%;
}

.tone-meter-score {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #5CAF8A;
}

/* ============================================
   Tone Slider (Tune Section)
   ============================================ */

.tone-slider {
    max-width: 400px;
}

.tone-slider-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #A0A0B0;
    margin-bottom: 12px;
}

.tone-slider-track {
    width: 100%;
    height: 4px;
    background: rgba(160, 160, 176, 0.2);
    border-radius: 2px;
    position: relative;
    margin-bottom: 8px;
    cursor: pointer;
}

.tone-slider-thumb {
    position: absolute;
    top: 50%;
    left: 65%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: #D47B6A;
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, left 0.5s ease;
    box-shadow: 0 2px 8px rgba(212, 123, 106, 0.3);
}

.tone-slider-track:hover .tone-slider-thumb {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 3px 12px rgba(212, 123, 106, 0.4);
}

.tone-slider-values {
    display: flex;
    justify-content: space-between;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #A0A0B0;
}

/* ============================================
   Global Nodes (Global Section)
   ============================================ */

.global-nodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.global-node {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(160, 160, 176, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.global-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.node-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5CAF8A;
    flex-shrink: 0;
}

.node-label {
    font-size: 13px;
    color: #2D2D38;
    flex-grow: 1;
}

.global-node .metric-value {
    font-size: 14px;
    color: #4A6A9D;
}

/* ============================================
   Harmony Section
   ============================================ */

.harmony-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    background: #F8F3E8;
}

.harmony-title {
    font-size: clamp(26px, 4.5vw, 56px);
    font-weight: 700;
    color: #2D2D38;
    text-align: center;
    margin-bottom: 16px;
}

.harmony-description {
    font-size: clamp(15px, 1.5vw, 18px);
    color: #2D2D38;
    opacity: 0.8;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.75;
}

.harmony-visual {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 56px;
}

.harmony-wave {
    width: 100%;
    height: 100%;
}

.harmony-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.noise-path {
    stroke: #A0A0B0;
    opacity: 0.4;
}

.clean-path {
    stroke: #5CAF8A;
    opacity: 0.8;
}

.harmony-labels {
    display: flex;
    justify-content: space-between;
    margin-top: -12px;
}

.harmony-label-noise,
.harmony-label-clean {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.harmony-label-noise {
    color: #A0A0B0;
}

.harmony-label-clean {
    color: #5CAF8A;
}

.harmony-metrics {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.harmony-metric {
    text-align: center;
}

.harmony-metric .metric-value {
    display: block;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    color: #4A6A9D;
    margin-bottom: 4px;
}

.metric-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #A0A0B0;
}

/* ============================================
   Closing Section
   ============================================ */

.closing-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    background: linear-gradient(180deg, #F8F3E8 0%, #E4D9F0 100%);
}

.closing-title {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 700;
    color: #2D2D38;
    text-align: center;
    margin-bottom: 16px;
}

.closing-description {
    font-size: clamp(15px, 1.5vw, 18px);
    color: #2D2D38;
    opacity: 0.8;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.75;
}

.closing-wave-container {
    width: 100%;
    max-width: 600px;
    height: 80px;
    margin: 0 auto;
}

.closing-wave {
    width: 100%;
    height: 100%;
}

.closing-wave-path {
    fill: none;
    stroke: rgba(74, 106, 157, 0.2);
    stroke-width: 2;
    stroke-linecap: round;
}

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

.site-footer {
    padding: 32px 24px;
    background: #2D2D38;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 14px;
    color: #E4D9F0;
}

.footer-separator {
    color: #A0A0B0;
    opacity: 0.4;
}

.footer-tagline {
    font-size: 13px;
    color: #A0A0B0;
    opacity: 0.6;
}

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

.hero-content.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.waveform-svg.animate-in {
    animation: fadeIn 0.6s ease forwards;
}

.circuit-map.animate-in {
    animation: fadeIn 0.4s ease forwards;
}

.circuit-map.animate-in .circuit-line {
    animation: drawLine 0.6s ease forwards;
}

.circuit-map.animate-in .cl-1 { animation-delay: 0.1s; }
.circuit-map.animate-in .cl-2 { animation-delay: 0.15s; }
.circuit-map.animate-in .cl-3 { animation-delay: 0.2s; }
.circuit-map.animate-in .cl-4 { animation-delay: 0.25s; }
.circuit-map.animate-in .cl-5 { animation-delay: 0.3s; }
.circuit-map.animate-in .cl-6 { animation-delay: 0.35s; }
.circuit-map.animate-in .cl-7 { animation-delay: 0.4s; }
.circuit-map.animate-in .cl-8 { animation-delay: 0.45s; }
.circuit-map.animate-in .cl-9 { animation-delay: 0.5s; }
.circuit-map.animate-in .cl-10 { animation-delay: 0.55s; }

.circuit-map.animate-in .circuit-node {
    animation: nodeAppear 0.2s ease forwards;
}

.circuit-map.animate-in .circuit-node:nth-child(12) { animation-delay: 0.5s; }
.circuit-map.animate-in .circuit-node:nth-child(13) { animation-delay: 0.55s; }
.circuit-map.animate-in .circuit-node:nth-child(14) { animation-delay: 0.6s; }
.circuit-map.animate-in .circuit-node:nth-child(15) { animation-delay: 0.65s; }
.circuit-map.animate-in .circuit-node:nth-child(16) { animation-delay: 0.7s; }
.circuit-map.animate-in .circuit-node:nth-child(17) { animation-delay: 0.75s; }
.circuit-map.animate-in .circuit-node:nth-child(18) { animation-delay: 0.8s; }
.circuit-map.animate-in .circuit-node:nth-child(19) { animation-delay: 0.85s; }
.circuit-map.animate-in .circuit-node:nth-child(20) { animation-delay: 0.9s; }
.circuit-map.animate-in .circuit-node:nth-child(21) { animation-delay: 0.95s; }
.circuit-map.animate-in .circuit-node:nth-child(22) { animation-delay: 0.4s; }

.scroll-indicator.animate-in {
    animation: fadeIn 0.5s ease 2s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes drawLine {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

@keyframes nodeAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 0.6;
        transform: scale(1);
    }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .service-card {
        padding: 40px 28px;
    }

    .harmony-metrics {
        gap: 32px;
    }

    .global-nodes {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .global-nodes {
        grid-template-columns: 1fr;
    }

    .harmony-metrics {
        flex-direction: column;
        gap: 24px;
    }
}
