/* State aKorti — Laurel Generator
   Tema: sfondo bianco, testo e label neri.
*/

@font-face {
  font-family: 'App Sans';
  src: url('fonts/InstrumentSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'App Sans';
  src: url('fonts/InstrumentSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'App Sans';
  src: url('fonts/InstrumentSans-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'App Sans';
  src: url('fonts/InstrumentSans-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7f7f5;
  --hairline: #dcdad4;
  --ink: #111111;
  --muted: #6b6b66;
  --error: #b3261e;
  --error-bg: #fbeceb;
  --success: #1e6b3c;
  --success-bg: #eaf5ee;
  --radius: 10px;
  --shadow: 0 16px 40px -24px rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'App Sans', -apple-system, sans-serif;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #000; }

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 36px;
}

.brand-link { display: inline-flex; align-items: center; }
.brand-logo { height: 34px; width: auto; display: block; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 6px;
}

h1 {
  font-size: 28px;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

.generator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 32px;
  align-items: start;
}

@media (max-width: 880px) {
  .generator { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
}
.step-label .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}

.field-group {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--hairline);
}
.field-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.field-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

label.field-label {
  display: block;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="text"], input[type="password"], input[type="file"], select {
  width: 100%;
  background: #fff;
  border: 1px solid #b9b7b0;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 15px;
}
input[type="text"]:focus, input[type="password"]:focus, select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17,17,17,0.1);
}

.style-toggle {
  display: inline-flex;
  border: 1px solid #b9b7b0;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}
.style-toggle button {
  background: #fff;
  color: var(--muted);
  border: none;
  width: 38px;
  height: 38px;
  font-family: 'App Sans';
  cursor: pointer;
  border-right: 1px solid #b9b7b0;
}
.style-toggle button:last-child { border-right: none; }
.style-toggle button:nth-child(1) { font-weight: 700; }
.style-toggle button:nth-child(2) { font-style: italic; }
.style-toggle button.active {
  background: var(--ink);
  color: #fff;
}
.style-toggle button:hover:not(.active) { color: var(--ink); background: var(--panel-2); }

.color-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.color-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  cursor: pointer;
  color: var(--ink);
}
.color-option input { accent-color: var(--ink); }

.color-presets {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.color-presets .btn-preset {
  flex: 1;
  padding: 10px 12px;
  font-size: 13.5px;
}

.color-picker-row {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}
.color-picker-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.color-picker-label input[type="color"] {
  width: 42px;
  height: 32px;
  padding: 2px;
  border: 1px solid #b9b7b0;
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
}

input[type="range"] {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--ink);
}
.scale-value {
  margin-top: 6px;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  cursor: pointer;
  margin-top: 14px;
  color: var(--ink);
}
.check-option input { accent-color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #000; }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid #b9b7b0;
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-secondary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-outline {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-outline:hover { background: var(--panel-2); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  text-decoration: underline;
  padding: 8px 4px;
}
.btn-block { width: 100%; }

.preview-col {
  position: sticky;
  top: 24px;
}

.preview-frame {
  background: var(--panel-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #fff;
}

.preview-caption {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.default-laurel-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.default-laurel-note a {
  white-space: nowrap;
  font-weight: 700;
}

.import-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.jump-row {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--hairline);
}

.nav-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.nav-row .btn { flex: 1; }

.admin-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px;
}
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.upload-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.alert {
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 14px;
  margin: 16px 0;
}
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid rgba(179,38,30,0.3); }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(30,107,60,0.3); }
.current-preview { margin-top: 18px; }
.current-laurel-img {
  width: 100%;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  margin-top: 8px;
}
.back-link { margin-top: 22px; font-size: 14px; }

footer.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
