/* ==========================================================================
   MDC Lashes — base.css (owner: layout)
   Modern reset, typography scale, links, focus, containers, sections, utilities.
   Uses only variables from tokens.css.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
  margin: 0;
}

/* :where() keeps this reset at zero specificity so any component class wins. */
:where(ul[class], ol[class]) {
  margin: 0;
  list-style: none;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

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

img,
video {
  height: auto;
}

svg.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

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

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

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

table {
  border-collapse: collapse;
  width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid var(--c-border-light);
  margin: 32px 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--c-petal);
  color: var(--c-text);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-sans);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--c-text);
  overflow-wrap: break-word;
}

h1 { font-size: var(--t-h1); letter-spacing: var(--ls-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: 18px; }
h5 { font-size: var(--t-body); }
h6 {
  font-size: var(--t-small);
  text-transform: uppercase;
  letter-spacing: .08em;
}

p { overflow-wrap: break-word; }

small { font-size: var(--t-small); }

strong, b { font-weight: 600; }

.display,
.font-display {
  font-family: var(--f-display);
  letter-spacing: -.01em;
}

.script,
.font-script {
  font-family: var(--f-script);
  font-weight: 400;
  letter-spacing: 0;
}

.text-hero {
  font-size: var(--t-hero);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: 600;
}

.accent {
  color: var(--c-blush-dark);
  font-style: italic;
}

/* ---------- Links ---------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.prose a,
.entry__content a,
.text-link {
  color: var(--c-text);
  text-decoration: underline;
  text-decoration-color: var(--c-blush);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.prose a:hover,
.entry__content a:hover,
.text-link:hover {
  color: var(--c-blush-dark);
}

/* ---------- Focus ---------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--c-blush-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
}

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

.screen-reader-text:focus,
.skip-link:focus {
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  width: auto;
  left: 12px;
  top: 12px;
  z-index: 100000;
  padding: 12px 20px;
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--t-small);
  font-weight: 600;
  border-radius: var(--r-md);
  box-shadow: var(--sh-elevated);
  text-decoration: none;
}

/* ---------- Containers ---------- */
.container,
.container--wide {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container {
  max-width: calc(var(--w-content) + var(--gutter) * 2);
}

.container--wide {
  max-width: var(--w-max);
}

.container--narrow {
  max-width: calc(800px + var(--gutter) * 2);
}

.site-main {
  display: block;
  min-height: 40vh;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: var(--space-section);
}

.section--alt {
  background: var(--c-surface);
}

.section--petal {
  background: var(--c-petal);
}

.section--tight {
  padding-block: calc(var(--space-section) / 2);
}

.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.section--rounded {
  border-radius: var(--r-xl);
  margin-inline: clamp(8px, 1.2vw, 16px);
}

/* ---------- Prose (editor content) ---------- */
.prose {
  max-width: 72ch;
  color: var(--c-text-2);
  font-size: 17px;
  line-height: 1.75;
}

.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: clamp(24px, 2.4vw, 30px); }
.prose h3 { margin-top: 1.6em; }
.prose h2 + *,
.prose h3 + * { margin-top: .6em; }
.prose ul,
.prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--c-blush-dark); }
.prose img,
.prose figure img { border-radius: var(--r-lg); }
.prose figcaption,
.wp-caption-text,
.wp-element-caption {
  margin-top: 8px;
  font-size: var(--t-small);
  color: var(--c-muted);
  text-align: center;
}
.prose blockquote {
  padding: 20px 24px;
  border-left: 3px solid var(--c-blush);
  background: var(--c-surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--c-text);
  font-size: 18px;
}
.prose table {
  font-size: var(--t-small);
}
.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border-light);
  text-align: left;
}
.prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--c-cream);
  font-size: .9em;
}

/* WordPress core alignments */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { width: min(100%, var(--w-content)); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption { max-width: 100%; }
.sticky, .bypostauthor, .gallery-caption { /* required core classes */ }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-muted); }
.text-2 { color: var(--c-text-2); }
.text-blush { color: var(--c-blush-dark); }
.text-small { font-size: var(--t-small); }
.text-xs { font-size: var(--t-xs); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.uppercase { text-transform: uppercase; letter-spacing: .08em; }
.nowrap { white-space: nowrap; }

.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.stack > * + * { margin-top: var(--stack, 16px); }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.grid {
  display: grid;
  gap: var(--grid-gap, 24px);
}
.grid--2,
.grid--3,
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.rounded { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-xl { border-radius: var(--r-xl); }
.surface { background: var(--c-surface); }
.shadow { box-shadow: var(--sh-elevated); }

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ratio {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 1 / 1);
}
.ratio > img,
.ratio > video,
.ratio > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Visibility by breakpoint: sm = <768, lg = >=1024 */
@media (max-width: 767.98px) { .hide-sm { display: none !important; } }
@media (min-width: 768px) { .show-sm { display: none !important; } }
@media (max-width: 1023.98px) { .hide-md-down { display: none !important; } }
@media (min-width: 1024px) { .hide-lg { display: none !important; } }

/* Scroll lock while a drawer/overlay is open */
html.is-locked,
html.is-locked body {
  overflow: hidden;
}
html.is-locked body {
  padding-right: var(--scrollbar-w, 0px);
}

/* ---------- Reveal on scroll ([data-reveal], JS adds .is-revealed) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="zoom"] { transform: scale(.97); }
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
