/* W से Website — public site styles. Mobile-first: base rules target phones,
   min-width media queries layer on tablet/desktop. */

:root {
    --cream: #fdf8ec;
    --paper: #fffdf8;
    --ink: #1f2330;
    --muted: #5b6170;
    --line: #ebe1c9;
    --yellow: #ffc21a;
    --yellow-deep: #f5a300;
    --blue: #2563eb;
    --green: #2e9e44;
    --whatsapp: #1fa855;
    --error: #c62828;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(31, 35, 48, .06), 0 8px 24px rgba(31, 35, 48, .06);
    --font-head: "Baloo 2", system-ui, sans-serif;
    --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --gutter: 20px;
    --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    /* room for the fixed mobile action bar */
    padding-bottom: 76px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 20px;
    border: 2px solid transparent; border-radius: 999px;
    font: 700 1rem/1.2 var(--font-body);
    text-decoration: none; cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.btn-primary:hover { background: #ffcd3f; }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.btn-outline { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.icon { flex: none; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(253, 248, 236, .92);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.3rem/1 var(--font-head); }
.brand img { border-radius: 50%; }
.brand-se { color: var(--blue); }

.menu-toggle {
    width: 48px; height: 48px; margin-right: -10px;
    display: grid; place-items: center;
    background: none; border: 0; cursor: pointer;
}
.menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -7px; }
.menu-bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 4px;
    padding: 12px var(--gutter) 20px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(31, 35, 48, .08);
}
.site-nav.open { display: flex; }
.site-nav a:not(.btn) { padding: 12px 4px; color: var(--ink); text-decoration: none; font-weight: 700; border-bottom: 1px solid var(--line); }
.site-nav a.active { color: var(--blue); }
.site-nav .btn { margin-top: 12px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { max-width: 640px; margin: 0 0 32px; }
.eyebrow {
    margin: 0 0 8px;
    color: var(--blue); font-weight: 800; font-size: .85rem;
    text-transform: uppercase; letter-spacing: .08em;
}
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 36px 0 48px; }
.hero-inner { display: grid; gap: 28px; }
.hero h1 .hl {
    background: linear-gradient(transparent 62%, rgba(255, 194, 26, .7) 62%);
    padding: 0 .08em;
}
.hero-price { font-size: 1.05rem; }
.hero-price strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--green); }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.hero-art { order: -1; width: 150px; }
.hero-art img { border-radius: 50%; box-shadow: var(--shadow); }

/* ---------- Why ---------- */
.why { padding-top: 0; }
.why-grid { display: grid; gap: 16px; }
.why-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.why-card p { margin: 0; color: var(--muted); }

/* ---------- Pricing ---------- */
.pricing { background: var(--paper); border-block: 1px solid var(--line); }

.period-toggle {
    display: flex; margin: 0 0 28px; padding: 4px;
    border: 2px solid var(--ink); border-radius: 999px; background: #fff;
    max-width: 440px;
}
.period-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.period-toggle label {
    flex: 1; text-align: center; padding: 10px 6px; border-radius: 999px;
    font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap;
}
.period-toggle input:checked + label { background: var(--ink); color: #fff; }
.period-toggle input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }

.price-grid { display: grid; gap: 20px; }
.price-card {
    position: relative; display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 22px; box-shadow: var(--shadow);
}
.price-card.featured { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--yellow); }
.price-card h3 { font-size: 1.6rem; margin-bottom: 4px; }
.price-tagline { color: var(--muted); }
.badge {
    position: absolute; top: -14px; left: 22px; margin: 0;
    background: var(--green); color: #fff; font-weight: 800; font-size: .8rem;
    padding: 4px 12px; border-radius: 999px;
}
.price-block { margin: 4px 0 16px; min-height: 96px; }

