/* ==========================================================================
   Undead Tech, LLC — System-adaptive styles
   ========================================================================== */

:root {
  --bg: #14161c;
  --bg-alt: #1b1e26;
  --bg-deep: #0e1014;
  --paper: #eee7d8;
  --amber: #e8a33d;
  --verdigris: #6f9c8d;
  --rust: #8a4a3a;
  --muted: #9aa2ab;
  --alert: #ff3b30;
  --alert-bg: rgba(255, 59, 48, 0.08);
  --line: rgba(238, 231, 216, 0.16);

  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --max: 1180px;
}

/* Light mode overrides */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fdfbf7;
    --bg-alt: #f4f0e6;
    --bg-deep: #eae4d8;
    --paper: #14161c;
    --amber: #c26d00;
    --verdigris: #2a7a62;
    --rust: #8a4a3a;
    --muted: #5a626a;
    --alert: #d32f2f;
    --alert-bg: rgba(211, 47, 47, 0.08);
    --line: rgba(20, 22, 28, 0.18);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

@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;
  }
}

/* Typography & Utility */
.tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 18px;
}

.section-head h2 {
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}

.section-head .tag { white-space: nowrap; }
section { padding: 88px 0; }

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px dashed var(--line);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* Force minimum constraints on the logo image */
.brand .site-logo {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
  flex-shrink: 0;
}

.brand-name {
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
}

.brand-name em {
  font-style: normal;
  color: var(--amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--amber); border-color: var(--amber); }

.nav-phone {
  color: var(--paper) !important;
  border: 1px solid var(--line);
  padding: 8px 14px !important;
}
.nav-phone:hover { border-color: var(--amber); }

@media (max-width: 780px) {
  .nav-links:not(.nav-phone-wrap) { display: none; }
}

/* Hero */
.hero {
  padding: 72px 0;
  position: relative;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.hero-eyebrow .dot {
  width: 8px; height: 8px;
  background: var(--amber);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

h1.hero-title {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  text-transform: uppercase;
}

h1.hero-title .flicker {
  color: var(--amber);
  animation: flicker 5s linear infinite;
}

@keyframes flicker {
  0%, 89%, 92%, 100% { opacity: 1; }
  90% { opacity: 0.4; }
  91% { opacity: 0.85; }
}

.hero-sub {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 34px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 14px 22px;
  border: 1px solid var(--paper);
  display: inline-block;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #14161c;
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }

.btn-ghost {
  color: var(--paper);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--paper); }

/* Hero Graphic */
.hero-graphic {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 28px 22px;
}

.pulse-caption {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 14px;
}

.pulse-caption strong { color: var(--verdigris); }
.pulse-line { stroke: var(--amber); }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.placard {
  background: var(--bg);
  padding: 30px 24px 28px;
  position: relative;
  transition: background 0.2s ease;
}

.placard:hover { background: var(--bg-alt); }

.placard-tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.placard-tag .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--verdigris);
}

.placard-icon { width: 34px; height: 34px; color: var(--amber); }

.placard h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 11px;
  line-height: 1.2;
}

.placard p {
  color: var(--muted);
  margin: 0 0 15px;
  font-size: 14.5px;
}

.placard ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper);
}

.placard li {
  padding: 7px 0;
  border-top: 1px dashed var(--line);
}
.placard li:first-child { border-top: none; }

@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* About */
.about .wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: start;
}

.about-copy p { color: var(--muted); margin: 0 0 18px; font-size: 16.5px; }
.about-copy p:first-child {
  color: var(--paper);
  font-size: 19px;
  font-family: var(--serif);
}

.vitals {
  border: 1px solid var(--line);
  background: var(--bg-alt);
}

.vitals-head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 20px;
  border-bottom: 1px dashed var(--line);
}

.vitals dl {
  margin: 0;
  padding: 6px 20px 18px;
}

.vitals-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 13px;
}
.vitals-row:first-child { border-top: none; }

.vitals-row dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.vitals-row dd { margin: 0; color: var(--paper); text-align: right; }

/* Museum */
.museum {
  background: var(--bg-deep);
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.museum .section-head { border-bottom-color: var(--line); }

.exhibit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.exhibit {
  border: 1px solid var(--line);
  padding: 22px 20px;
  background: rgba(120, 120, 120, 0.04);
}

.exhibit .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--verdigris);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 12px;
}

