:root {
  --black: #050806;
  --panel: #080d0a;
  --gold: #e9c77b;
  --gold-dim: #a88646;
  --green: #52ff75;
  --text: #f3e9d3;
  --muted: #c3b9a4;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0%, #20301b 0%, transparent 36%),
    repeating-linear-gradient(90deg, transparent 0 39px, #15231855 40px),
    var(--black);
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.8;
}

.site-shell {
  width: min(100%, 1100px);
  margin: auto;
  padding: 12px;
  border-inline: 1px solid #947237;
}

.topbar, footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  color: var(--green);
  border: 1px solid #398c49;
  background: #030705;
  font: 12px monospace;
  direction: ltr;
}

.top-status { color: var(--gold); }

.brand {
  text-align: center;
  padding: 26px 8px 22px;
}

.ankh {
  color: var(--gold);
  font-size: 42px;
  text-shadow: 0 0 16px #d2a34777;
}

h1 {
  margin: 0;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: clamp(25px, 6vw, 56px);
  letter-spacing: 2px;
  line-height: 1.3;
  text-shadow: 0 2px 10px #d4a44744;
}

.brand p { color: var(--muted); margin: 8px 0; }

.gold-line {
  height: 2px;
  max-width: 500px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.terminal {
  border: 2px solid var(--green);
  border-radius: 10px;
  background: #030604;
  overflow: hidden;
  box-shadow: 0 0 14px #32ff5c55, inset 0 0 28px #193d1b55;
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #0c1b0e;
  color: var(--green);
  padding: 10px 12px;
  border-bottom: 1px solid var(--green);
  font: 12px monospace;
  direction: ltr;
}

.terminal-controls { white-space: nowrap; }

.terminal-command {
  padding: 12px;
  color: var(--green);
  font: 12px monospace;
  overflow-wrap: anywhere;
}

.command-text { color: var(--gold); }

.cursor { animation: blink 1s steps(2) infinite; }

@keyframes blink { 50% { opacity: 0; } }

.hero, .vault, .visitors {
  text-align: center;
  padding: 24px 14px;
}

.section-kicker, .section-heading {
  color: var(--green);
  font: 12px monospace;
  letter-spacing: 1px;
  text-align: center;
}

h2 {
  color: var(--gold);
  font-size: clamp(21px, 4vw, 30px);
  line-height: 1.5;
}

.hero p, .vault p {
  max-width: 650px;
  margin: 14px auto;
}

img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--gold-dim);
  box-shadow: 0 0 12px #c29c4d33;
  border-radius: 4px;
}

.hero img {
  max-width: 780px;
  margin: 24px auto 0;
}

.section-heading {
  padding: 16px 8px;
  border-block: 1px solid #5a4728;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.story-card {
  min-width: 0;
  padding: 16px;
  background: linear-gradient(145deg, #12130e, #050806);
  border: 1px solid var(--gold-dim);
  box-shadow: inset 0 0 18px #9e7b2315;
  text-align: center;
}

.card-top {
  color: var(--green);
  font: 11px monospace;
  direction: ltr;
}

.story-card img {
  margin: 14px 0;
}

.story-card p { color: var(--muted); }

.story-card strong { color: var(--gold); }

.vault {
  margin: 14px;
  border: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, #15150e, #070a07);
}

.verse {
  color: var(--gold);
  font-size: 23px;
}

.motto {
  color: var(--green);
  font: 12px/2 monospace;
  margin: 22px auto;
}

.action-link {
  display: inline-block;
  padding: 10px 20px;
  color: var(--black);
  background: var(--gold);
  border: 1px solid #fff1b8;
  font-weight: bold;
  text-decoration: none;
}

.action-link:hover, .action-link:focus-visible {
  background: var(--green);
}

.visitors {
  border-top: 1px solid #5a4728;
  margin-top: 24px;
}

.visitors p { color: var(--gold); }

.visitors small { color: var(--muted); }

footer { margin-top: 14px; }

@media (max-width: 620px) {
  .story-grid { grid-template-columns: 1fr; padding: 10px; }
  .story-card { padding: 12px; }
  .hero, .vault, .visitors { padding: 20px 12px; }
  .vault { margin: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}

/* === ROBY FACTORY V2 — TERMUX ADVENTURE BACKGROUND === */

body {
  background: #020503;
  isolation: isolate;
}

/* Original Termux adventure artwork */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("./termux-adventure.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.30;
  filter: saturate(1.15) contrast(1.12);
  pointer-events: none;
  z-index: -1;
}

/* Keep the historical artwork visible around the terminal */
.site-shell {
  position: relative;
  z-index: 1;
  background: rgba(2, 5, 3, 0.38);
}

/* Premium black-gold title */
.brand {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0.25)
  );
  border-radius: 12px;
}

