/* ============================================================
   Jew Capital — Design System
   Palette: dark navy / white. Futuristic tech.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&family=DM+Serif+Display:ital@0;1&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Press+Start+2P&display=swap');

/* ---- Variables ---- */
:root {
  --bg:           #F8FAFF;
  --bg-card:      #FFFFFF;
  --bg-nav:       #060E1F;
  --bg-overlay:   rgba(0, 82, 224, 0.06);
  --border:       #DDE4F0;
  --accent:       #0052E0;
  --accent-dark:  #0038B8;
  --accent-light: #D6E4FF;
  --text:         #080F20;
  --text-muted:   #475569;
  --text-light:   #94A3B8;
  --white:        #FFFFFF;
  --shadow:       0 2px 16px rgba(6, 14, 31, 0.10);
  --shadow-hover: 0 6px 32px rgba(0, 56, 184, 0.18);
  --radius:       8px;
  --radius-lg:    14px;
  --nav-height:   88px;
  --font-body:    'Inter', sans-serif;
  --font-serif:   'DM Serif Display', serif;
  --font-pixel:   'Press Start 2P', monospace;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Password Gate ---- */
#gate-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.gate-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 360px;
  text-align: center;
  box-shadow: var(--shadow);
}
.gate-box input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  letter-spacing: 0.15em;
}
.gate-box input[type="password"]:focus { border-color: var(--accent); }
.gate-box input[type="password"].shake {
  animation: shake 0.35s ease;
  border-color: #c94a4a;
}
.gate-error {
  color: #c94a4a;
  font-size: 0.82rem;
  margin-top: 10px;
  min-height: 1.2em;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}
.gate-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ---- Navigation ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--bg-nav);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  padding: 0 48px;
  gap: 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: 54px;
  width: auto;
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.60);
  padding: 8px 16px;
  border-radius: 6px;
  transition: color 0.15s;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.nav-links a:hover {
  color: #FFFFFF;
  text-decoration: none;
}
.nav-links a.active {
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
}

/* ---- Page wrapper ---- */
.page-content { display: block; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(0, 82, 224, 0.35);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 20px rgba(0, 56, 184, 0.45);
}
.btn-outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-light);
}
.hero .btn-outline {
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.6);
}
.hero .btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: #FFFFFF;
}
.btn-full { width: 100%; text-align: center; }

/* ---- Section containers ---- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 32px;
}
.section-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 24px 40px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  background: var(--bg-nav);
}

/* ---- Modals ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 28, 0.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: #0A1628;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 90%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.50);
  transform: translateY(16px);
  transition: transform 0.2s;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-body { padding: 28px 32px; }
.modal-company-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}
.modal-founder {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.60);
  margin-bottom: 16px;
}
.modal-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(255,255,255,0.25); }
.modal-wrapper { position: relative; }
.rpg-modal-inner {
  max-width: 900px;
  width: 92%;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.rpg-modal-inner .modal-close {
  background: rgba(4, 12, 40, 0.60);
  color: #FAF7F2;
  top: 10px;
  right: 10px;
  z-index: 10;
}
.rpg-modal-inner .modal-close:hover {
  background: rgba(4, 12, 40, 0.85);
}

/* ---- Apply form ---- */
.apply-form-wrap {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}
.apply-form-wrap h2 { margin-bottom: 8px; }
.apply-form-wrap p { color: var(--text-muted); margin-bottom: 28px; font-size: 0.92rem; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--accent); }

