:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --muted-text: #555555;
  --accent: #6a3fb3; /* adjust to your preferred purple */
  --border-color: #dddddd;
  --max-width: 960px;
  --heading-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Basic reset and typography */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--body-font);
  line-height: 1.6;
  font-size: 16px;
}

/* Global link styles */

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* Skip link */

.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background-color: #ffffff;
  color: var(--accent);
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

/* Layout helpers */

.section {
  padding: 3rem 1rem;
}

.section-inner,
.header-inner,
.footer-inner,
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
}

.site-branding {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
}

.site-title:focus,
.site-title:hover {
  text-decoration: underline;
}

.site-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}

.main-nav a {
  font-size: 0.95rem;
}

/* Hero */

.hero {
  padding: 3rem 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.hero-content {
  flex: 1 1 280px;
}

.hero-visual {
  flex: 0 0 240px;
  display: flex;
  justify-content: center;
}

.hero-network {
  width: 200px;
  height: 120px;
}

.hero-network circle {
  fill: var(--accent);
}

.hero-network line {
  stroke: var(--accent);
  stroke-width: 1;
}

.hero h1 {
  font-family: var(--heading-font);
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

.hero-core {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.hero-support {
  margin: 0 0 1rem;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #4f2a8a;
  border-color: #4f2a8a;
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #f5f0ff;
}

/* Sections and content */

h1,
h2,
h3,
h4 {
  font-family: var(--heading-font);
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.4rem;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.1rem;
  margin: 2rem 0 0.5rem;
}

h4 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 0.75rem;
}

.bullet-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

/* Grid and cards */

.grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Force 2 columns on larger screens, 1 column on small screens */
.grid-2 {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.card {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
  background-color: #fafafa;
}

.card h3 a {
  color: var(--accent);
}

.card h3 a:hover,
.card h3 a:focus {
  text-decoration: underline;
}

.card-links {
  margin: 0.5rem 0 0;
}

.card-links a {
  color: var(--accent);
}

.card-links a:hover,
.card-links a:focus {
  text-decoration: underline;
}

.divider {
  margin: 0 0.25rem;
  color: var(--muted-text);
}

/* Extra space after any grid before an h2 */
.grid + h2 {
  margin-top: 2.5rem;
}

/* Contact form */

.contact-form {
  max-width: 600px;
  margin-top: 1rem;
}

.form-field {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.required-indicator {
  color: var(--accent);
  margin-left: 0.25rem;
}

.form-field input,
.form-field textarea {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.4rem;
  font-family: var(--body-font);
  font-size: 0.95rem;
}

.form-field input:focus,
.form-field textarea:focus,
.btn:focus,
.main-nav a:focus,
.site-title:focus,
.skip-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Form status message */

.form-status {
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
  color: var(--muted-text);
}

/* Footer */

.site-footer {
  border-top: 1px solid #cccccc; /* clearer line to separate footer */
  padding: 1.5rem 1rem;
  background-color: #f5f5f5; /* light grey background to distinguish from body */
  font-size: 0.9rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-inner p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover,
.site-footer a:focus {
  text-decoration: underline;
}

/* Footer links row */

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--accent);
}

.footer-links a:hover,
.footer-links a:focus {
  text-decoration: underline;
}

/* Responsive tweaks */

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero-inner {
    flex-direction: column;
  }

  .hero-content {
    flex: 1 1 auto;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  /* On small screens, grids become single-column */
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Form Feedback Styling */
.form-feedback {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

/* Success message */
.form-feedback.success {
  background-color: #e0f5e9;      /* pale green */
  border: 2px solid #1b7f3b;      /* dark green */
  color: #1b3b2a;                 /* strong text color */
}

/* Error message */
.form-feedback.error {
  background-color: #fdecea;      /* pale red */
  border: 2px solid #b01c2e;      /* dark red */
  color: #3d0008;                 /* strong text color */
}
