* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.2), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(167, 139, 250, 0.2), transparent 40%),
    linear-gradient(180deg, #0b1220 0%, #111827 100%);
  background-size: 120% 120%;
  animation: bg-shift 14s ease-in-out infinite alternate;
  color: #e5e7eb;
}
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  backdrop-filter: blur(4px);
  background: transparent;
  border-bottom: none;
  z-index: 10;
}
nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #e5e7eb;
  transition: color 0.2s ease;
}
nav a:hover {
  color: #93c5fd;
}
.hero {
  padding: 5rem 0;
  position: relative;
}
.hero h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1rem auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
  pointer-events: none;
}
.section-intro {
  color: #9ca3af;
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #2563eb, #4f46e5);
  background-size: 200% 200%;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: btn-shimmer 4s linear infinite;
  font-size: 1rem;
  font-family: inherit;
}
.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.45);
}
.btn-disabled,
.btn-disabled:hover {
  background: #374151;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.card {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(75, 85, 99, 0.7);
  border-radius: 12px;
  padding: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: #60a5fa;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.45);
}
form {
  display: grid;
  gap: 0.75rem;
  max-width: 600px;
}
input, textarea {
  padding: 0.75rem;
  border: 1px solid #4b5563;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
}
footer {
  padding: 2rem 0;
  color: #9ca3af;
}
@media (max-width: 768px) {
  .cards { grid-template-columns: 1fr; }
  header { flex-direction: column; align-items: flex-start; }
  nav a { margin: 0 1rem 0 0; }
}
section {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
 
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
 
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
 
@keyframes bg-shift {
  from { background-position: 0% 0%; }
  to { background-position: 100% 100%; }
}
 
@keyframes btn-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
 
 
/* ============================================================
   📘 NOTE: DEMO MODAL STYLES — everything below is new.
   These styles control the popup that shows the demo sites.
   ============================================================ */
 
/* 📘 NOTE: position: fixed means this element is glued to the screen —
   it doesn't scroll with the page. inset: 0 is shorthand for
   top:0; right:0; bottom:0; left:0 — it covers the ENTIRE screen.
   
   opacity: 0 makes it invisible.
   pointer-events: none makes it "unclickable" so it doesn't block the page underneath.
   
   We use both together because display:none would skip the fade animation.
   With opacity + pointer-events, the element still exists but is invisible and harmless. */
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100; /* higher than header's z-index: 10, so it appears on top of everything */
  background: rgba(0, 0, 0, 0.85); /* semi-transparent black backdrop */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease; /* smooth fade in/out */
}
 
/* 📘 NOTE: When JavaScript adds the class "open" to the modal,
   these two lines kick in — opacity becomes 1 (fully visible)
   and pointer-events becomes auto (clickable again).
   This is a very common CSS pattern: toggle a class with JS,
   let CSS handle the visual change. */
.demo-modal.open {
  opacity: 1;
  pointer-events: auto;
}
 
/* 📘 NOTE: vw = "viewport width" and vh = "viewport height"
   92vw means "92% of the browser window's width"
   90vh means "90% of the browser window's height"
   This gives the modal box a little gap around the edges so
   the dark backdrop shows through on all sides. */
.demo-modal-inner {
  width: 92vw;
  height: 90vh;
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column; /* stacks the top bar and iframe vertically */
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
 
/* 📘 NOTE: This is the top bar inside the modal that shows
   the demo name and the Close button. flex-shrink: 0 prevents
   it from squishing when the iframe needs space. */
.demo-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: #1e2533;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
 
.demo-modal-title {
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.95rem;
}
 
.demo-modal-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: background 0.2s ease;
}
 
.demo-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}
 
/* 📘 NOTE: The <iframe> is the "magic" element — it's a browser window
   inside your browser window. Setting src="demos/fencing/" tells it
   to load that folder's index.html right here inside your page.
   
   flex: 1 means "take up all remaining height" after the top bar.
   border: none removes the default outline iframes have. */
#demoFrame {
  width: 100%;
  flex: 1;
  border: none;
  background: #fff;
}
/* 📘 NOTE: This targets only the 3rd card inside the demo list.
   grid-column: 1 / -1 makes it span across both columns.
   justify-self: center stops it from stretching full width.
   width: calc(50% - 0.5rem) matches the size of the cards above it. */
#demo-list article:nth-child(3) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 0.5rem);
}