/* Shared styles for public hub pages */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

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

:root {
  --bg:      #0a0a0c;
  --surface: #111114;
  --border:  #222226;
  --border2: #2e2e32;
  --text:    #f0efe8;
  --muted:   #6b6b72;
  --accent:  #b8a98a;
  --danger-soft: #fca5a5;
}

[data-theme="light"] {
  --bg:      #f7f6f2;
  --surface: #fffefb;
  --border:  #e3e1d8;
  --border2: #d3d0c5;
  --text:    #1c1b19;
  --muted:   #716f67;
  --accent:  #8a7550;
  --danger-soft: #b91c1c;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Brand ── */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

.brand-wordmark .r { color: var(--muted); font-style: italic; }

.hub-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hub-logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.hub-logo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.hub-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text);
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.full { grid-column: 1 / -1; }

label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.875rem;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

input:focus {
  border-color: var(--accent);
}

.btn-submit {
  width: 100%;
  padding: 0.7rem;
  background: var(--text);
  border: none;
  border-radius: 8px;
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: opacity 0.15s;
}

.btn-submit:hover:not(:disabled) { opacity: 0.92; }
.btn-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.feedback {
  border-radius: 8px;
  padding: 0.65rem 0.875rem;
  font-size: 0.85rem;
  display: none;
  margin-bottom: 0.875rem;
  line-height: 1.45;
}

.feedback.visible { display: block; }
.feedback.error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: var(--danger-soft);
}

.state-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.state-icon { font-size: 2rem; }
.state-title { font-size: 1.2rem; font-weight: 600; color: var(--text); }
.state-sub { font-size: 0.875rem; color: var(--muted); line-height: 1.5; }

.success-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-portal {
  display: block;
  width: 100%;
  padding: 0.7rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, opacity 0.15s;
}

.btn-portal:hover { border-color: var(--accent); opacity: 0.92; }

.portal-hint {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
  margin: 0;
}

.public-legal {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.35rem;
}

.public-legal a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.public-legal a:hover {
  color: var(--text);
}

.powered-by {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.powered-by a {
  color: inherit;
  text-decoration: none;
}

.powered-by a:hover {
  color: var(--text);
}

.powered-by span {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

@media (max-width: 400px) {
  .form-grid { grid-template-columns: 1fr; }
  .card { padding: 1.25rem; }
}
