/* Family Time Connect — shared styles */

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

:root {
  --bg: #F4F6F3;
  --surface: #FFFFFF;
  --surface-tint: #EDF1EC;
  --ink: #17231F;
  --ink-soft: #45564F;
  --ink-faint: #6C7C75;
  --primary: #2C5A4E;
  --primary-dark: #1D3F37;
  --accent: #B8863A;
  --accent-soft: #EFE3CB;
  --line: #DBE2DC;
  --danger: #A8402F;
  --danger-soft: #F6E6E2;
  --ok: #3E6B4F;
  --radius-s: 4px;
  --radius-m: 10px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }
a { color: var(--primary); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-name span { color: var(--primary); }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
nav.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}
nav.main-nav a:hover { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* Hero */
.hero {
  padding: 96px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-eyebrow-motif {
  position: absolute;
  right: -60px;
  top: -40px;
  width: 420px;
  height: 420px;
  opacity: 0.9;
  z-index: 0;
}
.hero-copy { max-width: 640px; }
.hero-copy p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* Meeting-point motif, reused as section marker */
.motif {
  width: 46px;
  height: 28px;
  margin-bottom: 18px;
}

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  counter-reset: step;
}
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step .num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.audience-card {
  background: var(--surface);
  padding: 32px;
}
.audience-card h3 { margin-bottom: 10px; }

.safeguard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.safeguard-list { list-style: none; margin: 0; padding: 0; }
.safeguard-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
}
.safeguard-list li:first-child { border-top: 1px solid var(--line); }
.safeguard-list svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; color: var(--primary); }
.safeguard-list h4 { margin: 0 0 4px; font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.safeguard-list p { margin: 0; font-size: 0.95rem; }

.panel {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 28px;
}
.panel h4 { font-family: var(--font-body); font-size: 0.95rem; letter-spacing: 0.02em; margin-bottom: 12px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: var(--surface);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-hint { font-size: 0.82rem; color: var(--ink-faint); margin-top: 4px; }
.contact-details dt { font-weight: 700; margin-top: 18px; font-size: 0.9rem; text-transform: none; }
.contact-details dd { margin: 2px 0 0; color: var(--ink-soft); }

/* Footer */
footer.site-footer {
  background: var(--ink);
  color: #DDE5E1;
  padding: 56px 0 32px;
}
footer.site-footer a { color: #DDE5E1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-grid h5 { font-size: 0.85rem; letter-spacing: 0.02em; margin-bottom: 14px; color: #9FB3AB; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; font-size: 0.93rem; }
.footer-grid a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #94A69D;
  flex-wrap: wrap;
  gap: 10px;
}

/* Banners */
.banner {
  padding: 12px 0;
  font-size: 0.9rem;
  text-align: center;
}
.banner-prototype { background: var(--danger-soft); color: var(--danger); border-bottom: 1px solid #E3B7AB; }
.banner-prototype strong { font-weight: 700; }

/* Portal shared */
.portal-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.portal-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 44px;
  width: 100%;
  max-width: 420px;
}
.auth-card .motif { margin-bottom: 22px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-card p.sub { font-size: 0.92rem; margin-bottom: 26px; }
.mfa-code-inputs { display: flex; gap: 8px; margin-bottom: 6px; }
.mfa-code-inputs input {
  width: 100%;
  text-align: center;
  font-size: 1.3rem;
  font-family: var(--font-body);
  padding: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}
.demo-note {
  margin-top: 26px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-s);
  font-size: 0.85rem;
  color: #6B4E1E;
}
.error-msg {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-s);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}
.error-msg.show { display: block; }

/* Dashboard */
.dash-shell { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 250px;
  background: var(--ink);
  color: #DDE5E1;
  padding: 26px 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.dash-sidebar .brand { color: #fff; margin-bottom: 34px; }
.dash-sidebar .brand-mark path.mark-fill { fill: #fff; }
.dash-nav { list-style: none; padding: 0; margin: 0; flex: 1; }
.dash-nav li { margin-bottom: 4px; }
.dash-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  color: #C4D2CB;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
}
.dash-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dash-nav a.active { background: var(--primary); color: #fff; }
.dash-nav .nav-group-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6E8279; margin: 18px 0 8px 12px; }
.sidebar-role {
  font-size: 0.78rem;
  color: #94A69D;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
}
.sidebar-role strong { display: block; color: #fff; font-size: 0.9rem; margin-bottom: 2px; }

.dash-main { flex: 1; min-width: 0; }
.dash-topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
.mfa-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ok);
  background: #E5EFE7;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
}
.mfa-pill svg { width: 14px; height: 14px; }
.dash-content { padding: 32px; }
.dash-content h1 { font-size: 1.6rem; margin-bottom: 4px; }
.dash-content .muted { color: var(--ink-faint); font-size: 0.92rem; margin-bottom: 30px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 32px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 20px 22px;
}
.stat-card .label { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 8px; }
.stat-card .value { font-family: var(--font-display); font-size: 1.9rem; color: var(--ink); }
.stat-card .value.accent { color: var(--accent); }

table.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
table.data-table th, table.data-table td { text-align: left; padding: 13px 16px; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
table.data-table th { background: var(--surface-tint); font-weight: 700; color: var(--ink-soft); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
table.data-table tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.76rem; font-weight: 700; }
.tag-ok { background: #E5EFE7; color: var(--ok); }
.tag-pending { background: var(--accent-soft); color: #7A5A1E; }
.tag-locked { background: var(--danger-soft); color: var(--danger); }

.locked-note {
  border: 1px dashed var(--line);
  border-radius: var(--radius-m);
  padding: 30px;
  text-align: center;
  color: var(--ink-faint);
}
.locked-note svg { width: 30px; height: 30px; margin-bottom: 10px; color: var(--ink-faint); }

.role-switcher {
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.role-switcher select {
  padding: 7px 10px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  font-family: var(--font-body);
}

/* Notes page */
.notes-list { display: flex; flex-direction: column; gap: 14px; }
.note-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 22px; }
.note-card .note-meta { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 8px; }
.new-note-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; margin-bottom: 28px; }

@media (max-width: 860px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-eyebrow-motif { display: none; }
  .steps, .audience-grid, .safeguard-grid, .contact-grid, .footer-grid, .card-grid { grid-template-columns: 1fr; }
  .safeguard-grid { gap: 32px; }
  .dash-sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 30; transition: left 0.2s ease; }
  .dash-sidebar.open { left: 0; }
  .dash-content { padding: 22px; }
}
