/* -------------------------------------------------------
   Global Theme (Element Selectors Only)
   Palette:
     --indigo:  #4A3F74
     --olive:   #7A7A3B
     --cream:   #FAF9F6
     --lav:     #A899C9
     --char:    #2E2E2E
-------------------------------------------------------- */

/* Load free fonts (can be moved to your HTML <head> if preferred) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --indigo: #4A3F74;
  --indigo-700: #43386B;
  --olive: #7A7A3B;
  --olive-700: #5E5E2D;
  --cream: #FAF9F6;
  --lav: #A899C9;
  --char: #2E2E2E;

  --gray-100: #F2F2F2;
  --gray-300: #D9D9DF;
  --border-subtle: #E7E7EE;

  /* Typography scale */
  --font-heading: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;

  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.06), 0 1px 1px rgba(0,0,0,.04);
  --shadow-2: 0 6px 18px rgba(0,0,0,.12);
  --focus: 0 0 0 3px rgba(122,122,59,.35); /* olive halo */
}

/* Base / page */
html { box-sizing: border-box; scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  color: var(--char);
  /*background:
    linear-gradient(360deg, #FFFFFF 0%, #534751 100%); /* soft depth */
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection highlight */
::selection {
  background: rgba(122,122,59,.25); /* olive tint */
}

/* Headings – bold, friendly */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--indigo);
  margin: 0 0 .5em;
}
h1 { font-weight: 800; font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: .2px; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
h3 { font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4, h5, h6 { font-weight: 700; }

/* Paragraphs & small text */
p { margin: 0 0 1rem; }
small { font-size: .875em; color: #444; }

/* Links */
a {
  color: var(--indigo);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: var(--olive); text-decoration-color: var(--olive); }
a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* Lists */
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .375rem; }

/* Horizontal rule (subtle divider) */
hr {
  height: 1px;
  border: none;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.08), transparent);
  margin: 2rem 0;
}

/* Images */
img, svg, picture, video { max-width: 100%; height: auto; display: block; }

/* Figures & blockquotes */
figure { margin: 0 0 1.25rem; }
blockquote {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--lav);
  background: #FBFAFF;
  color: #3a3553;
  border-radius: 6px;
}

/* Sections – alternate background rhythm without classes */
main > section:nth-of-type(2n) {
  background: var(--gray-100);
}
main > section {
  padding: clamp(1.5rem, 3vw, 3rem) 0;
}

/* Header / Footer (semantic elements only) */
header, footer {
  background: var(--indigo);
  color: #fff;
}
header a, footer a { color: #fff; }
header a:hover, footer a:hover { color: var(--lav); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem; border-bottom: 1px solid var(--border-subtle); }
th { text-align: left; color: var(--indigo); font-family: var(--font-heading); }

/* Forms */
label { font-weight: 600; color: var(--indigo); }
input, select, textarea {
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: .625rem .75rem;
  box-shadow: var(--shadow-1);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--olive);
  box-shadow: var(--focus);
}

/* overrides */
select {
    padding: unset;
}

/* Buttons (element selectors only) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-body);
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: .7rem 1.1rem;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  box-shadow: var(--shadow-1);
  background: var(--indigo);
  color: var(--cream);
}

/* Hover / active */
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  background: var(--olive);
  color: #fff;
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0);
  box-shadow: var(--shadow-1);
  background: var(--olive-700);
}

/* Disabled */
button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled {
  cursor: not-allowed;
  opacity: .6;
  box-shadow: none;
}

/* Secondary buttons via element context only:
   Use <button> for primary; use <input type="button"> for secondary if you want a contrast pattern.
   (Still no class names.) */
input[type="button"] {
  background: #fff;
  color: var(--indigo);
  border-color: var(--indigo);
}
input[type="button"]:hover {
  background: var(--lav);
  color: #fff;
  border-color: var(--lav);
}

/* Links that look like buttons (anchors remain element-only) */
a[href^="http"]:where(:not([rel~="no-button"])) {
  /* regular links unchanged; this block intentionally empty */
}

/* Nav (semantic element) */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,249,246,.85); /* cream glass */
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-1);
}

/* Footer tweaks */
footer { padding: 2rem 0; }
footer p { opacity: .9; }

/* Code / pre */
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #FBFAFF;
  color: #3b2f67;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}
code { padding: .15em .35em; }
pre { padding: .75rem 1rem; overflow: auto; }

/* Accessible focus for everything clickable */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}

/* Optional: solid hero look just by using the <header> or first <section> */
header, main > section:first-of-type {
  background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-700) 100%);
  color: #fff;
}
