/* ERC ROCINANTE website.
   Same layout as the ERC ZARATHUSTRA site (a replica of its former WordPress/Divi design),
   with the ROCINANTE logo colours. Change the --c-* colours below to re-colour the whole site. */

:root {
  /* ROCINANTE palette (logo): orange, green, blue, yellow on #0B3041, letters #FFFFFF.
     Pink #D86ECC is only the plume in the logo and is not used here. */
  --c-primary: #FF6723;    /* orange: Project cover filter, objective Oa / WP1 */
  --c-green: #00D26A;      /* green: News cover filter, objective Ob / WP2 */
  --c-secondary: #0074BA;  /* blue: dividers, Team cover filter, member names, links on light sections, Oc / WP3 */
  --c-highlight: #FCD53F;  /* yellow: default links, active menu, Results cover filter, Od / WP4 */
  --c-neutral: #7F7F7F;    /* grey: menu items, member text */
  --c-icon: var(--c-primary); /* blurb icons */
  --c-divider: var(--c-secondary);
  --c-dark: #0B3041;       /* footer and intro bands (logo background) */
  --c-dark-2: #082532;     /* second dark band */
  --c-header: #0B3041;
  --c-text: #666666;
  --c-heading: #444444;
  --font-body: 'Ubuntu', Helvetica, Arial, Lucida, sans-serif;
  --font-head: 'Audiowide', display, sans-serif;
  --header-h: 94px;
}

/* ---------------------------------------------------------------- fonts */
@font-face { font-family: 'Audiowide'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/audiowide-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ubuntu-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ubuntu-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/ubuntu-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/ubuntu-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/ubuntu-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: italic; font-weight: 700; font-display: swap; src: url('../fonts/ubuntu-latin-700-italic.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ubuntu-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ubuntu-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/ubuntu-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
/* Elegant Icons (MIT), the icon font Divi is built on */
@font-face { font-family: 'ElegantIcons'; font-display: block; src: url('../fonts/ElegantIcons.woff') format('woff'); }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--c-text); font: 500 20px/1.5em var(--font-body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--c-highlight); text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; height: auto; vertical-align: bottom; }
h1, h2, h3, h4, h5, h6 { margin: 0; padding-bottom: 10px; color: var(--c-heading); font-family: var(--font-head); font-weight: 500; line-height: 1.2em; }
h1 { font-size: 32px; } h2 { font-size: 27px; } h3 { font-size: 23px; } h4 { font-size: 19px; } h5 { font-size: 16px; } h6 { font-size: 15px; }
p { margin: 0; padding-bottom: 1em; }
p:last-child { padding-bottom: 0; }
strong, b { font-weight: 700; }
ul, ol { margin: 0; padding: 0 0 23px 1em; line-height: 26px; }
ul { list-style-type: disc; }
ol { list-style-type: decimal; list-style-position: inside; }
li ul, li ol { padding: 2px 0 2px 20px; }
blockquote { margin: 20px 0 30px; padding-left: 20px; border-left: 5px solid var(--qb, var(--c-highlight)); }
blockquote p { padding-bottom: 0; }
figure { margin: 0; }
hr { border: 0; border-top: 1px solid #ddd; margin: 1em 0; }
.et-icon { font-family: 'ElegantIcons'; speak: never; font-style: normal; font-weight: 400; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; }

/* ---------------------------------------------------------------- header */
#main-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: var(--c-header); box-shadow: 0 1px 0 rgba(0,0,0,.1); transition: height .4s ease, box-shadow .4s; height: var(--header-h); }
#main-header.scrolled { --header-h: 54px; box-shadow: 0 0 7px rgba(0,0,0,.1); }
.header-inner { height: 100%; padding: 0 32px 0 37px; display: flex; align-items: center; justify-content: space-between; }
#logo { display: block; height: 56px; width: auto; max-width: none; transition: height .4s ease; }
#main-header.scrolled #logo { height: 32px; }
#top-nav { display: flex; align-items: center; height: 100%; }
#top-menu { list-style: none; margin: 0; padding: 0; display: flex; line-height: 1; }
#top-menu li { padding-right: 22px; }
#top-menu a { display: block; font: 700 18px/1em var(--font-head); text-transform: uppercase; color: var(--c-neutral); transition: font-size .4s, color .3s; }
#main-header.scrolled #top-menu a { font-size: 14px; }
#top-menu a:hover { opacity: .7; }
#top-menu li.current a { color: var(--c-highlight); }
#search-toggle, #menu-toggle { background: none; border: 0; padding: 0; margin-left: 0; cursor: pointer; color: var(--c-neutral); font-size: 17px; }
#menu-toggle { display: none; font-size: 32px; }
#page-container { padding-top: 94px; }

/* ---------------------------------------------------------------- layout */
.sec { position: relative; background-position: center; background-size: cover; background-repeat: no-repeat; }
.row { width: 80%; max-width: 960px; margin: 0 auto; padding: 20px 0; display: flex; align-items: flex-start; }
.row-equal { align-items: stretch; }
.col { flex: 0 0 auto; margin-right: 5.5%; min-width: 0; position: relative; }
.col:last-child { margin-right: 0; }
.col-4_4 { width: 100%; }
.col-1_2 { width: 47.25%; }
.col-1_3 { width: 29.6667%; }
.col-2_3 { width: 64.833%; }
.col-1_4 { width: 20.875%; }
.col-3_4 { width: 73.625%; }
.col-1_5 { width: 15.6%; }
.col-2_5 { width: 36.8%; }
.col-3_5 { width: 57.7%; }
.row-inner { display: flex; padding: 26px 0; }
.col-inner { width: calc(var(--w) * 100%); }
.mod { position: relative; margin-bottom: min(26.4px, 2.2vw); }
.col > .mod:last-child, .col-inner > .mod:last-child { margin-bottom: 0; }
.sec-specialty > .row { padding: 0; }
.sec-specialty > .row > .col:has(> .row-inner) { padding-top: 27px; padding-bottom: 27px; }

/* ---------------------------------------------------------------- text module */
.text { color: var(--tc, inherit); font-size: var(--ts, inherit); line-height: var(--tl, 1.5em); font-family: var(--tf, inherit); }
.text h1, .text h2, .text h3, .text h4, .text h5, .text h6 { color: var(--hc, var(--c-heading)); font-family: var(--hf, var(--font-head)); text-align: var(--ha, inherit); text-shadow: var(--hsh, none); }
.text h1 { font-size: var(--h1s, 32px); }
.text a { color: var(--lc, var(--c-highlight)); }
.text blockquote { color: var(--qc, inherit); font-size: var(--qs, inherit); font-family: var(--qf, inherit); text-align: var(--qa, inherit); }
.text blockquote p { line-height: 1.25em; }
.dark, .dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }

