/* ----- Variables (mobile-first) ----- */
:root {
  --color-bg: #faf9f6;
  --color-bg-dark: #2d1528;
  --color-text: #1a1a1a;
  --color-text-muted: #4a5568;
  --color-accent: #753163;
  --color-accent-hover: #5c2650;
  --color-accent-light: #f0e8ee;
  --color-border: #e8e0e6;
  --color-white: #fff;
  --font-heading: "DM Serif Display", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.25rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 2.5rem;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --tap-min: 44px; /* minimum touch target size */
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

/* ----- Animations ----- */
@keyframes call-now-onload {
  0% { transform: scale(1); box-shadow: none; }
  35% { transform: scale(1.06); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4); }
  100% { transform: scale(1); box-shadow: none; }
}

/* ----- Reset & base (mobile-first) ----- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden; /* clip can break position:sticky on some browsers */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem; /* 16px avoids iOS zoom on input focus */
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  height: 100dvh;
  overflow: hidden;
}

/* Single scroll container so sticky header actually sticks (no doc scroll = no bugs) */
.page-wrap {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; line-height: 1.2; }

/* ----- Layout (mobile default) ----- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

/* Anchor jumps should land below fixed header */
section[id] {
  scroll-margin-top: calc(var(--header-h, 72px) + 12px);
}

.section-title {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  margin: 0 0 var(--space-sm);
  color: var(--color-bg-dark);
}

.section-intro {
  margin: 0 0 var(--space-xl);
  color: var(--color-text-muted);
  max-width: 560px;
  font-size: 0.9375rem;
}

/* ----- Header (mobile-first: basic dropdown nav) ----- */
/* sticky so header stays visible on scroll (fixed is buggy on some mobile browsers) */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200; /* above mobile menu layer */
  background: var(--color-accent-light);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding-top: var(--safe-top);
  overflow: visible;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  position: relative;
  z-index: 201;
  overflow: visible;
}

.logo {
  text-decoration: none;
  padding: var(--space-xs) 0;
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
}

.logo:hover { text-decoration: none; }

.header-logo {
  padding: 0;
  min-height: 0;
  flex-shrink: 0;
}
.header-inner .header-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  padding: 0 var(--space-sm);
  min-height: 0;
}
.header-business-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  line-height: 1.1;
  color: var(--color-bg-dark);
  font-weight: 400;
  display: block;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.header-business-name:hover {
  color: var(--color-bg-dark);
  text-decoration: none;
}
.header-phone {
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}
.header-phone:hover { text-decoration: underline; color: var(--color-accent-hover); }

.logo img {
  display: block;
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Dropdown directly under header (BestPrintStudio pattern) */
.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  background: var(--color-accent-light);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  max-height: calc(100dvh - var(--header-h, 72px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  z-index: 190;
}

/* Overlay when menu open: outside click closes (BestPrintStudio) */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 189;
  background: transparent;
}
.nav-overlay[hidden] {
  display: none !important;
}
.nav-overlay:not([hidden]) {
  display: block;
}

/* Open state: JS toggles class */
.nav.is-open {
  display: flex;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-sm);
  color: var(--color-text);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.nav a:hover { color: var(--color-accent); }

.nav-cta {
  margin-top: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-accent);
  color: var(--color-white) !important;
  border-radius: var(--radius);
  border: none;
  justify-content: center;
  min-height: var(--tap-min);
}

.nav-cta:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
}

/* Legacy hook (no longer used) */
.mobile-nav { position: static; }

/* Hamburger: always visible on mobile */
.nav-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: var(--color-text);
  -webkit-tap-highlight-color: transparent;
  list-style: none;
  position: relative;
  z-index: 202;
}

.nav-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-hamburger { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile: bigger header + logo, disable backdrop-filter */
@media (max-width: 1023.98px) {
  .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .header-inner {
    min-height: 64px;
    padding: var(--space-xs) var(--space-md);
  }
  .header-inner .header-logo img { height: 50px; }
  .header-business-name { font-size: 1.1rem; }
}

/* Tablet + desktop: company name on one line */
@media (min-width: 768px) {
  .header-business-name { white-space: nowrap; }
}

/* Desktop layout (JS adds body.desktop-layout when width >= 1024) */
@media (min-width: 1024px) {
  .header-inner {
    padding: var(--space-md) var(--space-lg);
    justify-content: space-between;
  }
  .header-inner .header-logo img { height: 80px; }
  .header-business-name { font-size: 1.6rem; }
  .header-phone { font-size: 1.6rem; }
  .nav-toggle { display: none; }
  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-xl);
    padding: 0;
    background: transparent;
    overflow: visible;
    width: auto;
    height: auto;
    max-height: none;
    bottom: auto;
    left: auto;
    right: auto;
    top: auto;
    box-shadow: none;
    border: none;
  }
  .nav a {
    min-height: 0;
    padding: var(--space-sm) 0;
    border-bottom: none;
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
  }
  .nav .nav-cta {
    display: none !important;
  }
}

