/* Hull Breach — cinematic maritime theme */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
  --navy-deep: #0a1628;
  --navy: #0f2340;
  --ocean: #1a4a6e;
  --ocean-light: #2d6a8f;
  --foam: #c8dce8;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --text: #e8eef4;
  --text-muted: #8fa8bc;
  --glass: rgba(10, 22, 40, 0.75);
  --glass-border: rgba(201, 162, 39, 0.25);
  --danger: #c44;
  --success: #3a8;
  --radius: 4px;
  --nav-height: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-weight: 300;
  background: var(--navy-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, .brand, .section-title {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.04em;
}

a { color: var(--gold-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--foam); }

img, video { max-width: 100%; display: block; }

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: linear-gradient(180deg, rgba(10,22,40,0.95) 0%, rgba(10,22,40,0.6) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--glass-border);
}

.brand {
  font-size: 1.35rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand span { color: var(--foam); font-weight: 400; }

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
}

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

.nav-auth {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-chip {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.user-chip.visible { display: flex; }

.user-chip img {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gold);
}

.credits-badge {
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-light);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.25s;
}

.btn:hover {
  background: var(--gold);
  color: var(--navy-deep);
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}

.btn-primary:hover {
  background: var(--gold-light);
}

.btn-ghost {
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Hero ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10,22,40,0.3) 0%,
    rgba(10,22,40,0.5) 40%,
    rgba(10,22,40,0.85) 80%,
    var(--navy-deep) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--foam);
  line-height: 1.05;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

.hero-subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── Sections ── */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-dark {
  background: var(--navy);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--foam);
  margin-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin-top: 0.75rem;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* ── Trailer placeholder ── */
.trailer-block {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.trailer-icon {
  width: 80px; height: 80px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold);
}

.trailer-label {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  color: var(--foam);
}

.trailer-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.3s;
}

.feature-card:hover { border-color: var(--gold); }

.feature-card h3 {
  color: var(--gold-light);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ── Page header (inner pages) ── */
.page-header {
  padding: calc(var(--nav-height) + 4rem) 2rem 3rem;
  text-align: center;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-bottom: 1px solid var(--glass-border);
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--foam);
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ── About page ── */
.about-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .about-media { grid-template-columns: 1fr; }
}

.media-placeholder {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--navy) 0%, var(--ocean) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.about-submenu {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.about-submenu a {
  padding: 0.4rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-submenu a:hover,
.about-submenu a.active {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ── Developer page ── */
.dev-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
}

.dev-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ── Downloads page ── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* ── Store ── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.store-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.store-item:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.store-item-image {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--ocean) 0%, var(--navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.5;
}

.store-item-body { padding: 1.25rem; }

.store-item-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.store-item-name {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--foam);
  margin-bottom: 0.5rem;
}

.store-item-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.store-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.store-price {
  font-weight: 600;
  color: var(--gold-light);
  font-size: 1.1rem;
}

.owned-badge {
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Credits page ── */
.credits-panel {
  max-width: 560px;
  margin: 0 auto;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}

.credits-balance {
  font-family: 'Cinzel', serif;
  font-size: 3.5rem;
  color: var(--gold-light);
  margin: 1rem 0;
}

.credits-panel p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Login page ── */
.login-panel {
  max-width: 420px;
  margin: 0 auto;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}

.login-panel h2 {
  font-family: 'Cinzel', serif;
  color: var(--foam);
  margin-bottom: 0.5rem;
}

.login-panel p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 2rem;
  background: #fff;
  color: #333;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s;
  width: 100%;
  justify-content: center;
}

.google-btn:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

.google-btn svg { width: 20px; height: 20px; }

/* ── Login form ── */
.login-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
}

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(204,68,68,0.15);
  border: 1px solid var(--danger);
  color: #f88;
}

.alert-info {
  background: rgba(45,106,143,0.2);
  border: 1px solid var(--ocean-light);
  color: var(--foam);
}

/* ── Footer ── */
.site-footer {
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer .brand { font-size: 1rem; margin-bottom: 0.5rem; display: block; }

/* ── Auth gate ── */
.auth-gate {
  text-align: center;
  padding: 4rem 2rem;
}

.auth-gate p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Responsive nav ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .site-nav { padding: 0 1rem; }
  .section { padding: 3rem 1rem; }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--navy);
  border: 1px solid var(--gold);
  color: var(--foam);
  border-radius: var(--radius);
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show { transform: translateY(0); opacity: 1; }