/* ===========================================================================
   Secret Store — Apple-inspired design system
   ตาม design spec: single blue accent, alternating full-bleed tiles,
   SF Pro (system) + tight tracking, 17px body, pills, exactly one shadow
   =========================================================================== */
:root {
    /* Brand & accent */
    --primary: #0066cc;
    --primary-focus: #0071e3;
    --primary-on-dark: #2997ff;
    /* Surface */
    --canvas: #ffffff;
    --parchment: #f5f5f7;
    --pearl: #fafafc;
    --tile-1: #272729;
    --tile-2: #2a2a2c;
    --tile-3: #252527;
    --black: #000000;
    --chip: rgba(210, 210, 215, 0.64);
    /* Text */
    --ink: #1d1d1f;
    --on-dark: #ffffff;
    --body-muted: #cccccc;
    --ink-80: #333333;
    --ink-48: #7a7a7a;
    /* Lines */
    --divider-soft: #f0f0f0;
    --hairline: #e0e0e0;
    /* Depth */
    --product-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
    /* Radius */
    --r-sm: 8px;
    --r-md: 11px;
    --r-lg: 18px;
    --r-pill: 9999px;
    /* Rhythm */
    --section: 80px;
    --font: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: -apple-system, "SF Pro Display", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--canvas);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.374px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------------- Global nav ---------------- */
.global-nav {
    position: sticky; top: 0; z-index: 100;
    height: 44px; background: var(--black);
    display: flex; align-items: center; justify-content: center;
}
.global-nav__inner {
    width: 100%; max-width: 1024px; padding: 0 22px;
    display: flex; align-items: center; gap: 28px;
}
.global-nav a, .global-nav button {
    color: var(--on-dark); font-size: 12px; line-height: 1;
    letter-spacing: -0.12px; opacity: .88; background: none; border: 0;
    cursor: pointer; font-family: inherit; transition: opacity .2s;
}
.global-nav a:hover { opacity: 1; }
.global-nav__logo { font-size: 15px; font-weight: 600; opacity: 1; letter-spacing: -0.2px; }
.global-nav__spacer { flex: 1; }
.global-nav__right { display: flex; align-items: center; gap: 18px; }
.nav-icon { width: 16px; height: 16px; opacity: .88; }
.bag { position: relative; }
.bag__count {
    position: absolute; top: -6px; right: -8px; min-width: 15px; height: 15px;
    background: var(--primary); color: #fff; border-radius: 9999px;
    font-size: 9px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
    letter-spacing: 0;
}
.nav-discord {
    display: inline-flex; align-items: center; gap: 6px;
    background: #5865f2; color: #fff !important; opacity: 1 !important;
    padding: 5px 11px; border-radius: var(--r-sm); font-weight: 500;
}
.nav-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* ---------------- Sub nav (frosted) ---------------- */
.sub-nav {
    position: sticky; top: 44px; z-index: 90; height: 52px;
    background: rgba(245, 245, 247, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex; align-items: center; justify-content: center;
}
.sub-nav__inner {
    width: 100%; max-width: 1024px; padding: 0 22px;
    display: flex; align-items: center;
}
.sub-nav__title { font-size: 21px; font-weight: 600; letter-spacing: 0.231px; }
.sub-nav__links { display: flex; gap: 26px; margin-left: 40px; flex: 1; }
.sub-nav__links a { color: var(--ink); font-size: 14px; letter-spacing: -0.224px; opacity: .82; }
.sub-nav__links a:hover { opacity: 1; }

/* ---------------- Buttons / pills ---------------- */
.btn { font-family: inherit; cursor: pointer; border: 0; transition: transform .15s ease, background .2s; }
.btn:active { transform: scale(0.96); }
.btn:focus-visible { outline: 2px solid var(--primary-focus); outline-offset: 2px; }

.pill {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; font-size: 17px; line-height: 1;
    letter-spacing: -0.374px; border-radius: var(--r-pill); padding: 11px 22px;
}
.pill:hover { background: #0055b3; }
.pill--ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.pill--ghost:hover { background: rgba(0, 102, 204, 0.06); }
.pill--lg { font-size: 18px; font-weight: 300; padding: 14px 28px; }
.pill--sm { font-size: 14px; padding: 8px 16px; }

.btn-dark {
    background: var(--ink); color: #fff; font-size: 14px; letter-spacing: -0.224px;
    border-radius: var(--r-sm); padding: 8px 15px;
}
.text-link { color: var(--primary); font-size: 17px; }
.text-link:hover { text-decoration: underline; }
.on-dark .text-link { color: var(--primary-on-dark); }

/* ---------------- Tiles (full-bleed) ---------------- */
.tile { padding: var(--section) 22px; text-align: center; }
.tile--light { background: var(--canvas); color: var(--ink); }
.tile--parchment { background: var(--parchment); color: var(--ink); }
.tile--dark { background: var(--tile-1); color: var(--on-dark); }
.tile--dark-2 { background: var(--tile-2); color: var(--on-dark); }
.tile--dark-3 { background: var(--tile-3); color: var(--on-dark); }
.tile__inner { max-width: 980px; margin: 0 auto; }
.tile__eyebrow { font-size: 21px; font-weight: 600; letter-spacing: 0.231px; color: var(--primary); margin-bottom: 8px; }
.on-dark .tile__eyebrow { color: var(--primary-on-dark); }
.tile__h {
    font-family: var(--font-display);
    font-size: 40px; font-weight: 600; line-height: 1.10; letter-spacing: 0;
}
.tile--hero .tile__h { font-size: 56px; line-height: 1.07; letter-spacing: -0.28px; }
.tile__sub { font-size: 28px; font-weight: 400; line-height: 1.14; letter-spacing: .196px; margin-top: 6px; }
.on-dark .tile__sub { color: var(--body-muted); }
.tile__price { font-size: 17px; color: var(--ink-48); margin-top: 14px; }
.on-dark .tile__price { color: var(--body-muted); }
.tile__cta { display: flex; gap: 22px; justify-content: center; margin-top: 26px; }
.tile__media { margin-top: 44px; }

/* ---------------- Mock screenshot (placeholder for real product images) ---------------- */
.shot {
    width: min(760px, 92%); margin: 0 auto; aspect-ratio: 16 / 9;
    border-radius: var(--r-lg); background: #0e0f12; overflow: hidden;
    box-shadow: var(--product-shadow); position: relative;
    display: flex; flex-direction: column;
}
.shot--light { background: #fbfbfd; }
.shot__bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: rgba(255,255,255,.06); }
.shot--light .shot__bar { background: rgba(0,0,0,.04); }
.shot__dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25); }
.shot--light .shot__dot { background: rgba(0,0,0,.15); }
.shot__body { flex: 1; padding: 20px; display: grid; grid-template-columns: 90px 1fr; gap: 14px; }
.shot__side { border-radius: 10px; background: rgba(255,255,255,.05); }
.shot--light .shot__side { background: rgba(0,0,0,.04); }
.shot__main { display: flex; flex-direction: column; gap: 12px; }
.shot__row { height: 22px; border-radius: 7px; background: rgba(255,255,255,.06); }
.shot--light .shot__row { background: rgba(0,0,0,.045); }
.shot__row--accent { background: rgba(41,151,255,.35); width: 45%; }
.shot--light .shot__row--accent { background: rgba(0,102,204,.18); }
.shot__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 4px; }
.shot__cell { aspect-ratio: 1; border-radius: 9px; background: rgba(255,255,255,.05); }
.shot--light .shot__cell { background: rgba(0,0,0,.04); }

