/* styles.css — Hello World Studio AI Tools
   Shared across hitmaker.html, tutor.html, book.html, index.html */

:root {
  --bg: #15120d;
  --surface: #1d1812;
  --surface-raised: #251f17;
  --border: #3a3024;
  --text: #f3ecdf;
  --text-muted: #b3a690;
  --gold: #d6a24c;
  --gold-soft: rgba(214, 162, 76, 0.14);
  --green: #3a5a45;
  --error: #e07a63;
  --radius: 10px;
  --serif: 'Fraunces', Georgia, 'Iowan Old Style', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); }

.wrap {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 64px;
  flex: 1;
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.brand .name {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.brand .name strong { color: var(--text); font-weight: 600; }

.brand .back {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.brand .back:hover { color: var(--gold); }

h1.tool-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 38px);
  margin: 0 0 6px;
  line-height: 1.15;
}

p.tool-sub {
  color: var(--text-muted);
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.5;
  max-width: 56ch;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.field { margin-bottom: 18px; }

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--sans);
  transition: border-color 0.15s ease;
}

textarea { resize: vertical; min-height: 110px; line-height: 1.5; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.row { display: flex; gap: 14px; }
.row .field { flex: 1; }

@media (max-width: 540px) {
  .row { flex-direction: column; gap: 0; }
}

.access-field {
  background: var(--gold-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 24px;
}

.access-field label { color: var(--text); }

button.generate {
  width: 100%;
  background: var(--gold);
  color: #1a1208;
  border: none;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
}

button.generate:hover { filter: brightness(1.08); }
button.generate:active { transform: scale(0.997); }

button.generate:disabled {
  background: var(--surface-raised);
  color: var(--text-muted);
  cursor: not-allowed;
}

.status {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  display: none;
  align-items: center;
  gap: 10px;
}

.status.visible { display: flex; }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(224, 122, 99, 0.12);
  border: 1px solid rgba(224, 122, 99, 0.4);
  color: var(--error);
  font-size: 14px;
  display: none;
}

.error-box.visible { display: block; }

.result {
  margin-top: 28px;
  display: none;
}

.result.visible { display: block; }

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.result-header span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.copy-btn:hover { color: var(--text); border-color: var(--gold); }

.result-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 15px;
}

footer.foot {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 24px 20px;
}

/* index hub */
.hub-grid {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.hub-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.hub-card:hover { border-color: var(--gold); }

.hub-card .eyebrow {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hub-card h2 {
  font-family: var(--serif);
  color: var(--text);
  font-size: 20px;
  margin: 0 0 6px;
}

.hub-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}
