/* =========================================================
   TheraMind Landingpage
   Palette: warmes Papier / Off-Black / desaturiertes Sage
   Typografie: Instrument Serif (Display) + Geist (Body)
   ========================================================= */

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

:root {
    /* Palette */
    --bg: #f6f3ec;
    --bg-tint: #efeadf;
    --ink: #1a1a1a;
    --ink-soft: #3d3d3d;
    --muted: #7a756c;
    --line: #d8d2c4;
    --accent: #2d5a4f;
    --accent-soft: #4a7566;
    --paper-card: #fbf9f3;

    /* Type */
    --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
    --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Layout */
    --container: 1200px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);

    /* Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---------- Grain overlay (fixed, zero repaint cost) ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.35;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.02;
}

em {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--accent);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 1px;
    background: var(--muted);
}

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(246, 243, 236, 0.72);
    border-bottom: 1px solid rgba(216, 210, 196, 0.5);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--ink);
}

.brand__mark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, var(--accent-soft) 0%, var(--accent) 60%, #1e3d35 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.brand__name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.topbar__nav {
    display: flex;
    gap: 2rem;
}

.topbar__nav a {
    font-size: 0.875rem;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.25s var(--ease-out-expo);
}

.topbar__nav a:hover {
    color: var(--accent);
}

@media (max-width: 640px) {
    .topbar__nav { display: none; }
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: calc(100dvh - 64px);
    display: flex;
    align-items: center;
    padding-top: clamp(3rem, 10vh, 6rem);
    padding-bottom: clamp(4rem, 14vh, 8rem);
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hero__inner {
        grid-template-columns: 1.35fr 1fr;
        gap: 6rem;
    }
}

.hero__content {
    animation: fadeUp 1s var(--ease-out-expo) both;
}

.hero__title {
    font-size: clamp(3rem, 8vw, 6.25rem);
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    color: var(--ink);
}

.hero__lede {
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 42ch;
    margin-bottom: 2.5rem;
}

.hero__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted);
    padding: 0.625rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-card);
}

.meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2.4s var(--ease-out-expo) infinite;
}

/* ---------- Hero aside: layered chips ---------- */
.hero__aside {
    display: none;
    position: relative;
    height: 400px;
    animation: fadeUp 1.2s var(--ease-out-expo) 0.2s both;
}

@media (min-width: 900px) {
    .hero__aside { display: block; }
}

.chip-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.chip {
    position: absolute;
    padding: 1rem 1.5rem;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 20px 40px -20px rgba(26, 26, 26, 0.08);
    transition: transform 0.6s var(--ease-out-expo);
}

.chip__label {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--ink);
}

.chip--1 {
    top: 8%;
    left: 4%;
    transform: rotate(-4deg);
    animation: float 7s ease-in-out infinite;
}

.chip--2 {
    top: 30%;
    right: 0%;
    transform: rotate(3deg);
    animation: float 8s ease-in-out -1s infinite;
}

.chip--3 {
    bottom: 32%;
    left: 12%;
    transform: rotate(-2deg);
    animation: float 9s ease-in-out -2s infinite;
}

.chip--4 {
    bottom: 8%;
    right: 8%;
    transform: rotate(5deg);
    animation: float 7.5s ease-in-out -3s infinite;
}

.chip--4 .chip__label {
    background: var(--accent);
    color: var(--paper-card);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-style: normal;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.25s var(--ease-out-expo);
}

.scroll-hint:hover {
    color: var(--accent);
}

.scroll-hint__line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--muted));
    animation: scrollPulse 2.4s var(--ease-out-expo) infinite;
    transform-origin: top;
}

/* ---------- ABOUT ---------- */
.about {
    padding-top: clamp(5rem, 14vh, 10rem);
    padding-bottom: clamp(5rem, 14vh, 10rem);
    border-top: 1px solid var(--line);
}

.about__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 900px) {
    .about__inner {
        grid-template-columns: 1fr 1.4fr;
        gap: clamp(4rem, 10vw, 8rem);
        align-items: start;
    }
}

.about__portrait {
    position: sticky;
    top: 6rem;
}

