/* ==========================================================================
   CT TOYS — Base styles (reset, typography, layout, utilities)
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 2000;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  transform: translateY(-180%);
  transition: transform .2s ease;
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

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

a { color: var(--accent-text); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 { line-height: 1.2; color: var(--text-primary); font-weight: 700; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--alt { background: var(--bg-soft); }
.section--white { background: var(--bg-secondary); }

.section__head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section__head--left { text-align: left; margin-left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 24px rgba(236, 72, 153, 0.35); }
.btn--primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 10px 32px rgba(236, 72, 153, 0.45); }

.btn--outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--outline:hover { background: var(--accent); color: #fff; }

.btn--ghost { background: rgba(255, 255, 255, 0.15); color: #fff; border-color: rgba(255, 255, 255, 0.5); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }

.btn--white { background: #fff; color: var(--accent-hover); box-shadow: 0 6px 24px rgba(43, 18, 36, 0.15); }
.btn--white:hover { background: var(--surface-elevated); color: var(--accent-hover); }

.btn--block { width: 100%; justify-content: center; }
.btn--sm { padding: 9px 16px; font-size: 12px; border-width: 1px; }

/* ---------- Section title ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-elevated);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  border: 1px solid var(--accent-light);
}
.section-label--light { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.3); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.section-title span { color: var(--accent); }
.section-title--light { color: #fff; }

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.8;
}
.section-subtitle--light { color: rgba(255, 255, 255, 0.82); }
.section-subtitle--left { margin-left: 0; }

.divider {
  width: 64px; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  margin: 0 auto 24px;
}
.divider--left { margin-left: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--d1 { transition-delay: 0.08s; }
.reveal--d2 { transition-delay: 0.16s; }
.reveal--d3 { transition-delay: 0.24s; }
.reveal--d4 { transition-delay: 0.32s; }
.reveal--d5 { transition-delay: 0.40s; }

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

/* ---------- Image placeholder (unified slot) ---------- */
.img-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-soft);
  background-image: linear-gradient(135deg,
      var(--border) 25%, var(--bg-primary) 25%, var(--bg-primary) 50%,
      var(--border) 50%, var(--border) 75%, var(--bg-primary) 75%, var(--bg-primary));
  background-size: 24px 24px;
  color: var(--text-muted);
  overflow: hidden;
  aspect-ratio: var(--ar, 16 / 9);
}
.img-slot > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-slot-label {
  display: none;
}
/* Hide the slot label where a real design overlay sits on top */
.img-slot--no-label .img-slot-label { display: none; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}
.field-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
}
.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.form-success {
  display: none;
  background: var(--surface-elevated);
  border: 1px solid var(--accent-light);
  color: var(--accent-hover);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-weight: 600;
}
.form-success.is-shown { display: block; }

/* ---------- Utility ---------- */
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.grid { display: grid; gap: 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