.exhibit h4 {
  font-family: var(--serif);
  font-size: 17.5px;
  margin: 0 0 8px;
}

.exhibit p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

.museum-note {
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  border-left: 2px solid var(--amber);
  padding-left: 16px;
}

@media (max-width: 900px) {
  .exhibit-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .exhibit-grid { grid-template-columns: 1fr; }
}

/* Contact */
.ticket {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  display: grid;
  grid-template-columns: 1.3fr 1px 1fr;
}

.ticket-divider {
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0,
    var(--line) 6px,
    transparent 6px,
    transparent 14px
  );
}

.ticket-main, .ticket-side { padding: 40px 38px; }

.ticket-main h2 {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 24px;
  margin: 0 0 14px;
}

.ticket-main p {
  color: var(--muted);
  max-width: 44ch;
  margin: 0 0 26px;
}

.ticket-side .tag { display: block; margin-bottom: 16px; }

.contact-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-row svg { width: 18px; height: 18px; color: var(--verdigris); flex-shrink: 0; margin-top: 3px; }

.contact-row a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 15px;
}
.contact-row a:hover { color: var(--amber); }

.contact-row .label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.contact-row address, .contact-row .value {
  font-style: normal;
  font-family: var(--serif);
  font-size: 15px;
}

@media (max-width: 820px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-divider { display: none; }
  .ticket-side { border-top: 1px dashed var(--line); }
}

/* Footer & Easter Egg */
footer {
  border-top: 1px dashed var(--line);
  padding: 40px 0;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

footer .foot-links {
  display: flex;
  gap: 18px;
}
footer .foot-links a { text-decoration: none; color: var(--muted); }
footer .foot-links a:hover { color: var(--amber); }

/* The Secret Link styles */
.secret-shortcut {
  text-decoration: none;
  color: inherit;
  cursor: default;
}
.secret-shortcut:focus-visible {
  outline: none;
  color: var(--amber);
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .about .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
}

@media (max-width: 620px) {
  section { padding: 60px 0; }
  .wrap { padding: 0 20px; }
  .nav { padding: 14px 20px; }
  .section-head { flex-direction: column; gap: 8px; }
}

/* ==========================================================================
   Internal Index / Terminal Access (Sector 7G)
   ========================================================================== */

.terminal {
  max-width: 600px;
  width: 100%;
  margin: 60px auto;
  border: 1px solid var(--verdigris);
  padding: 40px;
  position: relative;
  font-family: var(--mono);
  background: var(--bg);
  box-sizing: border-box;
}

.terminal::before {
  content: "RESTRICTED ACCESS // SECTOR 7G";
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--bg);
  padding: 0 10px;
  color: var(--verdigris);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.terminal h1 {
  color: var(--amber);
  font-size: 24px;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--mono);
}

.terminal .log {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 20px;
}

.terminal ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.terminal li {
  margin-bottom: 15px;
}

.terminal a {
  color: var(--paper);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.terminal a::before {
  content: ">";
  color: var(--amber);
  margin-right: 12px;
  font-weight: bold;
}

.terminal a:hover, .terminal a:focus-visible {
  color: var(--amber);
  outline: none;
}

.blink {
  animation: blink-caret .75s step-end infinite;
}

@keyframes blink-caret {
  from, to { opacity: transparent; }
  50% { opacity: 1; }
}

/* Violation Warning Block */
.violation {
  margin-top: 40px;
  padding: 20px;
  border: 1px solid var(--alert);
  background: var(--alert-bg);
  color: var(--alert);
  font-size: 13px;
  font-family: var(--mono);
  animation: flash-border 1.5s infinite;
}

.violation-header {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  display: inline-block;
  animation: flash-text 1s step-end infinite;
}

.violation-details {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 5px;
  opacity: 0.9;
}

@keyframes flash-text {
  0%, 100% { color: var(--alert); background: transparent; }
  50% { color: var(--bg); background: var(--alert); }
}

@keyframes flash-border {
  0%, 100% { border-color: var(--alert); box-shadow: 0 0 0px var(--alert); }
  50% { border-color: transparent; box-shadow: 0 0 10px transparent; }
}
