@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --white: #fafaf8;
  --black: #0f0f0d;
  --grey-100: #f2f2ef;
  --grey-200: #e4e4df;
  --grey-400: #b0b0a8;
  --grey-600: #6b6b63;
  --accent: #c8a96e;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-height: 72px;
  --max-w: 1200px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-200);
  z-index: 300;
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-600);
  text-decoration: none;
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--black);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--black);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-login {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  border: 1px solid var(--black);
  padding: 8px 20px;
  border-radius: 8px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-login:hover {
  background: var(--black);
  color: var(--white);
}

/* ── LAYOUT ── */
main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* ── TYPOGRAPHY ── */
h1 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.2;
}

h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.3;
}

/* ── SECTION LABEL ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-600);
  margin-bottom: 24px;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* ── DIVIDER ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--grey-200);
  margin: 80px 0;
}

/* ── BUTTON ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  border: 1px solid var(--black);
  padding: 14px 32px;
  border-radius: 8px;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  background: transparent;
}

.btn:hover {
  background: var(--black);
  color: var(--white);
}

.btn-filled {
  background: var(--black);
  color: var(--white);
}

.btn-filled:hover {
  background: var(--black);
  color: var(--white);
}

.btn-ghost {
  border-color: var(--grey-400);
  color: var(--grey-600);
}

.btn-ghost:hover {
  border-color: var(--black);
  background: transparent;
  color: var(--black);
}

/* ── FADE IN ANIMATION ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s var(--ease) forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.1s; }
.fade-up:nth-child(2) { animation-delay: 0.2s; }
.fade-up:nth-child(3) { animation-delay: 0.3s; }
.fade-up:nth-child(4) { animation-delay: 0.4s; }
.fade-up:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--grey-200);
  padding: 40px 0;
  margin-top: 120px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-quote {
  font-size: 18px;
  color: var(--grey-600);
  letter-spacing: 0.01em;
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 300;
}

.footer-top {
  font-size: 12px;
  color: var(--grey-400);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.footer-top:hover {
  color: var(--black);
}

/* ── RESPONSIVE ── */
html, body { overflow-x: hidden; }

@media (max-width: 768px) {
  .nav-inner { padding: 0 24px; }
  .container { padding: 0 24px; }
  .nav-links { gap: 20px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-quote { display: none; }
  footer { margin-top: 80px; }
  .divider { margin: 48px 0; }
}

@media (max-width: 600px) {
  .btn { padding: 12px 24px; font-size: 12px; }
  footer { margin-top: 60px; padding: 24px 0; }
  .footer-inner { padding: 0 24px; }
  .divider { margin: 32px 0; }
}

@media (max-width: 360px) {
  .nav-inner { padding: 0 16px; }
  .footer-inner { padding: 0 16px; }
  .btn { padding: 10px 18px; font-size: 11px; }
  #lb-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 18px; }
}

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
  transition: all 0.35s var(--ease);
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── FULL-SCREEN MOBILE MENU ── */
body.menu-open { overflow: hidden; }

@media (max-width: 540px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: flex !important;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) 40px 60px;
    z-index: 200;
    gap: 0;
    counter-reset: nav-item;

    /* closed — sitting above viewport */
    transform: translateY(-100%);
    transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
    pointer-events: none;
    visibility: hidden;
  }

  /* open — slides down to fill screen */
  .nav-links.nav-open {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }

  /* List items — staggered fade-up on open */
  .nav-links li {
    width: 100%;
    counter-increment: nav-item;
    border-bottom: 1px solid var(--grey-200);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }

  .nav-links.nav-open li { opacity: 1; transform: translateY(0); }
  .nav-links.nav-open li:nth-child(1) { transition-delay: 0.2s; }
  .nav-links.nav-open li:nth-child(2) { transition-delay: 0.3s; }
  .nav-links.nav-open li:nth-child(3) { transition-delay: 0.4s; }

  /* Gold numbered label above each link */
  .nav-links li::before {
    content: "0" counter(nav-item) " —";
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--accent);
    padding-top: 32px;
    margin-bottom: 6px;
  }

  /* Large editorial link text */
  .nav-links a {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(40px, 11vw, 60px);
    font-weight: 300;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--black);
    padding-bottom: 32px;
    line-height: 1.05;
    transition: color 0.2s;
  }

  .nav-links a:hover { color: var(--accent); }
  .nav-links a.active { font-style: italic; color: var(--accent); }
  .nav-links a::after { display: none; }

  /* Hamburger sits above everything */
  .nav-hamburger { z-index: 400; }
}

