/* ─────────────────────────────────────────
   1515 Tech — Shared Stylesheet
   Design: Deep felt-green / cream / gold
   Fonts: Playfair Display + DM Sans
───────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
  --felt:    #1a2e1a;
  --felt-mid:#243824;
  --felt-lt: #2f4a2f;
  --cream:   #f8f4ec;
  --cream-dk:#ede8dc;
  --gold:    #c9a84c;
  --gold-lt: #e8c97a;
  --red:     #b8392a;
  --ink:     #0e1a0e;
  --muted:   rgba(248,244,236,0.68);

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', sans-serif;

  --radius: 4px;
  --nav-h:  72px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--felt);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NOISE OVERLAY ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ─── NAVIGATION ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  background: rgba(26,46,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-logo .gold { color: var(--gold); }

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--gold);
  color: var(--ink) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--gold-lt) !important; color: var(--ink) !important; }

/* ─── MOBILE NAV TOGGLE ─── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 22px;
  padding: 0;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }

.nav-toggle.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ─── APP SUB-NAV (per-app pages) ─── */
.app-subnav {
  position: sticky;
  top: var(--nav-h);
  margin-top: var(--nav-h);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.85rem 3rem;
  background: rgba(14,26,14,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  font-size: 0.875rem;
}

.app-subnav .app-subnav-name {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin-right: 0.5rem;
}

.app-subnav a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.app-subnav a:hover,
.app-subnav a.active { color: var(--gold); }

/* ─── APP CARD GRID (homepage) ─── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 10px;
  padding: 2rem;
  text-decoration: none;
  color: var(--cream);
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.app-card:hover {
  border-color: rgba(201,168,76,0.4);
  background: rgba(255,255,255,0.07);
  transform: translateY(-4px);
}

.app-card-icon {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}

.app-card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.app-card .app-card-tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.app-card p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.app-card .app-card-link {
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.app-card.app-card-placeholder {
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  border-style: dashed;
}

/* ─── REDIRECT / MOVED PAGE ─── */
.redirect-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.redirect-page .redirect-inner { max-width: 420px; }

.redirect-page h1 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.redirect-page p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover { background: var(--gold-lt); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(248,244,236,0.3);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); }

/* ─── SECTION UTILITIES ─── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.section-tag::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-title em { font-style: italic; color: var(--gold); }

/* ─── DIVIDER ─── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.3), transparent);
  margin: 0;
}

/* ─── CARD ─── */
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 8px;
  padding: 2rem;
  transition: border-color 0.3s, background 0.3s;
}

.card:hover {
  border-color: rgba(201,168,76,0.4);
  background: rgba(255,255,255,0.07);
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(201,168,76,0.2);
  padding: 3rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
}

.footer-logo .gold { color: var(--gold); }

.footer-tagline {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ─── PLAYING CARD SUIT DECORATION ─── */
.suit-deco {
  font-size: 1rem;
  opacity: 0.15;
  user-select: none;
}

/* ─── PAGE WRAPPER ─── */
.page-wrap {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ─── PAGE HERO (inner pages) ─── */
.page-hero {
  padding: 5rem 3rem 4rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.page-hero .section-tag { justify-content: center; }

/* ─── PROSE (legal pages) ─── */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem;
}

.prose h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  margin: 2.5rem 0 0.75rem;
}

.prose h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  margin: 1.5rem 0 0.5rem;
}

.prose p {
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(248,244,236,0.8);
  margin-bottom: 1rem;
}

.prose ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose ul li {
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(248,244,236,0.8);
  margin-bottom: 0.4rem;
}

.prose a { color: var(--gold); }

.prose .last-updated {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2rem;
  display: block;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50%       { transform: translateY(-12px) rotate(2deg); }
}

.anim-fade-up  { opacity: 0; animation: fadeUp 0.7s ease forwards; }
.anim-delay-1  { animation-delay: 0.15s; }
.anim-delay-2  { animation-delay: 0.3s; }
.anim-delay-3  { animation-delay: 0.45s; }
.anim-delay-4  { animation-delay: 0.6s; }

/* ─── RESPONSIVE NAV ─── */
@media (max-width: 768px) {
  .site-nav { padding: 0 1.5rem; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(14,26,14,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201,168,76,0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 60vh; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-cta { display: inline-block; margin: 1rem 1.5rem; }
  .app-subnav { padding: 0.75rem 1.5rem; top: var(--nav-h); }
  .prose { padding: 2rem 1.5rem; }
  .site-footer { padding: 2rem 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
