/* ============================================================
   Astro Mauritius — shared design system
   Brand: deep-night navy, warm star orange, silver grey.
   ============================================================ */

:root {
  --am-night:        #011124;
  --am-night-raise:  #04203f;      /* raised surface */
  --am-night-soft:   rgba(255, 255, 255, 0.045);
  --am-orange:       #F09D51;
  --am-orange-deep:  #d97f2e;
  --am-silver:       #C8CCD3;
  --am-silver-dim:   #8f97a3;
  --am-white:        #FFFFFF;

  --am-glass:        rgba(9, 30, 56, 0.55);
  --am-glass-border: rgba(200, 204, 211, 0.14);
  --am-shadow:       0 18px 50px rgba(0, 0, 0, 0.45);
  --am-radius:       18px;
  --am-radius-sm:    12px;

  --am-font-display: "Poppins", system-ui, sans-serif;
  --am-font-body:    "Inter", system-ui, sans-serif;

  --am-ease: cubic-bezier(.22, .8, .3, 1);
}

* { box-sizing: border-box; }

/* The hidden attribute must always win over display rules */
[hidden] { display: none !important; }

/* Hidden scrollbars — scrolling (wheel + touch) still works */
html { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }


html { -webkit-text-size-adjust: 100%; }

@media (max-width: 380px) {
  body.am-page { font-size: 15px; }
  .am-btn { padding: 0.8em 1.4em; }
}

body.am-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(240, 157, 81, 0.10), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(64, 120, 190, 0.12), transparent 60%),
    var(--am-night);
  color: var(--am-silver);
  font-family: var(--am-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Constellation texture layer (set the image path per page) */
.am-constellation {
  position: fixed;
  inset: 0;
  background-image: var(--am-constellation-url);
  background-size: 900px auto;
  background-repeat: repeat;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  filter: invert(1);           /* the artwork is dark-on-light → make it glow */
  mix-blend-mode: screen;
}

.am-shell { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
.am-h1, .am-h2, .am-h3 {
  font-family: var(--am-font-display);
  color: var(--am-white);
  line-height: 1.2;
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
}
.am-h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 600; }
.am-h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 600; }
.am-h3 { font-size: 1.1rem; font-weight: 600; }
.am-eyebrow {
  font-family: var(--am-font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--am-orange);
}
.am-muted { color: var(--am-silver-dim); }

/* ---------- Glass card ---------- */
.am-card {
  background: var(--am-glass);
  border: 1px solid var(--am-glass-border);
  border-radius: var(--am-radius);
  box-shadow: var(--am-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Buttons ---------- */
.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--am-font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.9em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--am-ease), box-shadow 0.25s var(--am-ease),
              background 0.25s var(--am-ease), color 0.25s var(--am-ease);
  text-decoration: none;
}
.am-btn:focus-visible { outline: 2px solid var(--am-orange); outline-offset: 3px; }
.am-btn-primary {
  background: linear-gradient(135deg, var(--am-orange), var(--am-orange-deep));
  color: #0b1a2e;
  box-shadow: 0 8px 26px rgba(240, 157, 81, 0.35);
}
.am-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(240, 157, 81, 0.45); }
.am-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.am-btn-ghost {
  background: transparent;
  color: var(--am-silver);
  border-color: var(--am-glass-border);
}
.am-btn-ghost:hover { border-color: var(--am-orange); color: var(--am-orange); }
.am-btn-danger { background: transparent; color: #ff8a80; border-color: rgba(255, 138, 128, .4); }
.am-btn-danger:hover { background: rgba(255, 138, 128, .12); }

/* ---------- Form controls ---------- */
.am-field { margin-bottom: 1.35rem; }
.am-label {
  display: block;
  font-family: var(--am-font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--am-white);
  margin-bottom: 0.45rem;
}
.am-label .req { color: var(--am-orange); }
.am-label .opt { color: var(--am-silver-dim); font-weight: 400; font-size: 0.8rem; }
.am-input, .am-select, .am-textarea {
  width: 100%;
  background: var(--am-night-soft);
  border: 1px solid var(--am-glass-border);
  border-radius: var(--am-radius-sm);
  color: var(--am-white);
  font-family: var(--am-font-body);
  font-size: 1rem;
  padding: 0.8em 1em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.am-input:focus, .am-select:focus, .am-textarea:focus {
  outline: none;
  border-color: var(--am-orange);
  box-shadow: 0 0 0 3px rgba(240, 157, 81, 0.18);
}
.am-select option { background: var(--am-night-raise); color: var(--am-white); }
.am-textarea { min-height: 130px; resize: vertical; }
.am-hint { font-size: 0.8rem; color: var(--am-silver-dim); margin-top: 0.35rem; }
.am-error { font-size: 0.83rem; color: #ff9d94; margin-top: 0.35rem; display: none; }
.am-field.invalid .am-input,
.am-field.invalid .am-select,
.am-field.invalid .am-textarea { border-color: #ff9d94; }
.am-field.invalid .am-error { display: block; }

/* ---------- Star ratings ---------- */
.am-stars { display: inline-flex; gap: 4px; color: var(--am-orange); }
.am-stars svg { width: 1.1em; height: 1.1em; display: block; }
.am-stars .off { color: rgba(200, 204, 211, 0.25); }

/* Interactive picker */
.am-star-picker { display: inline-flex; gap: 8px; }
.am-star-picker button {
  background: none; border: 0; padding: 4px; cursor: pointer;
  color: rgba(200, 204, 211, 0.28);
  transition: transform 0.15s var(--am-ease), color 0.15s;
  border-radius: 8px;
}
.am-star-picker button svg { width: 34px; height: 34px; display: block; }
.am-star-picker button.on { color: var(--am-orange); filter: drop-shadow(0 0 8px rgba(240,157,81,.55)); }
.am-star-picker button:hover { transform: scale(1.15); }
.am-star-picker button:focus-visible { outline: 2px solid var(--am-orange); outline-offset: 2px; }

/* ---------- Utility ---------- */
.am-badge {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.3em 0.8em; border-radius: 999px;
  background: linear-gradient(135deg, #f6d27f, #d9a03f);
  color: #2a1c05;
}
.am-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
