/* Sweet Moments — base design system (both skins)
   Tokens measured from the live Tilda site (see docs/study/visual-inventory.md).
   Tilda skin: / , /links , /begining.  Course skin: /zefir-course , /enrol. */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Bochan Sans';
  src: url('../fonts/bochan-sans.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
/* Gilroy + High Spirited: interim self-hosted webfonts captured from the live site
   (the free-for-public-use versions Natasha already uses). When John drops his OTF
   files into frontend/assets/fonts/, switch src to the OTF lines below. */
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/gilroy-regular.woff') format('woff'); /* url('../fonts/gilroy-regular.otf') format('opentype'); */
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/gilroy-medium.woff') format('woff'); /* url('../fonts/gilroy-medium.otf') format('opentype'); */
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'High Spirited';
  src: url('../fonts/high-spirited.woff') format('woff'); /* url('../fonts/high-spirited.otf') format('opentype'); */
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --pink: #DD9BB5;
  --brown: #774E37;
  --black: #3C3C3C;
  --cream: #FFFAF7;

  --pink-header: #FFE9F2;
  --pink-band: #FFF3F8;
  --pink-testi: #FFE2EE;
  --pink-soft: #DD88AA;
  --brown-soft: #B98D75;

  --gold-a: #C0864C;
  --gold-b: #FCD4AC;
  --gold-grad: linear-gradient(326.16deg, #C0864C 0%, #FCD4AC 100%);

  /* course skin */
  --pinkwash: #FCF0F4;
  --pinkwash-2: #F9EEF3;
  --pink-deep: #C87F9E;
  --line: #EFDEE6;
  --muted: #AD9384;
  --r-frame: clamp(30px, 4vw, 46px);
  --r-img: clamp(22px, 3vw, 34px);

  --display: 'Bochan Sans', 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Gilroy', 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --script: 'High Spirited', 'Great Vibes', cursive;

  --gutter: 140px;
  --inner: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--black);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--pinkwash-2); color: var(--brown); }
:focus-visible { outline: 2px solid var(--pink-deep); outline-offset: 3px; }

.container { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1240px) { .container { padding: 0 clamp(20px, calc((100vw - 1160px) / 2), 140px); } }

/* ---------- typography helpers ---------- */
.h-display { font-family: var(--display); font-weight: 400; color: var(--brown); }
.h-script  { font-family: var(--script); font-weight: 400; color: var(--pink); line-height: 1; }
.t-body    { font-family: var(--sans); color: var(--black); }

/* ---------- buttons: Tilda gold (home skin) ---------- */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  font-family: var(--sans); font-weight: 500; text-align: center;
  color: #fff; background: var(--gold-grad);
  border: none; border-radius: 15px; cursor: pointer;
  transition: none;
}
.btn-gold::after {
  content: ''; position: absolute; inset: 0;
  background: var(--gold-a); opacity: 0;
  transition: opacity .2s ease-in-out;
}
.btn-gold:hover::after { opacity: 1; }
.btn-gold > * { position: relative; z-index: 1; }

/* ---------- buttons: course skin ---------- */
.btn-pink {
  display: inline-block;
  background: var(--pink); color: #fff;
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
  padding: 19px 42px; border-radius: 3px; border: 1px solid var(--pink);
  transition: background .35s ease, border-color .35s ease;
}
.btn-pink:hover { background: var(--pink-deep); border-color: var(--pink-deep); }
.btn-ghost {
  font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--black); padding-bottom: 4px; border-bottom: 1px solid var(--line);
  transition: color .3s ease, border-color .3s ease;
}
.btn-ghost:hover { color: var(--pink-deep); border-color: var(--pink); }

/* ---------- popup chrome (home skin) ---------- */
.popup-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.popup-backdrop.open { display: flex; }
.popup {
  background: #fff; border-radius: 30px; overflow: hidden;
  width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto;
  position: relative; padding: 48px 44px;
  animation: popup-in .25s ease;
}
@keyframes popup-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.popup-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: none; font-size: 26px; line-height: 1;
  color: var(--black); cursor: pointer;
}
.popup h2 { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--brown); margin-bottom: 10px; }
.popup .popup-body { color: var(--black); margin-bottom: 22px; }

/* form fields (home skin) */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-family: var(--sans); font-weight: 500; font-size: 14px; color: var(--black); margin-bottom: 6px; }
.form-field input {
  width: 100%; padding: 12px 16px; font-family: var(--sans); font-size: 16px;
  color: var(--black); background: #fff;
  border: 1px solid #000; border-radius: 0;
}
.form-field textarea {
  width: 100%; padding: 12px 16px; font-family: var(--sans); font-size: 16px;
  color: var(--black); background: #fff;
  border: 1px solid #000; border-radius: 0; resize: vertical;
}
.form-field input::placeholder { color: rgba(60,60,60,.5); }
.form-error { color: #b00020; font-size: 13px; margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-success { display: none; text-align: center; padding: 30px 0; }
.form-success.show, .form-dup.show { display: block; }
.form-dup { display: none; text-align: center; padding: 30px 0; }
.form-success h3 { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--brown); margin-bottom: 10px; }
.form-success p { color: var(--black); }

/* ---------- carousel (t1148-like) ---------- */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; padding-bottom: 8px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 auto; scroll-snap-align: start; }
.carousel-arrow {
  width: 60px; height: 60px; border-radius: 50%;
  border: 1px solid transparent; background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .2s ease;
}
.carousel-arrow:hover { border-color: var(--brown); }
.carousel-arrow svg { width: 18px; height: 18px; stroke: var(--brown); stroke-width: 2; fill: none; }

/* ---------- zoom lightbox (replaces Tilda zoomer) ---------- */
.zoom-backdrop {
  position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.85);
  display: none; align-items: center; justify-content: center;
}
.zoom-backdrop.open { display: flex; }
.zoom-backdrop img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.zoom-close {
  position: absolute; top: 20px; right: 28px; background: none; border: none;
  color: #fff; font-size: 34px; cursor: pointer; line-height: 1;
}

/* ---------- mobile drawer ---------- */
.drawer {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  background: var(--pink-header);
  transform: translateY(-100%); transition: transform .3s ease;
  padding: 18px 20px 22px;
}
.drawer.open { transform: none; }
.drawer a { display: block; font-family: var(--sans); font-weight: 500; font-size: 14px; color: var(--brown); padding: 10px 0; }
.burger { display: none; background: none; border: none; cursor: pointer; }

/* ---------- misc ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.t-zoomable { cursor: zoom-in; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .carousel-track { scroll-behavior: auto; }
}
