/* ==========================================================================
   GlobalToneCare — Scandinavian functional + glassmorphism
   ========================================================================== */

:root {
    --c-bg: #f8f9fc;          /* Snow White */
    --c-grad-start: #e3f2fd;  /* Serenity Blue */
    --c-grad-end: #ede7f6;    /* Clarity Lavender */
    --c-text: #212121;        /* Deep Charcoal */
    --c-teal: #00897b;        /* Harmony Teal */
    --c-coral: #e57373;       /* Caution Coral */
    --c-frost: rgba(255, 255, 255, 0.65);
    --c-frost-strong: rgba(255, 255, 255, 0.78);
    --c-cloud: #f0f0f5;       /* Cloud Gray */

    --font-display: 'DM Sans', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-accent: 'Outfit', system-ui, sans-serif;

    --radius-card: 16px;
    --radius-pill: 999px;

    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.04);
    --shadow-lift: 0 8px 24px rgba(0, 0, 0, 0.06);

    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);

    --max-w: 1200px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

.eyebrow {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-teal);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.eyebrow--hero {
    color: var(--c-text);
    opacity: 0.55;
    margin-bottom: 1.75rem;
}

.section__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--c-text);
    margin-bottom: 1.5rem;
}

.section__intro,
.section__body {
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    color: var(--c-text);
    opacity: 0.78;
    margin-bottom: 1.25rem;
    max-width: 56ch;
}

.section__list {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.section__list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    color: var(--c-text);
    opacity: 0.82;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-teal);
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(0, 137, 123, 0.12);
}

/* ============================== Section base ============================== */

.section {
    position: relative;
    min-height: 100vh;
    padding: clamp(4rem, 9vh, 7rem) var(--gutter);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section__header {
    max-width: var(--max-w);
    margin: 0 auto 3.5rem;
    text-align: center;
    width: 100%;
}

.section__header .section__intro {
    margin-left: auto;
    margin-right: auto;
}

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

.section--hero {
    overflow: hidden;
    text-align: center;
    align-items: center;
}

.hero__gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(227, 242, 253, 0.9), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(237, 231, 246, 0.95), transparent 55%),
        linear-gradient(135deg, var(--c-grad-start) 0%, var(--c-grad-end) 100%);
    animation: hero-drift 18s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes hero-drift {
    0%   { background-position: 0% 0%, 100% 100%, 0% 0%; transform: scale(1); }
    100% { background-position: 8% 5%, 92% 95%, 0% 0%; transform: scale(1.03); }
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 840px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--c-text);
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(8px);
    animation: hero-fade 800ms var(--ease-out) 200ms forwards;
}

@keyframes hero-fade {
    to { opacity: 1; transform: translateY(0); }
}

.hero__tagline {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    color: var(--c-teal);
    margin-top: 2.5rem;
    opacity: 0;
    animation: hero-fade 700ms var(--ease-out) 1900ms forwards;
}

.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    z-index: 1;
    opacity: 0;
    animation: hero-fade 800ms var(--ease-out) 2400ms forwards;
}

.hero__scroll-label {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-text);
    opacity: 0.45;
}

.hero__scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, var(--c-teal));
    animation: scroll-pulse 2.4s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { transform: scaleY(0.6); transform-origin: top; opacity: 0.4; }
    50%      { transform: scaleY(1); opacity: 1; }
}

/* ============================== Sound wave ============================== */

.wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 auto;
}

.wave .bar {
    width: 4px;
    border-radius: 2px;
    background: var(--c-teal);
    opacity: 0.8;
}

.wave--hero {
    height: 56px;
    margin-top: 1.5rem;
}

.wave--hero .bar {
    height: 8px;
    transform-origin: center;
    animation: wave-breathe 2.6s ease-in-out infinite;
    animation-delay: var(--bar-delay, 0s);
    opacity: 0;
}

.wave--hero .bar.is-in {
    opacity: 0.8;
}

@keyframes wave-breathe {
    0%, 100% { transform: scaleY(0.25); }
    50%      { transform: scaleY(1); }
}

/* Spectrum — before/after */

.wave--before,
.wave--after {
    height: 100px;
    align-items: flex-end;
}

.wave--before .bar,
.wave--after .bar {
    background: var(--c-coral);
    opacity: 0.85;
    height: var(--h-before, 30px);
    transition:
        height 1.2s var(--ease-out),
        background-color 1.2s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 30ms);
}

.wave--after .bar {
    background: var(--c-teal);
    height: var(--h-after, 30px);
    opacity: 0.6;
}

.section--spectrum.is-visible .wave--before .bar {
    background: var(--c-teal);
    height: var(--h-after, 30px);
    opacity: 0.85;
}

/* Footer rest wave */

.wave--rest {
    height: 24px;
    margin-top: 3rem;
    align-items: center;
}

.wave--rest .bar {
    height: 2px;
    width: 4px;
    background: var(--c-teal);
    opacity: 0.35;
    animation: rest-glow 4s ease-in-out infinite;
    animation-delay: var(--bar-delay, 0s);
}

@keyframes rest-glow {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 0.55; }
}

/* ============================== Split layouts ============================== */

