:root {
    --bg: #f4f8fb;
    --surface: #ffffff;
    --text: #1d2140;
    --muted: #666b8a;
    --line: #dde4ef;
    --accent: #0f8a9e;
    --gradient: linear-gradient(160deg, #2fd3c0 0%, #28b4d2 35%, #8d73b8 68%, #f0567a 100%);
    --button: linear-gradient(120deg, #0f8fa2 0%, #7a55b8 55%, #d23c78 100%);
    --on-accent: #ffffff;
    --blob-1: #9aeadf;
    --blob-2: #f7b4c8;
    --blob-3: #cdbff0;
    --shadow: 0 1px 2px rgba(29, 33, 64, 0.06), 0 12px 32px -12px rgba(29, 33, 64, 0.22);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12132a;
        --surface: #1c1e3a;
        --text: #eef0fb;
        --muted: #a2a6c6;
        --line: #2e3155;
        --accent: #5fdcd0;
        --blob-1: #0f5a63;
        --blob-2: #6a1f4d;
        --blob-3: #3b2f6e;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
    }
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    font: 17px/1.6 "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); }

/* Soft background shapes. The layer reaches far above and below the screen,
   so its clipped edges never show behind the browser bars or while scrolling. */
.blobs {
    position: fixed;
    top: -30vh;
    bottom: -30vh;
    left: 0;
    right: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.blobs span {
    position: absolute;
    border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
    filter: blur(40px);
    opacity: 0.7;
    animation: drift 24s ease-in-out infinite alternate;
}

.blobs span:nth-child(1) { width: 420px; height: 380px; background: var(--blob-1); top: calc(30vh - 120px); left: -100px; }
.blobs span:nth-child(2) { width: 360px; height: 340px; background: var(--blob-2); bottom: calc(30vh - 120px); right: -80px; animation-delay: -8s; }
.blobs span:nth-child(3) { width: 260px; height: 240px; background: var(--blob-3); top: 75vh; left: 62%; animation-delay: -16s; opacity: 0.5; }

@keyframes drift {
    0%   { transform: translate(0, 0) rotate(0deg); border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%; }
    50%  { transform: translate(30px, 20px) rotate(20deg); border-radius: 58% 42% 38% 62% / 52% 60% 40% 48%; }
    100% { transform: translate(-20px, 30px) rotate(-10deg); border-radius: 48% 52% 55% 45% / 38% 55% 45% 62%; }
}

@media (prefers-reduced-motion: reduce) {
    .blobs span { animation: none; }
    .app, .app:hover { transition: none; transform: none; }
}

/* Header */
.site-header {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font: 600 22px/1 "Fraunces", Georgia, serif;
}

.brand .logo {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.nav {
    display: flex;
    gap: 22px;
}

.nav a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

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

.logo {
    flex: none;
    display: grid;
    place-items: center;
    background: var(--gradient);
    color: var(--on-accent);
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    line-height: 1;
    border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
    box-shadow: var(--shadow);
    animation: morph 12s ease-in-out infinite alternate;
}

@keyframes morph {
    0%   { border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; }
    100% { border-radius: 56% 44% 42% 58% / 44% 56% 46% 54%; }
}

@media (prefers-reduced-motion: reduce) {
    .logo { animation: none; }
}

/* Home */
.home {
    flex: 1;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
}

.hero {
    padding: 64px 0 56px;
    text-align: center;
}

h1 {
    font: 600 40px/1.1 "Fraunces", Georgia, serif;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.hero h1 {
    font-size: clamp(36px, 7vw, 60px);
    margin-bottom: 16px;
}

.hero h1 em {
    font-style: normal;
    background: var(--button);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    max-width: 520px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 19px;
}

.section {
    padding: 24px 0 56px;
    scroll-margin-top: 16px;
}

.section h2 {
    font: 600 28px/1.2 "Fraunces", Georgia, serif;
    margin: 0 0 20px;
    text-align: center;
}

.apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease;
}

.app:hover { transform: translateY(-4px); }

.app-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.app-icon {
    width: 72px;
    height: 72px;
    flex: none;
    border-radius: 22%;
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.35);
}

.app h3 {
    margin: 0;
    font: 600 22px/1.2 "Fraunces", Georgia, serif;
}

.app .kind {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.app .about {
    flex: 1;
    margin: 0 0 20px;
}

.app-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    font-weight: 700;
}

.app-links a {
    color: var(--accent);
    text-decoration: none;
}

.app-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.contact {
    max-width: 520px;
    margin: 0 auto;
    padding: 32px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.contact h2 { margin-bottom: 8px; }

.contact p {
    margin: 0 0 24px;
    color: var(--muted);
}

.contact .copy { margin-bottom: 28px; }

.email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 14px 26px;
    background: var(--button);
    color: var(--on-accent);
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.email:hover,
.email:focus-visible {
    filter: brightness(1.08) saturate(1.1);
    transform: translateY(-2px);
}

.email svg { flex: none; width: 20px; height: 20px; }

.copy {
    display: block;
    margin: 10px auto 0;
    padding: 4px 8px;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 3px;
}

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

.socials {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.socials a {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.socials a:hover,
.socials a:focus-visible {
    transform: translateY(-3px);
    color: var(--accent);
    border-color: var(--accent);
}

.socials svg { width: 24px; height: 24px; }

.site-footer {
    padding: 24px 16px 32px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
}

.site-footer a {
    color: var(--muted);
    text-underline-offset: 3px;
}

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

.site-footer .dot { margin: 0 8px; }

/* Privacy */
.doc {
    flex: 1;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 16px 24px;
}

.back {
    display: inline-block;
    margin-bottom: 32px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

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

.doc h1 { font-size: 36px; }

.doc h2 {
    font: 600 22px/1.3 "Fraunces", Georgia, serif;
    margin: 36px 0 8px;
}

.doc h3 {
    font-size: 17px;
    margin: 20px 0 4px;
}

.doc p,
.doc li { margin: 0 0 12px; }

.doc ul { padding-left: 22px; }

.date {
    color: var(--muted);
    margin: 0 0 28px;
}

.summary {
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Redirect */
.redirect {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 48px 16px;
    text-align: center;
}

@media (max-width: 520px) {
    .nav { gap: 16px; }
    .hero { padding: 40px 0 40px; }
    .app { padding: 20px; }
}
