@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Nunito+Sans:wght@400;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: 1.2;
  font-weight: 800;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li { margin-bottom: 0.25rem; }

strong { font-weight: 700; }
em { font-style: italic; }

hr {
  border: none;
  border-top: 2px solid var(--color-primary);
  opacity: 0.3;
  margin: var(--spacing-lg) 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary {
  background: var(--color-trust-blue);
  color: #fff;
  border-color: var(--color-trust-blue);
}
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--color-trust-blue);
  border-color: var(--color-trust-blue);
}
.btn-secondary:hover { background: var(--color-trust-blue); color: #fff; }

.btn-cta {
  background: var(--color-cta);
  color: #fff;
  border-color: var(--color-cta);
}
.btn-cta:hover { background: var(--color-warm-orange); border-color: var(--color-warm-orange); color: #fff; }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.15rem; }

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-text);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #d1e3f6;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--color-focus-ring);
  box-shadow: 0 0 0 3px rgba(74,168,240,0.15);
}

.form-control::placeholder {
  color: #aabdd4;
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

select.form-control {
  cursor: pointer;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead th {
  background: var(--color-deep-navy);
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
}

tbody tr { border-bottom: 1px solid #e8f0fb; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f0f7ff; }
tbody td { padding: 0.75rem 1rem; }

/* Site Header */
.site-header {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--color-primary);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo:hover { opacity: 0.9; }

.site-logo-img {
  height: 60px;
  width: auto;
}

/* Site Main */
.site-main {
  flex: 1;
}

/* Site Footer */
.site-footer {
  background: var(--color-deep-navy);
  color: #c8d8ec;
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  margin-top: auto;
}

.site-footer a { color: var(--color-sky-blue); }
.site-footer a:hover { color: var(--color-sun-gold); }
.site-footer h4 { color: #fff; margin-bottom: 0.75rem; font-size: 1.1rem; }
.site-footer p { margin-bottom: 0.5rem; font-size: 0.95rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li { margin-bottom: 0.4rem; }

.footer-tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-sun-gold);
  margin-bottom: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: 0.875rem;
  color: #8aa8c8;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* Flash messages */
.flash {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.flash--success {
  background: #d4f8e2;
  color: #166534;
  border: 1px solid #a7f3c0;
}

.flash--error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.flash--info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}
