/* =========================================================
   One-Page Personal Site & Store — front-end styles
   ========================================================= */
:root {
    --bg: #0b1020;
    --bg-alt: #0f1630;
    --card: #151d3b;
    --card-hover: #1a2348;
    --border: rgba(148, 163, 255, 0.12);
    --text: #e6e9f5;
    --muted: #9aa3c7;
    --accent: #6366f1;
    --accent-2: #a855f7;
    --grad: linear-gradient(135deg, #6366f1, #a855f7);
    --radius: 16px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.empty { color: var(--muted); grid-column: 1 / -1; text-align: center; padding: 2rem 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: var(--grad);
    color: #fff;
    font-weight: 600;
    padding: 0.85rem 1.9rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45); }
.btn-sm { padding: 0.55rem 1.3rem; font-size: 0.9rem; }
.btn-full { width: 100%; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--text);
    box-shadow: none;
}
.btn-outline:hover { background: rgba(99, 102, 241, 0.12); }

/* ---------- Nav ---------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(11, 16, 32, 0.7);
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled { background: rgba(11, 16, 32, 0.92); border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.02em;
}
.brand-logo { width: 34px; height: 34px; display: block; flex-shrink: 0; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--text); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.12) 45%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    animation: float 9s ease-in-out infinite alternate;
}
@keyframes float { from { transform: translateY(0) } to { transform: translateY(50px) } }
.hero-content { max-width: 720px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
    font-size: 0.85rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.4rem;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.35 } }
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}
.hero p { font-size: 1.15rem; color: var(--muted); margin-bottom: 2rem; max-width: 580px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3.2rem; }
.kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.6rem;
}
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); margin-top: 0.7rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; }
.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 1.05rem; }
.stats { display: grid; gap: 1rem; }
.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.6rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    transition: transform 0.25s;
}
.stat:hover { transform: translateX(6px); }
.stat strong {
    font-size: 2rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat span { color: var(--muted); font-size: 0.95rem; }

/* ---------- Services ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 1.6rem;
}
.service-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(99, 102, 241, 0.5); background: var(--card-hover); }
.service-card.featured { border-color: rgba(168, 85, 247, 0.55); box-shadow: 0 0 40px rgba(168, 85, 247, 0.12); }
.tag {
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--grad);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    letter-spacing: 0.04em;
}
.service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.14);
    color: #a5b4fc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}
.service-icon svg { width: 26px; height: 26px; }
.service-img { border-radius: 12px; margin-bottom: 1.1rem; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--muted); font-size: 0.93rem; flex: 1; margin-bottom: 1.2rem; }
.service-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.price { font-size: 1.35rem; font-weight: 800; }

/* ---------- Portfolio ---------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.6rem;
}
.portfolio-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s;
}
.portfolio-item:hover { transform: translateY(-6px); border-color: rgba(99, 102, 241, 0.5); }
.portfolio-item img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.portfolio-item figcaption { padding: 1.2rem 1.4rem 1.4rem; }
.portfolio-item h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.portfolio-item p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.6rem; }
.portfolio-item a { font-size: 0.9rem; font-weight: 600; }

/* ---------- Testimonials ---------- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
}
.testimonial {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.7rem;
}
.stars { color: #fbbf24; letter-spacing: 0.15em; margin-bottom: 0.8rem; }
.testimonial p { color: var(--text); font-size: 0.97rem; margin-bottom: 1rem; }
.testimonial footer { color: var(--muted); font-size: 0.9rem; }
.testimonial footer strong { color: var(--text); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; }
.contact-info p { margin-bottom: 1rem; color: var(--muted); display: flex; align-items: center; gap: 0.7rem; }
.contact-info a { color: var(--text); }
.contact-info a:hover { color: var(--accent); }
.ci { font-style: normal; }
.socials { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.4rem; }
.socials a {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--muted);
    transition: 0.2s;
}
.socials a:hover { border-color: var(--accent); color: var(--text); }

.contact-form, #orderForm { display: flex; flex-direction: column; gap: 0.9rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
input, textarea, select {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    padding: 0.85rem 1rem;
    font-size: 0.97rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; padding: 0; border: 0; }
.form-status { font-size: 0.92rem; min-height: 1.2em; }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }

/* ---------- Order modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(5, 8, 18, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal[hidden] { display: none; }
.modal-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 460px;
    width: 100%;
    padding: 2rem;
    position: relative;
    animation: modalIn 0.25s ease;
    max-height: 92vh;
    overflow-y: auto;
}
@keyframes modalIn { from { transform: translateY(24px); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-box h3 { margin-bottom: 0.4rem; }
.modal-box .muted { margin-bottom: 1.2rem; font-size: 0.93rem; }
.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.7rem;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }

/* ---------- Cart ---------- */
.cart-count {
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.05rem 0.45rem;
    margin-left: 0.3rem;
    vertical-align: middle;
}
.cart-fab {
    position: fixed;
    bottom: 1.4rem;
    left: 1.4rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: var(--grad);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    z-index: 90;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s;
}
.cart-fab:hover { transform: scale(1.08); }
.cart-fab .cart-count { position: absolute; top: -4px; right: -4px; margin: 0; }

