/* ===========================================================
   FAJEM & CO. — COMPONENTS
   Header, nav, mobile menu, buttons, cards, forms, footer
   =========================================================== */

/* ========== HEADER ========== */
header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10, 11, 14, 0.65);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-bottom: 1px solid var(--ink-line);
  padding-top: var(--safe-top);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  gap: 20px;
}

/* ========== WORDMARK ========== */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark .amp {
  font-style: italic;
  color: var(--gold);
  padding: 0 4px;
  font-weight: 300;
  transition: color 0.4s ease;
}

.wordmark:hover .amp { color: var(--gold-bright); }

.wordmark .co {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--paper-dim);
  transform: translateY(-1px);
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--paper-low);
}

/* ========== DESKTOP NAV ========== */
nav.desktop-nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
  align-items: center;
}

nav.desktop-nav a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
  position: relative;
  padding: 4px 0;
}

nav.desktop-nav a:hover,
nav.desktop-nav a.active { color: var(--paper); }

nav.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}

nav.desktop-nav a:hover::after,
nav.desktop-nav a.active::after { transform: scaleX(1); }

/* ========== MOBILE MENU TOGGLE ========== */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--paper-low);
  color: var(--paper);
  transition: all 0.3s ease;
  position: relative;
  z-index: 110;
}

.menu-toggle:hover { border-color: var(--gold); color: var(--gold); }

.menu-toggle-lines {
  position: relative;
  width: 18px;
  height: 12px;
}

.menu-toggle-lines span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.2s ease;
}

.menu-toggle-lines span:nth-child(1) { top: 0; }
.menu-toggle-lines span:nth-child(2) { top: 50%; }
.menu-toggle-lines span:nth-child(3) { bottom: 0; }

.menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(3) {
  bottom: 50%;
  transform: translateY(1px) rotate(-45deg);
}

/* ========== MOBILE MENU PANEL ========== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 440px);
  background: var(--ink-deep);
  border-left: 1px solid var(--ink-line);
  z-index: 100;
  padding: calc(100px + var(--safe-top)) 40px calc(40px + var(--safe-bottom));
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu.open { transform: translateX(0); }

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--serif);
  font-weight: 300;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-menu a .arrow {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--paper-mute);
  transition: transform 0.3s ease, color 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a:active,
.mobile-menu a.active {
  color: var(--gold);
}

.mobile-menu a:hover .arrow,
.mobile-menu a:active .arrow {
  color: var(--gold);
  transform: translateX(4px);
}

.mobile-menu-footer {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu-footer .eyebrow { margin-bottom: 8px; }

.mobile-menu-contact {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 16px;
  color: var(--paper-dim);
  line-height: 1.6;
}

.mobile-menu-contact a { color: var(--gold); }

/* ========== CTA LINK (text button with sliding fill) ========== */
.cta-link {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  border: 1px solid var(--paper-low);
  padding: 11px 20px;
  transition: all 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  font-weight: 500;
}

.cta-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
  z-index: -1;
}

.cta-link:hover { border-color: var(--gold); color: var(--ink); }
.cta-link:hover::before { transform: translateY(0); }
.cta-link:hover .arrow { transform: translateX(4px); }
.cta-link .arrow { transition: transform 0.3s ease; }

/* ========== BUTTONS ========== */
.btn {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 18px 28px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 48px;
}

.btn-primary {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(201, 168, 106, 0.1);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary > span { position: relative; z-index: 1; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -12px rgba(201, 168, 106, 0.4);
}

.btn-primary:disabled,
.btn-primary.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-secondary {
  border-color: var(--paper-low);
  color: var(--paper);
  background: transparent;
}

.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}

.btn-secondary > span {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.btn-secondary:hover { border-color: var(--gold); }
.btn-secondary:hover::before { transform: translateY(0); }
.btn-secondary:hover > span { color: var(--ink); }

.btn .arrow { display: inline-block; transition: transform 0.3s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ========== FORMS ========== */
.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 10px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-line-bright);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  padding: 10px 0 12px;
  transition: border-color 0.3s ease;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
}

.field textarea { resize: vertical; min-height: 100px; }

.field select { cursor: pointer; }

.field select option { background: var(--ink-card); color: var(--paper); }

.field input::placeholder,
.field textarea::placeholder {
  color: var(--paper-low);
}

/* ========== FOOTER ========== */
footer {
  background: var(--ink-deep);
  border-top: 1px solid var(--ink-line);
  padding: 80px 0 calc(40px + var(--safe-bottom));
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--ink-line);
}

.footer-brand .wordmark { font-size: 26px; margin-bottom: 20px; }

.footer-brand p {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: 15px;
  color: var(--paper-dim);
  line-height: 1.6;
  max-width: 340px;
}

.footer-col h5 {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 500;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.footer-col a {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--paper-mute);
  letter-spacing: 0.01em;
}

.footer-bottom em { font-style: italic; color: var(--gold); font-family: var(--serif); }

/* ========== GENERIC CARD ========== */
.card-base {
  background: var(--ink-card);
  border: 1px solid var(--ink-line);
  padding: 40px;
  position: relative;
  transition: border-color 0.4s ease;
}

.card-base:hover { border-color: var(--gold-line); }

.card-base.has-top-tick::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 80px; height: 1px;
  background: var(--gold);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .wordmark { font-size: 18px; }
  .wordmark .co { display: none; }

  nav.desktop-nav { display: none; }

  .menu-toggle { display: inline-flex; }

  /* Hide header CTA on mobile — it lives in the menu */
  header .cta-link { display: none; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .mobile-menu { padding: calc(100px + var(--safe-top)) 28px calc(32px + var(--safe-bottom)); }
  .mobile-menu a { font-size: 24px; padding: 16px 0; }
  .btn { padding: 16px 24px; font-size: 12px; }
}
