@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

/* One look, matching the link-preview images: deep green, cream text, gold accents and frames. */
:root {
  --bg:         #0B2C1E;   /* page: the preview images' background */
  --surface:    #123B2A;   /* cards, lifted a few percent above the page */
  --field:      #092418;   /* inputs and inner rows, a shade darker */
  --border:     rgba(244, 239, 220, 0.14);
  --input-border: rgba(244, 239, 220, 0.24);
  --frame:      rgba(208, 172, 92, 0.55);  /* thin gold lines, like the frame on the images */
  --fg:         #F4EFDC;   /* cream */
  --muted:      #A7B5AA;
  --green:      #D0AC5C;   /* the accent; named --green from the old palette, now gold */
  --green-soft: rgba(208, 172, 92, 0.14);
  --on-accent:  #0B2C1E;
  --gold:       #D0AC5C;
  --gold-soft:  rgba(208, 172, 92, 0.14);
  --ok:         #8FD1A4;
  --ok-soft:    rgba(143, 209, 164, 0.12);
  --red:        #EE8676;
  --red-soft:   rgba(238, 134, 118, 0.12);
  --radius:     14px;
  --shadow:     0 10px 30px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--fg);
  min-height: 100%;
  padding-left:  max(16px, env(safe-area-inset-left,  0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 1.25rem 2rem;
}
/* Lighter green behind the header and card, deepening towards the edges, plus a faint grain
   so the green reads like heavy card stock rather than a flat screen colour. */
html {
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 90% 70% at 50% 18%, #134330 0%, var(--bg) 55%, #061C12 100%);
  background-attachment: fixed;
  min-height: 100%;
}
body { isolation: isolate; position: relative; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Gold outline icon in a faint ring (padlock on the login and invite-only screens) */
.icon-ring {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 0.75rem;
  border: 1px solid var(--frame); background: var(--gold-soft);
}
.icon-ring svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Quiet link under a card */
.page-link { text-align: center; font-size: 0.85rem; }
.page-link a { color: var(--muted); }
.page-link a:hover { color: var(--fg); }

.page { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }

.logo { text-align: center; padding-block: 0.5rem 1rem; }
/* The cut-out Santa; his coat fades into the page at the bottom. */
/* A faint warm glow behind Santa, so he sits in the scene rather than on a flat background */
.logo, .hero { position: relative; isolation: isolate; }
.logo::before, .hero::before {
  content: ''; position: absolute; z-index: -1; left: 50%; top: var(--glow-top, 44px);
  width: 340px; height: 340px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(92, 150, 112, 0.16), rgba(92, 150, 112, 0.05) 55%, transparent);
  pointer-events: none;
}
.logo .pine, .hero-icon {
  display: block; margin: 0 auto; width: 88px; height: 88px;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.logo h1, .brand-name {
  /* Serif capitals in gold, matching the serif headings and the editorial feel of the preview images */
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  line-height: 1.1;
  margin-top: 0.5rem;
}
.logo p { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--frame);  /* thin gold, like the frame on the preview images */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--gold); margin-bottom: 0.3rem; letter-spacing: 0.03em; text-transform: uppercase; }

input[type="text"], input[type="tel"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--field);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  font-size: 0.925rem;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 1rem;
}
input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input::placeholder { color: var(--muted); opacity: 0.55; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px; border: none;
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(180deg, #DDBB68 0%, #C69E4C 100%); color: var(--on-accent); font-weight: 600; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25); width: 100%; padding: 0.75rem; font-size: 0.95rem; }
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled, .btn-danger:disabled { background: var(--field); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); opacity: 1; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); color: var(--fg); }
.btn-danger { background: var(--red); color: var(--on-accent); font-weight: 600; width: 100%; padding: 0.75rem; font-size: 0.95rem; }
.btn-danger:hover { opacity: 0.88; }

.msg { padding: 0.65rem 0.9rem; border-radius: 8px; font-size: 0.875rem; margin-top: 0.75rem; }
.msg-error { background: var(--red-soft); color: var(--red); border: 1px solid var(--red); }
.msg-success { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok); }

.person-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.person-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px; background: var(--field); border: 1px solid var(--border);
}
.avatar {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.8rem; flex-shrink: 0;
}
.person-name { flex: 1; font-size: 0.9rem; }
.person-phone { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.divider { height: 1px; background: var(--border); margin-block: 0.5rem; }

.link-box {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 6px; background: var(--field); border: 1px solid var(--border);
  font-size: 0.82rem; color: var(--muted); overflow: hidden;
}
.link-box span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-copy { flex-shrink: 0; padding: 0.3rem 0.65rem; font-size: 0.78rem; }

.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 500;
}
.badge-green { background: var(--ok-soft); color: var(--ok); }
.badge-gold  { background: var(--gold-soft);  color: var(--gold); }
.badge-red   { background: var(--red-soft);   color: var(--red); }

.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.reveal-card {
  text-align: center;
  padding: 2rem 1.5rem;
}
.reveal-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 7vw, 2.8rem);
  color: var(--fg);
  margin: 1rem 0 0.5rem;
}
.reveal-label { color: var(--muted); font-size: 0.875rem; }
.reveal-icon { display: flex; justify-content: center; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Small text links/buttons used under forms (login, code steps) */
.text-btn { background: none; border: none; padding: 0; font: inherit; font-size: 0.8rem; color: var(--muted); cursor: pointer; text-decoration: underline; }
.text-btn:hover { color: var(--fg); }
.text-btn:disabled { opacity: 0.5; cursor: default; text-decoration: none; }
.row-links { display: flex; justify-content: space-between; margin-top: 0.75rem; }

/* Inline outline icon, takes the surrounding text colour */
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.14em; flex-shrink: 0; }
