/* ─────────────────────────────────────────────────────────────────────────────
   Amicus Care — Local Authority Document Portal
   Matches the styling of amicus.care (navy, Playfair Display + DM Sans)
   ───────────────────────────────────────────────────────────────────────────── */

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

:root {
  --navy: #1a2654;
  --text: #1a1a1a;
  --mid: #555;
  --light: #888;
  --border: #e5e5e5;
  --bg-soft: #f8f8f6;
  --white: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAV */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px; height: 72px;
  background: white; border-bottom: 1px solid var(--border);
}
.nav-logo img { height: 44px; width: auto; display: block; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-back, .nav-signout {
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 400;
  color: var(--mid); text-decoration: none; transition: color 0.2s;
}
.nav-back:hover, .nav-signout:hover { color: var(--navy); }
.nav-signout {
  font-weight: 500; color: var(--navy);
  border: 1.5px solid var(--navy); padding: 7px 18px; transition: all 0.2s;
}
.nav-signout:hover { background: var(--navy); color: white; }

/* TYPOGRAPHY */
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; color: var(--navy); line-height: 1.15; }
h1 { font-size: clamp(34px, 4.2vw, 54px); margin-bottom: 16px; letter-spacing: -0.01em; }
h3 { font-size: 22px; margin-bottom: 12px; }
p { color: var(--mid); font-weight: 300; }
em { font-style: italic; }
a { color: var(--navy); }

.page-eyebrow {
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--navy); opacity: 0.45; margin-bottom: 16px; display: block;
}

/* LAYOUT */
main { flex: 1; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 56px; }

/* ── LOGIN ─────────────────────────────────────────────────────────────────── */
.login-page { padding: 96px 0 120px; }
.login-page .container { max-width: 520px; }
.login-intro p { font-size: 17px; line-height: 1.75; }
.login-intro p + p { margin-top: 12px; }

.login-box {
  margin-top: 40px;
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 36px 40px;
}
.login-box label {
  display: block;
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy);
  margin-bottom: 10px;
}
.login-box input[type="password"] {
  width: 100%; display: block;
  font-family: 'DM Sans', sans-serif; font-size: 17px; font-weight: 400;
  color: var(--text); background: white;
  border: 1px solid var(--border); border-radius: 0;
  padding: 13px 16px; outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none; appearance: none;
}
.login-box input[type="password"]:focus { border-color: var(--navy); }
.login-box button {
  margin-top: 16px; width: 100%; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  letter-spacing: 0.02em; color: white; background: var(--navy);
  border: 1.5px solid var(--navy); border-radius: 0; padding: 13px 22px;
  transition: all 0.2s;
}
.login-box button:hover { background: transparent; color: var(--navy); }
.login-error {
  font-size: 14px; font-weight: 400; color: #8a3b3b;
  border-left: 2px solid #8a3b3b; padding-left: 12px; margin-bottom: 20px; line-height: 1.5;
}
.login-help {
  margin-top: 24px; font-size: 14px; font-weight: 300; color: var(--light); line-height: 1.6;
}
.login-help a { color: var(--navy); text-decoration: none; }
.login-help a:hover { opacity: 0.65; }

/* ── DOCUMENT LIST ─────────────────────────────────────────────────────────── */
.docs-page { padding: 80px 0 120px; }
.docs-header { margin-bottom: 52px; }
.docs-header > div { max-width: 640px; }
.docs-header p { font-size: 18px; line-height: 1.75; }

.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.docs-grid-single { grid-template-columns: 1fr; max-width: 640px; }
.doc-card { background: white; border: 1px solid var(--border); }
.doc-card-header {
  padding: 28px 32px 24px; border-bottom: 1px solid var(--border); background: var(--bg-soft);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
}
.doc-zip {
  flex-shrink: 0; margin-bottom: 4px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--navy); border: 1.5px solid var(--navy); background: white;
  padding: 8px 16px; text-decoration: none; white-space: nowrap; transition: all 0.2s;
}
.doc-zip span { font-weight: 300; color: var(--mid); }
.doc-zip:hover { background: var(--navy); color: white; }
.doc-zip:hover span { color: rgba(255,255,255,0.6); }
.doc-card-tag {
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--light); margin-bottom: 10px; display: block;
}
.doc-card-header h3 { font-size: 30px; margin-bottom: 4px; }
.doc-card-header p { font-size: 15px; }

.doc-row {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 32px; border-bottom: 1px solid var(--border);
}
.doc-row:last-child { border-bottom: none; }
.doc-row-external { background: var(--bg-soft); }
.doc-row-text { min-width: 0; }
.doc-title {
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  color: var(--navy); letter-spacing: 0.01em; margin-bottom: 2px;
}
.doc-note { font-size: 14px; font-weight: 300; color: var(--mid); line-height: 1.5; }
.doc-meta { font-size: 12px; font-weight: 300; color: var(--light); margin-top: 4px; letter-spacing: 0.02em; }
.doc-action { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.doc-dl { font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 400; color: var(--light); text-decoration: none; letter-spacing: 0.02em; transition: color 0.2s; }
.doc-dl:hover { color: var(--navy); text-decoration: underline; }
.doc-link {
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--navy); background: transparent; border: 1.5px solid var(--navy);
  padding: 8px 18px; text-decoration: none; white-space: nowrap; transition: all 0.2s; display: inline-block;
}
.doc-link:hover { background: var(--navy); color: white; }
.doc-pending {
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--light);
  border: 1px solid var(--border); padding: 7px 14px; white-space: nowrap; display: inline-block;
}

.docs-footnote {
  margin-top: 48px; background: var(--bg-soft); border: 1px solid var(--border);
  padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.docs-footnote p { font-size: 15px; }
.docs-footnote strong { font-weight: 500; color: var(--navy); }
.docs-footnote a { color: var(--navy); text-decoration: none; }
.docs-footnote a:hover { opacity: 0.65; }

/* FOOTER */
footer {
  background: #0f1635; padding: 36px 56px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-logo img { height: 36px; width: auto; filter: brightness(0) invert(1); opacity: 0.45; }
.footer-meta {
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 300;
  color: rgba(255,255,255,0.3); text-align: right; line-height: 1.6;
}
.footer-meta a { color: rgba(255,255,255,0.3); text-decoration: none; font-size: 11px; }

/* RESPONSIVE */
@media (max-width: 860px) {
  nav { padding: 0 24px; }
  .container { padding: 0 24px; }
  .login-page { padding: 64px 0 80px; }
  .login-box { padding: 28px 24px; }
  .docs-page { padding: 56px 0 80px; }
  .docs-grid { grid-template-columns: 1fr; gap: 24px; }
  .doc-card-header { padding: 24px 24px 18px; }
  .doc-card-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .doc-zip span { display: none; }
  .doc-row { padding: 18px 24px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .doc-action { flex-direction: row; align-items: center; gap: 14px; }
  footer { padding: 28px 24px; flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; font-size: 11px; }
}
@media (max-width: 480px) {
  nav { padding: 0 20px; }
  .container { padding: 0 20px; }
  .nav-right { gap: 16px; }
  .nav-back { display: none; }
}
