/* ================================================
   EPIDERMIST — Global Styles
   ================================================ */

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

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

body {
    font-family: var(--ep-font-body);
    font-size: var(--ep-text-base);
    line-height: 1.7;
    color: var(--ep-text-medium);
    background-color: var(--ep-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: var(--ep-accent);
    color: var(--ep-bg-white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--ep-font-heading);
    color: var(--ep-text-dark);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: var(--ep-text-6xl); line-height: 1.15; }
h2 { font-size: var(--ep-text-4xl); line-height: 1.2; }
h3 { font-size: var(--ep-text-2xl); line-height: 1.3; }
h4 { font-size: var(--ep-text-lg); line-height: 1.4; }
h5 { font-size: var(--ep-text-md); line-height: 1.4; }
h6 { font-size: var(--ep-text-base); line-height: 1.5; }

p {
    margin-bottom: 1em;
    color: var(--ep-text-medium);
}

a {
    color: var(--ep-text-dark);
    text-decoration: none;
    transition: var(--ep-transition);
}

a:hover {
    color: var(--ep-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* Container */
.ep-container {
    max-width: var(--ep-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--ep-container-padding);
    padding-right: var(--ep-container-padding);
    width: 100%;
}

/* Section */
.ep-section {
    padding: var(--ep-section-padding) 0;
}

/* Eyebrow */
.ep-eyebrow {
    display: block;
    font-family: var(--ep-font-body);
    font-size: var(--ep-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ep-text-light);
    margin-bottom: 16px;
}

/* Buttons */
.ep-btn-primary {
    display: inline-block;
    padding: 16px 40px;
    background-color: var(--ep-text-dark);
    color: var(--ep-bg-white);
    font-family: var(--ep-font-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1.5px solid var(--ep-text-dark);
    border-radius: var(--ep-radius-sm);
    cursor: pointer;
    transition: var(--ep-transition);
    text-align: center;
    line-height: 1;
}

.ep-btn-primary:hover {
    background-color: var(--ep-accent);
    border-color: var(--ep-accent);
    color: var(--ep-bg-white);
    transform: translateY(-2px);
    box-shadow: var(--ep-shadow-card);
}

.ep-btn-secondary {
    display: inline-block;
    padding: 16px 40px;
    background-color: transparent;
    color: var(--ep-text-dark);
    font-family: var(--ep-font-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1.5px solid var(--ep-text-dark);
    border-radius: var(--ep-radius-sm);
    cursor: pointer;
    transition: var(--ep-transition);
    text-align: center;
    line-height: 1;
}

.ep-btn-secondary:hover {
    background-color: var(--ep-text-dark);
    color: var(--ep-bg-white);
    transform: translateY(-2px);
}

.ep-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ep-text-dark);
    font-family: var(--ep-font-body);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1.5px solid var(--ep-text-dark);
    padding-bottom: 4px;
    transition: var(--ep-transition);
}

.ep-btn-text:hover {
    color: var(--ep-accent);
    border-color: var(--ep-accent);
}

.ep-arrow {
    transition: transform 0.3s ease;
}

.ep-btn-text:hover .ep-arrow {
    transform: translateX(4px);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-family: var(--ep-font-body);
    font-size: 15px;
    color: var(--ep-text-dark);
    background-color: var(--ep-bg-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    transition: var(--ep-transition);
    appearance: none;
    -webkit-appearance: none;
}

textarea {
    height: auto;
    padding: 16px;
    resize: vertical;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235A5A5A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--ep-accent);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ep-text-dark);
    margin-bottom: 8px;
}

label .required {
    color: var(--ep-error);
}

/* Form Rows */
.ep-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ep-form-group {
    margin-bottom: 20px;
}

.ep-form-note {
    font-size: 14px;
    color: var(--ep-text-light);
    margin-top: 12px;
}

/* Screen Reader */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Skip Link */
.ep-skip-link:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    width: auto;
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100000;
    padding: 12px 24px;
    background: var(--ep-text-dark);
    color: var(--ep-bg-white);
    border-radius: var(--ep-radius-sm);
    font-size: 14px;
}

/* Separator */
.ep-sep {
    margin: 0 8px;
    color: var(--ep-text-light);
}

/* Placeholders (used when no images are uploaded) */
.ep-brand-intro__placeholder,
.ep-about-story__placeholder,
.ep-concern-section__placeholder,
.ep-about-lifestyle__image {
    width: 100%;
    border-radius: var(--ep-radius-lg);
    background: linear-gradient(145deg, var(--ep-bg-secondary) 0%, #E8DFD3 100%);
}

.ep-brand-intro__placeholder {
    aspect-ratio: 4/5;
}

.ep-about-story__placeholder {
    aspect-ratio: 4/5;
}

.ep-about-lifestyle__image {
    height: 400px;
    border-radius: 0;
    background: linear-gradient(135deg, #E8DFD3 0%, var(--ep-bg-secondary) 50%, #DDD5C8 100%);
}

.ep-concern-section__placeholder {
    aspect-ratio: 1/1;
}

.ep-concern-section__placeholder--dryness {
    background: linear-gradient(145deg, #E8DFD3 0%, #D4C9BC 100%);
}

.ep-concern-section__placeholder--dullness {
    background: linear-gradient(145deg, #F0E6D8 0%, #E0D4C4 100%);
}

.ep-concern-section__placeholder--uneven-skin {
    background: linear-gradient(145deg, #E5DDD2 0%, #CFC5B8 100%);
}

.ep-concern-section__placeholder--sensitive-skin {
    background: linear-gradient(145deg, #F2EBE2 0%, #E3DAD0 100%);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--ep-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ep-text-light);
}

/* Posts Grid */
.ep-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.ep-post-card {
    background: var(--ep-bg-white);
    border-radius: var(--ep-radius-md);
    overflow: hidden;
    box-shadow: var(--ep-shadow-card);
    transition: var(--ep-transition);
}

.ep-post-card:hover {
    box-shadow: var(--ep-shadow-hover);
    transform: translateY(-4px);
}

.ep-post-card__image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.ep-post-card__content {
    padding: 28px;
}

.ep-post-card__title {
    font-size: var(--ep-text-lg);
    margin-bottom: 8px;
}

.ep-post-card__title a {
    color: var(--ep-text-dark);
}

.ep-post-card__title a:hover {
    color: var(--ep-accent);
}

/* Standard Page */
.ep-standard-page-container {
    padding-top: calc(var(--ep-header-height) + 40px);
    padding-bottom: 100px;
    min-height: 60vh;
}

body.admin-bar .ep-standard-page-container {
    padding-top: calc(var(--ep-header-height) + 72px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .ep-standard-page-container {
        padding-top: calc(var(--ep-header-height) + 86px);
    }
}

/* Single Post */
.ep-single-post {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 120px;
}

.ep-single-post__header {
    text-align: center;
    margin-bottom: 40px;
}

.ep-single-post__title {
    font-size: var(--ep-text-5xl);
}

.ep-single-post__meta {
    color: var(--ep-text-light);
    font-size: 14px;
    margin-top: 16px;
}

.ep-single-post__image {
    margin-bottom: 48px;
    border-radius: var(--ep-radius-lg);
    overflow: hidden;
}

.ep-single-post__image img {
    width: 100%;
}

.ep-single-post__content {
    font-size: 17px;
    line-height: 1.8;
}

/* 404 */
.ep-404 {
    padding-top: 160px;
}

.ep-404__content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.ep-404__content h1 {
    font-size: 120px;
    color: var(--ep-border);
    line-height: 1;
    margin-bottom: 16px;
}

.ep-404__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 32px 0;
}

/* No Content */
.ep-no-content {
    text-align: center;
    padding: 80px 0;
}

.ep-no-content h2 {
    margin-bottom: 12px;
}

.ep-no-content .ep-btn-primary {
    margin-top: 24px;
}

/* Search Form */
.ep-search-form {
    display: flex;
    max-width: 400px;
    margin: 24px auto 0;
}

.ep-search-form__input {
    border-radius: var(--ep-radius-sm) 0 0 var(--ep-radius-sm);
    border-right: none;
}

.ep-search-form__submit {
    padding: 0 16px;
    background: var(--ep-text-dark);
    color: var(--ep-bg-white);
    border: 1px solid var(--ep-text-dark);
    border-radius: 0 var(--ep-radius-sm) var(--ep-radius-sm) 0;
    cursor: pointer;
    transition: var(--ep-transition);
    display: flex;
    align-items: center;
}

.ep-search-form__submit:hover {
    background: var(--ep-accent);
    border-color: var(--ep-accent);
}

/* Pagination */
.ep-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}

.ep-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--ep-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-text-medium);
    border: 1px solid var(--ep-border);
    transition: var(--ep-transition);
}

.ep-pagination .page-numbers:hover,
.ep-pagination .page-numbers.current {
    background: var(--ep-text-dark);
    color: var(--ep-bg-white);
    border-color: var(--ep-text-dark);
}

/* Back to Top */
.ep-back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--ep-text-dark);
    color: var(--ep-bg-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--ep-transition);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.ep-back-to-top:hover {
    background: var(--ep-accent);
    transform: translateY(-2px);
}