/* ----- Buttons (touch-friendly on mobile) ----- */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  min-height: var(--tap-min);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent-light);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent-light);
  text-decoration: none;
}

/* ----- Hero (mobile-first: compact, tap-friendly CTAs) ----- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + var(--space-sm)) var(--space-md) var(--space-sm);
  padding-bottom: calc(var(--space-sm) + var(--safe-bottom));
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(45, 21, 40, 0.92) 0%, rgba(74, 32, 66, 0.92) 50%, rgba(117, 49, 99, 0.92) 100%),
    url("assets/images/hero1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  width: 100%;
}


.hero h1 {
  font-size: clamp(2.25rem, 10vw, 4.25rem);
  color: var(--color-white);
  margin: 0 0 var(--space-md);
  line-height: 1.15;
}

.hero-tagline {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 var(--space-xl);
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: stretch;
}

.hero .btn {
  width: 100%;
  justify-content: center;
  font-size: 1.2rem;
  padding: var(--space-md) var(--space-md);
  line-height: 1.35;
}

.hero .btn-primary {
  background: var(--color-white);
  color: var(--color-accent);
  animation: call-now-onload 1.2s ease-out 1;
}

.hero .btn-primary:hover {
  background: var(--color-accent-light);
  color: var(--color-accent-hover);
}

.hero .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.8);
  color: var(--color-white);
}

.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-white);
  color: var(--color-white);
}

.hero-trust {
  margin: var(--space-xl) 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* Mobile only: trim top/bottom by aligning content to top and reducing padding */
@media (max-width: 768px) {
  .hero {
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--safe-top) + var(--space-md));
    padding-bottom: var(--space-md);
    min-height: 55vh;
  }
  .hero-content {
    padding-bottom: 0;
  }
  .hero h1 { margin-top: 0; }
  .hero-tagline { margin-bottom: var(--space-md); }
  .hero-ctas { margin-bottom: 0; }
  .hero-trust { margin-top: var(--space-md); }
}

