/* ============================================================
   StayJC — main.css
   Editorial / neighborhood-paper design system.
   Shared tokens, type, nav, footer, buttons, base components.
   ============================================================ */

:root {
  /* ---------- COLORS ---------- */
  /* Paper / page backgrounds */
  --paper:        #F4EFE3;   /* warm newsprint cream — the page */
  --paper-deep:   #EAE2D0;   /* slightly darker, for section breaks */
  --paper-shade:  #E2D9C3;   /* edge of cards / hover */

  /* Ink */
  --ink:          #1A1714;   /* near-black, warm */
  --ink-soft:     #3C3631;   /* dark gray for body */
  --smoke:        #6B6560;   /* secondary text */
  --hairline:     #C9C0AC;   /* rule lines */
  --hairline-soft:#D9D2C0;

  /* Single accent — JC brownstone brick. Not "luxury gold." */
  --brick:        #9C3A24;
  --brick-dark:   #7E2D1A;
  --brick-soft:   #C9836D;

  /* Aliases used by older pages (keep working) */
  --white:    #FFFFFF;
  --dark:     var(--ink);
  --cream:    var(--paper);
  --sand:     var(--paper-deep);
  --tan:      var(--hairline);
  --muted:    var(--smoke);
  --accent:   var(--brick);
  --accent-light: #F2E2DA;
  --gold:     var(--brick);
  --green:    #4A6B5C;

  /* ---------- TYPE ---------- */
  --serif: 'Fraunces', 'EB Garamond', Georgia, serif;
  --sans:  'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --mono:  ui-monospace, 'SF Mono', Menlo, monospace;

  /* Optical Fraunces axis settings used throughout */
  --fr-soft: 100;    /* SOFT 0–100, higher = softer letterforms */
  --fr-wonk: 0;      /* WONK 0/1 — 1 enables alternate g/Q */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* ---------- ACCESSIBILITY ---------- */
.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  z-index: 1000;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- TOP NAVIGATION ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 36px;
  background: rgba(244, 239, 227, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.logo {
  font-family: var(--serif);
  font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo span {
  font-style: italic;
  color: var(--brick);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  font-family: var(--sans);
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--brick); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 9px 18px;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  transition: background 0.15s, border 0.15s;
}
.nav-cta:hover {
  background: var(--brick) !important;
  border-bottom-color: var(--brick);
}

/* ---------- HAMBURGER + MOBILE MENU ---------- */
.hamburger {
  /* 44×44 outer tap target meets Apple's HIG minimum so finger taps actually
     register on iPhone. Internal padding keeps the icon's visual size identical
     to what it was (28×22px content area inside the 44×44 button). */
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px 8px;
  box-sizing: border-box;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  /* Belt-and-braces: stop iOS Safari from intercepting the tap as text-selection */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;  /* taps go to the button, not the bars */
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.4);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.mobile-overlay.active { opacity: 1; pointer-events: all; }

.mobile-menu {
  position: fixed;
  top: 0; right: -100%;
  width: 80%; max-width: 360px;
  height: 100vh;
  background: var(--paper);
  z-index: 99;
  padding: 110px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: right 0.3s ease;
  border-left: 1px solid var(--hairline);
}
.mobile-menu.active { right: 0; }
.mobile-menu a {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 36, 'SOFT' 100;
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
}
.mobile-menu a:hover { color: var(--brick); }
.mobile-menu .nav-cta {
  align-self: flex-start;
  margin-top: 12px;
}

/* ---------- SHARED SECTIONS ---------- */
section {
  padding: 110px 36px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Editorial small label (replaces ✦ pills) */
.sec-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 18px;
  display: inline-block;
}
.sec-label--gold { color: var(--brick); }

/* Editorial section title */
.sec-title {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.sec-title em {
  font-style: italic;
  color: var(--brick);
  font-variation-settings: 'opsz' 96, 'SOFT' 100, 'WONK' 1;
}

.sec-sub {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--smoke);
  max-width: 560px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 56px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}

.view-all {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.view-all:hover { color: var(--brick); border-color: var(--brick); }

/* ---------- BUTTONS ---------- */
.btn-primary,
.btn-accent {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: background 0.15s, border-color 0.15s;
}
.btn-primary:hover,
.btn-accent:hover {
  background: var(--brick);
  border-color: var(--brick);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

/* On dark backgrounds */
.on-dark .btn-secondary {
  color: var(--paper);
  border-color: rgba(244, 239, 227, 0.4);
}
.on-dark .btn-secondary:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

/* ---------- CONTACT CTA (used by footer.php) ---------- */
.contact-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 100px 36px;
  text-align: center;
  margin-bottom: 64px;  /* breathing room before the footer */
}
.contact-cta-inner {
  max-width: 680px;
  margin: 0 auto;
}
.contact-cta-title {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 96, 'SOFT' 60, 'WONK' 1;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--paper);
}
.contact-cta-title em {
  font-style: italic;
  color: var(--brick-soft);
  font-variation-settings: 'opsz' 96, 'SOFT' 100, 'WONK' 1;
}
.contact-cta-text {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: rgba(244, 239, 227, 0.7);
  margin-bottom: 32px;
}
.contact-cta .btn-secondary {
  color: var(--paper);
  border-color: rgba(244, 239, 227, 0.4);
}
.contact-cta .btn-secondary:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--paper-deep);
  color: var(--ink-soft);
  padding: 60px 36px 32px;
  border-top: 1px solid var(--hairline);
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--smoke);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--brick); }
.footer-tagline {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 24, 'SOFT' 100;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 16px;
  max-width: 280px;
}
.footer-logo {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  font-size: 32px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  display: inline-block;
}
.footer-logo span {
  color: var(--brick);
  font-style: italic;
}
.site-footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--smoke);
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- RESPONSIVE NAV ---------- */
@media (max-width: 900px) {
  .site-nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  /* "Stay Jersey City" is wider than the old "StayJC" — shrink it on phones
     so the logo + 44×44 hamburger both fit comfortably on a 375px viewport. */
  .logo { font-size: 22px; }
}

@media (max-width: 380px) {
  .logo { font-size: 19px; }
}

@media (max-width: 768px) {
  section { padding: 70px 20px; }
  .section-head { flex-direction: column; align-items: flex-start; margin-bottom: 36px; }
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-bottom: 28px;
  }
  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .contact-cta { padding: 70px 20px; }
}

@media (max-width: 480px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}
