/* ==========================================================================
   ABEND — playabend.com
   CRT terminal aesthetic, IBM 3270 + IBM Plex Sans
   ========================================================================== */

/* --- Font Faces --- */
@font-face {
  font-family: 'IBM 3270';
  src: url('../fonts/3270-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- Brand Tokens --- */
:root {
  --phosphor-green: #00FF41;
  --deep-void: #0D0D0D;
  --neon-cyan: #00E5FF;
  --amber-warning: #FFB000;
  --synthwave-magenta: #FF2D7B;
  --darpa-purple: #2D1B69;
  --crt-white: #E0E0E0;
  --redacted-red: #FF3333;
  --scan-line-gray: #1A1A2E;
  --abend-flash: #FF0040;
  --ghost-phosphor: rgba(0, 255, 65, 0.12);
  --ghost-abend: rgba(255, 0, 64, 0.12);
  --terminal-black: #0A0A0F;
  --console-gray: #12121C;
  --bezel-dark: #1C1C2E;
  --panel-indigo: #252540;

  --font-terminal: 'IBM 3270', 'Courier New', monospace;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-content: 720px;
  --gutter: 1.5rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--crt-white);
  background: var(--deep-void);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--phosphor-green); }

img { max-width: 100%; height: auto; display: block; }

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

/* --- Scanline Overlay --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* --- CRT Vignette --- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

/* --- Main Content Layer --- */
.content {
  position: relative;
  z-index: 2;
}

/* --- Section Shared --- */
.section {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 3rem var(--gutter);
}

.section--wide {
  max-width: 960px;
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--scan-line-gray);
  margin: 0 auto;
  max-width: var(--max-content);
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.hero__title {
  font-family: var(--font-terminal);
  font-size: clamp(3rem, 10vw, 6rem);
  letter-spacing: 0.15em;
  color: var(--abend-flash);
  text-shadow:
    0 0 10px var(--ghost-abend),
    0 0 40px rgba(255, 0, 64, 0.2),
    0 0 80px rgba(255, 0, 64, 0.1);
  margin-bottom: 1rem;
  animation: abend-pulse 4s ease-in-out infinite;
}

@keyframes abend-pulse {
  0%, 100% { text-shadow: 0 0 10px var(--ghost-abend), 0 0 40px rgba(255, 0, 64, 0.2); }
  50% { text-shadow: 0 0 15px rgba(255, 0, 64, 0.25), 0 0 60px rgba(255, 0, 64, 0.25); }
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 300;
  color: var(--crt-white);
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero__badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.app-store-badge {
  height: 48px;
  width: auto;
  transition: opacity 0.2s;
}
.app-store-badge:hover { opacity: 0.8; }

/* --- Trailer Embed --- */
.trailer {
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: var(--console-gray);
  border: 1px solid var(--scan-line-gray);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(224, 224, 224, 0.3);
  font-family: var(--font-terminal);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.trailer iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
}

/* --- About --- */
.about__heading {
  font-family: var(--font-terminal);
  font-size: 1.1rem;
  color: var(--phosphor-green);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.about__text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--crt-white);
  opacity: 0.9;
}

/* --- Screenshots --- */
.screenshots {
  text-align: center;
}