.split {
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.split--reverse {
    grid-template-columns: 1fr 1fr;
}

.split__visual,
.split__text {
    min-width: 0;
}

@media (max-width: 860px) {
    .split,
    .split--reverse {
        grid-template-columns: 1fr;
    }
    .split--reverse .split__text {
        order: 1;
    }
    .split--reverse .split__visual {
        order: 2;
    }
}

/* ============================== Spectrum visual ============================== */

.section--spectrum {
    background: linear-gradient(180deg, var(--c-bg) 0%, #fbfcfe 100%);
}

.spectrum-frame {
    background: var(--c-frost-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.spectrum-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spectrum-label {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-text);
    opacity: 0.55;
    text-align: center;
}

.spectrum-arrow {
    display: flex;
    justify-content: center;
    opacity: 0.6;
}

/* ============================== Palette / glass cards ============================== */

.section--palette {
    background:
        radial-gradient(ellipse at top, rgba(227, 242, 253, 0.5), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(237, 231, 246, 0.45), transparent 60%),
        var(--c-bg);
}

.palette-grid {
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1080px) {
    .palette-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .palette-grid { grid-template-columns: 1fr; }
}

.glass-card {
    background: var(--c-frost);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(15px);
    transition:
        opacity 600ms var(--ease-out),
        transform 600ms var(--ease-out),
        box-shadow 400ms var(--ease-out),
        backdrop-filter 400ms var(--ease-out);
    transition-delay: var(--card-delay, 0ms);
}

.section--palette.is-visible .glass-card {
    opacity: 1;
    transform: translateY(0);
}

.glass-card:hover {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lift);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.78);
}

.glass-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 137, 123, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-card__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--c-text);
    letter-spacing: -0.01em;
}

.glass-card__body {
    font-size: 0.95rem;
    color: var(--c-text);
    opacity: 0.7;
    line-height: 1.6;
}

/* ============================== Globe ============================== */

.section--globe {
    background: linear-gradient(180deg, var(--c-bg) 0%, #fafbfd 100%);
}

.globe-frame {
    position: relative;
    background: var(--c-frost-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}

.globe-svg {
    width: 100%;
    height: auto;
    display: block;
}

.globe-dots circle[fill="#00897b"]:not([fill-opacity]) {
    animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

.globe-stats {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid rgba(33, 33, 33, 0.08);
    padding-top: 1.5rem;
}

.globe-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.globe-stat__num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--c-text);
}

.globe-stat__label {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-text);
    opacity: 0.55;
}

.globe-legend {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.globe-legend__item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    color: var(--c-text);
    opacity: 0.78;
}

.globe-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-teal);
    box-shadow: 0 0 0 4px rgba(0, 137, 123, 0.15);
}

.globe-dot--soft {
    background: transparent;
    border: 1px solid var(--c-teal);
    box-shadow: none;
    opacity: 0.6;
}

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

.section--close {
    background: var(--c-cloud);
    min-height: auto;
    padding-bottom: 3rem;
}

.close-grid {
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
}

@media (max-width: 860px) {
    .close-grid { grid-template-columns: 1fr; }
}

.close__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--c-text);
    margin: 0.5rem 0 2rem;
}

.close__nav {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.close__nav a {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    color: var(--c-text);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 200ms var(--ease-out), color 200ms var(--ease-out);
    width: fit-content;
}

.close__nav a:hover {
    opacity: 1;
    color: var(--c-teal);
}

.contact-form {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.contact-form__label {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-text);
    opacity: 0.6;
    margin-bottom: 0.85rem;
    display: block;
}

.contact-form__row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 137, 123, 0.18);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.4rem 0.4rem 1.25rem;
    transition: border-color 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

.contact-form__row:focus-within {
    border-color: var(--c-teal);
    box-shadow: 0 0 0 4px rgba(0, 137, 123, 0.12);
}

.contact-form__input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--c-text);
    padding: 0.6rem 0;
}

.contact-form__input::placeholder {
    color: var(--c-text);
    opacity: 0.4;
}

.contact-form__submit {
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--c-teal);
    color: #fff;
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 250ms var(--ease-out), transform 250ms var(--ease-out);
}

.contact-form__submit:hover {
    background: #00766a;
    transform: translateY(-1px);
}

.contact-form__submit-arrow {
    transition: transform 250ms var(--ease-out);
}

.contact-form__submit:hover .contact-form__submit-arrow {
    transform: translateX(3px);
}

.contact-form__note {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--c-text);
    opacity: 0.55;
    margin-top: 0.85rem;
    transition: color 250ms var(--ease-out), opacity 250ms var(--ease-out);
}

.contact-form__note.is-success {
    color: var(--c-teal);
    opacity: 1;
}

.contact-form__note.is-error {
    color: var(--c-coral);
    opacity: 1;
}

.close__meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-text);
    opacity: 0.45;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ============================== Reveal animations ============================== */

.reveal-left,
.reveal-right {
    opacity: 0;
    transition:
        opacity 700ms var(--ease-out),
        transform 700ms var(--ease-out);
}

.reveal-left  { transform: translateX(-30px); }
.reveal-right { transform: translateX(30px); }

.is-visible .reveal-left,
.is-visible .reveal-right {
    opacity: 1;
    transform: translateX(0);
}

/* Section title fade-up when visible */
.section__title,
.section__intro,
.section__body,
.section__list,
.eyebrow {
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.section:not(.section--hero):not(.is-visible) .section__title,
.section:not(.section--hero):not(.is-visible) .section__intro {
    opacity: 0;
    transform: translateY(20px);
}

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