/* assets/css/main.css - Global styles and design tokens for Pupy */
/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  /* Colour */
  --ink:        #1C1714;
  --ink2:       #5A4A40;
  --ink3:       #9A8880;
  --cream:      #F8F4F0;
  --cream2:     #F1EAE3;
  --warm:       #E5D9CE;
  --border:     #DDD0C5;
  --gold:       #B06B2E;
  --gold2:      #D4864A;
  --gold-bg:    #FAF0E6;
  --slate-dark: #232220;
  --green:      #2A6B47;
  --green-bg:   #EBF5EE;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(28,23,20,0.08);
  --shadow-md: 0 4px 16px rgba(28,23,20,0.12);
  --shadow-lg: 0 12px 40px rgba(28,23,20,0.18);
}

/* ── Global resets ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
}
body { min-height: 100vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
button, a { -webkit-tap-highlight-color: transparent; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-height: 44px;
}
.btn-primary:hover  { background: #8F5225; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: var(--ink3); cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.btn-ghost {
  background: transparent;
  color: var(--ink3);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── Card ──────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}

/* ── Inputs ────────────────────────────────────────────────────────────── */
.inp, .input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.inp:focus, .input:focus { border-color: var(--gold); }
.inp::placeholder, .input::placeholder { color: var(--ink3); }

/* ── Section label ─────────────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Container ─────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 1200px) {
  .container { max-width: 1100px; }
}

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp 0.4s ease forwards; }

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(176,107,46,0); }
  50%       { box-shadow: 0 0 0 6px rgba(176,107,46,0.2); }
}

/* ── Trust bar ─────────────────────────────────────────────────────────── */
.trust-bar {
  background: var(--gold);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 7px 16px;
  overflow-x: auto;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-family: var(--font-body);
}

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--slate-dark);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  font-family: var(--font-body);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (max-width: 599px) {
  .header-inner { height: 52px; }
}
.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo em {
  color: var(--gold2);
  font-style: normal;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-nav {
  display: none;
}
@media (min-width: 900px) {
  .header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
  }
}
.header-nav a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.header-nav a:hover { color: rgba(255,255,255,0.9); }
.header-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  display: none;
}
@media (min-width: 600px) {
  .header-badge { display: inline-block; }
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { font-family: var(--font-body); }

.footer-top {
  background: var(--slate-dark);
  padding: 40px 20px 32px;
}
.footer-top-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}
.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: rgba(255,255,255,0.40);
  margin-top: 4px;
}
.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  text-decoration: none;
}
.footer-social-link:hover { background: rgba(255,255,255,0.14); }
.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: rgba(255,255,255,0.50);
  stroke-width: 1.5;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.footer-social-link:hover svg { opacity: 1; }

.footer-mid {
  background: var(--cream2);
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.footer-mid-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 600px) {
  .footer-mid-inner { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--ink2);
  text-decoration: none;
  line-height: 2.2;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  background: var(--cream);
  padding: 16px 20px;
}
.footer-bottom-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink3);
}
.footer-pay-icons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-pay-icon {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink3);
  letter-spacing: 0.02em;
}

/* ── Grain overlay ─────────────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── Hamburger button ──────────────────────────────────────────────── */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.15s;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.08); }
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.75);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}
/* X state */
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hide hamburger on desktop (where header-nav is shown) */
@media (min-width: 900px) {
  .nav-hamburger { display: none; }
}

/* ── Mobile nav panel ──────────────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 59; /* below sticky header (z-index:60) */
  background: rgba(28, 23, 20, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--slate-dark);
  padding: 80px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.mobile-nav.is-open .mobile-nav-inner {
  transform: translateY(0);
}
.mobile-nav-link {
  display: block;
  padding: 14px 8px;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-body);
  transition: color 0.15s;
}
.mobile-nav-link:hover { color: #fff; }
.mobile-nav-cta {
  margin-top: 16px;
  text-align: center;
  justify-content: center;
  font-size: 15px;
  padding: 14px 24px;
}

/* Only show mobile nav below 900px */
@media (min-width: 900px) {
  .mobile-nav { display: none; }
}
