
/*
  Type scale: Perfect Fifth
  11.391
  7.594
  5.063
   - 4.2
    -3.8
  3.375
  2.25
  1.5
  1
  0.667
*/

@font-face {
  font-family: "IBM-Plex";
  src: url("./fonts/ibm-plex-sans-regular.woff2")
    format("woff2");
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM-Plex";
  src: url("./fonts/ibm-plex-sans-bold.woff2")
    format("woff2");
  font-weight: bold;
  font-display: swap;
}

@font-face {
  font-family: "IBM-Plex";
  src: url("./fonts/ibm-plex-sans-italic.woff2")
    format("woff2");
  font-style: italic;
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM-Plex-Condensed-Light";
  src: url("./fonts/ibm-plex-condensed-light.woff2")
    format("woff2");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "IBM-Plex-Serif";
  src: url("./fonts/ibm-plex-serif-bold.woff2")
    format("woff2");
  font-weight: bold;
  font-display: swap;
}
@keyframes rotating {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

:disabled, [readonly] {
  background: #666;
  color: #333;
  cursor: not-allowed;
}

/* 
  x-small < 576px 36rem
  small >= 576px
  medium >= 768px
  large >= 992px
  x-large >= 1200px
  xxl => 1400px
*/
:root {
  --audio-one-volume: 100%;
  --body-padding-x: 1rem;
  --box-shadow-color: #a9a9ad;
  --color-bg-cream: #fefcf5;
  --color-blue-dark: #23297A;
  /* Order of St. Patrick's Blue */
  --color-blue-light: #adD9ff;
  --color-cream-light: #fefcf5;
  --color-cream-dark: #B4AD96;
  --color-yellow-medium: #ffe100;
  --color-green-dark: #14505e;
  --color-green-medium: #22706d;
  --color-green-light: #d8f3f2;
  --color-orange-dark: #9B4F00;
  --color-orange-medium: #FF8200;
  --color-orange-light: #FFB364;
  --color-orange-lightest: #FFDAB3;
  --color-ui-grey-md: #666;
  --color-ui-grey-md-light: #999;
  --color-ui-grey-lightest: #e9e9ed;
  --color-ui-grey-lightest-bluey: #f1f3f4;
  --color-ui-grey-lighter: #c9c9cd;
  --color-ui-grey-light: #a9a9ad;
  --font-size-eleven: 11.391rem;
  --font-size-six: 7.594rem;
  --font-size-five: 5.063rem;
  --font-size-four: 3.375rem;
  --font-size-three: 2.25rem;
  --font-size-two-half: 1.875rem;
  --font-size-two: 1.5rem;
  --font-size-one-half: 1.25rem;
  --font-size-one: 1rem;
  --font-size-minus-one: 0.667rem;
  --main-bg-color: #fefcf5;
  --padding-pronunciation: 4rem;
  --text-body-color: #666;
  --ui-bar-radius: 5rem;
  --ui-btn-size: 3.375rem;
  --ui-change-time:  300ms;
  --ui-change-format: ease-in-out;
  --ui-input-radius: 1rem;
  /* can't use in media queries */
  /* --screen-medium: 48rem; */

}

@keyframes opacity-frame-1-2 {
  0% {
    opacity: 100%;
  }
  49% {
    opacity: 100%;
  }
  50%{
    opacity: 0%;
  }
  100% {
    opacity: 0%;
  }
}

@keyframes opacity-frame-2-2 {
  0% {
    opacity: 0%;
  }
  49% {
    opacity: 0%;
  }
  50%{
    opacity: 100%;
  }
  100% {
    opacity: 100%;
  }
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  background-color: var(--color-bg-cream);
  color: #444;
  display: flex;
  flex-direction: column;
	font-family: 'IBM-Plex', sans-serif;
  font-size: var(--font-size-one-half);
  font-weight: normal;
  justify-content: space-between;
  line-height: 2rem;
  margin: 0;
  min-height: 100%;
}

img {display: block; max-width: 100%;}

a, button, input, select, textarea {
  outline: solid 0.25rem transparent;
  outline-offset: 0.25rem;
}

.a-frame-1-2 {
  animation: opacity-frame-1-2 2s linear infinite forwards;
}
.a-frame-2-2 {
  animation: opacity-frame-2-2 2s linear infinite forwards;
}

.a-tween {
  height: auto;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%
}

.alert-box {
  box-sizing: border-box;
  color: #000; padding: 1rem;
  word-break: break-word;
}

.alert-box.error {
    background-color: var(--color-orange-lightest);
    border-color: var(--color-orange-dark);
}

.alert-box.error>h4 {
    color: var(--color-orange-dark);
}

.audio-word-letter {font-size: var(--font-size-four); line-height: 1; margin: 0;}

.audio-word-sync {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: var(--font-size-two) auto 0;
  padding: 1rem;
}
.audio-word-sync-item {
  border: solid 0.125rem var(--box-shadow-color);
  border-radius: 0.125rem;
  box-sizing: border-box;
  box-shadow: 0 0.25rem 0 0 var(--box-shadow-color);
  flex: 1 1 0;
  margin: 1rem;
  padding: 1rem;
  text-align: center;
}
.audio-word-sync-item.highlighted, 
.audio-word-sync-item.highlighted > p {
  --box-shadow-color: var(--color-yellow-medium);
  background-color: var(--color-yellow-medium);
  color: var(--color-green-dark);
}

.b4-list {
  margin-bottom: var(--font-size-minus-one);
}

.b4-section-break {
  margin-bottom: var(--font-size-four);
}

.bg-cream {
  background: var(--color-bg-cream);
}

.bg-dark {background-color: var(--color-green-dark);}

.bg-dark > h1, .bg-dark > p {
  color: #FFF;
}

.bg-dark > p {
  /* color: var(--color-green-light); */
}

.bg-green-light {background-color: var(--color-green-light);}

.bg-img {
  /* 'hidden' creates new stack context, causing 'sticky' not to work */
  overflow: clip;
  position: relative;
}

.bg-img::before {
  background-image: url("/_common-content/img/bg-abstract-ear-spiral.svg");
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  display: block;
  height: 100%;
  /* gives dark beige tone: black to #B4AD96 */
  filter: invert(77%) sepia(7%) saturate(717%) hue-rotate(9deg) brightness(91%) contrast(82%);
  left: 0;
  opacity: 0.2;
  position: absolute;
  top: 0;
  width: 100%;
}

.bg-img-ear::before {
  
  opacity: 0.1;
  top: 0;
  left: calc(50% - 15rem);
  transform: rotate(10deg);
  /* 'center' cause bg-img to overflow above, resulting in loss of padding on Heading when using #Listen */
  transform-origin: bottom;
}

.bg-kells-b {
  position: relative;
}

.bg-img.kells-b::before {
  background-image: url("/_common-content/img/backgrounds/kells-b-opacity-20.webp");
  opacity: 0.3;
}

.bg-white {background-color: #FFF}

button {
  appearance: none;
  background: none;
  background-color: var(--color-ui-grey-lightest);
  border: none;
}

button, input, select, textarea {
  box-sizing: border-box;
  color: var(--text-body-color);
  font-size: var(--font-size-one-half);
  padding: 0.667rem;
  transition: background-color var(--ui-change-time) var(--ui-change-format), outline-color var(--ui-change-time) var(--ui-change-format) ;
}

a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline-color: var(--color-yellow-medium);
}

button:hover {
  background-color: var(--color-ui-grey-light);
}

button:active {
  background-color: var(--color-yellow-medium);
}

.content-width {
  box-sizing: border-box;
  /* avoid gaps at top */
  display: inline-block;
  padding: var(--body-padding-x);
  /* to over-sit ::bg-img (w/ opacity) */
  overflow: clip;
  position: relative;
  /* since main is text-centered */
  text-align: left;
  max-width: 100%;
  width: 100%;
}

dfn{font-style: normal;}

dialog {
  position: fixed;
  top: 50%;
  transform: translateY(-25%);
}

dialog::backdrop {
  background: rgba(0,0,0,0.25);
  height: 100%;
  width: 100%;
}

.dialog-inner {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  top: 50%;
  transform: translateY(-25%);
  width: 24rem;
}

.error-img {
  /* https://angel-rs.github.io/css-color-filter-generator/ to get #9B4F00 from #000 */
  filter: brightness(0) saturate(100%) invert(21%) sepia(92%) saturate(3077%) hue-rotate(39deg) brightness(96%) contrast(101%);
  margin-right: var(--font-size-one);
}

footer {margin: 0}

.form-signup {display: flex;justify-content: center;}

.form-signup-field {
  border-radius: 1.5rem 0 0 1.5rem;
  /* for stacking purposes, over signup button */
  position: relative;
  text-align: center;
  z-index: 1;
}

.form-signup-submit {
  align-items: center;
  background-color: var(--color-yellow-medium);
  border-radius: 0 1.5rem 1.5rem 0;color: #000;display: flex;
  justify-content: space-around;width: fit-content;
}

.form-signup-submit.submitting {
  background-color: var(--color-yellow-medium);
}

.form-signup-submit > .submitting, .form-signup-submit.submitting > .initial {
  display: none;
}

.form-signup-submit.submitting > .submitting {
  display: inline-block;
}

.form-signup-text {
  margin-right: 0.5rem;
}

.form-ui-icon {
  max-height: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  color: inherit;
  font-family: "IBM-Plex-Serif";
  font-weight: bold;
  line-height: 1.875;
  margin: 0 0 1.5rem 0;
}

h1 {
  font-size: 3.8rem;
  line-height: 1.875;
  margin-bottom: var(--font-size-four);
}

h1 > span {line-height: 1;}


h2 {
  border-bottom: solid 0.125rem var(--color-ui-grey-md-light) ;
  color: var(--color-green-dark);
  font-family: "IBM-Plex-Condensed-Light";
  font-size: var(--font-size-four);
  font-weight: 300;
  margin-bottom: var(--font-size-four);
  padding-bottom: var(--font-size-one-half);
}

h3 {font-size: var(--font-size-three); line-height: 1.25;}
h4 {font-size: var(--font-size-two); line-height: 1.25;}


hr {
  background: var(--color-ui-grey-md-light);
  border: none;
  height: 0.125rem;
  margin-bottom: var(--font-size-four);
}

img {
  font-size: var(--font-size-minus-one);
}

.index-list {list-style: none; padding-left: 0.667rem;}
.index-list-entry-header {
  border-top: solid 0.125rem var(--color-green-dark)
}
.index-list-entry-header > span {
  background: var(--color-green-dark);
  color: #FFF;
  padding: 0 1rem 0.667rem;
}

input {
  appearance: none;
  display: inline-block;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
  max-width: 15rem;
  min-height: 2rem;
  padding: 0 0.667rem;
  width: 100%;
}

input[type=range] {
  /* for styling in Chrome */
  -webkit-appearance: none;
  background: transparent;
  height: 1rem;
  margin: 1rem 0;
  min-height: 0;
  padding: 0;
  width: 100%;
}

/*  Must be separate, as browsers will ignore entire rules
    they don't understand.
*/

input[type=range]::-moz-range-track {
  height: 0.667rem;
  cursor: pointer;
  background: var(--color-ui-grey-lighter);
  border-radius: var(--ui-bar-radius);
  width: 100%;
}

input[type=range]::-webkit-slider-runnable-track {
  /* selectivty of default Chrome styles overrides earlier dec. */
  appearance: none;
  height: 0.667rem;
  cursor: pointer;
  background: var(--color-ui-grey-lighter);
  /* updated in JS; hard stops created */
  background: linear-gradient(90deg, var(--color-ui-grey-md-light) var(--audio-one-volume), var(--color-ui-grey-lighter) var(--audio-one-volume));
  border-radius: var(--ui-bar-radius);
  width: 100%;
}


input[type=range]::-moz-range-progress {
  background-color: var(--color-ui-grey-md-light);
  border-radius: var(--ui-bar-radius);
  height: 0.667rem;
}

input[type=range]::-moz-range-thumb {
  background-color: var(--color-green-medium);
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  height: 1rem;
  width: 1rem;
}

input[type=range]::-webkit-slider-thumb {
  /* selectivty of default Chrome styles overrides earlier dec. */
  appearance: none;
  background-color: var(--color-green-medium);
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  height: 1rem;
  position: relative;
  /* border on track affects webkit thumb position, knocking down etc. */
  top: -0.125rem;
  width: 1rem;
}



main {
  box-sizing: border-box;
  /* avoid gap at top under body */
  display: inline-block;
  margin: 0;
    /* to center content within sections etc. */
  text-align: center;
}

noscript {
  background-color: #999;
  border-bottom: solid 0.125rem var(--color-orange-medium);
  box-sizing: border-box;
  /* need this or no styles will apply (Opera) */
  display: block;
  padding: 1rem;
}

ol, p, ul {
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.page-header {
  /* avoid gap at top */
  display: inline-block;
  min-height: 100vh;
  padding: var(--font-size-six) 0;
  position: relative;
  margin: 0;
  width: 100%;
}

.page-header-cta {
  align-items: center;
  background: var(--color-bg-cream);
  border-bottom: solid 0.375rem var(--color-blue-light);
  bottom: 0; box-sizing: border-box;
  color: #000;
  box-sizing: border-box;
  display: flex;
  height: var(--ui-btn-size);
  justify-content: center;
  margin: 0 auto var(--font-size-five);
  padding: 1rem;
  text-decoration: none;
  width: 8rem;
}

.page-header-cta.dark {
  background: var(--color-green-dark); color: #FFF;
}

.page-header > p, .page-header > .content-width > p {
  font-size: var(--font-size-two);
}
.page-header-cta > .ui {
  margin-left: 0.125rem;
  max-width: 1rem;
}
.page-header-cta.dark > .link-cta-icon {filter: invert(100%)}


.page-header-subtitle {
  color: var(--color-orange-medium);
  display: block;
  font-size: var(--font-size-two-half);
}

.page-header-subtitle.light {color: var(--color-green-light);}

.page-header.dark-harp {
    background-color: var(--color-green-dark);
  background-image: url("/_common-content/img/harp-green-op-25.svg");
  background-position: top;
  background-repeat: no-repeat;
  background-size: cover;
  box-sizing: border-box;
}

.page-header-subtitle > .txt-subtle {color: var(--color-ui-grey-light); font-size: 1.5rem;}

.panel {
  border: solid 0.125rem var(--box-shadow-color);
  border-radius: 1rem;
  box-sizing: border-box;
  box-shadow: 0 0.25rem 0 0 var(--box-shadow-color);
  padding: 1.5rem;
}

.pronunciation {
  border: solid 0.125rem var(--box-shadow-color);
  border-radius: 0.125rem;
  background-color: var(--color-ui-grey-lightest-bluey);
  box-shadow: 0 0.25rem 0 0 var(--box-shadow-color);
  box-sizing: border-box;
  margin: 1rem auto 2.25rem;
  max-width: 10rem;
  overflow: clip;
  padding:0;
  padding-right: var(--padding-pronunciation);
  position: relative;
  width: 100%;
}

.pronunciation.full-face {
  --padding-pronunciation: 2rem;
}

.pronunciation > .a-tween {
  /* must match padding-right of pronunciation */
  max-width: calc(100% - var(--padding-pronunciation));
}

section {
  border-top: solid 0.25rem var(--color-ui-grey-md);
  padding: var(--font-size-five) 0;
}

.section-break {
  background: none;
  color: var(--color-ui-grey-md);
  font-size: 1.5rem;
  height: auto;
  margin: var(--font-size-four) auto;
  text-align: center;
}

.section-break::before {
  content: "\2042";
  display: block;
}

strong {
  font-weight: bold;
}

.txt-blue-light {color: var(--color-blue-light)}
.txt-green-dark {color: var(--color-green-dark);}
.txt-white {color: #FFF;}

.ui {
  /* force SVG to have width */
  width: 2.25rem;
}

.ui-play {
  position: relative;
  left: 0.125rem;
}

.ui-rotating {
  animation: rotating 2s linear infinite;
  transform-origin: center;
}

.ui-wrapper {
  display: flex;
}

.v-hide {
  visibility: hidden;
}

.wrap-icon-text {
  display: flex;
  align-items: center;
}

/*
  UTILITY CLASSES
*/
.d-b {display: block;}
.d-none {
  display: none;
}
.f-bold {font-weight: bold;}
.f-sans {font-family: 'IBM-Plex', sans-serif;}
.f-cond-l {font-family: 'IBM-Plex-Condensed-Light', sans-serif;}
.f-normal{font-weight: normal}
.f-size-3{font-size: var(--font-size-four);}
.f-size-11{font-size:var(--font-size-eleven)}
/*todo: conver these to rem value hints , e.g. mb-1-5 is 1.5rem etc.*/
.mb-1-5 {margin-bottom: 1.5rem;}
.mb-3 {
  margin-bottom: var(--font-size-four);
}
.mb-5{margin-bottom:f;}

@media screen and (min-width: 36rem) {

  .content-width {
    max-width: 32rem;
  }

}
/*  medium >= 768px */
@media screen and (min-width: 48rem) {

  h1 {
    font-size: var(--font-size-five);
    line-height: 1.875;
  }
  
  .page-header-subtitle {
    font-size: var(--font-size-three);
  }
    
}

/* large >= 992px */
@media screen and (min-width: 62rem ) {
  /* for h1 length */
  .content-width {
    max-width: 36rem;
  }
  h1 {
    font-size: var(--font-size-six);
  }
  
  .page-header-subtitle {
    font-size: var(--font-size-four);
  }

  .page-header-subtitle > .txt-subtle {font-size: 2.25rem;}
}