/* ---- Inbox UI ---- */
.inbox-layout {
  display: grid;
  grid-template-columns: 180px 260px 1fr;
  height: 520px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0 auto;
}
.inbox-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inbox-sidebar-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.inbox-folder {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.83rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inbox-folder.active {
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
}
.inbox-folder-badge {
  background: var(--accent);
  color: var(--white);
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 1px 6px;
}
.inbox-message-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.inbox-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.inbox-item.selected {
  background: var(--accent-light);
}
.inbox-item-sender {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.inbox-item-subject {
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 2px;
}
.inbox-item-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.inbox-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.inbox-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 6px;
}
.inbox-read-pane {
  padding: 28px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.inbox-read-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.inbox-read-subject {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.inbox-read-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.inbox-read-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.75;
  flex: 1;
}
.inbox-actions {
  margin-top: 24px;
  display: flex;
  gap: 10px;
}

/* ---- RPG Game ---- */
.rpg-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(28, 19, 16, 0.16);
}
.rpg-bg {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.rpg-ui {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent 55%, rgba(4,12,40,0.85) 72%);
}
.rpg-speaker-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rpg-char-img {
  width: auto;
  height: 320px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.6));
}
.rpg-textbox {
  background: rgba(4, 12, 40, 0.92);
  border: 2px solid var(--accent-light);
  border-radius: 8px;
  padding: 14px 16px;
  color: #FAF7F2;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1.9;
  width: 100%;
  min-height: 72px;
  position: relative;
}
.rpg-speaker-name {
  font-family: var(--font-pixel);
  font-size: 0.52rem;
  color: var(--accent-light);
  margin-bottom: 5px;
  letter-spacing: 0.04em;
}
.rpg-next-btn {
  font-family: var(--font-pixel);
  font-size: 0.52rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 5px;
  padding: 7px 14px;
  cursor: pointer;
  margin-top: 8px;
  float: right;
  transition: background 0.15s;
}
.rpg-next-btn:hover { background: var(--accent-dark); }
.rpg-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.rpg-user-input {
  flex: 1;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  background: rgba(4,12,40,0.80);
  border: 1.5px solid var(--accent-light);
  border-radius: 5px;
  padding: 8px 12px;
  color: #FAF7F2;
  outline: none;
}
.rpg-send-btn {
  font-family: var(--font-pixel);
  font-size: 0.52rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.rpg-send-btn:hover { background: var(--accent-dark); }
.rpg-choice-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  justify-content: flex-end;
}
.rpg-choice-btn {
  font-family: var(--font-pixel);
  font-size: 0.52rem;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  border: 1.5px solid var(--accent-light);
  background: rgba(4,12,40,0.80);
  color: #FAF7F2;
  transition: background 0.15s, color 0.15s;
}
.rpg-choice-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* ---- End screens ---- */
.end-screen {
  text-align: center;
  padding: 60px 32px;
}
.end-screen h2 {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.end-screen.success h2 { color: var(--accent-dark); }
.end-screen.defeat h2 { color: #c94a4a; }
.end-screen p { color: var(--text-muted); margin-bottom: 28px; font-size: 0.92rem; }

/* ---- Team cards ---- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  text-align: center;
}
.team-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  margin: 0 auto 14px;
  box-shadow: var(--shadow);
}
.team-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.team-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- Company cards ---- */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  position: relative;
  z-index: 20;
}
.company-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(4, 10, 28, 0.28);
  transition: box-shadow 0.25s, transform 0.25s, opacity 0.25s;
  position: relative;
  background: #060E1F;
  aspect-ratio: 5/3;
}
.company-card:hover {
  z-index: 2;
}
.company-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.55;
}
.company-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(4, 10, 28, 0.30) 0%, rgba(0, 30, 90, 0.55) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 18px 20px;
}
.company-card-name {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 56, 184, 0.60);
}


/* ---- Landing hero ---- */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  text-align: center;
  position: relative;
  background: url('../img/landing_background.png') center center / cover no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 28, 0.68);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-slogan {
  font-family: 'Cormorant Garamond', serif;
  font-style: normal;
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  color: #FFFFFF;
  line-height: 1.18;
  max-width: 1200px;
  margin-bottom: 44px;
  letter-spacing: 0.01em;
}
.hero-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- About ---- */
.about-copy {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 720px;
  margin-bottom: 56px;
}
.about-copy strong { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .section { padding: 40px 20px; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .companies-grid { grid-template-columns: 1fr 1fr; }
  .rpg-char-img { width: auto; height: 200px; }
  .rpg-textbox { font-size: 0.52rem; }
  /* Inbox: collapse to read pane only */
  .inbox-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .inbox-sidebar { display: none; }
  .inbox-message-list { display: none; }
  .inbox-read-pane { padding: 24px 20px; min-height: 260px; }
  /* RPG: bigger touch targets */
  .rpg-next-btn,
  .rpg-send-btn,
  .rpg-choice-btn { min-height: 40px; padding: 10px 16px; font-size: 0.55rem; }
  .rpg-user-input { min-height: 40px; font-size: 0.55rem; }
}

@media (max-width: 480px) {
  :root { --nav-height: 60px; }
  /* Nav */
  nav { height: 60px; padding: 0 14px; }
  .nav-logo img { height: 38px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 6px 8px; font-size: 0.78rem; letter-spacing: 0; }
  /* Grids */
  .team-grid { grid-template-columns: 1fr; }
  .companies-grid { grid-template-columns: 1fr; }
  /* Section */
  .section { padding: 32px 14px; }
  /* Gate */
  .gate-box { width: 92%; padding: 32px 20px; }
  /* Apply form */
  .apply-form-wrap { padding: 28px 20px; }
  /* Modal */
  .modal-img { height: 180px; }
  /* End screen */
  .end-screen { padding: 40px 16px; }
  .end-screen h2 { font-size: 0.8rem; }
  /* RPG: full-width modal, tighter UI */
  .rpg-modal-inner { width: 100%; max-width: 100%; }
  .rpg-ui { padding: 10px; }
  .rpg-char-img { width: auto; height: 160px; }
  .rpg-textbox { font-size: 0.48rem; min-height: 56px; padding: 10px 12px; }
  .rpg-speaker-name { font-size: 0.44rem; }
  /* Footer */
  footer { padding: 20px 16px; }
}
