/* ============================================================
   SMILE BABY v2 — Base / Reset / Typography
   ============================================================ */

/* ── Imports ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');
@import url('./variables.css');

/* ── Modern Reset ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--ink);
  background-color: #FFFFFF;
  min-height: 100vh;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* ── Selection ────────────────────────────────────────── */
::selection {
  background-color: var(--primary);
  color: #FFFFFF;
}

::-moz-selection {
  background-color: var(--primary);
  color: #FFFFFF;
}

/* ── Elements Reset ───────────────────────────────────── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

fieldset {
  border: none;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--sp-8) 0;
}

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--ink-dark);
  letter-spacing: var(--ls-tight);
}

h1 {
  font-size: var(--fs-4xl);
  margin-bottom: var(--sp-6);
}

h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-5);
}

h3 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-4);
}

h4 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-3);
}

h5 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
}

h6 {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
}

p {
  margin-bottom: var(--sp-4);
  color: var(--ink-soft);
  line-height: var(--lh-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

a:not(.btn) {
  color: var(--primary);
  transition: var(--transition-fast);
}

a:not(.btn):hover {
  color: var(--primary-dark);
}

strong, b {
  font-weight: var(--fw-semibold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--fs-sm);
}

blockquote {
  border-left: 4px solid var(--primary);
  padding: var(--sp-4) var(--sp-6);
  margin: var(--sp-6) 0;
  background: var(--primary-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink);
}

blockquote p {
  color: var(--ink);
}

code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9em;
  background: var(--cream);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ── Lists ────────────────────────────────────────────── */
.content-area ul,
.content-area ol {
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.content-area ul {
  list-style: disc;
}

.content-area ol {
  list-style: decimal;
}

.content-area li {
  margin-bottom: var(--sp-2);
  color: var(--ink-soft);
  line-height: var(--lh-normal);
}

.content-area li::marker {
  color: var(--primary);
}

/* ── Layout Utilities ─────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sp-6);
  padding-right: var(--sp-6);
}

.wrap-sm {
  max-width: var(--max-width-sm);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sp-6);
  padding-right: var(--sp-6);
}

.wrap-lg {
  max-width: var(--max-width-lg);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sp-6);
  padding-right: var(--sp-6);
}

/* ── Text Utilities ───────────────────────────────────── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-primary { color: var(--primary) !important; }
.text-accent  { color: var(--accent) !important; }
.text-ink     { color: var(--ink) !important; }
.text-soft    { color: var(--ink-soft) !important; }
.text-white   { color: #FFFFFF !important; }
.text-sm      { font-size: var(--fs-sm) !important; }
.text-lg      { font-size: var(--fs-lg) !important; }
.text-xl      { font-size: var(--fs-xl) !important; }
.text-uppercase { text-transform: uppercase; letter-spacing: var(--ls-wider); }
.text-balance { text-wrap: balance; }

/* ── Display Utilities ────────────────────────────────── */
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.gap-1         { gap: var(--sp-1); }
.gap-2         { gap: var(--sp-2); }
.gap-3         { gap: var(--sp-3); }
.gap-4         { gap: var(--sp-4); }
.gap-6         { gap: var(--sp-6); }
.gap-8         { gap: var(--sp-8); }

.grid          { display: grid; }

.block         { display: block; }
.inline-block  { display: inline-block; }
.hidden        { display: none !important; }

/* ── Spacing Utilities ────────────────────────────────── */
.mt-auto { margin-top: auto; }
.mb-0    { margin-bottom: 0 !important; }
.mb-2    { margin-bottom: var(--sp-2); }
.mb-4    { margin-bottom: var(--sp-4); }
.mb-6    { margin-bottom: var(--sp-6); }
.mb-8    { margin-bottom: var(--sp-8); }
.mb-12   { margin-bottom: var(--sp-12); }

/* ── Misc Utilities ───────────────────────────────────── */
.rounded       { border-radius: var(--radius-md); }
.rounded-lg    { border-radius: var(--radius-lg); }
.rounded-full  { border-radius: var(--radius-full); }
.shadow        { box-shadow: var(--shadow-md); }
.shadow-lg     { box-shadow: var(--shadow-lg); }
.overflow-hidden { overflow: hidden; }
.relative      { position: relative; }
.absolute      { position: absolute; }

.bg-primary    { background-color: var(--primary) !important; }
.bg-cream      { background-color: var(--cream) !important; }
.bg-white      { background-color: #FFFFFF !important; }

/* ── Accessibility ────────────────────────────────────── */
.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;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--primary);
  color: #FFFFFF;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: var(--z-tooltip);
  font-weight: var(--fw-semibold);
  transition: top var(--duration-fast) var(--ease-default);
}

.skip-link:focus {
  top: 0;
}
