/* YarnSpace website. Plain CSS, system fonts only (no external requests). */

:root {
    --blue: #4b78ec;
    --purple: #8a4fdc;
    --coral: #f5a48a;
    --gradient: linear-gradient(135deg, var(--blue), var(--purple));
    --bg: #f7f6fc;
    --surface: #ffffff;
    --text: #1d1b2c;
    --muted: #5e5b73;
    --border: rgba(60, 50, 120, 0.12);
    --shadow: 0 10px 30px rgba(70, 60, 160, 0.10);
    --radius: 22px;
    --max: 1120px;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12111b;
        --surface: #1c1a29;
        --text: #f1effa;
        --muted: #aaa6c2;
        --border: rgba(200, 190, 255, 0.12);
        --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--purple); }
@media (prefers-color-scheme: dark) { a { color: #b99bff; } }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }

.skip-link {
    position: absolute; left: -999px; top: 8px;
    background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10;
}
.skip-link:focus { left: 8px; }

/* Header */

.site-header {
    position: sticky; top: 0; z-index: 5;
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    height: 64px;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
.site-nav a:hover { color: var(--text); }
.lang-switch {
    border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
}
@media (max-width: 720px) { .site-nav .nav-section { display: none; } }

/* Hero */

.hero {
    position: relative; overflow: hidden;
    padding: 88px 0 96px;
    text-align: center;
}
.hero::before {
    content: ""; position: absolute; inset: -40% -10% auto -10%; height: 120%;
    background:
        radial-gradient(40% 50% at 25% 40%, rgba(75, 120, 236, 0.28), transparent 70%),
        radial-gradient(40% 50% at 75% 35%, rgba(138, 79, 220, 0.28), transparent 70%),
        radial-gradient(30% 40% at 55% 80%, rgba(245, 164, 138, 0.22), transparent 70%);
    z-index: -1;
}
.hero-icon {
    width: 128px; height: 128px; margin: 0 auto 28px;
    border-radius: 29px; box-shadow: 0 18px 40px rgba(90, 70, 200, 0.35);
}
.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    line-height: 1.08; letter-spacing: -0.02em;
    margin: 0 auto 20px; max-width: 16ch;
}
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
    font-size: clamp(1.08rem, 2.2vw, 1.3rem);
    color: var(--muted); max-width: 40em; margin: 0 auto 34px;
}
.cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: flex-start; }


.button-secondary {
    display: inline-block; padding: 13px 22px; border-radius: 14px;
    background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600;
    border: 1px solid var(--border);
}

.trust {
    list-style: none; padding: 0; margin: 34px 0 0;
    display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center;
    color: var(--muted); font-size: 0.95rem; font-weight: 600;
}
.trust li::before { content: "✓"; color: var(--purple); margin-right: 6px; }

.platforms { margin-top: 14px; color: var(--muted); font-size: 0.9rem; }

/* Sections */

section { padding: 84px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 44em; margin: 0 auto 48px; }
.eyebrow {
    display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--purple); margin-bottom: 10px;
}
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 14px; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.1rem; }

.feature-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.section-alt .card { background: var(--bg); box-shadow: none; }
.card h3 { margin: 16px 0 8px; font-size: 1.25rem; line-height: 1.25; }
.card p { margin: 0 0 10px; color: var(--muted); }
.card ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--muted); }
.card li { margin: 4px 0; }