.brand h1 {
  color: #f2d58c;
  text-shadow:
    0 1px 0 #76551e,
    0 0 20px rgba(225, 181, 83, 0.28);
}

/* The terminal is the readable foreground */
.terminal {
  background: rgba(2, 7, 4, 0.94);
  box-shadow:
    0 0 12px rgba(82, 255, 117, 0.6),
    0 0 34px rgba(82, 255, 117, 0.16),
    inset 0 0 24px rgba(40, 100, 50, 0.16);
}

.story-card {
  background: rgba(5, 8, 6, 0.96);
}

.vault {
  background: rgba(9, 12, 8, 0.97);
}

@media (max-width: 620px) {
  body::before {
    background-position: center top;
    opacity: 0.22;
  }

  .site-shell {
    background: rgba(2, 5, 3, 0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    background-attachment: scroll;
  }
}

/* ==========================================
   ROBY FACTORY V3
   BLACK GOLD • TERMINAL GLASS EDITION
   ========================================== */

/* More visible background artwork */
body::before {
  opacity: 0.48;
  filter: saturate(1.22) contrast(1.10);
}

/* Let the circuitry show through */
.site-shell {
  background: rgba(2, 5, 3, 0.12);
}

/* Transparent terminal frame */
.terminal {
  background: rgba(2, 7, 4, 0.76);
  border-color: #55ff77;
  box-shadow:
    0 0 14px rgba(82, 255, 117, 0.65),
    0 0 38px rgba(82, 255, 117, 0.22),
    inset 0 0 24px rgba(40, 100, 50, 0.12);
}

/* Wider, more comfortable sections */
.hero {
  padding: 36px 24px 42px;
}

.hero p {
  max-width: 740px;
  font-size: 1.08rem;
}

.hero img {
  max-width: 900px;
  margin-top: 28px;
}

/* Larger cards with glass effect */
.story-grid {
  gap: 20px;
  padding: 24px;
}

.story-card {
  padding: 26px 22px;
  background: rgba(5, 10, 7, 0.74);
  border: 1px solid #bd9851;
  border-radius: 10px;
  box-shadow:
    inset 0 0 22px rgba(197, 151, 63, 0.08),
    0 0 12px rgba(0, 0, 0, 0.25);
}

.story-card img {
  margin: 20px 0;
}

.story-card p {
  font-size: 1.04rem;
  line-height: 2;
}

.story-card strong {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 14px;
  border: 1px solid rgba(233, 199, 123, 0.45);
  border-radius: 5px;
  background: rgba(28, 23, 10, 0.65);
}

/* Transparent gold vault */
.vault {
  margin: 20px 24px;
  padding: 38px 24px;
  background: rgba(9, 12, 8, 0.76);
  border-radius: 10px;
}

.vault .verse {
  font-size: 1.55rem;
}

/* Keep the terminal header readable */
.terminal-bar {
  background: rgba(7, 23, 10, 0.92);
}

.terminal-command {
  background: rgba(0, 0, 0, 0.42);
}

/* Give headings more presence */
.section-heading {
  font-size: 14px;
  padding: 20px 12px;
  text-shadow: 0 0 8px rgba(82, 255, 117, 0.4);
}

h2 {
  text-shadow: 0 0 12px rgba(233, 199, 123, 0.15);
}

/* Mobile layout */
@media (max-width: 620px) {
  body::before {
    opacity: 0.38;
  }

  .terminal {
    background: rgba(2, 7, 4, 0.80);
  }

  .hero {
    padding: 30px 16px 34px;
  }

  .story-grid {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 18px;
  }

  .story-card {
    padding: 22px 16px;
  }

  .vault {
    margin: 14px;
    padding: 30px 16px;
  }
}

/* ========================================
   ROBY FACTORY V4
   OBSIDIAN GOLD • ROYAL HEADER
   ======================================== */

/* Clear separation from background image */
header,
.site-header,
.hero-header {
  position: relative;
  isolation: isolate;
}

/* Royal hero panel */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 18px 14px 26px;
  padding: 48px 18px 44px !important;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(136, 102, 35, .22),
      transparent 65%
    ),
    linear-gradient(
      145deg,
      rgba(12, 15, 13, .98),
      rgba(1, 4, 3, .99) 65%,
      rgba(22, 18, 10, .98)
    ) !important;
  border: 1px solid #b8924d;
  border-radius: 12px;
  box-shadow:
    0 0 0 4px rgba(3, 8, 5, .90),
    0 0 0 5px rgba(204, 164, 82, .42),
    0 16px 38px rgba(0, 0, 0, .65),
    inset 0 0 35px rgba(184, 140, 48, .08);
}

