/* ===========================
   Threshold — Shared Styles
   =========================== */

/* Font Faces */
@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-BookItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-MediumItalic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-BlackItalic.otf') format('opentype');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: #111;
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  z-index: 10000;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Circular Std', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #333;
  background: #ffffff;
  line-height: 1.7;
}

/* ===========================
   Top Brand — Animated Logo
   =========================== */
.top-brand-area {
  display: block;
  padding: 40px 0 20px 40px;
}
.top-brand-area canvas {
  display: block;
  cursor: pointer;
}

/* Full-width divider below brand */
.top-divider {
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  z-index: 101;
  width: 100%;
}

/* ===========================
   Floating Left Navigation — hover reveal
   =========================== */
.side-nav-wrapper {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2000;
}

/* "Menu" tab visible when nav is hidden */
.side-nav-tab {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #111;
  color: #fff;
  font-family: 'Circular Std', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 10px 8px;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  border-radius: 0 4px 4px 0;
  transition: opacity 0.3s ease;
}

.side-nav-wrapper:hover .side-nav-tab {
  opacity: 0;
  pointer-events: none;
}

/* Nav panel slides in on hover */
.side-nav {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateX(-100%) translateY(-50%);
  background: #fff;
  padding: 24px 24px 24px 28px;
  border-right: 1px solid #e0e0e0;
  border-left: 2px solid #111;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.side-nav-wrapper:hover .side-nav {
  transform: translateX(0) translateY(-50%);
  opacity: 1;
}

.side-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  line-height: 1.5;
  white-space: nowrap;
  position: relative;
  padding-left: 0;
  letter-spacing: 0.01em;
}

.side-nav-links a::before {
  content: '\2192';
  position: absolute;
  left: -20px;
  opacity: 0;
  transition: all 0.3s ease;
  transform: translateX(-4px);
}

.side-nav-links a:hover {
  padding-left: 20px;
}

.side-nav-links a:hover::before {
  opacity: 1;
  left: 0;
  transform: translateX(0);
}

.side-nav-links a.active {
  font-weight: 700;
  text-decoration: none;
}


/* ===========================
   Mobile Navigation
   =========================== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 200;
}

.mobile-nav-brand {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #111;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 20px 24px;
  z-index: 199;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 15px;
  color: #111;
  text-decoration: none;
}

/* ===========================
   Site Footer — single centered line
   =========================== */
.site-footer {
  position: relative;
  padding: 20px 40px 16px;
  margin-left: 0;
  text-align: center;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.footer-subscribe-label {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.footer-subscribe {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}

.footer-subscribe input[type="email"] {
  padding: 7px 12px;
  font-family: 'Circular Std', sans-serif;
  font-size: 12px;
  border: 1px solid #ccc;
  background: #fff;
  color: #111;
  border-radius: 3px;
  width: 200px;
  outline: none;
  transition: border-color 0.2s ease;
}

.footer-subscribe input[type="email"]::placeholder {
  color: #999;
}

.footer-subscribe input[type="email"]:focus {
  border-color: #111;
  box-shadow: 0 0 0 2px rgba(17,17,17,0.2);
}

.footer-subscribe button {
  padding: 7px 16px;
  font-family: 'Circular Std', sans-serif;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.footer-subscribe button:hover {
  background: #333;
  border-color: #333;
}

.footer-msg {
  display: none;
  font-size: 11px;
  color: #111;
  margin-bottom: 8px;
}

.footer-legal {
  font-size: 11px;
  color: #767676;
}

.site-footer a {
  color: #767676;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #111;
}

/* ===========================
   Cookie Consent Banner
   =========================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: #ccc;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
  font-size: 13px;
  border-top: 1px solid #333;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner p {
  margin: 0;
  line-height: 1.5;
}

.cookie-banner a {
  color: #fff;
  text-decoration: underline;
}

.cookie-banner-btn {
  padding: 8px 20px;
  background: #fff;
  color: #111;
  border: none;
  border-radius: 4px;
  font-family: 'Circular Std', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 24px;
  transition: opacity 0.2s ease;
}

.cookie-banner-btn:hover {
  opacity: 0.85;
}

/* ===========================
   Accessibility — Focus States
   =========================== */
.side-nav-links a:focus-visible,
.mobile-menu a:focus-visible,
.mobile-nav-brand:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-subscribe button:focus-visible,
.cookie-banner-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.hamburger:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.skip-link:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===========================
   Accessibility — Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================
   Responsive — Shared
   =========================== */
@media (max-width: 900px) {
  .side-nav-wrapper {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .top-brand-area {
    padding: 20px 0 10px 24px;
  }

  .site-footer {
    margin-left: 0;
    padding: 12px 24px;
  }

  .site-footer::before {
    left: 0;
  }

  .cookie-banner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 16px 24px;
  }

  .cookie-banner-btn {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 12px 16px;
  }
}