@media (min-width: 769px) {
  .hero-bg {
    background-position: center 35%;
  }
  .hero {
    min-height: 55vh;
    padding: calc(60px + var(--space-xl)) var(--space-lg) var(--space-xl);
  }
  .hero h1 { margin-bottom: var(--space-md); }
  .hero-tagline { font-size: 1.15rem; margin-bottom: var(--space-xl); }
  .hero-ctas {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero .btn { width: auto; }
  .hero-trust { margin-top: var(--space-xl); font-size: 0.875rem; }
}

/* ----- Services (mobile: single column) ----- */
.services { background: var(--color-white); }

.services-grid {
  list-style: none;
  margin: 0 0 var(--space-xl);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.service-card {
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.service-card h3 {
  font-size: 1.125rem;
  margin: 0 0 var(--space-xs);
  color: var(--color-bg-dark);
}

.service-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.services-cta { margin: 0; }

@media (min-width: 480px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

@media (min-width: 769px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
  }
  .service-card { padding: var(--space-xl); }
  .service-card h3 { font-size: 1.2rem; }
  .service-card p { font-size: 0.95rem; }
}

/* ----- Why choose us (mobile: single column) ----- */
.why-us { background: var(--color-bg); }

.why-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.why-card {
  padding: var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.why-card h3 {
  font-size: 1.0625rem;
  margin: 0 0 var(--space-xs);
  color: var(--color-bg-dark);
  font-family: var(--font-body);
  font-weight: 600;
}

.why-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

@media (min-width: 480px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

@media (min-width: 769px) {
  .why-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
  }
  .why-card { padding: var(--space-xl); }
  .why-card h3 { font-size: 1.1rem; }
  .why-card p { font-size: 0.95rem; }
}

.link-cta {
  font-weight: 600;
  color: var(--color-accent);
  display: inline-block;
  padding: var(--space-sm) 0;
  min-height: var(--tap-min);
  line-height: 1.4;
}

.link-cta:hover { text-decoration: underline; }

/* ----- About (mobile: stack, image first) ----- */
.about { background: var(--color-accent-light); overflow-x: hidden; }

.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
  min-width: 0;
}

.about-content {
  min-width: 0;
  overflow-wrap: break-word;
}

.about-image {
  order: -1;
  min-width: 0;
}

.about-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-content .section-title { margin-top: 0; }

.about-content p {
  margin: 0 0 var(--space-md);
  color: var(--color-text);
  font-size: 0.9375rem;
}

.about-service-area {
  margin: var(--space-md) 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.about-cta { margin: var(--space-lg) 0 0; }

.about-cta .btn { width: 100%; text-align: center; }

@media (min-width: 769px) {
  .about-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
  }
  .about-image { order: 0; }
  .about-content p { font-size: 1rem; }
  .about-service-area { font-size: 0.95rem; margin-top: var(--space-lg); }
  .about-cta { margin-top: var(--space-xl); }
  .about-cta .btn { width: auto; }
}

/* ----- Contact (mobile: stack, touch-friendly form) ----- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info p { margin: 0 0 var(--space-xs); }
.contact-phone {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  padding: 12px 0;
  min-height: var(--tap-min);
  line-height: 1.3;
}
.contact-phone:hover { text-decoration: underline; }
.contact-note {
  margin-top: var(--space-xs) !important;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.contact-info a[href^="mailto:"] {
  color: var(--color-accent);
  display: inline-block;
  padding: var(--space-xs) 0;
  min-height: var(--tap-min);
  line-height: 1.4;
}

.form-tips {
  margin: 0 0 var(--space-md);
  padding: var(--space-md);
  background: var(--color-accent-light);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--color-text);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.contact-form label {
  font-weight: 500;
  color: var(--color-text);
  font-size: 0.9375rem;
}

.contact-form label .required {
  color: var(--color-accent);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: 16px; /* prevents iOS zoom on focus */
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  -webkit-appearance: none;
  appearance: none;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  padding-top: var(--space-md);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.contact-form button[type="submit"] {
  width: 100%;
  margin-top: var(--space-sm);
  min-height: var(--tap-min);
  -webkit-tap-highlight-color: transparent;
}

/* Mobile: compact form (tight spacing, keep appearance) */
@media (max-width: 768px) {
  .contact-form-wrap .form-tips {
    margin-bottom: var(--space-sm);
  }
  .contact-form {
    gap: var(--space-xs);
  }
  .contact-form label {
    margin-bottom: 2px;
    font-size: 0.875rem;
  }
  .contact-form input,
  .contact-form textarea {
    min-height: 40px;
    padding: var(--space-sm) var(--space-md);
  }
  .contact-form textarea {
    min-height: 88px;
    padding-top: var(--space-sm);
  }
  .contact-form button[type="submit"] {
    margin-top: var(--space-xs);
  }
}

/* Honeypot: hidden from users, bots still fill it */
.form-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 769px) {
  .contact-layout {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-3xl);
  }
  .contact-form { max-width: 480px; }
  .contact-form button[type="submit"] {
    width: auto;
    align-self: flex-start;
  }
  .form-tips { font-size: 0.9rem; }
}

/* ----- Section padding: more on desktop ----- */
@media (min-width: 769px) {
  .section { padding: var(--space-3xl) 0; }
  .container { padding-left: var(--space-lg); padding-right: var(--space-lg); }
  .section-intro { margin-bottom: var(--space-2xl); }
}

/* ----- Footer (mobile: compact) ----- */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-md) var(--space-md);
  padding-bottom: calc(var(--space-md) + var(--safe-bottom));
  text-align: center;
  line-height: 1.4;
}

.site-footer p {
  margin: 0 0 var(--space-xs);
}
.site-footer p:last-child {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--color-white);
  padding: 0;
  min-height: 0;
  display: inline;
  line-height: inherit;
}
.site-footer a:hover { text-decoration: underline; }

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 2px;
}

.footer-area {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-copy {
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 769px) {
  .site-footer {
    padding: var(--space-xl) var(--space-lg);
    padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
  }
  .site-footer p { margin-bottom: var(--space-xs); }
  .footer-brand { font-size: 1.0625rem; margin-bottom: 2px; }
  .footer-area, .footer-copy { font-size: 0.875rem; }
  .footer-copy { margin-top: var(--space-sm); }
}
