/* ============================================================
   BLYPPO THEME — main.css
   ============================================================
   Vanilla CSS, mobile-first, no jQuery, no build tools.
   Tokens jako custom properties. Layout: container + grid.
   ============================================================ */

:root {
    --color-bg:           #ffffff;
    --color-surface:      #f9fafb;
    --color-text:         #111827;
    --color-text-muted:   #6b7280;
    --color-border:       #e5e7eb;
    --color-primary:      #3b82f6;
    --color-primary-dark: #2563eb;
    --color-accent:       #8b5cf6;
    --color-success:      #10b981;
    --color-warning:      #f59e0b;
    --color-danger:       #ef4444;

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow:    0 4px 12px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 32px rgba(0,0,0,.08);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --container:        1200px;
    --container-narrow: 760px;
    --gutter:           1.25rem;
}

/* ===== Reset/base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--color-text); background: var(--color-bg); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--color-primary-dark); }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; color: var(--color-text); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--color-surface); padding: .15em .35em; border-radius: var(--radius-sm); }

.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: absolute; top: 0; left: 0; padding: .75em 1em; background: var(--color-primary); color: #fff; z-index: 100; }

/* ===== Layout helpers ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }

.section-header { text-align: center; margin: 0 auto 3rem; max-width: 640px; }
.section-title { margin-bottom: .75rem; }
.section-lead { color: var(--color-text-muted); font-size: 1.1rem; }

/* ===== Buttons ===== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .65em 1.4em;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .15s ease;
    white-space: nowrap;
}
.button--lg { padding: .9em 1.8em; font-size: 1.05rem; }
.button--primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.button--primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.button--ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.button--ghost:hover { background: var(--color-surface); border-color: var(--color-text-muted); color: var(--color-text); }

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(150%) blur(8px);
    -webkit-backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 0;
    gap: 1.5rem;
}
.site-header__brand img,
.custom-logo { max-height: 40px; width: auto; }
.site-header__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}
.primary-menu a {
    color: var(--color-text);
    font-weight: 500;
    font-size: .95rem;
}
.primary-menu a:hover { color: var(--color-primary); }
.site-header__toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: .5rem;
    cursor: pointer;
}
.site-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    margin: 4px 0;
    transition: transform .2s, opacity .2s;
}

/* ===== Hero ===== */
.hero {
    padding: 5rem 0 6rem;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
    overflow: hidden;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
.hero__eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(59,130,246,.1);
    padding: .35em .9em;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 1rem;
}
.hero__title { margin-bottom: 1.25rem; }
.hero__title-accent {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero__lead {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 640px;
    margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.hero__meta { font-size: .85rem; color: var(--color-text-muted); margin: 0; }
.hero__visual {
    position: relative;
    height: 280px;
}
.hero__box {
    position: absolute;
    padding: 1rem 1.25rem;
    border: 2px solid;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #fff;
    width: 240px;
    transform-origin: top left;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.hero__box strong { font-size: 1rem; }
.hero__box span { font-size: .85rem; opacity: .8; }
.hero__box:nth-child(1) { top: 0; left: 0; transform: rotate(-3deg); }
.hero__box:nth-child(2) { top: 60px; left: 80px; transform: rotate(2deg); z-index: 2; }
.hero__box:nth-child(3) { top: 130px; left: 30px; transform: rotate(-1deg); }

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

/* ===== Features ===== */
.features { padding: 5rem 0; background: var(--color-bg); }
.features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 600px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features__grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color .2s, transform .2s;
}
.feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.feature-card__icon { font-size: 2rem; margin-bottom: .75rem; }
.feature-card__title { margin: 0 0 .5rem; font-size: 1.15rem; }
.feature-card__desc { color: var(--color-text-muted); margin: 0; font-size: .95rem; }

/* ===== Variants ===== */
.variants { padding: 5rem 0; background: var(--color-surface); }
.variants__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 600px) { .variants__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .variants__grid { grid-template-columns: repeat(3, 1fr); } }
.variant-card {
    border: 2px solid;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.variant-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.variant-card__title { margin: 0 0 .25rem; font-size: 1.1rem; }
.variant-card__desc { font-size: .9rem; opacity: .85; margin: 0 0 .85rem; }
.variant-card__code {
    display: inline-block;
    background: rgba(255,255,255,.6);
    color: inherit;
    padding: .25em .55em;
    border-radius: var(--radius-sm);
    font-size: .8rem;
}

/* ===== Presets ===== */
.presets { padding: 5rem 0; }
.presets__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 600px) { .presets__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .presets__list { grid-template-columns: repeat(3, 1fr); } }
.preset-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.preset-card__chip {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    padding: .25em .8em;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    margin-bottom: .5rem;
}
.preset-card p { margin: 0; color: var(--color-text-muted); font-size: .95rem; }

/* ===== Pricing ===== */
.pricing { padding: 5rem 0; background: var(--color-surface); }
.pricing__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 800px) { .pricing__grid { grid-template-columns: repeat(3, 1fr); } }
.pricing-card {
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}
.pricing-card--featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(59,130,246,.1);
    position: relative;
    transform: scale(1.02);
}
.pricing-card__label { font-size: 1.4rem; margin: 0 0 .5rem; color: var(--color-primary); }
.pricing-card__price { margin-bottom: 1.5rem; }
.pricing-card__amount { font-size: 2.5rem; font-weight: 700; }
.pricing-card__period { display: block; color: var(--color-text-muted); font-size: .9rem; }
.pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    text-align: left;
    flex: 1;
}
.pricing-card__features li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: .95rem;
}
.pricing-card__features li:last-child { border-bottom: 0; }

