/* ============================================================================
   Holdviola v3 — reset, typography, layout utilities, shared components
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, canvas { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 2px; border-radius: 4px; }

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 400; line-height: 1.2; margin: 0; color: var(--brand); overflow-wrap: break-word; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); line-height: 1.22; }
h4 { font-size: var(--h4); line-height: 1.3; }
h5 { font-size: var(--h5); line-height: 1.4; }
h6 { font-size: var(--h6); line-height: 1.4; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 400; color: var(--brand); }

/* ---- Type utilities ---- */
.eyebrow {
  font-family: var(--font-btn); font-weight: 500; text-transform: uppercase;
  letter-spacing: .14em; font-size: var(--small); color: var(--brand-bright);
}
.text-md { font-size: var(--body-md); }
.text-sm { font-size: var(--small); }
.text-tiny { font-size: var(--tiny); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-alt, .text-alt h1, .text-alt h2, .text-alt h3, .text-alt h4, .text-alt p { color: var(--text-alt); }
.text-alt strong { color: #fff; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--container-large); margin-inline: auto; padding-inline: var(--gutter); }
.container--medium { max-width: var(--container-medium); }
.container--small { max-width: var(--container-small); }
.section { padding-block: var(--pad-section) var(--pad-section-bottom); }
.section--sm { padding-block: clamp(2.5rem, 1.5rem + 4vw, 3rem); }
.stack > * + * { margin-top: var(--sp-1); }
.grid { display: grid; gap: var(--sp-2); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-btn); font-weight: 500; font-size: 1rem; text-transform: uppercase;
  letter-spacing: .01em; line-height: 1;
  padding: .9rem 1.6rem .75rem; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
                              transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease);
  text-align: center; will-change: transform;
}
.btn:hover { background: rgba(255,255,255,.72); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-float); }
.btn:active { transform: translateY(0); }
.btn--secondary { background: transparent; color: var(--brand); border: var(--stroke) solid var(--brand); }
.btn--secondary:hover { background: var(--brand); color: #fff; }
.btn--alt { background: #fff; color: var(--brand); border-color: #fff; }
.btn--alt:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn--ghost-alt { background: transparent; color: #fff; border: var(--stroke) solid rgba(255,255,255,.7); }
.btn--ghost-alt:hover { background: #fff; color: var(--brand); border-color: #fff; }
.btn--link {
  background: none; border: none; color: var(--brand); text-transform: none;
  font-family: var(--font-btn); font-weight: 500; padding: .25rem 0;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn--link::after { content: "→"; transition: transform var(--t-fast) var(--ease); }
.btn--link:hover { box-shadow: none; transform: none; text-decoration: underline; }
.btn--link:hover::after { transform: translateX(4px); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---- Cards ---- */
.card {
  background: #fff; border-radius: var(--r-card); border: 1px solid #ece6f3;
  box-shadow: var(--shadow-card); overflow: hidden;
}

/* ---- Pills / chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-body);
  font-size: var(--small); color: var(--brand); background: #f5effb;
  border: 1px solid #e7dcf6; border-radius: var(--r-pill); padding: .35rem .85rem;
}

/* ---- Section heading block ---- */
.section-head { max-width: 48rem; margin-inline: auto; text-align: center; }
.section-head .eyebrow { display: inline-block; margin-bottom: .75rem; }
.section-head p { color: var(--muted); margin-top: .75rem; }

/* ---- Decorative divider ---- */
.lotus-divider { display: flex; align-items: center; justify-content: center; gap: .8rem; color: var(--brand-pink-soft); }
.lotus-divider::before, .lotus-divider::after { content: ""; height: 1px; width: clamp(2rem, 8vw, 5rem); background: linear-gradient(90deg, transparent, var(--brand-pink-soft)); }
.lotus-divider::after { background: linear-gradient(90deg, var(--brand-pink-soft), transparent); }

/* ---- Forms (shared) ---- */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-family: var(--font-body); font-size: var(--small); color: var(--muted); }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(74,2,146,.12);
}
.field textarea { resize: vertical; min-height: 5rem; }
.form-note { font-size: var(--tiny); color: var(--muted-2); }
.form-msg { font-size: var(--small); padding: .65rem .9rem; border-radius: var(--r-sm); display: none; }
.form-msg.is-ok { display: block; color: var(--ok); background: var(--ok-bg); }
.form-msg.is-err { display: block; color: var(--err); background: var(--err-bg); }

/* ---- Visually hidden ---- */
.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;
}

/* ---- Scroll reveal (transform/opacity only) ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); will-change: transform, opacity; }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }

/* ---- Tilt (3D-ish hover) — JS toggles --rx/--ry; disabled on touch/reduced-motion ---- */
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform var(--t-med) var(--ease); transform-style: preserve-3d; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .tilt { transform: none !important; }
  .btn, .btn:hover { transform: none !important; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
