/* ══════════════════════════════════════════════════
   WATCHMAN FINE ARTS — Global Styles v2
   ══════════════════════════════════════════════════ */

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-body);
  background: #FFFFFF;
  overflow-x: hidden;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ── PAGE TRANSITION ── */
main {
  animation: pageIn 0.5s var(--ease-out) both;
  min-height: calc(100vh - var(--nav-h));
}
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── CONTAINER ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ══════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: #FEFEFE;
  box-shadow: 0 1px 0 var(--border-light),
              0 4px 24px rgba(26, 24, 22, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 clamp(24px, 5vw, 80px);
}

/* ── Logo ── */
.nav-logo {
  justify-self: start;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: opacity var(--dur-normal);
}
.nav-logo:hover { opacity: 0.7; }
.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* ── Links (center column) ── */
.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 64px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color var(--dur-normal) var(--ease-out);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width var(--dur-normal) var(--ease-out),
              left var(--dur-normal) var(--ease-out);
}
.nav-link:hover {
  color: var(--text-primary);
}
.nav-link:hover::after {
  width: 100%;
  left: 0;
}
.nav-link.active {
  color: var(--text-primary);
  font-weight: 500;
}
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* ── Actions (right column) ── */
.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-body);
  transition: color var(--dur-normal), background var(--dur-normal);
}
.nav-cart:hover {
  color: var(--text-primary);
  background: var(--border-light);
}
.nav-cart-icon {
  display: block;
}
.nav-cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.nav-cart-count.visible { display: flex; }

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-body);
  transition: all 0.3s var(--ease-out);
  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; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #FEFEFE;
    box-shadow: 0 8px 24px rgba(26, 24, 22, 0.06);
    flex-direction: column;
    align-items: center;
    padding: 32px var(--gutter);
    gap: 24px;
  }
  .nav-links.mobile-open { display: flex; }
  .nav-link { font-size: 0.85rem; letter-spacing: 0.24em; }
  .nav-hamburger { display: flex; }
  .nav-logo-img { height: 30px; }
}

/* ══════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════ */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-micro);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.display-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-primary);
}

.heading {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
}

.body-text {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text-body);
  font-weight: 300;
}

.caption {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 32px;
  border: none;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--charcoal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 10px 0;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn svg { transition: transform var(--dur-normal); }
.btn:hover svg { transform: translateX(4px); }

/* ══════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════ */
.form-field {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: var(--text-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--dur-normal);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-subtle);
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ══════════════════════════════════════════════════
   SECTION HELPERS
   ══════════════════════════════════════════════════ */
.section-header {
  text-align: center;
  padding: var(--space-section) var(--gutter) var(--space-lg);
}
.section-header .eyebrow {
  margin-bottom: 16px;
}
.section-header .section-title {
  margin-bottom: 16px;
}
.section-header .caption {
  max-width: 520px;
  margin: 0 auto;
}

.divider {
  width: 48px;
  height: 1px;
  background: var(--accent);
}

/* ══════════════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════════════ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  /* Reserve space for the fixed nav at top and caption at bottom so the
     artwork is never clipped by either. */
  padding: calc(var(--nav-h) + 24px) 24px 96px;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.lightbox-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: fixed;
  top: 28px;
  right: 32px;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--dur-normal);
  z-index: 2001;
}
.lightbox-close:hover { color: var(--text-primary); }

.lightbox-back {
  position: fixed;
  top: calc(var(--nav-h) + 24px);
  left: clamp(24px, 4vw, 64px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 20px;
  cursor: pointer;
  transition: all var(--dur-normal);
  z-index: 2001;
}
.lightbox-back:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}
.lightbox-back svg {
  transition: transform var(--dur-normal);
}
.lightbox-back:hover svg {
  transform: translateX(-3px);
}

.lightbox-caption {
  position: fixed;
  bottom: 32px;
  right: 40px;
  text-align: right;
  pointer-events: none;
  z-index: 2001;
}
.lightbox-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-primary);
  font-style: italic;
}
.lightbox-meta {
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */

/* Newsletter signup section */
.site-signup {
  background: #F9F8F7;
  border-top: 1px solid var(--border-light);
  padding: var(--space-lg) var(--gutter);
}
.signup-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.signup-text .eyebrow {
  color: var(--accent);
  margin-bottom: 16px;
}
.signup-heading {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.signup-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
}
.signup-form {
  display: flex;
  gap: 12px;
}
.signup-form input {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  padding: 14px 18px;
  outline: none;
  transition: border-color var(--dur-normal);
}
.signup-form input:focus { border-color: var(--accent); }
.signup-form input::placeholder { color: var(--text-subtle); }
.signup-form button {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  transition: background var(--dur-normal);
  white-space: nowrap;
}
.signup-form button:hover { background: var(--accent-hover); }
.signup-feedback {
  margin-top: 12px;
  font-size: var(--text-sm);
  font-weight: 300;
}
.signup-feedback.success { color: var(--success); }
.signup-feedback.error { color: var(--error); }
.signup-success-msg {
  display: none;
  color: var(--text-body);
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .signup-inner { grid-template-columns: 1fr; gap: var(--space-lg); }
  .signup-form { flex-direction: column; }
}

/* Main footer */
.site-footer {
  background: #F4F3F1;
  border-top: 1px solid var(--border-light);
  padding: var(--space-xl) var(--gutter) var(--space-lg);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-xl);
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}
.footer-logo-sub {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}
.footer-tagline {
  font-size: var(--text-sm);
  color: var(--text-subtle);
  line-height: 1.6;
  font-weight: 300;
}
.footer-heading {
  font-size: var(--text-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--dur-normal);
  font-weight: 300;
}
.footer-links a:hover { color: var(--accent); }
#footer-contact a {
  pointer-events: none;
  cursor: default;
}
#footer-contact a:hover { color: var(--text-muted); }

.footer-bottom {
  background: #EDECEA;
  border-top: 1px solid var(--border-light);
  padding: 20px var(--gutter);
}
.footer-bottom-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-subtle);
}
.social-links { display: flex; gap: 12px; }
.social-link {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
  transition: all var(--dur-normal);
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-lg); }
  .footer-bottom-inner { flex-direction: column; gap: 12px; text-align: center; }
}

/* ══════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--success);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 14px 28px;
  z-index: 9000;
  opacity: 0;
  transition: all 0.4s var(--ease-out);
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.error { background: var(--error); }

/* ══════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════ */
.pt-nav { padding-top: var(--nav-h); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
