/* ==========================================================================
   Cirk-IT — Design tokens
   ========================================================================== */
:root {
  /* Color */
  --bg:            #0a0e0e;
  --bg-panel:      #101615;
  --bg-panel-2:    #141b1a;
  --border:        #1e2928;
  --border-bright: #2a3a38;

  --teal:          #18b3b5;
  --teal-bright:   #4fd9d6;
  --teal-dim:      #0e6c6d;
  --teal-wash:     rgba(24, 179, 181, 0.09);

  --text:          #e7edec;
  --text-muted:    #8fa3a1;
  --text-faint:    #5a6c6a;

  --amber:         #e0a458;
  --red:           #e0685c;
  --green:         #5fd68a;

  /* Type */
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-w: 1120px;
  --radius: 3px;
  --nav-h: 72px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle grid texture on the base layer */
body {
  background-image:
    linear-gradient(rgba(24,179,181,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,179,181,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: center top;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; color: var(--text-muted); }
strong { color: var(--text); }

::selection { background: var(--teal-dim); color: #fff; }

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

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--teal);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-bright);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--teal);
  color: #05100f;
  border-color: var(--teal);
  font-weight: 600;
}
.btn-primary:hover { background: var(--teal-bright); border-color: var(--teal-bright); }
.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-bright); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ==========================================================================
   Nav
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 14, 14, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }
.brand-text {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
.nav-links a:not(.btn) {
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}
.nav-links a:not(.btn):hover, .nav-links a.active:not(.btn) { color: var(--teal-bright); }
.nav-links a.active:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--teal);
}
.nav-links .btn { padding: 9px 16px; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  width: 40px; height: 40px;
  font-family: var(--font-mono);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Terminal window component
   ========================================================================== */
.term {
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--bg-panel-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.term-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.term-bar .dot:nth-child(1) { background: #e0685c; }
.term-bar .dot:nth-child(2) { background: #e0a458; }
.term-bar .dot:nth-child(3) { background: #5fd68a; }
.term-bar .title { margin-left: 8px; }
.term-bar .status { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.term-bar .status .led { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }

.term-body {
  padding: 24px 26px 28px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.term-line { margin: 0 0 10px; color: var(--text-muted); }
.term-line.lead { color: var(--text); font-weight: 500; }
.term-line .prompt { color: var(--teal); margin-right: 8px; }
.term-line.out { color: var(--text-muted); padding-left: 0; }
.cursor {
  display: inline-block;
  width: 8px; height: 1.1em;
  background: var(--teal-bright);
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Sections
   ========================================================================== */
section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { margin-bottom: 0; }
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 72px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: 1.08rem; max-width: 46ch; }
.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto 8px; }
}

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

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--border-bright); }
.card .status-row {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-faint);
  margin-top: 16px;
}
.card .status-row .led { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card h3 .idx { color: var(--teal); font-size: 0.85rem; }
.card p:last-child { margin-bottom: 0; }

.log-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.log-label .prompt { color: var(--teal); }

/* ==========================================================================
   Stats / value strip
   ========================================================================== */
.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 30px 0;
}
.strip .grid-3 { gap: 0; }
.strip .stat { text-align: left; padding: 0 24px; border-left: 1px solid var(--border); }
.strip .stat:first-child { border-left: none; padding-left: 0; }
.strip .stat b { display: block; font-family: var(--font-mono); font-size: 1.6rem; color: var(--teal-bright); }
.strip .stat span { color: var(--text-muted); font-size: 0.9rem; }
@media (max-width: 860px) {
  .strip .stat { border-left: none; border-top: 1px solid var(--border); padding: 18px 0 0; margin-top: 18px; }
  .strip .stat:first-child { border-top: none; margin-top: 0; padding-top: 0; }
}

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--teal-wash), transparent 60%), var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-banner h2 { margin-bottom: 6px; }
.cta-banner p { margin-bottom: 0; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  padding: 13px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-wash);
  outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

.alert {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid;
}
.alert-success { color: var(--green); border-color: var(--green); background: rgba(95,214,138,0.08); }
.alert-error   { color: var(--red);   border-color: var(--red);   background: rgba(224,104,92,0.08); }

/* ==========================================================================
   Contact / info panels
   ========================================================================== */
.info-row {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-row .k { font-family: var(--font-mono); color: var(--text-faint); width: 84px; flex-shrink: 0; font-size: 0.85rem; padding-top: 2px; }
.info-row .v { color: var(--text); }
.info-row .v a:hover { color: var(--teal-bright); }

.map-embed {
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
  filter: grayscale(0.4) invert(0.92) contrast(0.9);
}
.map-embed iframe { display: block; width: 100%; height: 260px; border: 0; }

/* ==========================================================================
   Directory listing (about — values)
   ========================================================================== */
.dirlist {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.dirlist .dl-head { color: var(--text-faint); margin-bottom: 14px; }
.dirlist .dl-row { display: flex; gap: 16px; padding: 7px 0; color: var(--text-muted); }
.dirlist .dl-row .perm { color: var(--teal-bright); flex-shrink: 0; font-weight: 600; }
.dirlist .dl-row .name { color: var(--text); }
.dirlist .dl-row .desc { color: var(--text-muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 34px;
  margin-top: 40px;
}
.footer-top {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px;
  margin-bottom: 28px;
}
.footer-links { display: flex; gap: 24px; font-family: var(--font-mono); font-size: 0.85rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--teal-bright); }
.footer-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}
.footer-prompt .prompt { color: var(--teal-dim); }

/* ==========================================================================
   Page hero (inner pages)
   ========================================================================== */
.page-head { padding: 56px 0 20px; }
.page-head h1 { margin-bottom: 12px; }
.page-head p { max-width: 60ch; }

/* Support widget panel */
.widget-panel {
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius);
  padding: 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}
