/*
  Copyright (c) 2026 tusar404
  Licensed under the MIT License.
  This file is part of Team Arc

  DESIGN SYSTEM — "Incident Report"
  ----------------------------------
  This isn't a fantasy-poster site. The real material of this product is a
  Telegram DM at 1am: a night-action prompt, a locked-in confirmation, a
  morning casualty report. So the visual language borrows from a case file /
  night-desk log rather than parchment-and-crest fantasy branding — dossier
  tabs, stamped tags, typewriter numerals, redaction bars.

  Color
    --ink        #14121c  base background, near-black plum, not pure black
    --ink-2      #1b1826  raised panel surface
    --ink-3      #242032  card / input surface
    --parchment  #ece4d3  paper surface (used sparingly, for "document" cards)
    --brass      #b8863b  primary accent — lantern brass, CTAs, active states
    --warding    #4f8296  cool teal-blue — Order / protective / info
    --curse      #93394a  deep wine-red — Death Eaters / danger / night
    --text       #ece6da  primary text on dark
    --text-dim   #a79c8c  secondary text on dark
    --text-ink   #2b2418  text on parchment

  Type
    display: 'Fraunces' — high-contrast serif with ink-trap character, used
             large and sparingly for headlines and dossier titles
    body:    'Inter' — humanist sans, the workhorse
    mono:    'IBM Plex Mono' — case numbers, commands, stamps, timestamps
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #14121c;
  --ink-2: #1b1826;
  --ink-3: #242032;
  --parchment: #ece4d3;
  --parchment-dim: #dcd0b8;
  --brass: #b8863b;
  --brass-bright: #d9a94f;
  --warding: #4f8296;
  --warding-bright: #6fa8bc;
  --curse: #93394a;
  --curse-bright: #b8495e;
  --text: #ece6da;
  --text-dim: #a79c8c;
  --text-faint: #6f6658;
  --text-ink: #2b2418;
  --line: rgba(236, 230, 218, 0.1);
  --line-bright: rgba(236, 230, 218, 0.22);
  --radius: 3px;
  --shadow-lift: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(184, 134, 59, 0.07), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(79, 130, 150, 0.06), transparent 55%),
    var(--ink);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; margin: 0; color: var(--text); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brass); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

/* ---------------------------------------------------------------------- */
/* Nav                                                                     */
/* ---------------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 18, 28, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand .mark {
  width: 28px;
  height: 28px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--brass-bright);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  font-size: 14.5px;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--ink-3); }
.nav-links a.active { color: var(--brass-bright); }
.nav-cta {
  border: 1px solid var(--brass);
  color: var(--brass-bright) !important;
}
.nav-cta:hover { background: var(--brass); color: var(--ink) !important; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-bright);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: var(--radius);
  font-size: 16px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--ink-2);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-toggle { display: block; }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-brass { background: var(--brass); color: #1a1408; }
.btn-brass:hover { background: var(--brass-bright); }
.btn-outline { border-color: var(--line-bright); color: var(--text); }
.btn-outline:hover { border-color: var(--brass); color: var(--brass-bright); }

/* ---------------------------------------------------------------------- */
/* Section scaffolding                                                     */
/* ---------------------------------------------------------------------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); margin-top: 14px; line-height: 1.15; }
.section-head p { color: var(--text-dim); margin-top: 16px; font-size: 16.5px; }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }

/* ---------------------------------------------------------------------- */
/* Dossier card — the recurring "document" motif                          */
/* ---------------------------------------------------------------------- */
.dossier {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.dossier:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.dossier::before {
  content: '';
  position: absolute;
  top: 0; left: 22px;
  width: 46px; height: 4px;
  background: var(--tab-color, var(--brass));
  border-radius: 0 0 3px 3px;
}
.dossier .tag, .flip-front .tag, .flip-back .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tab-color, var(--brass-bright));
  margin-bottom: 12px;
  display: inline-block;
}
.dossier h3 { font-size: 19px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.dossier p { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }

.team-order    { --tab-color: var(--warding-bright); }
.team-de       { --tab-color: var(--curse-bright); }
.team-neutral  { --tab-color: var(--brass-bright); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
  margin-top: 60px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; color: var(--text-dim); }
.footer-links a:hover { color: var(--brass-bright); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  text-align: center;
}
.footer-note { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text-faint); }
.footer-note a { color: var(--text-dim); }
.footer-note a:hover { color: var(--brass-bright); }

/* ---------------------------------------------------------------------- */
/* Utility                                                                 */
/* ---------------------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.mono { font-family: 'IBM Plex Mono', monospace; }

/* ---------------------------------------------------------------------- */
/* Flip card — role reference on roles.html                               */
/* ---------------------------------------------------------------------- */
.flip-card {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  perspective: 1400px;
  display: block;
  width: 100%;
  height: 380px;
  font: inherit;
  color: inherit;
  text-align: left;
}
@media (max-width: 860px) {
  .flip-card { height: 340px; }
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}
.flip-card[aria-pressed="true"] .flip-card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.flip-front::before {
  content: '';
  position: absolute;
  top: 0; left: 22px;
  width: 46px; height: 4px;
  background: var(--tab-color, var(--brass));
  border-radius: 0 0 3px 3px;
}
.flip-front .tag { color: var(--tab-color, var(--brass-bright)); }
.flip-card:hover .flip-face { border-color: var(--line-bright); }
.flip-back {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  background: var(--ink-3);
  border-color: var(--tab-color, var(--brass));
  padding: 22px 22px 18px;
  overflow-y: auto;
}
.flip-back::-webkit-scrollbar { width: 5px; }
.flip-back::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 3px; }
.flip-front h3 { font-size: 20px; margin-bottom: 8px; }
.flip-front .teaser { color: var(--text-dim); font-size: 14px; margin-top: auto; }
.flip-hint {
  margin-top: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.flip-back h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tab-color, var(--brass-bright));
  margin-bottom: 6px;
}
.flip-back p { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; }
.flip-back .ability { margin-bottom: 12px; }
.flip-back .tip { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.flip-back .tip p { color: var(--text); font-style: italic; }

.page-hero {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(32px, 5vw, 46px); margin-top: 14px; line-height: 1.1; }
.page-hero p { color: var(--text-dim); font-size: 17px; margin-top: 16px; max-width: 620px; }

/* ---------------------------------------------------------------------- */
/* Hero — live incident-log transcript, styled as a phone/DM screen       */
/* ---------------------------------------------------------------------- */
.hero {
  padding: 76px 0 40px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
}
.hero h1 {
  font-size: clamp(36px, 5.2vw, 56px);
  line-height: 1.06;
  margin-top: 18px;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--brass-bright);
}
.hero .lede {
  color: var(--text-dim);
  font-size: 18px;
  margin-top: 20px;
  max-width: 480px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.phone {
  background: var(--ink-2);
  border: 1px solid var(--line-bright);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-lift);
  position: relative;
}
.phone::before {
  content: 'NIGHT LOG — NO. 004';
  position: absolute;
  top: -11px; left: 20px;
  background: var(--brass);
  color: #1a1408;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 2px;
}
.phone-screen {
  background: var(--ink);
  border-radius: 12px;
  padding: 18px 14px;
  height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phone-screen::-webkit-scrollbar { width: 0; }

.t-bubble {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}
.t-bot {
  align-self: flex-start;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.t-user {
  align-self: flex-end;
  background: var(--brass);
  color: #1a1408;
  font-weight: 600;
  border-bottom-right-radius: 3px;
}
.t-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.t-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--text-dim);
}
