/* ==========================================================================
   RECKLESS STORE — BASE / RESET / TYPOGRAPHY
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--rt-font);
    font-size: var(--rt-fs-base);
    line-height: var(--rt-lh-normal);
    color: var(--rt-text);
    background-color: var(--rt-bg);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
    overflow: hidden;
}

/* Zoom / narrow-viewport stability: keep every box inside its available space
   without hiding overflow or shrinking text globally. */
html, body { max-width: 100%; }
.page, .page-main, .container, [class*="grid"], [class*="flex"] { max-width: 100%; }
code, pre, .badge, .status-pill, [dir="ltr"] { overflow-wrap: anywhere; }
input, select, textarea, button { max-width: 100%; }

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */

.h-hero {
    font-size: var(--rt-fs-hero);
    font-weight: var(--rt-fw-black);
    line-height: var(--rt-lh-tight);
    letter-spacing: -0.02em;
}

.h1 {
    font-size: clamp(1.9rem, 4vw, var(--rt-fs-3xl));
    font-weight: var(--rt-fw-bold);
    line-height: var(--rt-lh-tight);
}

.h2 {
    font-size: clamp(1.5rem, 3vw, var(--rt-fs-2xl));
    font-weight: var(--rt-fw-bold);
    line-height: var(--rt-lh-snug);
}

.h3 {
    font-size: var(--rt-fs-xl);
    font-weight: var(--rt-fw-semibold);
    line-height: var(--rt-lh-snug);
}

.h4 {
    font-size: var(--rt-fs-lg);
    font-weight: var(--rt-fw-semibold);
}

.text-soft {
    color: var(--rt-text-soft);
}

.text-muted {
    color: var(--rt-text-muted);
}

.text-primary {
    color: var(--rt-primary);
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(120deg, #FFFFFF 20%, var(--rt-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--rt-space-2);
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-semibold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rt-primary);
    margin-bottom: var(--rt-space-4);
}

.section-label::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--rt-primary);
    border-radius: var(--rt-radius-full);
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--rt-container);
    margin-inline: auto;
    padding-inline: var(--rt-space-6);
}

.container-narrow {
    max-width: var(--rt-container-narrow);
}

.section {
    padding-block: var(--rt-space-24);
    position: relative;
}

.section-sm {
    padding-block: var(--rt-space-16);
}

.grid {
    display: grid;
    gap: var(--rt-space-6);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
    gap: var(--rt-space-4);
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-4);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rt-space-4);
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

:focus-visible {
    outline: 2px solid var(--rt-primary);
    outline-offset: 3px;
    border-radius: var(--rt-radius-sm);
}

.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;
    top: -100px;
    left: var(--rt-space-4);
    z-index: 999;
    background: var(--rt-primary);
    color: #fff;
    padding: var(--rt-space-3) var(--rt-space-5);
    border-radius: 0 0 var(--rt-radius) var(--rt-radius);
    font-weight: var(--rt-fw-semibold);
    transition: top var(--rt-duration-normal) var(--rt-ease);
}

.skip-link:focus {
    top: 0;
}

/* --------------------------------------------------------------------------
   Scrollbar
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--rt-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: var(--rt-radius-full);
    border: 2px solid var(--rt-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--rt-primary);
}

/* --------------------------------------------------------------------------
   Selection
   -------------------------------------------------------------------------- */

::selection {
    background: rgba(46, 125, 91, 0.55);
    color: #fff;
}