.cart-items { margin: 1rem 0 0.4rem; }
.cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
}
.cart-row-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.cart-row-info strong { font-size: 0.96rem; }
.cart-row-info .muted { font-size: 0.85rem; }
.cart-qty { display: flex; align-items: center; gap: 0.35rem; flex-shrink: 0; }
.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    transition: 0.15s;
}
.qty-btn:hover { border-color: var(--accent); }
.qty-del { font-size: 0.85rem; }
.qty-del:hover { border-color: #ef4444; }
.qty-num { min-width: 1.4em; text-align: center; font-weight: 700; }
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 0;
    font-size: 1.05rem;
}
.cart-total-row strong { font-size: 1.4rem; }
#cartCheckout { margin-bottom: 0.4rem; text-align: center; }

/* ---------- Checkout page ---------- */
.checkout-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; align-items: start; }
.checkout-summary, .thankyou-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
}
.checkout-summary h3, .checkout-form h3 { margin-bottom: 0.9rem; font-size: 1.05rem; }
.checkout-form h3 { margin-top: 1.4rem; }
.checkout-form h3:first-of-type { margin-top: 0; }
.checkout-form { display: flex; flex-direction: column; gap: 0.9rem; }
.pay-methods { display: flex; flex-direction: column; gap: 0.6rem; }
.pay-method {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
}
.pay-method:hover { border-color: var(--accent); }
.pay-method input { width: auto; accent-color: var(--accent); }
.pay-method:has(input:checked) { border-color: var(--accent); background: rgba(99, 102, 241, 0.08); }

/* ---------- Thank-you page ---------- */
.thankyou-card { text-align: center; }
.ty-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.2rem;
}
.ty-icon.ok { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.thankyou-card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.ty-summary { text-align: left; margin: 1.6rem 0; }
.notice {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    font-size: 0.93rem;
    text-align: left;
    margin: 1rem 0;
}
.notice.warn { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }

/* USDT payment box */
.usdt-box strong { display: block; font-size: 1.15rem; margin-bottom: 0.15rem; }
.usdt-net { color: var(--muted); font-size: 0.85rem; }
.usdt-addr-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin: 0.9rem 0;
    flex-wrap: wrap;
}
.usdt-addr-row code {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}
.usdt-hint { font-size: 0.85rem; color: var(--muted); margin: 0; }
.usdt-hint strong { display: inline; font-size: inherit; }

@media (max-width: 860px) {
    .checkout-grid { grid-template-columns: 1fr; }
}

/* ---------- Back to top ---------- */
.to-top {
    position: fixed;
    bottom: 1.4rem;
    right: 1.4rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--grad);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: 0.3s;
    z-index: 90;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Scroll reveal ----------
   Content is ALWAYS visible on every device — nothing is ever hidden.
   The entrance animation is a pure enhancement that plays over already
   visible content when it scrolls into view. If JS, the observer, or the
   animation fails on any device, the page simply shows normally. */
@keyframes revealRise {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
}
html.js .reveal.in { animation: revealRise 0.6s ease; }
@media (prefers-reduced-motion: reduce) {
    html.js .reveal.in { animation: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .section { padding: 64px 0; }
}
@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 68px;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: flex-start;
        background: rgba(11, 16, 32, 0.98);
        border-bottom: 1px solid var(--border);
        padding: 1.2rem 1.5rem 1.6rem;
        gap: 1.1rem;
        transform: translateY(-130%);
        transition: transform 0.3s ease;
    }
    .nav-links.open { transform: none; }
    .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .row2 { grid-template-columns: 1fr; }
    .hero { min-height: auto; }
}