/* Show one period at a time; 2 months is the fallback when :has() isn't supported. */
.price-amount { display: none; margin: 0; }
.price-amount[data-period="2m"] { display: block; }
.pricing:has(#period-6m:checked) .price-amount[data-period="2m"],
.pricing:has(#period-1y:checked) .price-amount[data-period="2m"] { display: none; }
.pricing:has(#period-6m:checked) .price-amount[data-period="6m"],
.pricing:has(#period-1y:checked) .price-amount[data-period="1y"] { display: block; }

.price { display: block; font: 800 2.6rem/1.1 var(--font-head); }
.price-period { display: block; color: var(--muted); font-size: .95rem; }
.price-monthly { display: inline-block; margin-top: 6px; font-size: .85rem; font-weight: 700; color: var(--green); background: #e9f6ec; padding: 2px 10px; border-radius: 999px; }
.best-for { font-size: .95rem; }

.checklist { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.checklist li { position: relative; padding: 6px 0 6px 30px; }
.checklist li::before {
    content: ""; position: absolute; left: 0; top: 10px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3L15 7'/%3E%3C/svg%3E") center/14px no-repeat;
}

.custom-card {
    display: grid; gap: 16px; align-items: center;
    margin-top: 28px; padding: 24px 22px;
    background: var(--cream); border: 2px dashed var(--ink); border-radius: var(--radius);
}
.custom-card h3 { margin-bottom: 4px; }
.custom-card p { margin: 0; }

/* ---------- Included ---------- */
.included-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.included-grid li {
    display: flex; flex-direction: column; gap: 2px;
    padding: 18px 18px 18px 20px; background: var(--paper);
    border: 1px solid var(--line); border-left: 5px solid var(--yellow); border-radius: var(--radius-sm);
}
.included-grid span { color: var(--muted); font-size: .95rem; }

/* ---------- Steps ---------- */
.how { background: var(--ink); color: #fff; }
.how .eyebrow { color: var(--yellow); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li {
    counter-increment: step; position: relative;
    padding: 20px 20px 20px 76px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius);
}
.steps li::before {
    content: counter(step);
    position: absolute; left: 20px; top: 20px;
    width: 40px; height: 40px; display: grid; place-items: center;
    background: var(--yellow); color: var(--ink); border-radius: 50%;
    font: 800 1.3rem/1 var(--font-head);
}
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: rgba(255, 255, 255, .78); }

/* ---------- Industries ---------- */
.industry-grid { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.industry-grid li {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.industry-emoji { font-size: 1.8rem; line-height: 1; margin-bottom: 4px; }
.industry-grid strong { font-family: var(--font-head); font-size: 1.1rem; line-height: 1.2; }
.industry-grid span:last-child { color: var(--muted); font-size: .88rem; line-height: 1.4; }

/* ---------- Contact ---------- */
.contact { background: var(--paper); border-top: 1px solid var(--line); }
.contact-inner { display: grid; gap: 28px; }
.contact-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.contact-item {
    display: flex; flex-direction: column; padding: 14px 16px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--ink); text-decoration: none; word-break: break-word;
}
.contact-item:hover { border-color: var(--ink); }
.contact-label { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.form-card { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px 18px; box-shadow: 6px 6px 0 var(--yellow); }
.field { margin-bottom: 18px; }
.field-row { display: grid; gap: 0; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .95rem; }
.req { color: var(--error); }
.optional { color: var(--muted); font-weight: 400; }

.field input, .field select, .field textarea {
    width: 100%; min-height: 50px; padding: 12px 14px;
    background: var(--paper); color: var(--ink);
    border: 1.5px solid #cfc5ad; border-radius: var(--radius-sm);
    /* 16px+ stops iOS zooming in on focus */
    font: 400 1rem/1.4 var(--font-body);
    -webkit-appearance: none; appearance: none;
}
.field select {
    padding-right: 40px;
    background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231f2330' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E") right 12px center/18px no-repeat;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 6px 0 0; color: var(--error); font-size: .9rem; font-weight: 600; }

.input-prefix { display: flex; }
.input-prefix span {
    display: grid; place-items: center; padding: 0 12px;
    background: var(--cream); border: 1.5px solid #cfc5ad; border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-weight: 700; color: var(--muted);
}
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.form-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; }
.alert p { margin: 4px 0 0; }
.alert-success { background: #e9f6ec; border: 1.5px solid var(--green); }
.alert-error { background: #fdecec; border: 1.5px solid var(--error); color: #8e1c1c; font-weight: 600; }

/* ---------- Portfolio ---------- */
.page-hero { padding: 40px 0 8px; }
.page-hero .lead { max-width: 620px; }

.demo-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.demo-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.demo-preview { padding: 18px 18px 0; background: color-mix(in srgb, var(--accent) 14%, #fff); }
.demo-browser { display: flex; gap: 5px; padding: 8px 10px; background: #fff; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 0; }
.demo-browser span { width: 8px; height: 8px; border-radius: 50%; background: #e0d8c6; }
.demo-screen { background: var(--accent); padding: 18px 16px 16px; border-radius: 0; min-height: 150px; }
.demo-screen-title { color: #fff; font: 800 1.2rem/1.1 var(--font-head); margin: 0 0 12px; }
.demo-screen-bar { height: 8px; width: 80%; background: rgba(255, 255, 255, .55); border-radius: 4px; margin-bottom: 8px; }
.demo-screen-bar.short { width: 50%; }
.demo-screen-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.demo-screen-tiles i { height: 42px; background: rgba(255, 255, 255, .85); border-radius: 6px; }
.demo-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.demo-body h2 { font-size: 1.4rem; margin-bottom: 6px; }
.demo-body .muted { flex: 1; font-size: .95rem; }
.demo-body .btn { align-self: flex-start; }
.demo-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.tag { background: var(--cream); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; color: var(--ink); }
.coming-soon { margin: 0; font-size: .9rem; font-weight: 700; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 24px; border-top: 1px solid var(--line); background: var(--cream); }
.footer-inner { display: grid; gap: 20px; }
.footer-brand { font: 800 1.4rem/1 var(--font-head); margin-bottom: 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: var(--ink); word-break: break-word; }
.copyright { margin: 24px 0 0; color: var(--muted); font-size: .85rem; }

/* ---------- Mobile action bar + WhatsApp float ---------- */
.mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgba(253, 248, 236, .96);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
}
.mobile-cta .btn { min-height: 48px; padding: 10px 12px; box-shadow: none; }
.wa-float { display: none; }

/* ================= Tablet ================= */
@media (min-width: 640px) {
    :root { --gutter: 28px; }
    .hero-actions { flex-direction: row; }
    .why-grid { grid-template-columns: repeat(3, 1fr); }
    .included-grid { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .field-row { grid-template-columns: 1fr 1fr; gap: 16px; }
    .demo-grid { grid-template-columns: 1fr 1fr; }
    .custom-card { grid-template-columns: 1fr auto; padding: 28px; }
    .form-card { padding: 30px 28px; }
    .footer-inner { grid-template-columns: 1fr auto; }
}

/* ================= Desktop ================= */
@media (min-width: 960px) {
    :root { --header-h: 76px; }
    body { padding-bottom: 0; }
    .section { padding: 88px 0; }

    .menu-toggle { display: none; }
    .site-nav {
        display: flex; position: static; flex-direction: row; align-items: center; gap: 28px;
        padding: 0; background: none; border: 0; box-shadow: none;
    }
    .site-nav a:not(.btn) { padding: 0; border: 0; }
    .site-nav a:not(.btn):hover { color: var(--blue); }
    .site-nav .btn { margin: 0; }

    .hero { padding: 72px 0 64px; }
    .hero-inner { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 56px; }
    .hero-art { order: 0; width: 100%; max-width: 400px; justify-self: end; }

    .price-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
    .price-card { padding: 32px 28px; }
    .included-grid { grid-template-columns: repeat(4, 1fr); }
    .steps { grid-template-columns: repeat(4, 1fr); }
    .steps li { padding: 76px 22px 24px; }
    .industry-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .industry-grid li { padding: 22px; }
    .contact-inner { grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
    .demo-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

    .mobile-cta { display: none; }
    .wa-float {
        display: grid; place-items: center;
        position: fixed; right: 24px; bottom: 24px; z-index: 40;
        width: 60px; height: 60px; border-radius: 50%;
        background: var(--whatsapp); color: #fff;
        box-shadow: 0 6px 20px rgba(31, 168, 85, .4);
        transition: transform .15s ease;
    }
    .wa-float:hover { transform: scale(1.06); }
    .wa-float .icon { width: 30px; height: 30px; }
}
