/* ═══════════════════════════════════════════════════════
   Zagwyn Firewood — styles.css
   Tailwind CDN handles utility classes.
   This file handles component classes, base styles,
   animations, and layout primitives.
   ═══════════════════════════════════════════════════════ */

/* ─── Variables ──────────────────────────────────────── */
:root {
  --charcoal:      #1C1C1C;
  --charcoal-700:  #2A2A2A;
  --amber:         #C8912E;
  --amber-light:   #DDA94A;
  --amber-dark:    #9F7422;
  --offwhite:      #F5F2ED;
  --offwhite-dark: #E8E3D8;
  --forest:        #2A3D2E;
}

/* ─── Base ───────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--offwhite);
  color: var(--charcoal);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, h3, h4 {
  font-family: 'Oswald', Impact, sans-serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2rem, 6vw, 5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.04em; }

a { color: inherit; text-decoration: none; }

::selection { background: #c8912e; color: #1c1c1c; }

:focus-visible { outline: 2px solid #c8912e; outline-offset: 3px; }

input, select, textarea {
  -webkit-appearance: none;
  -moz-appearance:    none;
  appearance:         none;
  border-radius: 0;
}

/* ─── Layout ─────────────────────────────────────────── */
.container-wide {
  margin-left:  auto;
  margin-right: auto;
  max-width: 72rem;
  padding-left:  1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .container-wide { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 768px) {
  .container-wide { padding-left: 2.5rem; padding-right: 2.5rem; }
}

/* ─── Buttons ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--amber);
  color: var(--charcoal);
  font-family: 'Oswald', Impact, sans-serif;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.875rem;
  line-height: 1;
  transition: background 150ms, transform 150ms;
  text-decoration: none;
  cursor: pointer;
  border: none;
}
.btn-primary:hover  { background: var(--amber-light); }
.btn-primary:active { background: var(--amber-dark); transform: scale(0.97); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid var(--charcoal);
  color: var(--charcoal);
  background: transparent;
  font-family: 'Oswald', Impact, sans-serif;
  font-weight: 700;
  padding: 0.72rem 1.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.875rem;
  line-height: 1;
  transition: background 150ms, color 150ms, transform 150ms;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline:hover  { background: var(--charcoal); color: var(--offwhite); }
.btn-outline:active { transform: scale(0.97); }

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid var(--offwhite);
  color: var(--offwhite);
  background: transparent;
  font-family: 'Oswald', Impact, sans-serif;
  font-weight: 700;
  padding: 0.72rem 1.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.875rem;
  line-height: 1;
  transition: background 150ms, color 150ms, transform 150ms;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline-light:hover  { background: var(--offwhite); color: var(--charcoal); }
.btn-outline-light:active { transform: scale(0.97); }

/* ─── Typography Helpers ─────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ─── Dividers ───────────────────────────────────────── */
.rule       { border-top: 1px solid rgba(28, 28, 28, 0.14); }
.rule-light { border-top: 1px solid rgba(245, 242, 237, 0.16); }

/* ─── Grain Texture ──────────────────────────────────── */
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  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)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.035;
  mix-blend-mode: overlay;
}

/* ─── Accessibility ──────────────────────────────────── */
.touch-target { min-width: 44px; min-height: 44px; }

/* ─── Scrollbar Hide ─────────────────────────────────── */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ─── Animations ─────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-up { animation: fade-up 0.6s ease-out both; }
.animate-fade-in { animation: fade-in 0.4s ease-out both; }
.animate-fade-up:nth-child(2) { animation-delay: 0.1s; }
.animate-fade-up:nth-child(3) { animation-delay: 0.2s; }
.animate-fade-up:nth-child(4) { animation-delay: 0.3s; }

/* ─── Mobile Menu ────────────────────────────────────── */
#mobile-menu {
  background: var(--charcoal);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
#mobile-menu.menu-open {
  max-height: 80vh;
  opacity: 1;
}

/* ─── TrustBar ───────────────────────────────────────── */
.trustbar-list {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(28, 28, 28, 0.75);
  overflow-x: auto;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .trustbar-list { justify-content: center; gap: 2.5rem; font-size: 0.75rem; }
}
.trustbar-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ─── Photo Placeholders ─────────────────────────────── */
.placeholder {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed;
}
.placeholder-dark {
  background: var(--charcoal);
  color: var(--offwhite);
  border-color: rgba(200, 145, 46, 0.6);
}
.placeholder-light {
  background: var(--offwhite-dark);
  color: var(--charcoal);
  border-color: rgba(28, 28, 28, 0.4);
}
.placeholder-hatch {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(
    45deg,
    currentColor 0 1px,
    transparent 1px 10px
  );
}
.placeholder-label {
  position: relative;
  padding: 1rem 1.5rem;
  text-align: center;
}
.placeholder-caption {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  opacity: 0.6;
}
.placeholder-text {
  margin-top: 0.5rem;
  font-family: 'Oswald', Impact, sans-serif;
  font-size: 0.875rem;
  text-transform: uppercase;
  max-width: 280px;
}

/* ─── Form Inputs ────────────────────────────────────── */
.form-field { display: block; }
.form-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(28, 28, 28, 0.7);
  margin-bottom: 0.5rem;
}
.form-input {
  display: block;
  width: 100%;
  border: 1px solid rgba(28, 28, 28, 0.3);
  background: var(--offwhite);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  transition: border-color 150ms;
  box-sizing: border-box;
}
.form-input:focus { outline: none; border-color: var(--amber); }