.screenshots__heading {
  font-family: var(--font-terminal);
  font-size: 1.1rem;
  color: var(--phosphor-green);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

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

.screenshot-frame {
  position: relative;
  width: 180px;
  border: 1px solid var(--scan-line-gray);
  border-radius: 6px;
  overflow: hidden;
  background: var(--console-gray);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.screenshot-frame img {
  width: 100%;
  display: block;
}

.screenshot-frame--placeholder {
  aspect-ratio: 9 / 19.5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(224, 224, 224, 0.2);
  font-family: var(--font-terminal);
  font-size: 0.75rem;
}

/* CRT curvature on screenshot frames */
.screenshot-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

/* --- Links Section (Press Kit, Privacy, Contact) --- */
.links {
  text-align: center;
}

.links__heading {
  font-family: var(--font-terminal);
  font-size: 1.1rem;
  color: var(--phosphor-green);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.links__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.links__list a {
  font-family: var(--font-terminal);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.links__list a:hover {
  border-bottom-color: var(--phosphor-green);
}

.links__email {
  font-family: var(--font-terminal);
  font-size: 0.95rem;
  color: var(--neon-cyan);
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.social-links a {
  font-family: var(--font-terminal);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: rgba(224, 224, 224, 0.5);
  transition: color 0.2s;
}

.social-links a:hover { color: var(--neon-cyan); }

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem var(--gutter);
  font-size: 0.8rem;
  color: rgba(224, 224, 224, 0.3);
  font-family: var(--font-terminal);
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Press Kit Page
   ========================================================================== */

.presskit-header {
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.presskit-header__title {
  font-family: var(--font-terminal);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--phosphor-green);
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px var(--ghost-phosphor);
}

.presskit-header__back {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-terminal);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.fact-sheet {
  background: var(--console-gray);
  border: 1px solid var(--scan-line-gray);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.fact-sheet h2 {
  font-family: var(--font-terminal);
  font-size: 1rem;
  color: var(--phosphor-green);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.fact-sheet dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
}

.fact-sheet dt {
  font-weight: 500;
  color: rgba(224, 224, 224, 0.6);
  font-size: 0.9rem;
}

.fact-sheet dd {
  font-size: 0.9rem;
}

.presskit-section {
  margin-bottom: 2.5rem;
}

.presskit-section h2 {
  font-family: var(--font-terminal);
  font-size: 1rem;
  color: var(--phosphor-green);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.presskit-section p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.presskit-section ul {
  list-style: none;
  padding: 0;
}

.presskit-section li {
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.6;
}

.presskit-section li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--phosphor-green);
  font-family: var(--font-terminal);
}

/* --- Assets Grid (Press Kit) --- */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.asset-card {
  background: var(--console-gray);
  border: 1px solid var(--scan-line-gray);
  border-radius: 4px;
  padding: 1rem;
  text-align: center;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(224, 224, 224, 0.3);
  font-family: var(--font-terminal);
  font-size: 0.75rem;
}

.asset-card img {
  max-width: 100%;
  max-height: 80%;
  object-fit: contain;
}

/* ==========================================================================
   Privacy Policy Page
   ========================================================================== */

.privacy-header {
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.privacy-header__title {
  font-family: var(--font-terminal);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--phosphor-green);
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px var(--ghost-phosphor);
}

.privacy-header__back {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-terminal);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.privacy-content h2 {
  font-family: var(--font-terminal);
  font-size: 1rem;
  color: var(--phosphor-green);
  letter-spacing: 0.08em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.privacy-content p {
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.privacy-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.privacy-content li {
  padding: 0.25rem 0 0.25rem 1.2rem;
  position: relative;
  line-height: 1.7;
  font-size: 0.95rem;
  opacity: 0.9;
}

.privacy-content li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--phosphor-green);
  font-family: var(--font-terminal);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  .hero { padding-top: 4rem; padding-bottom: 3rem; }
  .hero__title { letter-spacing: 0.1em; }
  .section { padding: 2rem var(--gutter); }

  .screenshot-frame { width: 140px; }

  /* Reduce scanlines on mobile for performance */
  body::before {
    background: repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 3px,
      rgba(0, 0, 0, 0.05) 3px,
      rgba(0, 0, 0, 0.05) 6px
    );
  }

  .fact-sheet dl {
    grid-template-columns: 1fr;
  }
  .fact-sheet dt {
    margin-top: 0.5rem;
    color: rgba(224, 224, 224, 0.4);
    font-size: 0.8rem;
  }
}

@media (min-width: 601px) and (max-width: 960px) {
  .screenshot-frame { width: 160px; }
}
