/* PackMyFace — shared core styles (tokens, atoms, components).
   Variant files add their own <style> for layout/typographic identity. */

/* ---------- tokens ---------- */
:root {
  --accent: #FFB300;
  --accent-2: #FF8A00;
  --tg: #2AABEE;
  --tg-2: #229ED9;

  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --card: #ffffff;
  --fg: #111111;
  --muted: #5d5d5a;
  --line: #e9e8e4;
  --ring: rgba(17,17,17,.08);

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 28px;
  --r-xl: 40px;

  --shadow: 0 1px 2px rgba(17,17,17,.05), 0 8px 24px rgba(17,17,17,.06);
  --shadow-lg: 0 2px 6px rgba(17,17,17,.06), 0 24px 60px rgba(17,17,17,.12);

  --container: 1180px;
  --pad: clamp(18px, 5vw, 56px);

  --ff-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-head: "Archivo", "Manrope", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #0e0e10;
  --bg-soft: #161619;
  --card: #18181c;
  --fg: #f4f3ef;
  --muted: #a4a4a0;
  --line: #2a2a30;
  --ring: rgba(255,255,255,.10);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 8px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.6);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}
.pmf-noscroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--ff-head); margin: 0; line-height: 1.02; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--tg); outline-offset: 2px; border-radius: 6px; }

.pmf-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.pmf-section { padding-block: clamp(56px, 9vw, 120px); }

/* ---------- kicker / heading helpers ---------- */
.pmf-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2);
}
.pmf-kicker::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ff-head); font-weight: 800; letter-spacing: -0.01em;
  font-size: 17px; padding: 15px 26px; border-radius: 999px; border: 0;
  background: linear-gradient(135deg, var(--tg), var(--tg-2)); color: #fff;
  box-shadow: 0 10px 24px rgba(34,158,217,.32); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(34,158,217,.4); }
.btn:active { transform: translateY(0); }
.btn svg, .btn .tg { width: 20px; height: 20px; }
.btn--accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1b1300; box-shadow: 0 10px 24px rgba(255,138,0,.32); }
.btn--accent:hover { box-shadow: 0 16px 32px rgba(255,138,0,.42); }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--fg); transform: translateY(-2px); }
.btn--lg { font-size: 19px; padding: 18px 34px; }

/* ---------- sticker tiles ---------- */
.pmf-sticker {
  aspect-ratio: 1; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 25%, color-mix(in srgb, var(--tint) 92%, #fff), var(--tint));
  border-radius: 26%;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.9), var(--shadow);
  position: relative;
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
[data-theme="dark"] .pmf-sticker { box-shadow: inset 0 0 0 4px rgba(255,255,255,.14), var(--shadow); }
.pmf-sticker:hover { transform: translateY(-4px) rotate(-2deg); }
.pmf-sticker__face { font-size: clamp(30px, 6vw, 56px); line-height: 1; filter: drop-shadow(0 3px 4px rgba(0,0,0,.12)); }
.pmf-sticker--img { overflow: hidden; }
.pmf-sticker__img { width: 100%; height: 100%; object-fit: cover; display: block; filter: drop-shadow(0 3px 5px rgba(0,0,0,.14)); transform: scale(1.02); }
.pmf-chat__sticker--img { overflow: hidden; padding: 0; }
.pmf-chat__sticker--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pmf-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.4vw, 16px); }

