/* =================================================================
   BeautyMax — handcrafted / notebook redesign.
   Same family as Sunday Clicker: warm paper, hand-drawn cards with
   offset ink shadows, scribble underlines, slight tilts, washi tape,
   handwritten headings. Anti-AI-look — 2026 trends say craft beats
   polish.
   ================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Patrick+Hand&family=Inter:wght@400;500;600&display=swap");

:root {
  --cream:        #fdf6ee;
  --cream-deep:   #f6ead8;
  --paper:        #fffdf7;
  --blush:        #f4b6c2;
  --blush-deep:   #ec88a0;
  --peach:        #f4a261;
  --sage:         #a3b18a;
  --ink:          #2a2120;
  --ink-soft:     #5a4a48;
  --rule:         rgba(180, 140, 130, 0.10);
  --accent:       #ec88a0;
  --shadow-ink:   #2a2120;

  --font-hand:    "Caveat", cursive;
  --font-marker:  "Patrick Hand", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Patrick Hand", ui-sans-serif, system-ui, sans-serif;
  --font-num:     "Inter", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    repeating-linear-gradient(to bottom,
      transparent 0, transparent 31px,
      var(--rule) 31px, var(--rule) 32px),
    radial-gradient(ellipse at top left,     rgba(244, 162, 97, 0.10), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(244, 182, 194, 0.12), transparent 60%);
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blush-deep); }
::selection { background: var(--blush); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-num);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.scribble {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'><path d='M2 6 C 20 2, 40 9, 60 5 S 100 2, 118 7' stroke='%23ec88a0' stroke-width='3' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: 100% 0.45em;
  padding-bottom: 0.12em;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 246, 238, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 18px;
  position: relative;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-hand);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ink);
}
.brand img {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  transform: rotate(-3deg);
}
.brand-name { letter-spacing: -0.01em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-marker);
}
.nav-links a {
  position: relative;
  font-size: 1rem;
  color: var(--ink);
  padding: 4px 0;
}
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: -2px;
  height: 6px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='6' viewBox='0 0 80 6'><path d='M2 4 C 14 1, 28 6, 40 3 S 70 1, 78 5' stroke='%23ec88a0' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat;
  background-size: 100% 100%;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--ink);
  background: var(--paper);
  width: 42px; height: 38px;
  border-radius: 10px 8px 9px 11px / 9px 11px 8px 10px;
  box-shadow: 3px 3px 0 var(--shadow-ink);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px); right: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 14px 11px 13px 12px / 12px 14px 11px 13px;
    padding: 14px 18px;
    box-shadow: 5px 6px 0 var(--shadow-ink);
    transform: rotate(-1deg) translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, transform 150ms ease;
    z-index: 60;
  }
  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: rotate(-1deg) translateY(0);
  }
}

/* ---------- Buttons ---------- */
.btn-hand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 14px 11px 13px 12px / 12px 14px 11px 13px;
  font-family: var(--font-marker);
  font-size: 1rem;
  box-shadow: 4px 4px 0 var(--shadow-ink);
  transition: transform 90ms ease, box-shadow 90ms ease, background 120ms ease;
  cursor: pointer;
  text-align: center;
}
.btn-hand:hover { background: #fffaf2; color: var(--ink); }
.btn-hand:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-ink); }

.btn-text {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
  line-height: 1;
}
.btn-text::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: -2px;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='8' viewBox='0 0 100 8'><path d='M2 5 C 14 2, 28 7, 40 4 S 70 2, 98 6' stroke='%23ec88a0' stroke-width='2.4' fill='none' stroke-linecap='round'/></svg>") no-repeat;
  background-size: 100% 100%;
}
.btn-text:hover { color: var(--blush-deep); }

.apple-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px 8px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px 11px 13px 12px / 12px 14px 11px 13px;
  box-shadow: 4px 4px 0 var(--shadow-ink);
  transition: transform 90ms ease, box-shadow 90ms ease, background 120ms ease;
  line-height: 0;
}
.apple-badge:hover { background: #fffaf2; }
.apple-badge:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-ink); }
.apple-badge svg { height: 52px; width: auto; display: block; }

/* ---------- Note card ---------- */
.note-card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 18px 14px 17px 15px / 15px 18px 14px 17px;
  padding: 22px 22px 24px;
  box-shadow: 5px 6px 0 var(--shadow-ink);
}
.note-card::before {
  content: "";
  position: absolute;
  top: -10px; left: 26px;
  width: 70px; height: 18px;
  background: rgba(244, 162, 97, 0.55);
  border: 1px dashed rgba(0,0,0,0.18);
  transform: rotate(-4deg);
  box-shadow: 1px 2px 0 rgba(0,0,0,0.12);
}
.note-card.no-tape::before { display: none; }
.tilt-l    { transform: rotate(-1.1deg); }
.tilt-r    { transform: rotate(0.9deg); }
.tilt-mild { transform: rotate(-0.4deg); }

