/* Lumeya — sistema visivo
   Direzione: notte calda. Non tecnologico, non freddo, non "app di AI".
   Deve somigliare a una stanza con la luce bassa, non a un pannello di controllo. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  /* notte */
  --ink-900: #0b0910;
  --ink-800: #121019;
  --ink-700: #1a1723;
  --ink-600: #241f30;
  --line:    rgba(255, 255, 255, .08);

  /* luce calda */
  --warm:    #ffb08a;
  --warm-2:  #ff8f9e;
  --lilac:   #b39cf5;
  --glow:    radial-gradient(60% 60% at 50% 0%, rgba(255, 176, 138, .18), transparent 70%);

  --text:    #f2eeea;
  --muted:   #a49cae;
  --faint:   #6f6878;

  --ok:      #7fd1a4;
  --warn:    #ffc46b;

  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 34px; --r-full: 999px;
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, .45);
  --shadow-lift: 0 8px 30px rgba(0, 0, 0, .35);

  --font-display: 'Fraunces', Georgia, serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* c'e' chi usa il telefono di giorno, alla luce: il tema chiaro non e' un ripensamento */
:root[data-theme="light"] {
  --ink-900: #faf6f2;
  --ink-800: #fffdfb;
  --ink-700: #f3ece6;
  --ink-600: #e8ded6;
  --line:    rgba(25, 18, 30, .1);
  --text:    #221c28;
  --muted:   #6b6374;
  --faint:   #9a92a4;
  --glow:    radial-gradient(60% 60% at 50% 0%, rgba(255, 176, 138, .35), transparent 70%);
  --shadow-soft: 0 18px 50px rgba(80, 60, 70, .12);
  --shadow-lift: 0 6px 22px rgba(80, 60, 70, .10);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* aurora di fondo: lenta, quasi impercettibile */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora::before, .aurora::after {
  content: ''; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(80px); opacity: .40;
}
.aurora::before { background: radial-gradient(circle, var(--warm), transparent 65%); top: -22vmax; left: -12vmax; animation: drift 34s var(--ease) infinite alternate; }
.aurora::after  { background: radial-gradient(circle, var(--lilac), transparent 65%); bottom: -26vmax; right: -14vmax; animation: drift 44s var(--ease) infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .aurora::before, .aurora::after { animation: none; } }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; line-height: 1.12; margin: 0 0 .4em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; }

.btn {
  font: inherit; font-weight: 500; cursor: pointer; border: 0; text-decoration: none;
  padding: .85rem 1.5rem; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--warm), var(--warm-2));
  color: #2a1318; box-shadow: 0 8px 26px rgba(255, 143, 158, .32);
}
.btn-primary:hover { box-shadow: 0 12px 34px rgba(255, 143, 158, .45); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--line); }
:root[data-theme="light"] .btn-ghost { background: rgba(0,0,0,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.card {
  background: color-mix(in srgb, var(--ink-800) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
}

input, textarea, select {
  font: inherit; color: var(--text); width: 100%;
  background: color-mix(in srgb, var(--ink-700) 80%, transparent);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: .8rem 1rem; outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus, textarea:focus { border-color: var(--warm); box-shadow: 0 0 0 4px rgba(255, 176, 138, .14); }
label { display: block; font-size: .85rem; color: var(--muted); margin: 0 0 .35rem; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: .75rem; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

@media (prefers-reduced-motion: no-preference) {
  .fade-up { animation: fadeUp .6s var(--ease) both; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
}
