/* ─────────────────────────────────────────────────────────
   AppInSource — shared base styles
   Used by every page: variables, reset, nav, footer, fade-up.
   Page-specific styles live in {page}.css.
   ───────────────────────────────────────────────────────── */

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

:root {
  --ink: #1a1a18;
  --ink-2: #3d3d39;
  --ink-3: #7a7a74;
  --ink-4: #b0b0a8;
  --paper: #f5f4ef;
  --paper-2: #eeede7;
  --paper-3: #e5e4dd;
  --accent: #0f6e56;
  --accent-light: #e1f5ee;
  --accent-mid: #1d9e75;
  --rule: rgba(26,26,24,0.12);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 0 clamp(24px, 5vw, 80px);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.nav-logo img { display: block; height: 28px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-links .nav-new { display: inline-flex; align-items: center; gap: 6px; }
.nav-new-badge {
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  background: var(--accent);
  color: #fff;
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 400;
}

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--sans);
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 6px 18px;
  border-radius: 2px;
  background: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s !important;
  line-height: 1;
  text-decoration: none;
}
.nav-cta:hover { background: var(--accent) !important; color: #fff !important; }

/* ── NAV CONTACT POPOVER ── */
.nav-contact { position: relative; }
.contact-popover {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 20px 24px;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(26,26,24,0.1);
  z-index: 110;
}
.contact-popover.open { display: block; }
.contact-popover::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 20px;
  width: 8px;
  height: 8px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  transform: rotate(-45deg);
}
.cp-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 4px;
}
.cp-label + .cp-label { margin-top: 16px; }
.contact-email,
.contact-phone {
  display: block;
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-email:hover,
.contact-phone:hover { color: var(--accent); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 24px clamp(24px, 5vw, 80px);
  gap: 20px;
  z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 400;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
}
.nav-mobile a:last-child { border-bottom: none; padding-bottom: 0; }

/* ── FOOTER ── */
footer {
  padding: clamp(40px, 5vw, 60px) clamp(24px, 5vw, 80px);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  border-top: 1px solid var(--rule);
}

.footer-logo { display: inline-block; line-height: 0; margin-bottom: 14px; }
.footer-logo img { display: block; height: 22px; width: auto; }

.footer-tagline {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.65;
  font-weight: 300;
  max-width: 220px;
  margin-bottom: 20px;
}
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  font-size: 12px;
  color: var(--ink-3);
  text-decoration: none;
  font-family: var(--mono);
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--accent); }

.footer-col-title {
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.footer-col-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col-links a {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 300;
  transition: color 0.2s;
}
.footer-col-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--rule);
  padding: 20px clamp(24px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom span,
.footer-bottom-left,
.footer-bottom-right {
  font-size: 12px;
  color: var(--ink-4);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* ── BUTTONS ── */
.btn-primary {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--sans);
  color: #fff;
  background: var(--ink);
  padding: 12px 28px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }

/* ── FADE-UP UTILITY ── */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ── SHARED RESPONSIVE ── */
@media (max-width: 900px) {
  footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  footer { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
