:root {
  --ink: #050505;
  --gold: #d4af37;
  --gold-soft: #e8c86a;
  --sand: #f0e6c8;
  --cream: #f7f1de;
  --fog: rgba(240, 230, 200, 0.68);
  --line: rgba(212, 175, 55, 0.32);
  --input-bg: rgba(10, 10, 10, 0.65);
  --font: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--sand);
  background: var(--ink);
  line-height: 1.5;
  min-height: 100dvh;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 12% -8%, rgba(212, 175, 55, 0.16), transparent 55%),
    linear-gradient(165deg, #050505 0%, #121212 45%, #0a0a0a 100%);
  pointer-events: none;
}

.orb {
  position: fixed;
  top: -80px;
  right: -60px;
  width: 280px;
  height: 280px;
  border-radius: 140px;
  background: rgba(212, 175, 55, 0.18);
  z-index: 0;
  pointer-events: none;
  animation: pulse 4.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  animation: fadeUp 0.9s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.logo {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  object-fit: cover;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.brand {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.5rem);
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-btn {
  margin-top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-soft);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.segment {
  display: flex;
  background: rgba(8, 8, 8, 0.55);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid var(--line);
  margin-bottom: 28px;
}

.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--fog);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 12px;
  border-radius: 999px;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--gold);
  color: #1a1008;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field > span {
  color: var(--fog);
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

input, textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid rgba(240, 230, 200, 0.12);
  border-radius: 16px;
  color: var(--cream);
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  resize: vertical;
}

textarea { min-height: 140px; }
input:focus, textarea:focus {
  outline: 2px solid rgba(212, 175, 55, 0.4);
  border-color: var(--gold);
}
input::placeholder, textarea::placeholder { color: var(--fog); }

.actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 16px 22px;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.7; cursor: wait; }

.btn.primary {
  flex: 1;
  background: var(--gold);
  color: #1a1008;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }

.btn.ghost {
  background: transparent;
  color: var(--sand);
  border: 1px solid var(--line);
  font-weight: 600;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(26, 16, 8, 0.25);
  border-top-color: #1a1008;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 28px 24px;
  background: linear-gradient(160deg, #1a1a1a, #0d0d0d);
  text-align: center;
  animation: fadeUp 0.35s ease both;
}

.result-card {
  text-align: left;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.copy-btn {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-soft);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.result-scroll {
  overflow: auto;
  max-height: 280px;
  margin-bottom: 18px;
}

.result-text {
  margin: 0;
  color: var(--cream);
  font-size: 15px;
  line-height: 22px;
  font-family: ui-monospace, "Cascadia Code", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  color: var(--gold-soft);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal-copy {
  margin: 8px 0 0;
  color: var(--fog);
  font-size: 12px;
  letter-spacing: 1px;
}

.modal-divider {
  width: 48px;
  height: 1px;
  background: var(--line);
  margin: 18px auto;
}

.modal-label {
  margin: 0 0 4px;
  color: var(--fog);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.modal-name {
  margin: 0 0 14px;
  color: var(--cream);
  font-size: 16px;
  font-weight: 600;
}

.modal-whatsapp {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--gold-soft);
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  align-self: center;
  margin: 0 auto;
  display: inline-flex;
}

.about-card .modal-close { margin-top: 0; }

@media (max-width: 480px) {
  .shell { padding: 20px 16px 48px; }
}