/* ---------- phone mockup ---------- */
.pmf-phone {
  width: min(320px, 78vw); aspect-ratio: 320 / 660; margin-inline: auto;
  background: #0c0c0e; border-radius: 44px; padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.06);
  position: relative;
}
.pmf-phone__notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 120px; height: 26px; background: #0c0c0e; border-radius: 0 0 16px 16px; z-index: 3; }
.pmf-phone__screen {
  height: 100%; border-radius: 34px; overflow: hidden;
  background: linear-gradient(180deg, #cfe9fb, #e8f4fd);
  display: flex; flex-direction: column;
}
.pmf-chat__top { display: flex; align-items: center; gap: 10px; padding: 38px 16px 12px; background: linear-gradient(135deg, var(--tg), var(--tg-2)); color: #fff; }
.pmf-chat__ava { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 20px; }
.pmf-chat__name { font-weight: 800; font-size: 15px; }
.pmf-chat__status { font-size: 12px; opacity: .85; }
.pmf-chat__body { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.pmf-chat__msg { align-self: flex-start; background: #fff; color: #111; padding: 9px 14px; border-radius: 16px 16px 16px 4px; font-size: 14px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.pmf-chat__msg--me { align-self: flex-end; background: #d7f3c8; border-radius: 16px 16px 4px 16px; }
.pmf-chat__stickers { align-self: flex-start; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 78%; }
.pmf-chat__sticker { aspect-ratio: 1; border-radius: 22%; display: grid; place-items: center; font-size: 30px; background: radial-gradient(120% 120% at 30% 25%, color-mix(in srgb, var(--tint) 92%, #fff), var(--tint)); box-shadow: inset 0 0 0 3px rgba(255,255,255,.9), 0 4px 10px rgba(0,0,0,.1); }

/* ---------- header / nav ---------- */
.pmf-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.pmf-header__bar { display: flex; align-items: center; gap: 18px; height: 68px; }
.pmf-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ff-head); font-weight: 900; letter-spacing: -0.03em; font-size: 19px; }
.pmf-logo__mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; font-size: 19px; box-shadow: var(--shadow); }
.pmf-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.pmf-nav__links { display: flex; align-items: center; gap: 22px; }
.pmf-nav a { font-weight: 700; font-size: 15px; color: var(--muted); transition: color .15s; }
.pmf-nav a:hover { color: var(--fg); }
.pmf-actions { display: flex; align-items: center; gap: 12px; }

.pmf-lang { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.pmf-lang button { background: transparent; border: 0; color: var(--muted); font-weight: 800; font-size: 13px; padding: 7px 11px; }
.pmf-lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

.pmf-burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.pmf-burger span { width: 20px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .2s, opacity .2s; }
.pmf-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pmf-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pmf-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .pmf-burger { display: flex; }
  .pmf-nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 24px; margin: 0; transform: translateY(-120%); transition: transform .28s ease;
    box-shadow: var(--shadow-lg); max-height: calc(100vh - 68px); overflow: auto;
  }
  .pmf-nav.is-open { transform: translateY(0); }
  .pmf-nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .pmf-nav__links a { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--line); color: var(--fg); }
  .pmf-actions { margin-top: 16px; flex-direction: column; align-items: stretch; }
  .pmf-actions .btn { width: 100%; }
}

/* ---------- FAQ ---------- */
.pmf-faq__item { border-bottom: 1px solid var(--line); }
.pmf-faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: transparent; border: 0; padding: 22px 4px; text-align: left; font-family: var(--ff-head); font-weight: 800; font-size: clamp(17px, 2.4vw, 21px); color: var(--fg); letter-spacing: -0.01em; }
.pmf-faq__ic { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-size: 20px; transition: transform .25s, background .2s; }
.pmf-faq__item.is-open .pmf-faq__ic { transform: rotate(45deg); background: var(--accent); color: #1b1300; }
.pmf-faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.pmf-faq__a > div { overflow: hidden; }
.pmf-faq__item.is-open .pmf-faq__a { grid-template-rows: 1fr; }
.pmf-faq__a p { color: var(--muted); padding: 0 4px 22px; max-width: 70ch; font-size: 16px; }

/* ---------- footer ---------- */
.pmf-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-block: clamp(40px, 6vw, 64px); }
.pmf-footer__grid { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: flex-start; justify-content: space-between; }
.pmf-footer__links { display: flex; flex-wrap: wrap; gap: 18px 28px; }
.pmf-footer__links a { font-weight: 700; color: var(--muted); }
.pmf-footer__links a:hover { color: var(--fg); }
.pmf-footer__rights { color: var(--muted); font-size: 14px; margin-top: 22px; }

/* ---------- Tweaks panel ---------- */
.pmf-tw-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: var(--fg); color: var(--bg); font-size: 22px;
  box-shadow: var(--shadow-lg); display: grid; place-items: center;
}
.pmf-tw-fab:hover { transform: scale(1.06) rotate(20deg); }
.pmf-tw {
  position: fixed; right: 18px; bottom: 82px; z-index: 91;
  width: 280px; background: var(--card); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 16px; font-family: var(--ff-body);
}
.pmf-tw[hidden] { display: none; }
.pmf-tw__head { display: flex; align-items: center; justify-content: space-between; font-family: var(--ff-head); font-weight: 900; font-size: 16px; margin-bottom: 14px; }
.pmf-tw__x { background: transparent; border: 0; font-size: 22px; color: var(--muted); line-height: 1; }
.pmf-tw__row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pmf-tw__row > label { font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pmf-tw__swatches { display: flex; gap: 8px; }
.pmf-tw-sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.pmf-tw-sw.is-on { border-color: var(--fg); transform: scale(1.08); }
.pmf-seg { display: flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.pmf-seg button { flex: 1; background: transparent; border: 0; color: var(--muted); font-weight: 700; font-size: 13px; padding: 8px 6px; border-radius: 9px; }
.pmf-seg button.is-on { background: var(--fg); color: var(--bg); }

/* ---------- utilities ---------- */
.pmf-eyebrow-center { text-align: center; }
.pmf-reveal { opacity: 0; transform: translateY(18px); animation: pmf-in .7s cubic-bezier(.2,.8,.2,1) forwards; }
@media (prefers-reduced-motion: reduce) { .pmf-reveal { animation: none; opacity: 1; transform: none; } }
@keyframes pmf-in { to { opacity: 1; transform: none; } }
.pmf-confetti { position: absolute; width: 12px; height: 12px; border-radius: 3px; opacity: .9; pointer-events: none; }