.portrait {
    aspect-ratio: 4 / 5;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-tint);
    border: 1px solid var(--line);
    box-shadow: 0 30px 60px -30px rgba(26, 26, 26, 0.15);
    position: relative;
}

.portrait__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Subtle warm paper tone when loading */
    background: var(--bg-tint);
    transition: transform 1.2s var(--ease-out-expo);
}

.portrait:hover .portrait__img {
    transform: scale(1.02);
}

.about__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
}

.section-title {
    font-size: clamp(2.25rem, 5vw, 4rem);
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    max-width: 16ch;
}

.prose p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 62ch;
    margin-bottom: 1.25rem;
}

.prose p:last-child { margin-bottom: 0; }

/* ---------- SURVEY INFO ---------- */
.survey-info {
    padding-top: clamp(5rem, 14vh, 10rem);
    padding-bottom: clamp(5rem, 14vh, 10rem);
    background: var(--bg-tint);
    border-top: 1px solid var(--line);
}

.survey-info__header {
    max-width: 56ch;
    margin-bottom: 5rem;
}

.survey-info__header .section-title {
    max-width: 22ch;
}

/* Info grid: 2-col zig-zag, NOT 3 equal cards */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem 4rem;
    margin-bottom: clamp(5rem, 12vh, 8rem);
}

@media (min-width: 800px) {
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem 5rem;
    }
    /* offset second column for editorial feel */
    .info-grid .info-item:nth-child(even) {
        margin-top: 3rem;
    }
}

.info-item {
    position: relative;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.info-item__num {
    position: absolute;
    top: -0.2rem;
    right: 0;
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--muted);
    background: var(--bg-tint);
    padding: 0 0.5rem;
    transform: translateY(-50%);
}

.info-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
    color: var(--ink);
}

.info-item p {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-soft);
    max-width: 42ch;
}

.info-item strong {
    font-weight: 500;
    color: var(--ink);
    background: linear-gradient(to top, rgba(45, 90, 79, 0.12) 0%, rgba(45, 90, 79, 0.12) 40%, transparent 40%);
    padding: 0 0.1em;
}

/* ---------- CTA ---------- */
.cta {
    padding: 3rem;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    box-shadow: 0 30px 60px -30px rgba(26, 26, 26, 0.08);
}

@media (min-width: 720px) {
    .cta {
        padding: 3.5rem 4rem;
    }
}

.cta__lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.cta__dauer {
    color: var(--ink);
    font-weight: 500;
}

.cta__divider {
    width: 1px;
    height: 16px;
    background: var(--line);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.3s var(--ease-out-expo), background 0.3s var(--ease-out-expo);
    border: 1px solid transparent;
    will-change: transform;
}

.btn--primary {
    background: var(--ink);
    color: var(--bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn--primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn__icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover .btn__icon {
    transform: translateX(4px);
}

.cta__note {
    font-size: 0.8125rem;
    color: var(--muted);
    font-style: italic;
}

/* ---------- Footer ---------- */
.footer {
    padding-top: 4rem;
    padding-bottom: 4rem;
    border-top: 1px solid var(--line);
    background: var(--bg);
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 800px) {
    .footer__inner {
        grid-template-columns: auto 1fr auto;
        gap: 4rem;
    }
}

.footer__brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.footer__name {
    font-family: var(--font-display);
    font-size: 1.125rem;
}

.footer__sub {
    font-size: 0.8125rem;
    color: var(--muted);
}

.footer__nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer__nav a {
    font-size: 0.875rem;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.25s var(--ease-out-expo);
}

.footer__nav a:hover {
    color: var(--accent);
}

.footer__tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.9375rem;
    color: var(--muted);
    max-width: 24ch;
}

@media (min-width: 800px) {
    .footer__tagline {
        text-align: right;
    }
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-8px) rotate(var(--r, 0deg)); }
}

/* Rotations per chip (preserved during float) */
.chip--1 { --r: -4deg; }
.chip--2 { --r:  3deg; }
.chip--3 { --r: -2deg; }
.chip--4 { --r:  5deg; }

@keyframes scrollPulse {
    0%   { transform: scaleY(0); transform-origin: top; opacity: 0.4; }
    50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
    51%  { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.4; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
