/* Renovalora — Milestone 1.
   Palette is the logo's family (shared with Acrevalia): deep forest
   green grounds, gold accent, ivory text. Fleur's glass rule:
   layered translucent glass over an ambient scene, reveal-on-scroll,
   prefers-reduced-motion honoured. */

:root {
  --green-950: #0a1f13;
  --green-900: #0e2417;
  --green-800: #14331f;
  --green-700: #1a4229;
  --gold: #c49e54;
  --gold-bright: #e3c078;
  --ivory: #f4eedd;
  --ivory-dim: rgba(244, 238, 221, 0.72);
  --ivory-faint: rgba(244, 238, 221, 0.5);
  --glass: rgba(244, 238, 221, 0.055);
  --glass-strong: rgba(244, 238, 221, 0.09);
  --glass-border: rgba(196, 158, 84, 0.28);
  --danger: #e08a7a;
  --radius: 18px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ivory);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(196, 158, 84, 0.13), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(38, 96, 58, 0.35), transparent 60%),
    linear-gradient(165deg, var(--green-800) 0%, var(--green-900) 45%, var(--green-950) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
}

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
  animation: drift 26s ease-in-out infinite alternate;
}
.glow-a { width: 420px; height: 420px; top: -120px; right: -80px; background: rgba(196, 158, 84, 0.20); }
.glow-b { width: 520px; height: 520px; bottom: -200px; left: -140px; background: rgba(30, 84, 50, 0.55); animation-delay: -12s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-40px, 30px) scale(1.08); }
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(244, 238, 221, 0.08);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 10px; z-index: 20;
  margin: 10px auto 0; max-width: 1120px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ivory); }
.brand-mark { height: 34px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; letter-spacing: 0.04em; }
.brand-byline { font-size: 0.66rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { font-size: 0.85rem; color: var(--ivory-dim); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-size: 0.92rem; cursor: pointer;
  border-radius: 999px; padding: 9px 18px; border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-gold {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  color: #221a08; font-weight: 600;
  box-shadow: 0 6px 18px rgba(196, 158, 84, 0.35);
}
.btn-gold:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ivory-dim); border-color: rgba(244, 238, 221, 0.25); }
.btn-ghost:hover { color: var(--ivory); border-color: rgba(244, 238, 221, 0.5); }
.btn-big { font-size: 1.02rem; padding: 13px 28px; }
.btn-small { font-size: 0.8rem; padding: 5px 12px; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(224, 138, 122, 0.4); }

/* ---------- layout ---------- */
main { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 26px 16px 10px; }

.hero { padding: 40px 28px 34px; text-align: center; }
.hero-logo { width: min(430px, 86%); height: auto; display: block; margin: 0 auto; }
.hero-tagline {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--gold); letter-spacing: 0.14em; font-size: 1.02rem; margin: 14px 0 6px;
}
.hero-lede { max-width: 560px; margin: 8px auto 22px; color: var(--ivory-dim); }
.signin-note { color: var(--gold-bright); margin: 14px auto 0; max-width: 480px; }

.card-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.card { padding: 22px; }
.card h3 { margin: 0 0 8px; font-family: Georgia, serif; font-weight: 600; color: var(--ivory); }
.card p { margin: 0; color: var(--ivory-dim); font-size: 0.94rem; }

/* ---------- dashboard ---------- */
.dash-head h2 { font-family: Georgia, serif; font-weight: 600; margin: 6px 0 2px; }
.dash-biz { color: var(--gold); margin: 0 0 6px; min-height: 1.2em; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.panel { padding: 22px; }
.panel h3 { margin: 0 0 6px; font-family: Georgia, serif; font-weight: 600; }
.panel-sub { color: var(--ivory-faint); font-size: 0.88rem; margin: 0 0 12px; }
.soon p { color: var(--ivory-dim); font-size: 0.94rem; }
.soon-badge {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: #221a08; background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  border-radius: 999px; padding: 3px 10px; vertical-align: middle; margin-left: 8px; white-space: nowrap;
}
.legal-inline { color: var(--gold-bright) !important; font-size: 0.85rem !important; }

/* ---------- forms & lists ---------- */
.form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.form h4 { margin: 6px 0 0; font-size: 0.95rem; color: var(--gold); }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--ivory-dim); }
.form .opt { color: var(--ivory-faint); font-size: 0.78rem; }
.form input, .form select, .form textarea {
  font: inherit; font-size: 0.95rem; color: var(--ivory);
  background: rgba(10, 31, 19, 0.55); border: 1px solid rgba(244, 238, 221, 0.18);
  border-radius: 10px; padding: 9px 12px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid rgba(196, 158, 84, 0.65); outline-offset: 1px; border-color: transparent;
}
.form-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.save-state { font-size: 0.85rem; color: var(--gold-bright); min-height: 1.2em; }
.save-state.error { color: var(--danger); }

.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item-list li {
  background: var(--glass-strong); border: 1px solid rgba(244, 238, 221, 0.10);
  border-radius: 12px; padding: 10px 12px;
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
}
.item-main { min-width: 0; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-sub { color: var(--ivory-faint); font-size: 0.83rem; overflow-wrap: anywhere; }
.item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.empty-note { color: var(--ivory-faint); font-size: 0.9rem; }

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 1; max-width: 1120px; margin: 26px auto 0;
  padding: 20px 16px 34px; color: var(--ivory-faint); font-size: 0.83rem;
  border-top: 1px solid rgba(196, 158, 84, 0.18);
}
.footer-brand { color: var(--ivory-dim); font-size: 0.9rem; }
.footer a { color: var(--gold); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- legal pages ---------- */
.legal-card { padding: 30px 28px; max-width: 760px; margin: 0 auto; }
.legal-card h1 { font-family: Georgia, serif; font-weight: 600; margin: 0 0 10px; }
.legal-card h2 { font-family: Georgia, serif; font-weight: 600; font-size: 1.08rem; color: var(--gold-bright); margin: 22px 0 6px; }
.legal-card p { color: var(--ivory-dim); margin: 0 0 10px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .card-row { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .nav { border-radius: var(--radius); }
  .user-chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
