/* ==========================================================================
   Jaybit (jayb.it) — Master Stylesheet
   Design System: Organic Tech Bento Workshop
   Palette: Cinnamon Glow (#cd7f32), Moss Green (#55785c), Jay Blue (#72a2ff)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Variables & Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand Color Palette */
  --color-bg-dark: #0b0f14;
  --color-card-bg: rgba(18, 24, 33, 0.72);
  --color-card-border: rgba(255, 255, 255, 0.08);

  /* Accents */
  --color-jay-blue: #72a2ff;
  --color-jay-blue-glow: rgba(114, 162, 255, 0.25);
  --color-cinnamon: #cd7f32;
  --color-cinnamon-glow: rgba(205, 127, 50, 0.35);
  --color-moss: #55785c;
  --color-amber: #e1af5f;

  /* Typography Colors */
  --color-text-main: #f0f4f8;
  --color-text-muted: #8a99ad;

  /* Status Colors */
  --color-success: #4ecdc4;
  --color-error: #ff6b6b;

  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-code: 'Fira Code', monospace;
}

/* --------------------------------------------------------------------------
   2. Reset & General Setup
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-dark);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Page Container */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.25rem 4rem 1.25rem;
}

.container {
  width: 100%;
  max-width: 1160px;
}

/* --------------------------------------------------------------------------
   3. Top Navigation Header
   -------------------------------------------------------------------------- */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0.75rem 1.25rem;
  background: rgba(11, 15, 20, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  position: sticky;
  top: 1rem;
  z-index: 1000;
}

/* Brand Logo Component */
.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--color-text-main);
  transition: transform 0.2s ease;
}

.brand-logo-link:hover {
  transform: translateY(-1px);
}

.brand-icon {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 10px rgba(114, 162, 255, 0.4));
}

.brand-text-box {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-tld {
  color: var(--color-jay-blue);
}

.brand-slogan {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--color-cinnamon);
  letter-spacing: 0.05em;
}

/* Header Right: Status & Language Switcher */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.workshop-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(114, 162, 255, 0.08);
  border: 1px solid rgba(114, 162, 255, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  font-size: 0.78rem;
  color: var(--color-jay-blue);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-jay-blue);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-jay-blue);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

/* Modern Language Dropdown Selector */
.lang-dropdown {
  position: relative;
  display: inline-block;
}

.lang-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-text-main);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.lang-menu-btn:hover,
.lang-menu-btn[aria-expanded="true"] {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.lang-menu-btn .lang-chevron {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.lang-menu-btn[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #0d121c;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  min-width: 170px;
  padding: 6px;
  z-index: 1000;
  display: none;
  backdrop-filter: blur(20px);
  animation: langFadeIn 0.15s ease-out;
}

.lang-dropdown.open .lang-dropdown-menu {
  display: block;
}

@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.lang-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-option:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
}

.lang-option.active {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  font-weight: 700;
}

.lang-check {
  font-size: 0.85rem;
  color: #38bdf8;
  opacity: 0;
}

.lang-option.active .lang-check {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   4. Construction Banner Card
   -------------------------------------------------------------------------- */
.construction-banner {
  margin-bottom: 2rem;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.16) 0%, rgba(18, 24, 33, 0.85) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(205, 127, 50, 0.4);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(205, 127, 50, 0.15);
  position: relative;
  overflow: hidden;
}

.construction-banner-content {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.banner-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(225, 175, 95, 0.6));
}

.banner-text-group {
  display: flex;
  flex-direction: column;
}

.banner-title {
  color: var(--color-amber);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.banner-subtitle {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

.banner-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(225, 175, 95, 0.12);
  border: 1px solid rgba(225, 175, 95, 0.3);
  color: var(--color-amber);
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.pulse-amber-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-amber);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-amber);
  animation: pulse-amber 1.8s infinite ease-in-out;
}

@keyframes pulse-amber {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

/* --------------------------------------------------------------------------
   5. Bento Grid Layout
   -------------------------------------------------------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

/* Bento Card Base */
.bento-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-card-border);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* Bento Hero (7 Cols) */
.bento-hero {
  grid-column: span 7;
  min-height: 380px;
  background: radial-gradient(circle at top left, rgba(114, 162, 255, 0.08) 0%, var(--color-card-bg) 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  background: rgba(205, 127, 50, 0.15);
  border: 1px solid rgba(205, 127, 50, 0.3);
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-cinnamon);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.text-gradient {
  display: block;
  background: linear-gradient(135deg, var(--color-jay-blue) 0%, var(--color-amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 90%;
  margin-bottom: 1.5rem;
}

/* Animated Building Matrix Widget in Hero */
.building-matrix-widget {
  background: rgba(11, 15, 20, 0.6);
  border: 1px solid rgba(114, 162, 255, 0.18);
  border-radius: 16px;
  padding: 0.85rem 1.1rem;
  margin-top: auto;
}

.matrix-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.matrix-label {
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-jay-blue);
  font-weight: 600;
}

.matrix-percent {
  font-family: var(--font-code);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-amber);
}

.matrix-bar-track {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.matrix-bar-fill {
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-moss) 0%, var(--color-jay-blue) 60%, var(--color-amber) 100%);
  border-radius: 10px;
  transition: width 0.8s ease;
}

