@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #c8102e;
  --red-dark: #a00d26;
  --ink: #17181c;
  --ink-soft: #5b5f68;
  --line: #e4e2de;
  --paper: #ffffff;
  --paper-alt: #f6f5f3;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 4px;
  background: var(--red);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-glyph {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  background: var(--red);
  overflow: hidden;
}

.glyph-text {
  position: absolute;
  top: 50%;
  left: calc(50% - 0.3em);
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 29px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0;
}

.brand-name {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 18px;
}

/* ---------- hero ---------- */

.hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-alt);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--red);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  font-weight: 800;
}

.lede {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0;
}

/* ---------- generator ---------- */

main.container {
  width: 100%;
  flex: 1;
  padding-top: 48px;
  padding-bottom: 72px;
}

/* ---------- footer ---------- */

.site-footer {
  width: 100%;
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  padding: 16px 0;
  text-align: center;
}

.footer-btn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
}

.footer-btn:hover { color: var(--red); }

.panel {
  border: 1px solid var(--line);
  margin-bottom: 28px;
  background: var(--paper);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-alt);
  flex-wrap: wrap;
  gap: 8px;
}

.panel-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-transform: uppercase;
}

.panel-status {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a9d3f;
}

.generator { padding: 30px 22px 34px; }

.uuid-display {
  background: var(--ink);
  color: #fff;
  padding: 26px 78px 26px 20px;
  margin-bottom: 22px;
  position: relative;
  display: flex;
  align-items: center;
}

.uuid-text {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.06em;
  word-break: break-all;
  color: #fff;
  text-align: center;
  flex: 1;
}

.uuid-text .char {
  display: inline-block;
  white-space: pre;
}

.uuid-text.is-empty {
  color: transparent;
}

@keyframes uuidBlurOut {
  0%   { opacity: 1; filter: blur(0); }
  100% { opacity: 0; filter: blur(9px); }
}

@keyframes uuidBlurIn {
  0%   { opacity: 0; filter: blur(9px); }
  100% { opacity: 1; filter: blur(0); }
}

.uuid-text.is-out .char {
  animation: uuidBlurOut 140ms ease-in both;
}

.uuid-text.is-in .char {
  animation: uuidBlurIn 140ms ease-out both;
}

.copy-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
}

.copy-btn:hover { border-color: #fff; }

.copy-btn .icon-check { display: none; }

.copy-btn.is-copied { border-color: #fff; color: #7bd18b; }

.copy-btn.is-copied .icon-copy { display: none; }

.copy-btn.is-copied .icon-check { display: block; }

.actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--mono);
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-primary:active { transform: translateY(1px); }

.btn-info {
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--paper-alt);
  color: var(--red);
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-info:hover { border-color: var(--red); background: var(--paper); }

.btn-info:active { transform: translateY(1px); }

/* ---------- disclosure dialog ---------- */

.disclosure-dialog {
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 0;
  padding: 0;
  width: 560px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 12px 40px rgba(23, 24, 28, 0.25);
}

.disclosure-dialog::backdrop {
  background: rgba(23, 24, 28, 0.5);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0;
}

.dialog-close {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.dialog-close:hover { color: var(--red); }

.disclosure-dialog p {
  font-size: 14px;
  color: var(--ink);
  margin: 0;
  padding: 16px 22px 0;
}

.disclosure-dialog p:last-child { padding-bottom: 22px; }

/* responsive */

@media (max-width: 720px) {
  .hero h1 { font-size: 32px; }
  .uuid-text { font-size: 18px; }
  .actions { justify-content: stretch; }
  .actions .btn-primary { flex: 1; }
  .uuid-display { padding: 26px 66px 26px 16px; }
}
