/* ═══════════════════════════════════════════
   HARRIE KANTERS — Shared Stylesheet
   Font: Figtree | Icons: Lucide
═══════════════════════════════════════════ */

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

:root {
  --black:       #1e1e1e;
  --charcoal:    #252422;
  --dark:        #2c2c2c;
  --mid:         #5c5c5c;
  --light:       #9a9a9a;
  --white:       #ffffff;
  --beige:       #d6c8b4;
  --beige-light: #ede6dc;
  --card-bg:     #f0ebe3;
  --gold:        #c8a84b;
  --nav-h:       72px;
  --max-w:       1200px;
  --page-px:     64px;   /* horizontal padding for content columns */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Figtree', sans-serif;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ NAV ═══ */
#site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 300;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 var(--page-px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#site-nav.transparent { background: transparent; }
#site-nav.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
#site-nav.solid {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  line-height: 0;
  text-decoration: none;
}
.nav-logo img { height: 40px; width: auto; display: block; }

.logo-light { display: block; }
.logo-dark  { display: none;  }
#site-nav.transparent .logo-light { display: block; }
#site-nav.transparent .logo-dark  { display: none;  }
#site-nav.scrolled .logo-light,
#site-nav.solid    .logo-light { display: none;  }
#site-nav.scrolled .logo-dark,
#site-nav.solid    .logo-dark  { display: block; }

.nav-spacer { flex: 1; }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  transition: opacity 0.2s;
  white-space: nowrap;
}
.nav-link:hover { opacity: 0.7; }
.nav-link.active { font-weight: 700; }
#site-nav.scrolled .nav-link,
#site-nav.solid    .nav-link { color: var(--dark); }
#site-nav.scrolled .nav-link.active,
#site-nav.solid    .nav-link.active { color: var(--black); }

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.55);
  color: #fff;
  padding: 9px 20px;
  border-radius: 10px;
  font-family: 'Figtree', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-btn:hover { background: rgba(255,255,255,0.3); }
#site-nav.scrolled .nav-btn,
#site-nav.solid    .nav-btn {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
}
#site-nav.scrolled .nav-btn:hover,
#site-nav.solid    .nav-btn:hover { background: #333; border-color: #333; }

/* ── Hamburger ── */
.hamburger {
  display: none;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  z-index: 301;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: background 0.3s;
}
#site-nav.scrolled .hamburger span,
#site-nav.solid    .hamburger span { background: var(--dark); }

/* ── Mobile drawer — slides in from right ── */
.nav-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 32px) 32px 32px;
  gap: 24px;
  box-shadow: -4px 0 32px rgba(0,0,0,0.15);
  z-index: 299;
  overflow-y: auto;
  /* slide-out state */
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  /* always in DOM, hidden via transform */
  pointer-events: none;
}
.nav-drawer.open {
  transform: translateX(0);
  pointer-events: all;
}
.nav-drawer a {
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  transition: color 0.2s;
}
.nav-drawer a:hover { color: var(--mid); }
.nav-drawer .drawer-btn {
  background: var(--black);
  color: #fff !important;
  padding: 14px 24px;
  border-radius: 10px;
  text-align: center;
  margin-top: 8px;
  font-size: 1rem;
}

/* ── Drawer overlay ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 298;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ═══ SHARED BUTTON ═══ */
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  transition: background 0.2s;
  /* hug text — don't stretch to full width */
  align-self: flex-start;
}
.btn-dark:hover { background: #333; }

/* ═══ CONTACT SECTION ═══ */
#contact {
  background: var(--beige);
  padding: 100px var(--page-px);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 96px;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
}
.contact-left h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dark);
  line-height: 1.12;
  margin-bottom: 22px;
}
.contact-left p {
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--mid);
}
.cform { display: flex; flex-direction: column; gap: 14px; }
.cform-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 7px;
}
.cform-field input,
.cform-field textarea {
  width: 100%;
  background: var(--beige-light);
  border: none;
  border-radius: 12px;
  padding: 13px 17px;
  font-family: 'Figtree', sans-serif;
  font-size: 0.92rem;
  color: var(--dark);
  outline: none;
  transition: background 0.2s;
}
.cform-field input::placeholder,
.cform-field textarea::placeholder { color: #b0a898; }
.cform-field input:focus,
.cform-field textarea:focus { background: #e4dbd0; }
.cform-field textarea { resize: vertical; min-height: 118px; }
.cform-success {
  display: none;
  background: #d4edda;
  color: #2d6a4f;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
}
.cform-error {
  display: none;
  background: #fde8e8;
  color: #c0392b;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
}
.cform-field-error {
  display: block;
  color: #c0392b;
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 1em;
}
.cform-field input[aria-invalid="true"],
.cform-field textarea[aria-invalid="true"] { background: #fde8e8; }
[data-fs-success] { display: none; }
[data-fs-error]:not([data-fs-error=""]) { display: block; }
.cform-submit {
  width: 100%;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-family: 'Figtree', sans-serif;
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 2px;
}
.cform-submit:hover { background: #333; }

/* ═══ FOOTER ═══ */
#site-footer {
  background: var(--charcoal);
  padding: 60px var(--page-px) 36px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-logo {
  display: block;
  margin-bottom: 40px;
  line-height: 0;
}
.footer-logo img { height: 46px; width: auto; }
.footer-contacts { display: flex; flex-direction: column; gap: 18px; margin-bottom: 48px; }
.f-row {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: rgba(255,255,255,0.68);
  font-size: 0.9rem;
  transition: color 0.2s;
  line-height: 1.5;
}
.f-row:hover { color: rgba(255,255,255,0.95); }
.f-icon {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.f-icon [data-lucide] { width: 15px; height: 15px; stroke: rgba(255,255,255,0.6); }
.footer-hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin-bottom: 20px; }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.28); }

/* ═══ PROJECT CARDS (shared) ═══ */
.proj-card { text-decoration: none; display: block; }
.proj-img { border-radius: 8px; overflow: hidden; }
.proj-img img {
  width: 100%; height: 360px;
  object-fit: cover; display: block;
  transition: opacity 0.3s ease;
}
.proj-card:hover .proj-img img { opacity: 0.75; }
.proj-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 4px 0;
}
.proj-meta h4 { font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.proj-meta span { font-size: 0.82rem; color: var(--light); }

/* ═══ PAGE TRANSITIONS ═══ */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body { animation: pageFadeIn 0.4s ease forwards; }
body.fade-out { opacity: 0; transition: opacity 0.3s ease; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 980px) {
  :root { --page-px: 24px; }
  #site-nav { padding: 0 24px; }
  .nav-right { display: none !important; }
  .hamburger { display: flex; }

  #contact { padding: 56px var(--page-px); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  #site-footer { padding: 48px var(--page-px) 28px; }
}
