/* === CRONONCE STYLESHEET === */
:root {
  --bg:        #0a0b0f;
  --bg2:       #111319;
  --bg3:       #181c26;
  --border:    #1e2435;
  --border2:   #252d40;
  --accent:    #00e5a0;
  --accent2:   #00b87a;
  --accent-dim:#00e5a018;
  --text:      #e4e8f0;
  --text-muted:#6b7590;
  --text-dim:  #3a4160;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Space Grotesk', sans-serif;
  --radius:    10px;
  --radius-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

/* NOISE OVERLAY */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 400;
  border-bottom: 1px solid var(--border);
  background: rgba(10,11,15,.95);
  backdrop-filter: blur(14px);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.version-badge {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--text-dim);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: .2rem .55rem;
  border-radius: 100px;
}

/* MAIN */
.main-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  position: relative;
  z-index: 1;
}

/* HERO TEXT */
.hero-text {
  margin-bottom: 3rem;
}
.hero-text h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--text);
}
.hero-text h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  margin-top: 1rem;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  font-family: var(--mono);
  font-weight: 300;
}

/* BUILDER CARD */
.builder-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 0 60px rgba(0,229,160,.04);
}

/* TABS */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--sans);
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .03em;
  padding: .9rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* TAB PANES */
.tab-pane { display: none; padding: 1.75rem; }
.tab-pane.active { display: block; }

/* VISUAL GRID */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.field-group { display: flex; flex-direction: column; gap: .5rem; }
.field-group.full-width { grid-column: 1 / -1; }

label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hint {
  font-weight: 400;
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: .7rem;
  letter-spacing: 0;
}

select, input[type="text"] {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: .875rem;
  padding: .65rem .9rem;
  width: 100%;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7590' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.2rem;
}
select:focus, input[type="text"]:focus, input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Fix browser autofill white background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 9999px var(--bg3) inset !important;
  box-shadow: 0 0 0 9999px var(--bg3) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  border-color: var(--border2) !important;
  transition: background-color 9999s ease-in-out 0s;
}
.custom-input.hidden { display: none; }
.custom-input { margin-top: .25rem; }

/* TEXT INPUT TAB */
.text-input-wrap { display: flex; flex-direction: column; gap: .75rem; }
.mono-input { font-size: 1rem; letter-spacing: .04em; }
.field-hint { font-family: var(--mono); font-size: .75rem; color: var(--text-dim); }
.parse-result {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--accent);
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

/* PRESETS */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}
.preset-btn {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  padding: .75rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, color .2s, background .2s;
}
.preset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* OUTPUT */
.output-section {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.75rem;
  background: var(--bg);
}
.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.output-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 700;
  font-size: .8rem;
  padding: .45rem .9rem;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { background: var(--accent2); }
.copy-btn:active { transform: scale(.97); }
.output-box {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: .04em;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}
.cmd-placeholder { color: var(--text-dim); }
.output-description {
  margin-top: .6rem;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-muted);
}

/* REFERENCE */
.ref-section { margin-top: 1rem; }
.ref-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.ref-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: .825rem;
}
.ref-table thead tr {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.ref-table th {
  padding: .7rem 1rem;
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ref-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.ref-table tr:last-child td { border-bottom: none; }
.ref-table code {
  color: var(--accent);
  background: var(--accent-dim);
  padding: .1rem .35rem;
  border-radius: 4px;
  font-size: .8rem;
}
.specials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}
.special-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.special-item code {
  font-family: var(--mono);
  color: var(--accent);
  font-size: .85rem;
}
.special-item span {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--text-muted);
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo-sm {
  font-family: var(--sans);
  font-weight: 800;
  font-size: .9rem;
  color: var(--accent);
}
.footer-copy {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--text-dim);
}
.footer-nav {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
}
.footer-nav a {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.footer-nav a:hover { color: var(--accent); }

/* TOAST */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--accent);
  color: #000;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .875rem;
  padding: .65rem 1.4rem;
  border-radius: 100px;
  z-index: 999;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* STATIC PAGES */
.page-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  position: relative;
  z-index: 1;
}
.page-inner h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.04em;
  margin-bottom: 2.5rem;
  line-height: 1.1;
}
.page-inner h1 em { font-style: normal; color: var(--accent); }
.page-inner h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.page-inner p {
  font-family: var(--mono);
  font-size: .9rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.page-inner ul {
  list-style: none;
  margin-bottom: 1rem;
}
.page-inner ul li {
  font-family: var(--mono);
  font-size: .875rem;
  color: var(--text-muted);
  padding: .4rem 0;
  padding-left: 1.2rem;
  position: relative;
}
.page-inner ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.page-inner code {
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: .1rem .4rem;
  border-radius: 4px;
}
.page-inner pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--text);
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.7;
}
.page-inner pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.info-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.info-card .card-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

/* CONTACT FORM */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; }
.form-group label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
textarea {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: .875rem;
  padding: .65rem .9rem;
  width: 100%;
  outline: none;
  resize: vertical;
  min-height: 140px;
  transition: border-color .2s, box-shadow .2s;
}
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.submit-btn {
  align-self: flex-start;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 700;
  font-size: .9rem;
  padding: .75rem 1.75rem;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.submit-btn:hover { background: var(--accent2); }
.submit-btn:active { transform: scale(.97); }
.form-success {
  display: none;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: .875rem;
  color: var(--accent);
}

/* RELEASE NOTES */
.release-entry {
  border-left: 2px solid var(--border2);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}
.release-entry::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  left: -6px;
  top: .35rem;
}
.release-version {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .25rem;
}
.release-date {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--text-dim);
  margin-bottom: .75rem;
}
.release-entry h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}
.badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .15rem .5rem;
  border-radius: 4px;
  margin-right: .4rem;
}
.badge-new { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent); }
.badge-fix { background: #1a2035; color: #7ba3ff; border: 1px solid #2a3a60; }
.badge-docker { background: #0d1d35; color: #1a7dd8; border: 1px solid #1a3a60; }

/* Fix browser autofill white background — all input types */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 9999px var(--bg3) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}
/* Firefox autofill */
input:autofill {
  background: var(--bg3) !important;
  color: var(--text) !important;
}

/* HAMBURGER — hidden by default (desktop) */
.hamburger {
  display: none;
}

/* MOBILE NAV OVERLAY */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,11,15,.98);
  backdrop-filter: blur(20px);
  z-index: 500;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.nav-overlay.open { display: flex; }

.nav-overlay-close {
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  transition: color .2s;
}
.nav-overlay-close:hover { color: var(--accent); }

.nav-overlay a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: -.01em;
  transition: color .2s;
}
.nav-overlay a:hover,
.nav-overlay a.active { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 640px) {
  /* Hide desktop nav */
  .nav-links { display: none !important; }
  .version-badge { display: none; }

  /* Show hamburger */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    z-index: 600;
    margin-left: auto;
    position: relative;
  }
  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s, opacity .2s;
    transform-origin: center;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .footer-nav { display: none; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .preset-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 641px) {
  .nav-overlay { display: none !important; }
}