/* ---------- Scroll reveal ---------- */
.reveal,
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.fade-up.d1 { transition-delay: 60ms; }
.fade-up.d2 { transition-delay: 160ms; }
.fade-up.d3 { transition-delay: 260ms; }
.fade-up.d4 { transition-delay: 360ms; }
.reveal.is-visible { opacity: 1; transform: none; }
body.loaded .fade-up { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
.support-hero { padding: 60px 0 28px; }
.support-hero h1 {
  font-family: var(--font-hand);
  font-size: clamp(2.6rem, 6vw, 4rem);
  margin: 0 0 8px;
  line-height: 1.05;
}
.support-hero h1 em {
  font-style: normal;
  color: var(--blush-deep);
  position: relative;
}
.support-hero h1 em::after {
  content: "";
  position: absolute;
  left: -4px; right: -4px; bottom: -2px;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='10' viewBox='0 0 200 10'><path d='M2 6 C 35 2, 65 9, 100 5 S 170 2, 198 7' stroke='%23ec88a0' stroke-width='3' fill='none' stroke-linecap='round'/></svg>") no-repeat;
  background-size: 100% 100%;
}
.support-hero p { color: var(--ink-soft); margin: 0; }

.legal { padding: 24px 0 80px; }
.legal-date {
  font-family: var(--font-marker);
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.legal-content {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 18px 14px 17px 15px / 15px 18px 14px 17px;
  box-shadow: 5px 6px 0 var(--shadow-ink);
  padding: 28px 32px;
  position: relative;
}
.legal-content::before {
  content: "";
  position: absolute;
  top: -10px; left: 28px;
  width: 72px; height: 18px;
  background: rgba(163, 177, 138, 0.6);
  border: 1px dashed rgba(0,0,0,0.18);
  transform: rotate(-3deg);
}
.legal-content h1 {
  font-family: var(--font-hand);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin: 0 0 14px;
  line-height: 1.05;
}
.legal-content h2 {
  font-family: var(--font-hand);
  font-size: 1.9rem;
  margin: 26px 0 8px;
  line-height: 1.1;
}
.legal-content h3 {
  font-family: var(--font-marker);
  font-size: 1.1rem;
  margin: 20px 0 6px;
  letter-spacing: 0.01em;
}
.legal-content p, .legal-content li {
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 12px;
}
.legal-content ul, .legal-content ol { padding-left: 22px; }
.legal-content a {
  color: var(--blush-deep);
  border-bottom: 2px dashed rgba(236, 136, 160, 0.5);
}
.legal-content a:hover { border-bottom-style: solid; }
.legal-content strong { font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-section { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px 11px 13px 12px / 12px 14px 11px 13px;
  box-shadow: 4px 4px 0 var(--shadow-ink);
  overflow: hidden;
}
.faq-item:nth-child(odd)  { transform: rotate(-0.4deg); }
.faq-item:nth-child(even) { transform: rotate(0.3deg); }
.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 14px 18px;
  font-family: var(--font-marker);
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-question::after {
  content: "+";
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--blush-deep);
  line-height: 1;
  transition: transform 200ms ease;
}
.faq-item.is-open .faq-question::after,
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 260ms ease; }
.faq-item.is-open .faq-answer,
.faq-item.active .faq-answer { max-height: 600px; }
.faq-answer-inner {
  padding: 0 18px 16px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.faq-answer-inner a {
  color: var(--blush-deep);
  border-bottom: 2px dashed rgba(236, 136, 160, 0.5);
}

/* ---------- Contact card ---------- */
.contact-card {
  margin-top: 28px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 18px 14px 17px 15px / 15px 18px 14px 17px;
  box-shadow: 5px 6px 0 var(--shadow-ink);
  padding: 22px 24px;
  text-align: center;
  position: relative;
  transform: rotate(-0.5deg);
}
.contact-card::before {
  content: "";
  position: absolute;
  top: -10px; left: 24px;
  width: 72px; height: 18px;
  background: rgba(244, 162, 97, 0.55);
  border: 1px dashed rgba(0,0,0,0.18);
  transform: rotate(-4deg);
}
.contact-card h3 {
  font-family: var(--font-hand);
  font-size: 1.8rem;
  margin: 0 0 6px;
}
.contact-card p { color: var(--ink-soft); margin: 0 0 14px; }
.contact-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: var(--blush);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 14px 11px 13px 12px / 12px 14px 11px 13px;
  box-shadow: 4px 4px 0 var(--shadow-ink);
  font-family: var(--font-marker);
  font-size: 1rem;
  transition: transform 90ms ease, box-shadow 90ms ease, background 120ms ease;
}
.contact-email-btn:hover { background: #f9c4ce; color: var(--ink); }
.contact-email-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-ink); }

/* ---------- Footer ---------- */
.foot {
  margin-top: 80px;
  border-top: 2px dashed var(--ink);
  background: var(--cream);
  padding: 56px 0 28px;
  position: relative;
}
.foot-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.foot-brand img {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  transform: rotate(-3deg);
}
.foot-brand-name {
  font-family: var(--font-hand);
  font-size: 1.8rem;
  color: var(--ink);
}
.foot-note { color: var(--ink-soft); max-width: 40ch; margin: 0; font-size: 0.95rem; }
.foot-col h4 {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  margin: 0 0 8px;
  color: var(--ink);
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin: 4px 0; }
.foot-col a { color: var(--ink-soft); }
.foot-col a:hover { color: var(--blush-deep); }
.foot-bottom {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px dashed rgba(0,0,0,0.2);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-family: var(--font-num);
}
@media (max-width: 760px) {
  .foot-top { grid-template-columns: 1fr; gap: 28px; }
  .foot { padding: 40px 0 20px; margin-top: 56px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { padding: 0 18px; }
  .legal-content { padding: 22px 20px; }
  .legal-content h2 { font-size: 1.6rem; }
  .support-hero { padding: 40px 0 18px; }
  .legal { padding: 18px 0 60px; }
  .contact-card { padding: 18px 18px; }
  .faq-question { font-size: 1rem; padding: 12px 14px; }
  .faq-answer-inner { padding: 0 14px 14px; }
}
