/* =====================================
   IMPERIALPAWS — GLOBAL SAFETY & MOBILE BASE
   Purpose: Stability, mobile polish, gold tone
   ===================================== */

/* ===============================
   GOOGLE FONTS
   =============================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ===============================
   UNIVERSAL SAFETY RESET
   =============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.65;
  background: #f6f4ef; /* warm ivory gold base */
  color: #2a2a2a;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ===============================
   CONTAINERS (GLOBAL)
   =============================== */
.container,
.container.narrow {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container.narrow {
  max-width: 860px;
}

/* ===============================
   GLOBAL SECTION SAFETY
   =============================== */
section {
  width: 100%;
  overflow-x: hidden;
}

/* ===============================
   HERO SAFETY (ALL PAGES)
   =============================== */
.home-hero,
.page-hero {
  background-color: #f3efe7;
}

/* ===============================
   TYPOGRAPHY BASELINE
   =============================== */
h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
}

h1 {
  font-size: 2.6rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.7rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  font-size: 1rem;
}

.center {
  text-align: center;
}

.error-box {
  margin-bottom: 1.4rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e0b9b9;
  border-radius: 8px;
  background: #fff6f5;
  color: #8a2424;
}

/* ===============================
   BUTTON SAFETY
   =============================== */
.btn-primary,
.btn-secondary {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input,
textarea,
select {
  max-width: 100%;
  font-size: 16px; /* prevents iOS zoom */
  font-family: inherit;
}

textarea {
  resize: vertical;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
.btn-primary,
.btn-secondary,
.text-link {
  touch-action: manipulation;
}

/* Touch targets – minimum 44px */
button,
a,
.nav-cta,
.nav-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Inline links don't need the height */
p a, li a, footer a {
  min-height: unset;
  display: inline;
}

@media (hover: none) {
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
}

/* ===============================
   FIXED HEADER OFFSET
   =============================== */
/* Matches header height so content never hides */
body {
  padding-top: 72px;
}

/* ===============================
   REVEAL ANIMATIONS (SAFE)
   =============================== */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===============================
   FOCUS STYLES (ACCESSIBILITY)
   =============================== */
:focus-visible {
  outline: 2px solid #c7a45a;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ===============================
   MOBILE OPTIMIZATION
   =============================== */
@media (max-width: 820px) {

  /* Typography scale */
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  p {
    font-size: 1rem;
  }

  /* Hero should NOT dominate mobile */
  .home-hero,
  .page-hero {
    min-height: auto !important;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Header + nav overflow safety */
  .site-header,
  .header-inner {
    width: 100%;
    overflow-x: hidden;
  }

  /* Tables scroll safely */
  .admin-table-wrap,
  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* ===============================
   VERY SMALL SCREENS (< 375px)
   =============================== */
@media (max-width: 375px) {
  .container,
  .container.narrow {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}