/* Gold ornament */
.hero::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #f6d995,
    #94702e,
    #f6d995,
    transparent
  );
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 11px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #6b542c,
    #f0ce83,
    #6b542c,
    transparent
  );
  pointer-events: none;
}

/* The factory identity */
.hero h1 {
  position: relative;
  z-index: 1;
  color: #f5d891 !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 5.4vw, 3.3rem) !important;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-shadow:
    0 2px 0 #49300e,
    0 0 18px rgba(234, 186, 84, .30);
}

/* Keep the historical subtitle crisp */
.hero p,
.hero .subtitle,
.hero small {
  position: relative;
  z-index: 1;
  color: #e2d2b4;
  text-shadow: none;
}

/* Slightly smaller site typography */
body {
  font-size: 94%;
}

.story-card p,
.vault p {
  font-size: .94rem !important;
  line-height: 1.8;
}

.story-card h2,
.story-card h3 {
  font-size: 1.12rem;
}

.section-heading {
  font-size: 12px;
}

@media (max-width: 620px) {
  .hero {
    margin: 16px 12px 24px;
    padding: 42px 12px 38px !important;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 5.3vw, 2rem) !important;
  }
}

/* =========================================
   V5 — THE ROYAL EGYPTIAN FACTORY GATE
   Obsidian • Ancient Gold • Emerald
   ========================================= */

.brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 22px 12px 32px;
  padding: 38px 14px 32px;
  border: 3px double #d6b46c;
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 50% 12%,
      rgba(173,125,43,.23), transparent 62%),
    linear-gradient(135deg,
      #16150f 0%, #030504 38%,
      #10130e 70%, #050604 100%);
  box-shadow:
    0 0 0 4px #030604,
    0 0 0 5px #80612c,
    0 14px 34px rgba(0,0,0,.8),
    0 0 28px rgba(47,239,89,.18),
    inset 0 0 0 5px #080b08,
    inset 0 0 0 6px rgba(226,187,107,.4),
    inset 0 0 42px rgba(195,139,45,.12);
}

.brand::before {
  content: "𓂀  𓆣  ☀  𓆣  𓂀";
  display: block;
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  color: #e9c77e;
  font-size: clamp(18px, 5vw, 29px);
  letter-spacing: .18em;
  text-shadow: 0 0 14px rgba(240,187,72,.45);
}

.brand::after {
  content: "☥  ROYAL ENGINEERING • EST. 2003  ☥";
  display: block;
  position: relative;
  z-index: 1;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(222,183,99,.48);
  color: #c9ad70;
  font: 10px/1.6 monospace;
  letter-spacing: .07em;
}

.brand .ankh {
  font-size: 34px;
  color: #f2d18b;
  text-shadow: 0 0 20px rgba(242,194,88,.5);
}

.brand h1 {
  position: relative;
  z-index: 1;
  margin: 12px auto;
  color: #f7dc9d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 5.2vw, 51px);
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-shadow:
    0 2px 0 #765020,
    0 4px 12px rgba(0,0,0,.9),
    0 0 22px rgba(231,179,77,.35);
}

.brand p {
  position: relative;
  z-index: 1;
  color: #e4d2ad;
  font-size: clamp(12px, 3.1vw, 17px);
  line-height: 1.8;
  text-shadow: 0 2px 5px #000;
}

.brand .gold-line {
  max-width: 75%;
  background: linear-gradient(
    90deg, transparent, #987039,
    #f6d995, #987039, transparent);
  box-shadow: 0 0 10px rgba(227,181,83,.4);
}

@media (max-width: 620px) {
  .brand {
    margin: 16px 10px 25px;
    padding: 27px 12px 24px;
  }

  .brand::after {
    font-size: 9px;
    letter-spacing: 0;
  }
}