/* ── PASSWORD MODAL ── */
.pw-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--white);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pw-overlay.pw-active { display: flex; }

.pw-modal {
  background: var(--white);
  width: 100%;
  max-width: 420px;
  padding: 48px 40px 40px;
  position: relative;
}

.pw-close {
  position: fixed;
  top: 24px; right: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--grey-400);
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
  z-index: 9001;
}
.pw-close:hover { color: var(--black); }

.pw-lock-icon {
  width: 44px;
  height: 44px;
  background: var(--grey-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--grey-600);
}

.pw-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  color: var(--black);
  margin-bottom: 6px;
}

.pw-subtitle {
  font-size: 13px;
  color: var(--grey-600);
  line-height: 1.6;
  margin-bottom: 28px;
}

.pw-input {
  width: 100%;
  border: 1px solid var(--grey-200);
  border-radius: 0;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 8px;
  letter-spacing: 0.2em;
}
.pw-input:focus { border-color: var(--black); }
.pw-input.pw-error { border-color: #b94040; }

.pw-error-msg {
  font-size: 12px;
  color: #b94040;
  margin-bottom: 14px;
  display: none;
  letter-spacing: 0;
}
.pw-error-msg.visible { display: block; }

.pw-submit {
  width: 100%;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 28px;
}
.pw-submit:hover { background: #2a2a28; }

.pw-note {
  font-size: 12px;
  color: var(--grey-400);
  line-height: 1.75;
  border-top: 1px solid var(--grey-200);
  padding-top: 20px;
  text-align: center;
  font-style: italic;
}
.pw-note a {
  color: var(--accent);
  text-decoration: none;
}
.pw-note a:hover { text-decoration: underline; }

/* Lock badge on card images */
.card-lock-badge {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  background: rgba(15, 15, 13, 0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@media (max-width: 600px) {
  .pw-modal { padding: 40px 24px 32px; }
  .pw-title { font-size: 24px; }
}

/* ── FIGMA BAR GLOBAL ── */
.cs-figma-icon svg {
  width: 20px !important;
  height: 30px !important;
}

/* Lock icon inline next to figma title */
.cs-figma-bar-text {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
}

.cs-figma-bar-text strong {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.cs-figma-bar-text strong::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f0f0d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Hero image — match index card 16/9 on mobile */
@media (max-width: 600px) {
  .cs-hero-image {
    height: auto !important;
    aspect-ratio: 16/9 !important;
  }
}

/* Overview section — compact + bold on mobile */
@media (max-width: 600px) {
  .cs-overview-cell {
    padding: 20px !important;
  }
  .cs-overview-value {
    font-size: 18px !important;
    font-weight: 600 !important;
  }
  .cs-overview-label {
    margin-bottom: 4px !important;
  }
}


/* Figma bar — mobile stack */
@media (max-width: 600px) {
  .cs-figma-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .cs-figma-bar-left {
    align-items: flex-start !important;
  }
  .cs-figma-btn {
    width: auto !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
}

/* ── LIGHTBOX ── */
#lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}
#lb-overlay.lb-active {
  display: flex;
}
#lb-scroll {
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
#lb-scroll::-webkit-scrollbar { width: 6px; }
#lb-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 3px; }
#lb-img {
  display: block;
  width: 100%;
  border-radius: 12px;
}
#lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10000;
}
#lb-close:hover {
  background: rgba(255,255,255,0.3);
}