/* ---------------- Product grid (store-utility-card) ---------------- */
.grid-section { padding: var(--section) 22px; background: var(--parchment); }
.grid-section__head { max-width: 1200px; margin: 0 auto 40px; }
.grid-section__head h2 { font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1.1; }
.grid-section__head p { font-size: 21px; color: var(--ink-48); margin-top: 6px; letter-spacing: .231px; }
.pgrid {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.pcard {
    background: var(--canvas); border: 1px solid var(--hairline);
    border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column;
    transition: transform .2s ease;
}
.pcard:hover { transform: translateY(-3px); }
.pcard__img {
    aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; margin-bottom: 18px;
    background: #0e0f12; display: flex; align-items: center; justify-content: center;
}
.pcard__cat { font-size: 12px; font-weight: 600; color: var(--primary); letter-spacing: -0.12px; text-transform: uppercase; }
.pcard__name { font-size: 17px; font-weight: 600; line-height: 1.24; letter-spacing: -0.374px; margin-top: 4px; }
.pcard__desc { font-size: 14px; color: var(--ink-48); line-height: 1.4; margin-top: 6px; letter-spacing: -0.224px; }
.pcard__foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.pcard__price { font-size: 17px; font-weight: 600; }
.pcard__price small { font-size: 12px; font-weight: 400; color: var(--ink-48); }

/* ---------------- Footer ---------------- */
.footer { background: var(--parchment); color: var(--ink-80); padding: 64px 22px 40px; }
.footer__inner { max-width: 1024px; margin: 0 auto; }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer__col h4 { font-size: 14px; font-weight: 600; letter-spacing: -0.224px; margin-bottom: 8px; }
.footer__col a { display: block; color: var(--ink-80); font-size: 12px; line-height: 2.2; letter-spacing: -0.12px; }
.footer__col a:hover { color: var(--ink); }
.footer__legal {
    border-top: 1px solid var(--hairline); margin-top: 40px; padding-top: 20px;
    font-size: 12px; color: var(--ink-48); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1068px) { .pgrid { grid-template-columns: repeat(3, 1fr); } .tile--hero .tile__h { font-size: 44px; } }
@media (max-width: 833px) {
    .pgrid { grid-template-columns: repeat(2, 1fr); }
    .sub-nav__links { display: none; }
    .tile { padding: 56px 20px; }
    .tile__h { font-size: 32px; } .tile--hero .tile__h { font-size: 36px; }
    .tile__sub { font-size: 21px; }
    .footer__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .pgrid { grid-template-columns: 1fr; }
    .global-nav__inner { gap: 16px; }
    .nav-hide-sm { display: none; }
    .tile--hero .tile__h { font-size: 30px; }
    .tile__cta { flex-direction: column; align-items: center; gap: 12px; }
}