/* ===== CTA section ===== */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #fff;
    text-align: center;
}
.cta-section__inner { max-width: 640px; margin: 0 auto; }
.cta-section__title { color: #fff; margin-bottom: 1rem; }
.cta-section__lead { color: rgba(255,255,255,.85); font-size: 1.1rem; margin-bottom: 2rem; }
.cta-section .blyppo-license-form { background: #fff; padding: 2rem; border-radius: var(--radius); color: var(--color-text); text-align: left; box-shadow: var(--shadow-lg); }

/* ===== Blyppo license form (shortcode) ===== */
.blyppo-license-form__form { display: flex; flex-direction: column; gap: 1rem; }
.blyppo-license-form__label { display: flex; flex-direction: column; gap: .35rem; }
.blyppo-license-form__label > span { font-weight: 600; font-size: .9rem; }
.blyppo-license-form__input {
    padding: .75em 1em;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
}
.blyppo-license-form__input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.blyppo-license-form__submit {
    background: var(--color-primary);
    color: #fff;
    border: 0;
    padding: .9em 1.5em;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background .15s;
}
.blyppo-license-form__submit:hover { background: var(--color-primary-dark); }
.blyppo-license-form__msg { font-size: .9rem; margin: 0; }
.blyppo-license-form__msg.is-success { color: var(--color-success); }
.blyppo-license-form__msg.is-error { color: var(--color-danger); }
.blyppo-license-form__msg.is-loading { color: var(--color-text-muted); }
.blyppo-license-form__privacy { font-size: .8rem; color: var(--color-text-muted); margin: 1rem 0 0; }

/* ===== Footer ===== */
.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 3rem 0 1.5rem;
}
.site-footer a { color: #93c5fd; }
.site-footer a:hover { color: #fff; }
.site-footer__widgets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (min-width: 760px) { .site-footer__widgets { grid-template-columns: repeat(3, 1fr); } }
.site-footer__col h3, .site-footer__col .widget-title { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer__bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}
@media (min-width: 760px) { .site-footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; } }
.site-footer__copyright { margin: 0; font-size: .9rem; color: #9ca3af; }
.footer-menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ===== Pages: post-list, post-card ===== */
.archive { padding: 4rem 0; }
.archive__title { text-align: center; }
.post-list { display: grid; gap: 2rem; }
.post-card { padding: 2rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
.post-card__title { margin: 0 0 .5rem; }
.post-card__title a { color: var(--color-text); }
.post-card__title a:hover { color: var(--color-primary); }
.post-card__meta { font-size: .85rem; color: var(--color-text-muted); margin-bottom: .75rem; }

.page-content { padding: 4rem 0; }
.page-content__header { margin-bottom: 2rem; }
.page-content__body h2 { margin-top: 2rem; }
.page-content__body ul, .page-content__body ol { padding-left: 1.5rem; }

.single-post { padding: 4rem 0; }
.single-post__header { margin-bottom: 2rem; text-align: center; }
.single-post__meta { color: var(--color-text-muted); font-size: .9rem; }
.single-post__thumb { margin: 2rem 0; }
.single-post__thumb img { border-radius: var(--radius); width: 100%; }
.post-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .9rem;
}

.pagination { margin: 2rem 0; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: .5em .9em; margin: 0 .15em; border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ===== License page ===== */
.license-page { padding: 4rem 0; background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 60%); }
.license-page__form-wrap {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem 0 3rem;
    max-width: 560px;
    margin-inline: auto;
}

/* ===== Mobile menu ===== */
@media (max-width: 760px) {
    .site-header__toggle { display: block; }
    .site-header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        padding: 1rem;
        gap: 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .site-header__nav.is-open { max-height: 80vh; padding-block: 1.5rem; }
    .primary-menu { flex-direction: column; gap: 1rem; }
    .site-header__cta { align-self: stretch; text-align: center; }
}

/* ===== Print ===== */
@media print {
    .site-header, .site-footer, .cta-section, .hero__visual { display: none; }
    body { color: #000; background: #fff; }
}