/* ---------------------------------------------------------------- image, divider */
.image { line-height: 0; }
.image img { width: auto; max-width: 100%; }
.footer-logo { width: 100%; max-width: 420px; margin: 0 auto; }
.footer-logo img { border-radius: 4px; }
.divider { height: 5px; box-sizing: content-box; }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: var(--dw, 1px) solid var(--dc, #fff); }
.divider[style*="padding-top"]::before { top: auto; }

/* ---------------------------------------------------------------- blurb */
.blurb { text-align: var(--ba, center); }
.blurb-media { margin: 0 auto 30px; line-height: 0; }
.blurb-media img { max-width: 100%; width: auto; display: inline-block; }
.blurb .et-icon { display: inline-block; font-size: var(--is, 96px); color: var(--ic, var(--c-icon)); line-height: 1; }
.blurb-title { color: var(--hc, var(--c-heading)); font-family: var(--hf, var(--font-head)); font-size: var(--bhs, 19px); line-height: 1.8em; padding-bottom: 10px; }
.blurb-title a { color: inherit; }
.blurb-text { color: var(--tc, inherit); font-size: var(--ts, inherit); line-height: var(--tl, 1.5em); }
.blurb-text a { color: var(--c-highlight); }
.blurb-left { display: flex; text-align: left; gap: 15px; }
.blurb-left .blurb-media { margin: 0; }

/* ---------------------------------------------------------------- team member */
.member { display: flex; align-items: flex-start; }
.member-photo { flex: 0 0 auto; width: 220px; margin-right: 30px; border-radius: 8px; overflow: hidden; filter: sepia(.75); line-height: 0; }
.member-photo img { width: 220px; }
.member-text { flex: 1; color: var(--c-neutral); }
.member-name { font-family: var(--font-body); font-size: 27px; color: var(--c-secondary); padding-bottom: 10px; }
.member-position { color: #aaa; font-weight: 700; padding-bottom: 0; }
.member-bio a { color: var(--c-highlight); }

/* ---------------------------------------------------------------- hero (full-screen header) */
.hero { position: relative; display: flex; align-items: center; justify-content: center; background-position: center; background-size: cover; background-attachment: fixed; text-align: center; padding: 50px 0; }
.hero-fullscreen { min-height: calc(100vh - 94px); }
.hero-inner { width: 80%; max-width: 800px; padding: 10px; }
.hero-title { font: 700 var(--h1s, 60px)/1.4em var(--font-head); color: #fff; text-shadow: var(--hsh, none); padding: 0 0 10px; }
.hero-scroll { background-attachment: scroll; }
.scroll-down { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 80px; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -12px); } 60% { transform: translate(-50%, -6px); } }

/* objective / work-package colours */
.c-orange { --ic: var(--c-primary); } .c-green { --ic: var(--c-green); } .c-blue { --ic: var(--c-secondary); } .c-yellow { --ic: var(--c-highlight); }
.dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; vertical-align: baseline; margin-left: .25em; }
.dot-orange { background: var(--c-primary); } .dot-green { background: var(--c-green); } .dot-blue { background: var(--c-secondary); } .dot-yellow { background: var(--c-highlight); }
.figure-caption { font-size: 16px; line-height: 1.5em; text-align: center; font-style: italic; }
.placeholder-note { color: #999; font-style: italic; }

/* ---------------------------------------------------------------- footer */
#site-footer { background: var(--c-dark); }
#site-footer .footer-row { padding: 40px 0; align-items: center; }
.footer-text { color: #fff; font-size: 18px; line-height: 1.4em; text-align: justify; }
.footer-text h2 { color: #fff; text-align: justify; }

/* ---------------------------------------------------------------- news list (News page) */
.blog-list .list-post { margin-bottom: 60px; }
.list-image { display: block; margin-bottom: 30px; line-height: 0; }
.list-image img { width: 100%; }
.entry-title { font-size: 27px; padding-bottom: 10px; }
.entry-title a { color: var(--c-heading); }
.post-meta { margin-bottom: 6px; padding-bottom: 0; }
.post-meta a { color: var(--c-text); }
.more-link { color: var(--c-secondary); display: block; }

/* ---------------------------------------------------------------- related posts grid */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 5.5%; align-items: start; }
.grid-post { border: 1px solid #d8d8d8; padding: 19px; margin-bottom: 30px; background: #fff; }
.grid-image { display: block; margin: -19px -19px 29px; line-height: 0; aspect-ratio: 400 / 250; overflow: hidden; }
.grid-image img { width: 100%; height: 100%; object-fit: cover; }
.grid-post .entry-title { font-size: 19px; }
.grid-post .more-link { display: inline-block; }

/* ---------------------------------------------------------------- single post */
.post-hero { height: 400px; background-size: cover; background-position: center; }
.post-title-band { background: rgba(11,48,65,.92); }
.post-title-band .row { padding: 20px 0; }
.post-title-band h1 { color: #fff; font: 500 60px/1.6em var(--font-head); text-align: center; padding: 0; }
.post-content-row { padding: 20px 0 0; }
.post-meta-row { padding: 20px 0; }
.post-meta-row .text { text-align: center; }
.post-content a, .post-meta-row a, .related-row a { color: var(--c-secondary); }
.related-row .entry-title a { color: var(--c-heading); }
.related-head { padding: 20px 0; display: block; }
.related-head .divider { margin-bottom: 0; }
.related-head h2 { text-align: center; }
.related-row { padding: 20px 0; }
.post-content figure { margin: 0 0 1em; }
.post-content figcaption, .wp-element-caption { font-size: 15px; line-height: 1.4em; text-align: center; color: #888; margin-top: .5em; }
.wp-block-image { margin-bottom: 1em; }
.wp-block-image.aligncenter, .aligncenter { text-align: center; margin-left: auto; margin-right: auto; }
.wp-block-image .aligncenter { display: table; margin: 0 auto; }
.wp-block-image .aligncenter > figcaption { display: table-caption; caption-side: bottom; }
.wp-block-image.size-large img, .wp-block-image.size-full img { width: auto; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.wp-block-gallery { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 1em; padding: 0; list-style: none; }
.wp-block-gallery > figure, .wp-block-gallery .wp-block-image { flex: 1 1 calc(33% - 16px); margin: 0; position: relative; }
.wp-block-gallery.columns-2 > figure { flex-basis: calc(50% - 16px); }
.wp-block-gallery img { width: 100%; height: 100%; object-fit: cover; }
.wp-block-gallery figcaption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(0deg, rgba(0,0,0,.7), transparent); color: #fff; padding: 20px 8px 6px; margin: 0; font-size: 13px; }
.wp-block-embed { margin: 0 0 1em; }
.wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wp-block-separator { border: 0; border-top: 2px solid #ccc; margin: 1.5em auto; max-width: 100px; }

/* ---------------------------------------------------------------- category / 404 */
.category-head { background: var(--c-dark); }
.category-head .row { padding: 30px 0; }
.category-head h1 { color: #d3d3d3; }
.category-head p { color: #919191; }

/* ---------------------------------------------------------------- search */
#search-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.92); padding: 110px 10% 40px; overflow-y: auto; }
#search-overlay[hidden] { display: none; }
.search-box { display: flex; align-items: center; border-bottom: 2px solid var(--c-neutral); max-width: 960px; margin: 0 auto; }
#search-input { flex: 1; background: none; border: 0; color: #fff; font: 700 24px var(--font-head); text-transform: uppercase; padding: 10px 0; outline: none; }
#search-close { background: none; border: 0; color: var(--c-neutral); font-size: 28px; cursor: pointer; }
#search-results { max-width: 960px; margin: 30px auto 0; padding: 0; list-style: none; line-height: 1.5em; }
#search-results li { padding: 12px 0; border-bottom: 1px solid #333; }
#search-results a { font-family: var(--font-head); color: var(--c-highlight); }
#search-results p { color: #aaa; font-size: 16px; padding: 4px 0 0; }

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 980px) {
  :root { --header-h: 80px; }
  #main-header, #main-header.scrolled { --header-h: 80px; background: #fff; }
  #logo, #main-header.scrolled #logo { height: 43px; }
  .header-inner { padding: 0 5%; }
  #menu-toggle { display: block; color: var(--c-highlight); }
  #search-toggle { color: rgba(0,0,0,.6); margin-right: 18px; }
  #top-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #fff; padding: 5%; border-top: 3px solid var(--c-highlight); box-shadow: 0 2px 5px rgba(0,0,0,.1); }
  #top-menu.open { display: flex; }
  #top-menu li { padding: 0; }
  #top-menu a, #main-header.scrolled #top-menu a { font-size: 14px; color: rgba(0,0,0,.6); padding: 10px 5%; border-bottom: 1px solid rgba(0,0,0,.03); }
  #page-container { padding-top: 80px; }
  .row { flex-direction: column; }
  .mod { margin-bottom: 30px; }
  .row-inner { flex-direction: column; }
  .col, .col-inner { width: 100% !important; margin-right: 0; margin-bottom: 30px; }
  .col:last-child, .col-inner:last-child { margin-bottom: 0; }
  .hero { background-attachment: scroll; }
  .hero-fullscreen { min-height: calc(100vh - 80px); }
  .footer-logo { width: 100%; max-width: 100%; }
  .blog-grid { grid-template-columns: 1fr 1fr; gap: 0 5.5%; }
  .post-title-band h1 { font-size: 40px; }
}
@media (max-width: 767px) {
  .hero-title, .text h1 { font-size: min(var(--h1s, 32px), 32px); }
  .hero-title { font-size: 24px; }
  .member { flex-direction: column; }
  .member-photo { margin: 0 0 20px; }
  .blog-grid { grid-template-columns: 1fr; }
  .post-title-band h1 { font-size: 30px; }
  .post-hero { height: 250px; }
}

/* icons drawn from an SVG file in the current icon colour (e.g. the X logo) */
.icon-mask { display: inline-block; width: calc(var(--is, 96px) * .8); height: calc(var(--is, 96px) * .8); margin: calc(var(--is, 96px) * .1) 0; background: var(--ic, var(--c-icon)); -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat; }

/* text in the objective / work-package colours (e.g. **Experiments**{: .t-orange} in Markdown) */
.t-orange { color: var(--c-primary); } .t-green { color: var(--c-green); } .t-blue { color: var(--c-secondary); } .t-yellow { color: #D9A900; } /* the logo yellow is hard to read on white: a darker shade */