.icon-badge {
    width: 50px; height: 50px; border-radius: 14px;
    display: grid; place-items: center; color: #fff;
}
.icon-badge svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-periwinkle { background: #747aec; }
.c-rose { background: #e87390; }
.c-coral { background: #f5856a; }
.c-honey { background: #edad45; }
.c-mint { background: #4db59e; }
.c-sky { background: #5c9ee0; }
.c-plum { background: #9e5799; }
.c-teal { background: #298594; }

/* Highlights */

.highlight {
    display: grid; gap: 48px; align-items: center;
    grid-template-columns: 1fr 1fr;
}
.highlight + .highlight { margin-top: 84px; }
.highlight.reverse .highlight-art { order: 2; }
.highlight h3 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; margin: 0 0 14px; }
.highlight p { color: var(--muted); font-size: 1.08rem; }
.highlight ul { padding-left: 1.1em; color: var(--muted); }
.highlight-art {
    aspect-ratio: 16 / 10; border-radius: 28px; background: var(--gradient);
    display: grid; place-items: center; color: #fff; position: relative; overflow: hidden;
    box-shadow: 0 24px 50px rgba(90, 70, 200, 0.25);
}
.highlight-art svg { width: 34%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.95; }
.highlight-art::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(60% 60% at 80% 10%, rgba(255, 255, 255, 0.25), transparent 60%);
}
@media (max-width: 820px) {
    .highlight { grid-template-columns: 1fr; gap: 28px; }
    .highlight.reverse .highlight-art { order: 0; }
}

/* Pricing */

.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); max-width: 860px; margin: 0 auto; }
.plan h3 { margin-top: 0; }
.plan ul { list-style: none; padding: 0; }
.plan li { padding-left: 1.6em; position: relative; margin: 8px 0; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--purple); font-weight: 700; }
.plan-pro { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient) border-box; }
.section-alt .plan-pro { background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box; }
.plan .price { font-size: 1.05rem; color: var(--muted); margin: 4px 0 12px; }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 700; color: #fff; background: var(--gradient); padding: 3px 10px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }

/* FAQ */

.faq { max-width: 780px; margin: 0 auto; }
.faq details {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: 4px 22px; margin-bottom: 12px;
}
.section-alt .faq details { background: var(--bg); }
.faq summary {
    cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none;
    display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--purple); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* Final CTA */

.final-cta { text-align: center; }
.final-cta .card { background: var(--gradient); color: #fff; border: 0; padding: 56px 28px; }
.final-cta h2 { color: #fff; }
.final-cta p { color: rgba(255, 255, 255, 0.88); max-width: 34em; margin: 0 auto 28px; font-size: 1.1rem; }

/* Legal pages */

.legal { padding: 56px 0 80px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 0 0 6px; }
.legal .updated { color: var(--muted); margin: 0 0 36px; }
.legal h2 { font-size: 1.3rem; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--muted); }
.legal address { font-style: normal; color: var(--muted); }

/* Footer */

.site-footer { padding: 44px 0 56px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.92rem; }
.site-footer .container { display: grid; gap: 18px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.disclaimer { margin: 0; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* App Store badge (Apple's official artwork, not linked until the app is live) */

.store-badge { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.store-badge img { height: 54px; width: auto; }
.store-badge .soon {
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--purple);
}
@media (prefers-color-scheme: dark) {
    .store-badge img { outline: 1px solid rgba(255, 255, 255, 0.35); outline-offset: -1px; border-radius: 9px; }
    .store-badge .soon { color: #b99bff; }
}

/* Device frames, drawn in CSS around real screenshots */

.device-stage {
    position: relative; width: min(1040px, 100%); margin: 64px auto 0;
    padding-bottom: 4%;
}
.device-stage .mac { width: 80%; margin: 0 auto; }
.device-stage .ipad { position: absolute; left: 0; bottom: 0; width: 40%; }
.device-stage .iphone { position: absolute; right: 2%; bottom: 0; width: 15.5%; }

/* The bezel is the image's margin: margins in % refer to the frame's own width, so the bezel
   keeps its proportion at every size (padding would refer to the parent instead). */
.iphone {
    position: relative; display: block; background: #0b0b0e;
    border-radius: 18% / 8.3%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 0 0 1.5px #3b3b43,
        0 24px 50px rgba(40, 30, 110, 0.28);
}
.iphone img {
    display: block; width: 92%; margin: 4%;
    border-radius: 15.2% / 7%;
}
.iphone::after {
    content: ""; position: absolute; top: 3.3%; left: 50%; transform: translateX(-50%);
    width: 28.6%; height: 3.6%; background: #000; border-radius: 999px;
}

.ipad {
    display: block; background: #0b0b0e;
    border-radius: 3.6% / 4.75%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 0 0 1.5px #3b3b43,
        0 24px 50px rgba(40, 30, 110, 0.28);
}
.ipad img {
    display: block; width: 95.6%; margin: 2.2%;
    border-radius: 1.5% / 2%;
}

.mac .screen {
    background: #0d0d10; border-radius: 2.6% / 4.2%; padding: 2.2% 2.2% 3%;
    box-shadow: 0 30px 70px rgba(40, 30, 110, 0.28), inset 0 0 0 2px #2c2c33;
}
.mac .wallpaper {
    aspect-ratio: 16 / 10; border-radius: 0.6%;
    display: grid; place-items: center; overflow: hidden;
    background:
        radial-gradient(70% 90% at 15% 20%, #7aa0ff 0%, transparent 60%),
        radial-gradient(60% 80% at 90% 80%, #c08cff 0%, transparent 60%),
        linear-gradient(135deg, #4b78ec, #8a4fdc);
}
.mac .wallpaper img { width: 86%; filter: drop-shadow(0 14px 28px rgba(20, 10, 60, 0.35)); }
.mac .base {
    position: relative; width: 114%; margin-left: -7%; height: 0; padding-bottom: 3.4%;
    background: linear-gradient(#e6e6ea, #b9b9c2); border-radius: 0 0 14% 14% / 0 0 100% 100%;
}
.mac .base::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 14%; height: 40%; background: #c9c9d1; border-radius: 0 0 12px 12px;
}

/* Screenshot gallery */

.gallery {
    display: grid; gap: 28px; grid-template-columns: repeat(4, 1fr);
    max-width: 1040px; margin: 0 auto;
}
.gallery figure { margin: 0; text-align: center; }
.gallery .iphone { margin: 0 auto 18px; max-width: 240px; }
.gallery figcaption { font-weight: 700; }
.gallery figcaption span { display: block; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
@media (max-width: 640px) {
    .device-stage { width: calc(100% + 24px); margin-left: -12px; margin-top: 44px; }
}
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%;
        overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 24px;
        -webkit-overflow-scrolling: touch;
    }
    .gallery figure { scroll-snap-align: center; }
}
