/* ============================================================
   cogneuro.net — stylesheet
   ============================================================ */

/* ---- Google Fonts ----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ---- Colour palette --------------------------------------- */
:root {
  --bg:              #fafaf8;
  --text:            #1c1c1e;
  --muted:           #6b7280;
  --header-bg:       #0f1923;
  --header-text:     #eeede9;
  --link:            #1d6fa8;
  --link-hover:      #145a8a;
  --accent:          #c97d2f;
  --accent-light:    #fff8ed;
  --accent-border:   #e8a84a;
  --nav-hover:       rgba(255,255,255,0.09);
  --dropdown-bg:     #ffffff;
  --dropdown-border: #e5e7eb;
  --border:          #e5e7eb;
  --card-bg:         #ffffff;
  --max-width:       920px;
  --radius:          6px;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; }

/* ---- Body -------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.78;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Typography ------------------------------------------- */
h1, h2, h3, h4 {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: 2rem;    margin: 2rem 0 0.85rem; }
h2 { font-size: 1.45rem; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.12rem; margin: 1.6rem 0 0.5rem; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem 1.8rem; }
li { margin-bottom: 0.4rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
strong { font-weight: bold; }
em { font-style: italic; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Header ----------------------------------------------- */
header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 2px 10px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}

.logo img {
  height: 40px;
  width: auto;
  border-radius: 4px;
  display: block;
  flex-shrink: 0;
  opacity: 0.92;
  transition: opacity 0.15s;
}
.logo:hover img { opacity: 1; }

/* ---- Navigation ------------------------------------------- */
nav { margin-left: auto; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  height: 64px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item > a,
.nav-item > .nav-label {
  display: flex;
  align-items: center;
  padding: 0 0.82rem;
  height: 100%;
  color: var(--header-text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  opacity: 0.82;
}

.nav-item > a:hover,
.nav-item:hover > .nav-label {
  background: var(--nav-hover);
  text-decoration: none;
  opacity: 1;
}

/* Highlighted nav item (Sparrow link) */
.nav-item.nav-highlight > a {
  color: #f0c97a;
  opacity: 1;
}
.nav-item.nav-highlight > a:hover {
  color: #f5db9e;
  text-decoration: none;
}

/* Dropdown arrow */
.has-dropdown > .nav-label::after {
  content: " ▾";
  font-size: 0.62rem;
  opacity: 0.55;
  margin-left: 1px;
}

/* ---- Dropdown menus --------------------------------------- */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-top: 2px solid var(--accent);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  z-index: 200;
  border-radius: 0 0 var(--radius) var(--radius);
}

.nav-item:hover .dropdown { display: block; }

.dropdown li a {
  display: block;
  padding: 0.52rem 1.2rem;
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.83rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  text-decoration: none;
  transition: background 0.1s;
}
.dropdown li a:hover {
  background: #f5f4f0;
  color: var(--link);
  text-decoration: none;
}

/* ---- Mobile menu toggle ----------------------------------- */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--header-text);
  font-size: 1.6rem;
  cursor: pointer;
  margin-left: auto;
  padding: 0.3rem 0.5rem;
  opacity: 0.8;
}

/* ---- Main content ----------------------------------------- */
main {
  flex: 1;
  padding: 2.5rem 1.5rem 4.5rem;
}

.content {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- Images in content ------------------------------------ */
.content img {
  margin: 1.5rem 0;
  border-radius: var(--radius);
}

/* Profile photo */
.profile-photo {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 200px;
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(0,0,0,0.14);
}

/* ---- Callout boxes ---------------------------------------- */
.callout {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.91rem;
  line-height: 1.55;
}

.callout-clinic {
  background: var(--accent-light);
  border-left: 3px solid var(--accent-border);
  color: #5c3a10;
}
.callout-clinic a {
  color: #a06220;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.callout-clinic a:hover { color: var(--accent); }

.callout-notice {
  background: #f0f4f8;
  border-left: 3px solid #94a3b8;
  color: #374151;
}
.callout-notice a {
  color: #1d6fa8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.callout-notice a:hover { color: var(--link-hover); }

/* ---- Hero section ----------------------------------------- */
.hero {
  background: #060c12;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  position: relative;
}

.hero img {
  width: 100%;
  height: auto;
  max-height: 290px;
  object-fit: cover;
  object-position: center top;
  opacity: 0.88;
  margin: 0;
  border-radius: 0;
  display: block;
}

.hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.2rem 1.4rem 0.9rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: rgba(255,255,255,0.82);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.78rem;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ---- Feature cards ---------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
  margin: 2.2rem 0 1rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 5px 18px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.02rem;
  margin: 0 0 0.55rem;
  color: var(--text);
}

.card p {
  font-size: 0.86rem;
  font-family: Inter, system-ui, sans-serif;
  color: var(--muted);
  flex: 1;
  margin-bottom: 1rem;
  line-height: 1.55;
}

.card .card-link {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  margin-top: auto;
  letter-spacing: 0.01em;
}
.card .card-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ---- Section intro text on inner pages -------------------- */
.page-intro {
  font-size: 1.05rem;
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 400;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ---- Download button -------------------------------------- */
.btn {
  display: inline-block;
  background: var(--link);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}
.btn:hover {
  background: var(--link-hover);
  color: #fff;
  text-decoration: none;
}

/* ---- Footer ----------------------------------------------- */
footer {
  background: var(--header-bg);
  border-top: none;
  text-align: center;
  padding: 1.6rem 1rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.02em;
}
footer a {
  color: rgba(255,255,255,0.5);
}
footer a:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 700px) {
  .mobile-menu-toggle { display: block; }

  nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    padding: 0.5rem 0 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  }
  nav.open { display: block; }

  .nav-list {
    flex-direction: column;
    height: auto;
  }
  .nav-item { flex-direction: column; align-items: flex-start; }

  .nav-item > a,
  .nav-item > .nav-label {
    padding: 0.6rem 1.2rem;
    height: auto;
    width: 100%;
    opacity: 1;
  }

  .dropdown {
    display: block;
    position: static;
    border: none;
    border-top: none;
    border-left: 2px solid rgba(255,255,255,0.12);
    box-shadow: none;
    background: rgba(255,255,255,0.04);
    padding: 0;
    margin-left: 1rem;
    width: 100%;
    border-radius: 0;
  }
  .dropdown li a {
    color: rgba(255,255,255,0.75);
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
  }
  .dropdown li a:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
  }

  .profile-photo {
    float: none;
    margin: 0 0 1.5rem 0;
    max-width: 160px;
  }

  .hero img { max-height: 190px; }

  .cards { grid-template-columns: 1fr; }
}