.matrix-scan-line {
  position: absolute;
  top: 0;
  left: -50%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: matrix-scan 2.5s infinite linear;
}

@keyframes matrix-scan {
  0% { left: -50%; }
  100% { left: 150%; }
}

.matrix-step-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-family: var(--font-code);
}

/* Bento Terminal (5 Cols) */
.bento-terminal {
  grid-column: span 5;
  min-height: 380px;
  padding: 0;
  overflow: hidden;
  background: #0d121a;
  border-color: rgba(114, 162, 255, 0.15);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-tabs {
  display: flex;
  gap: 0.35rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-code);
  font-size: 0.76rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--color-text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: var(--color-jay-blue);
  background: rgba(114, 162, 255, 0.12);
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-code);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #c9d1d9;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: 100%;
}

.terminal-body::-webkit-scrollbar {
  display: none;
}

.terminal-body code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Syntax Highlighting */
.code-comment { color: #6e7681; font-style: italic; }
.code-keyword { color: #ff7b72; font-weight: 500; }
.code-type { color: #79c0ff; }
.code-function { color: #d2a8ff; }
.code-string { color: #a5d6ff; }
.code-number { color: #79c0ff; }

/* Bento Focus Cards (4 Cols each) */
.bento-focus {
  grid-column: span 4;
  min-height: 220px;
}

.focus-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.focus-num {
  font-family: var(--font-code);
  font-size: 0.88rem;
  color: var(--color-cinnamon);
  font-weight: 600;
}

.focus-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(114, 162, 255, 0.08);
  border: 1px solid rgba(114, 162, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-jay-blue);
}

.focus-item-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.focus-item-text {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Bento Subscription Card (12 Cols) */
.bento-subscribe {
  grid-column: span 12;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(85, 120, 92, 0.12) 0%, var(--color-card-bg) 100%);
  border-color: rgba(85, 120, 92, 0.25);
  padding: 2.25rem;
  flex-wrap: wrap;
}

.subscribe-text-group {
  flex: 1 1 320px;
}

.form-card-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.notify-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 540px;
}

.inputs-row {
  display: flex;
  gap: 0.65rem;
  flex: 1 1 360px;
}

.name-input, .email-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(11, 15, 20, 0.6);
  border: 1px solid var(--color-card-border);
  border-radius: 14px;
  color: var(--color-text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.name-input {
  flex: 0 0 150px;
}

.email-input {
  flex: 1 1 200px;
}

.name-input:focus, .email-input:focus {
  border-color: var(--color-jay-blue);
  box-shadow: 0 0 0 3px var(--color-jay-blue-glow);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg, var(--color-jay-blue) 0%, #4a82ef 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px var(--color-jay-blue-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(114, 162, 255, 0.4);
}

.btn-icon {
  transition: transform 0.2s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(3px);
}

/* Feedback Message */
.form-feedback {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.form-feedback.success { color: var(--color-success); }
.form-feedback.error { color: var(--color-error); }
.form-feedback.hidden { display: none; }

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */
.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.footer-main .copyright {
  margin: 0;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--color-jay-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.footer-bottom {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  text-align: center;
  width: 100%;
}

.ai-disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.65;
  margin: 0;
  line-height: 1.4;
}

/* Backward compatibility for legacy footer-content */
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   7. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .bento-hero { grid-column: span 12; }
  .bento-terminal { grid-column: span 12; }
  .bento-focus { grid-column: span 6; }
  .bento-subscribe { flex-direction: column; align-items: stretch; }
  .notify-form { flex-direction: column; align-items: stretch; max-width: 100%; }
  .inputs-row { flex-direction: column; width: 100%; }
  .name-input { flex: 1 1 100%; }
}

@media (max-width: 768px) {
  .footer-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
  }
  .footer-nav {
    justify-content: center;
    gap: 1rem;
  }
  .footer-bottom {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .bento-focus { grid-column: span 12; }
  .top-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .construction-banner { flex-direction: column; align-items: flex-start; }
  .notify-form { flex-direction: column; }
  .inputs-row { flex-direction: column; width: 100%; }
  .footer-content { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .footer-main { align-items: flex-start; text-align: left; }
  .footer-nav { justify-content: flex-start; gap: 0.75rem 1.25rem; }
  .footer-bottom { text-align: left; }
}
