/* =====================================================
   IAPL — International Association of Predictive Linguistics
   Style académique classique et sobre
   ===================================================== */

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #2b2b2b;
  background: #faf8f4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  font-weight: 600;
  color: #0a2342;
  line-height: 1.25;
  margin: 0 0 0.6em 0;
  letter-spacing: 0.2px;
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.45rem; }

p { margin: 0 0 1em 0; }
a {
  color: #0a2342;
  text-decoration: none;
  border-bottom: 1px solid rgba(166, 134, 60, 0.4);
  transition: color .2s, border-color .2s;
}
a:hover { color: #a6863c; border-bottom-color: #a6863c; }

img { max-width: 100%; display: block; }

/* --- Layout helpers --- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 4rem 0; }
.section--tight { padding: 2.5rem 0; }
.section--alt { background: #f1ede3; }
.section--dark { background: #0a2342; color: #eee5d0; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #f5efd9; }
.section--dark a { color: #d9c37a; border-color: rgba(217,195,122,.4); }
.section--dark a:hover { color: #fff; border-color: #fff; }

.grid { display: grid; gap: 2rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.lead { font-size: 1.2rem; color: #444; font-family: "Cormorant Garamond", serif; font-style: italic; }

.divider {
  width: 60px; height: 3px; background: #a6863c; margin: 1.2rem 0 1.8rem;
  border: 0;
}

.hr-ornament {
  text-align: center; margin: 3rem 0; color: #a6863c; letter-spacing: 0.6em;
}

/* --- Header --- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e7e0cf;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: none;
}
.brand__logo { width: 46px; height: 46px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #0a2342;
  letter-spacing: 0.5px;
}
.brand__sub {
  font-size: 0.72rem;
  color: #7a7468;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* --- Navigation --- */
.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.nav a {
  padding: 0.5rem 0.85rem;
  border: none;
  font-size: 0.95rem;
  color: #33302a;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.nav a:hover { color: #0a2342; border-bottom-color: #a6863c; }
.nav a.active { color: #0a2342; border-bottom-color: #0a2342; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.8rem;
  padding-left: 0.8rem;
  border-left: 1px solid #e0d8c3;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}
.lang-switch button {
  background: none;
  border: none;
  color: #7a7468;
  cursor: pointer;
  font: inherit;
  padding: 4px 8px;
  text-transform: uppercase;
  border-radius: 2px;
}
.lang-switch button.active { color: #0a2342; font-weight: 700; }
.lang-switch button:hover { color: #a6863c; }
.lang-switch .sep { color: #c8bfa4; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #dcd4be;
  padding: 0.4rem 0.7rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: #0a2342;
}
@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e7e0cf;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.8rem 1.5rem; border-bottom: 1px solid #f1ede3; }
  .nav a.active { border-bottom-color: #f1ede3; background: #faf8f4; }
  .lang-switch { margin: 0.4rem 1.5rem; padding: 0.5rem 0 0 0; border-left: none; border-top: 1px solid #e0d8c3; }
}

/* --- Hero --- */
.hero {
  background:
    linear-gradient(180deg, rgba(10,35,66,0.72) 0%, rgba(10,35,66,0.85) 100%),
    radial-gradient(ellipse at top, #17335c 0%, #0a2342 60%);
  color: #f5efd9;
  padding: 6rem 0 5rem;
  text-align: center;
}
.hero h1 {
  color: #fff;
  font-size: 3rem;
  max-width: 900px;
  margin: 0 auto 0.6rem;
}
.hero .subtitle {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.4rem;
  color: #d9c37a;
  margin-bottom: 2rem;
}
.hero .cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.9rem 1.8rem;
  background: transparent;
  border: 2px solid #d9c37a;
  color: #f5efd9;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.88rem;
}
.hero .cta:hover { background: #d9c37a; color: #0a2342; border-color: #d9c37a; }
.hero .crest { width: 64px; height: 64px; margin: 0 auto 1.3rem; opacity: 0.95; }

/* --- Page header (non-home pages) --- */
.page-header {
  background: #0a2342;
  color: #f5efd9;
  padding: 3.2rem 0 2.6rem;
  text-align: center;
  border-bottom: 4px solid #a6863c;
}
.page-header h1 { color: #fff; margin: 0; font-size: 2.4rem; }
.page-header .breadcrumb {
  font-size: 0.82rem;
  color: #d9c37a;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid #e7e0cf;
  padding: 1.8rem;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(10,35,66,0.08); }
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid #eadfc0;
  padding-bottom: 0.4rem;
}
.card .meta {
  font-size: 0.8rem;
  color: #7a7468;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.card a.read-more {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a6863c;
  border: none;
}
.card a.read-more:hover { color: #0a2342; }

/* --- Person card --- */
.person {
  text-align: center;
  background: #fff;
  padding: 2rem 1.5rem;
  border: 1px solid #e7e0cf;
}
.person__portrait {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d9c37a 0%, #a6863c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  color: #0a2342;
  margin: 0 auto 1rem;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #e7e0cf;
}
.person__name { font-family: "Cormorant Garamond", serif; font-size: 1.3rem; color: #0a2342; margin: 0.2rem 0; font-weight: 600; }
.person__role { font-size: 0.9rem; color: #7a7468; letter-spacing: 0.1em; text-transform: uppercase; }
.person__bio { font-size: 0.95rem; margin-top: 0.7rem; color: #444; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #0a2342;
  color: #fff;
  border: 2px solid #0a2342;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.88rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.btn:hover { background: #17335c; border-color: #17335c; color: #fff; }
.btn--outline {
  background: transparent;
  color: #0a2342;
}
.btn--outline:hover { background: #0a2342; color: #fff; }
.btn--gold {
  background: #a6863c;
  border-color: #a6863c;
  color: #fff;
}
.btn--gold:hover { background: #8a6e2d; border-color: #8a6e2d; }

/* --- Forms --- */
form label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5b564a;
  margin: 0.8rem 0 0.3rem;
}
form input, form textarea, form select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d7cfb8;
  background: #fff;
  font: inherit;
  color: #2b2b2b;
}
form input:focus, form textarea:focus { outline: 2px solid #a6863c; border-color: #a6863c; }
form textarea { min-height: 150px; resize: vertical; }

/* --- Pull quote --- */
.pullquote {
  border-left: 4px solid #a6863c;
  padding: 0.4rem 1.2rem;
  margin: 2rem 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-style: italic;
  color: #0a2342;
}
.pullquote cite { display: block; margin-top: 0.7rem; font-size: 0.9rem; font-style: normal; color: #7a7468; letter-spacing: 0.1em; text-transform: uppercase; }

/* --- Timeline --- */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid #a6863c; padding-left: 1.5rem; }
.timeline li { margin-bottom: 1.5rem; position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.94rem;
  top: 0.35rem;
  width: 10px; height: 10px;
  background: #a6863c;
  border-radius: 50%;
  border: 2px solid #faf8f4;
  box-shadow: 0 0 0 2px #a6863c;
}
.timeline .year {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0a2342;
  display: block;
  margin-bottom: 0.2rem;
}

/* --- Footer --- */
.site-footer {
  background: #0a2342;
  color: #cdc4a8;
  padding: 3rem 0 1.5rem;
  font-size: 0.92rem;
}
.site-footer h4 {
  color: #f5efd9;
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid #1a335c;
  padding-bottom: 0.4rem;
}
.site-footer a { color: #d9c37a; border-color: transparent; }
.site-footer a:hover { color: #fff; border-bottom-color: #d9c37a; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.4rem; }
.site-footer__bottom {
  border-top: 1px solid #1a335c;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: #8a8168;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.muted { color: #7a7468; }
.small { font-size: 0.88rem; }
.tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: #eadfc0;
  color: #7a5a1e;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 0.35rem;
  border-radius: 2px;
}

/* --- Predictive Grammar page specific --- */
.pg-hero {
  background: linear-gradient(135deg, #0a2342 0%, #17335c 50%, #1f3b6a 100%);
  color: #f5efd9;
  padding: 5rem 0;
}
.pg-hero h1 { color: #fff; font-size: 3rem; }
.pg-hero .kicker {
  color: #d9c37a;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}
.pg-hero .lead { color: #eae0c2; font-style: italic; font-size: 1.35rem; font-family: "Cormorant Garamond", serif; }

.pg-principle {
  background: #fff;
  border-left: 5px solid #a6863c;
  padding: 1.5rem 1.8rem;
  margin: 1.2rem 0;
  border: 1px solid #e7e0cf;
  border-left: 5px solid #a6863c;
}
.pg-principle h3 { margin-top: 0; font-size: 1.2rem; }
.pg-principle .number {
  font-family: "Cormorant Garamond", serif;
  color: #a6863c;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  float: left;
  margin-right: 0.8rem;
  margin-top: -0.1rem;
}

.language-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  margin: 0.2rem;
  background: #f1ede3;
  border: 1px solid #d7cfb8;
  font-size: 0.85rem;
  color: #0a2342;
  border-radius: 2px;
}

/* Print styles */
@media print {
  .site-header, .site-footer, .lang-switch, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; border: none; }
}
