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

/* 2. HTML & BODY BASE */
html {
    font-size: 16px; /* base tetap */
    line-height: var(--ms-line-height-normal);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--ms-font);
    font-size: var(--ms-font-size-body);
    line-height: var(--ms-line-height-normal);
    color: var(--ms-color-text-primary);
    background-color: var(--ms-color-bg-canvas);
}

/* 3. TYPOGRAPHY RESET */
h1, h2, h3, h4, h5, h6,
p {
    margin: 0;
    font-weight: inherit;
}

/* Heading scale pakai token */
h1 { 
    font-size: var(--ms-font-size-h1);
    line-height: var(--ms-line-height-tight);
    font-weight: var(--ms-font-weight-semi-bold);
}

h2 { 
    font-size: var(--ms-font-size-h2);
    line-height: var(--ms-line-height-tight);
    font-weight: var(--ms-font-weight-semi-bold);
}

h3 { 
    font-size: var(--ms-font-size-h3);
    font-weight: var(--ms-font-weight-medium);
}

h4 { 
    font-size: var(--ms-font-size-h4);
}

h5 { 
    font-size: var(--ms-font-size-label);
}

h6 { 
    font-size: var(--ms-font-size-small);
}

p {
    margin-bottom: var(--ms-space-lg);
    color: var(--ms-color-text-secondary);
}

/* 4. LIST */
ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ms-motion-fast) var(--ms-ease);
}

/* hover default jangan paksa underline */
a:hover {
    text-decoration: none;
}

/* 6. MEDIA ELEMENTS */
img,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 7. FORM ELEMENTS */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
    transition: all var(--ms-motion-fast) var(--ms-ease);
}

/* 8. TABLE */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    text-align: left;
    padding: 0;
}

/* 9. HR */
hr {
    border: none;
    border-top: 1px solid var(--ms-color-border-subtle);
}

/* 10. ROOT CONTAINER SAFETY */
#app {
    min-height: 100vh;
}

/* 11. CMS LAYOUT BASE */
.layout {
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--ms-space-lg);
}

/* 12. DEBUG MODE */
.layout-preview .region {
    outline: 1px dashed var(--ms-color-border-default);
}

.layout-preview .block {
    outline: 1px solid var(--ms-color-border-subtle);
}

/* 13. ACCESSIBILITY */
:focus-visible {
    outline: var(--ms-focus-ring-width) solid var(--ms-focus-ring-color);
    outline-offset: var(--ms-focus-ring-offset);
}

/* 14. SELECTION */
::selection {
    background: var(--ms-color-primary);
    color: var(--ms-color-text-inverse);
}