/* ! normalize.css v1.0.0 | MIT License | git.io/normalize */

/* ==========================================================================
HTML5 display definitions
========================================================================== */

/* * Corrects `block` display not defined in IE 6/7/8/9 and Firefox 3. */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
  display: block;
}
/* * Corrects `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. */
audio,
canvas,
video {
  display: inline-block;
  *display: inline;
  *zoom: 1;
}
/* * Prevents modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices. */
audio:not([controls]) {
  display: none;
  height: 0;
}
/* * Addresses styling for `hidden` attribute not present in IE 7/8/9, Firefox 3, * and Safari 4.
* Known issue:no IE 6 support. */
[hidden] {
  display: none;
}
/* ==========================================================================
Base
========================================================================== */
/* * 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using
*    `em` units.
* 2. Prevents iOS text size adjust after orientation change, without disabling
*    user zoom. */

html {
  font-size: 100%; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -ms-text-size-adjust: 100%; /* 2 */
}
/* * Addresses `font-family` inconsistency between `textarea` and other form
* elements. */
html,
button,
input,
select,
textarea {
  font-family: sans-serif;
}
/* * Addresses margins handled incorrectly in IE 6/7. */
body {
  margin: 0;
  font-family: "Lato", sans-serif;
  /* overflow-x: hidden; */
}
html,
body {
  width: auto !important;
  /* overflow-x: hidden !important; */
}
/* ==========================================================================
Links
========================================================================== */
/* * Addresses `outline` inconsistency between Chrome and other browsers. */

a:focus {
  outline: thin dotted;
}
/* * Improves readability when focused and also mouse hovered in all browsers. */
a:active,
a:hover {
  outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/* * Addresses font sizes and margins set differently in IE 6/7.
* Addresses font sizes within `section` and `article` in Firefox 4+, Safari 5, * and Chrome. */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
h2 {
  font-size: 1.5em;
  margin: 0.83em 0;
}
h3 {
  font-size: 1.17em;
  margin: 1em 0;
}
h4 {
  font-size: 1em;
  margin: 1.33em 0;
}
h5 {
  font-size: 0.83em;
  margin: 1.67em 0;
}
h6 {
  font-size: 0.75em;
  margin: 2.33em 0;
}
/* * Addresses styling not present in IE 7/8/9, Safari 5, and Chrome. */
abbr[title] {
  border-bottom: 1px dotted;
}
/* * Addresses style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. */
b,
strong {
  font-weight: bold;
}
blockquote {
  margin: 1em 40px;
}
/* * Addresses styling not present in Safari 5 and Chrome. */
dfn {
  font-style: italic;
}
/* * Addresses styling not present in IE 6/7/8/9. */
mark {
  background: #ff0;
  color: #000;
}
/* * Addresses margins set differently in IE 6/7. */
p,
pre {
  margin: 1em 0;
}
/* * Corrects font family set oddly in IE 6, Safari 4/5, and Chrome. */
code,
kbd,
pre,
samp {
  font-family: monospace, serif;
  _font-family: "courier new", monospace;
  font-size: 1em;
}
/* * Improves readability of pre-formatted text in all browsers. */
pre {
  white-space: pre;
  white-space: pre-wrap;
  word-wrap: break-word;
}
/* * Addresses CSS quotes not supported in IE 6/7. */
q {
  quotes: none;
}
/* * Addresses `quotes` property not supported in Safari 4. */
q:before,
q:after {
  content: "";
  content: none;
}
small {
  font-size: 75%;
}
/* * Prevents `sub` and `sup` affecting `line-height` in all browsers. */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sup {
  top: -0.5em;
}
sub {
  bottom: -0.25em;
}
/* ==========================================================================
Lists
========================================================================== */
/* * Addresses margins set differently in IE 6/7. */

dl,
menu,
ol,
ul {
  margin: 1em 0;
}
dd {
  margin: 0 0 0 40px;
}
/* * Addresses paddings set differently in IE 6/7. */
menu,
ol,
ul {
  padding: 0 0 0 40px;
}
/* * Corrects list images handled incorrectly in IE 7. */
nav ul,
nav ol {
  list-style: none;
  list-style-image: none;
}
/* ==========================================================================
Embedded content
========================================================================== */
/* * 1. Removes border when inside `a` element in IE 6/7/8/9 and Firefox 3.
* 2. Improves image quality when scaled in IE 7. */

img {
  border: 0; /* 1 */
  -ms-interpolation-mode: bicubic; /* 2 */
}
/* * Corrects overflow displayed oddly in IE 9. */
svg:not(:root) {
  overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/* * Addresses margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */

figure {
  margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/* * Corrects margin displayed oddly in IE 6/7. */

form {
  margin: 0;
}
/* * Define consistent border, margin, and padding. */
fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}
/* * 1. Corrects color not being inherited in IE 6/7/8/9.
* 2. Corrects text not wrapping in Firefox 3.
* 3. Corrects alignment displayed oddly in IE 6/7. */
legend {
  border: 0; /* 1 */
  padding: 0;
  white-space: normal; /* 2 */
  *margin-left: -7px; /* 3 */
}
/* * 1. Corrects font size not being inherited in all browsers.
* 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5, *    and Chrome.
* 3. Improves appearance and consistency in all browsers. */
button,
input,
select,
textarea {
  font-size: 100%; /* 1 */
  margin: 0; /* 2 */
  vertical-align: baseline; /* 3 */
  *vertical-align: middle; /* 3 */
}
/* * Addresses Firefox 3+ setting `line-height` on `input` using ` !important` in
* the UA stylesheet. */
button,
input {
  line-height: normal;
}
/* * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
*    and `video` controls.
* 2. Corrects inability to style clickable `input` types in iOS.
* 3. Improves usability and consistency of cursor style between image-type
*    `input` and others.
* 4. Removes inner spacing in IE 7 without affecting normal text inputs.
*    Known issue:inner spacing remains in IE 6. */
button, html input[type="button"], /* 1 */
input[type="reset"], input[type="submit"] {
  -webkit-appearance: button; /* 2 */
  cursor: pointer; /* 3 */
  *overflow: visible; /* 4 */
}
/* * Re-set default cursor for disabled elements. */
button[disabled],
input[disabled] {
  cursor: default;
}
/* * 1. Addresses box sizing set to content-box in IE 8/9.
* 2. Removes excess padding in IE 8/9.
* 3. Removes excess padding in IE 7.
*    Known issue:excess padding remains in IE 6. */
input[type="checkbox"],
input[type="radio"] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
  *height: 13px; /* 3 */
  *width: 13px; /* 3 */
}
/* * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
*    (include `-moz` to future-proof). */
input[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  -moz-box-sizing: content-box;
  -webkit-box-sizing: content-box; /* 2 */
  box-sizing: content-box;
}
/* * Removes inner padding and search cancel button in Safari 5 and Chrome
* on OS X. */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
/* * Removes inner padding and border in Firefox 3+. */
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}
/* * 1. Removes default vertical scrollbar in IE 6/7/8/9.
* 2. Improves readability and alignment in all browsers. */
textarea {
  overflow: auto; /* 1 */
  vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/* * Remove most spacing between table cells. */

table {
  border-collapse: collapse;
  border-spacing: 0;
}
/* * Remove most spacing between table cells. */
/* ==========================================================================
Headings
========================================================================== */
h1.chain {
  text-align: center;
  text-transform: uppercase;
  color: #353738;
  letter-spacing: 2px;
  font-size: 18px;
  font-weight: 600;
  background: url(../img/cog-icon.png) no-repeat top center;
  padding-top: 75px;
}
h2.frame {
  text-align: center;
  text-transform: uppercase;
  color: #353738;
  letter-spacing: 2px;
  font-size: 18px;
  font-weight: 600;
  padding-top: 65px;
  margin-top: 70px;
}
h2.mech {
  text-align: center;
  text-transform: uppercase;
  color: #353738;
  letter-spacing: 2px;
  font-size: 18px;
  font-weight: 600;
  /* background: url(../img/mech-icon.png) no-repeat top center; */
  padding-top: 65px;
  /* margin-top: 70px; */
}
h2.front-frame {
  text-align: center;
  text-transform: uppercase;
  color: #353738;
  letter-spacing: 2px;
  font-size: 18px;
  font-weight: 600;
  /* background: url(../img/front-icon.png) no-repeat top center; */
  padding-top: 65px;
  margin-top: 70px;
}
h2.twitter-post-username {
  color: #353738;
  letter-spacing: 2px;
  font-size: 18px;
  font-weight: 600;
  margin-top: 30px;
}
h2.twitter-post-username span {
  color: #848789;
  font-weight: 300;
}
h2.logo-header {
  text-align: center;
  color: #848789;
  letter-spacing: 1px;
  font-size: 24px;
  font-weight: 300;
  background: url(../img/main-logo.png) no-repeat top center;
  padding-top: 120px;
  margin: 70px 0 40px 0;
  font-style: italic;
}
/* ==========================================================================
User Styles
========================================================================== */

/* ==========================================================================
User Styles
========================================================================== */
.clearfix:before,
.clearfix:after {
  content: " ";
  display: table;
}
.clearfix:after {
  clear: both;
}
.clearfix {
  *zoom: 1;
}
.pullcontainer a#pull {
  display: none;
}
a {
  color: #282f35;
  -webkit-transition: all 0.25s ease;
  -moz-transition: all 0.25s ease;
  -ms-transition: all 0.25s ease;
  -o-transition: all 0.25s ease;
  transition: all 0.25s ease;
}
a:hover {
  color: #64c29e;
  text-decoration: none;
}
p {
  text-align: center;
  font-size: 14px;
  color: #848789;
  font-weight: 300;
  word-spacing: 2px;
  line-height: 1.8em;
  margin-top: 25px;
}
p.text-intro {
  font-size: 18px;
}
.hero {
  background: url(../img/hero_section_image.png) no-repeat top center #f4f5fc;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  height: 685px;
}
#hero-section {
  display: flex;
  flex-direction: row;
}
#hero-section h1 {
  text-align: center;
}
#partners {
  order: 0;
}
#partners p {
  color: black;
  margin: 1em;
  text-align: left;
  font-size: 1.3em;
  line-height: 1.3em;
  max-width: 400px;
  display: block;
  margin: 0 auto;
}
.partnerLogo {
  max-height: 80px;
}
span.partners {
  text-transform: uppercase;
  color: #831a1e;
  font-size: 1em;
  text-align: center;
  display: block;
  margin: 40px 0;
}
.logo-holder {
  background: url(../img/main-logo.png) no-repeat center center;
  width: 94px;
  height: 85px;
  position: absolute;
  top: 0;
  left: 327px;
}
.responsive-logo {
  display: hidden;
}
header {
  background-color: #f4f5fc;
}
header ul {
  padding-top: 35px;
}
header ul li {
  list-style: none;
  float: left;
  text-transform: uppercase;
  letter-spacing: 2px;
}
header ul li a {
  display: block;
  margin: 0 30px;
  color: #4d4959;
}
#work,
#partners {
  min-height: 800px;
}
.r_spacer {
  margin-right: 180px;
}
.intro {
  padding: 115px 0;
  background-color: #fbfbfb;
}
.section-1 {
  background: url(../img/dragon_hero.png) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  height: 600px;
  position: relative;
}
#heroCaption {
  padding: 5px;
  position: absolute;
  border-radius: 8px;
  left: 20px;
  bottom: 20px;
  width: 25vw;
  background-color: rgba(97, 101, 83, 0.7);
  color: white;
}
#partnerLogos {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
}
.section-2, #STS-1{
  background: url(../img/StringTheorySchool.jpg) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  height: 600px;
  position: relative;
}
.section-3 {
  background: url(../img/FB_IMG_1584515101011.jpg) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  height: 600px;
  position: relative;
}
.section-4 {
  background: url(../img/LCF_circus_1.jpg) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  height: 600px;
}
.dragon-wave-section {
  /* background-image: url('../img/grandpa_stork_tale.jpg'); */
  background-size: cover;
}
.section-text {
  position: relative;
  height: 600px;
}
.nopadding {
  padding: 0 !important;
  margin: 0 !important;
}
.thin-sep {
  height: 1px;
  background-color: #d7d7d7;
  width: 50px;
  margin: 8% auto 0 auto;
}
.small-featured-img {
  height: 200px;
  width: 100%;
  position: absolute;
  bottom: 0;
}
.seat-red {
  background: url(../img/seat-red.jpg) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
.seat-black, #why-not-cocoanuts {
  background: url(../img/why_not_cocconuts.jpg) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
.frame-red {
  background: url(../img/chrome-wheels.jpg) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
.section-text p {
  padding: 0 60px;
  text-align: justify;
}
.arrow {
  background: url(../img/arrow.png) no-repeat center center;
  width: 21px;
  height: 10px;
  margin: -1px auto 0 auto;
}
.logo-1 {
  height: 118px;
  margin: 40px auto;
  display: block;
}
.logo-2 {
  width: 177px;
  height: 152px;
  background: url(../img/vintage-logo.png);
  position: absolute;
  left: 50%;
  top: 50%;
  margin-top: -70px;
  margin-left: -90px;
}
.logo-3 {
  width: 208px;
  height: 67px;
  background: url(../img/bicycles-sml-logo.png);
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -110px;
  margin-top: -10px;
}

.flex-container {
  background-color: #f7f7f7;
  padding: 125px 0 35px;
  text-align: center;
}
.flex-twitter-icon {
  width: 32px;
  height: 27px;
  background: url(../img/twitter-bird.png) no-repeat center center;
  margin: 0 auto;
}
p.twitter-post {
  color: #848789;
  font-size: 24px;
  font-style: italic;
  font-weight: 300;
  margin-bottom: 100px;
}
.left-box-1 {
  width: 50%;
  float: left;
}
.left-box-2 {
  width: 50%;
  float: right;
}
.left-box-btm {
  width: 100%;
}
.left-box-1 img,
.left-box-2 img,
.left-box-btm img {
  width: 100%;
}
.mid-box-1 {
  width: 50%;
  float: left;
}
.mid-box-2 {
  width: 50%;
  float: right;
}
.mid-box-1 img {
  width: 100%;
  height: 100%;
}
.mid-box-2 img {
  width: 100%;
  height: 100%;
}
.right-box-1 {
  width: 100%;
}
.right-box-2 {
  width: 50%;
  float: left;
}
.right-box-3 {
  width: 50%;
  float: right;
}
.right-box-3 img,
.right-box-2 img,
.right-box-1 img {
  width: 100%;
}
.effects {
  background-color: #282f35;
}
.effects .img {
  position: relative;
}
.effects .img img {
  display: block;
  margin: 0;
  padding: 0;
  max-width: 100%;
  height: auto;
}
.overlay {
  z-index: 10;
}
a.close-overlay {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  width: 45px;
  height: 45px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 45px;
  text-align: center;
  background-color: #000;
  cursor: pointer;
}
a.close-overlay.hidden {
  display: none;
}
#effect .overlay {
  position: absolute;
  display: block;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(100, 194, 158, 0.8);
  opacity: 0;
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
  -ms-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
}
#effect .overlay a.expand {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  content: "";
  margin: 0 auto;
  border-radius: 30px;
  text-align: center;
  color: #fff;
  line-height: 50px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: url(../img/white-bike-icon.png) no-repeat top center;
  padding-top: 25px;
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
  -ms-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
  display: block;
}
#effect .img {
  overflow: hidden;
}
#effect .img.hover .overlay {
  opacity: 1;
}
#effect .img.hover .overlay a.expand {
  top: 50%;
  margin-top: -30px;
  opacity: 1;
}
.discover {
  background-color: #282f35;
  padding: 70px 0;
  text-align: center;
}
.shop-btn {
  border: solid 1px #bbb;
  padding: 15px 50px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 400;
}
.shop-btn:hover,
.shop-btn:focus {
  border: solid 1px #64c29e;
}
.sign-up {
  text-align: center;
}
.signup-input {
  border: solid 1px #d3d7d9;
  padding: 25px;
  width: 65%;
  color: #929292;
  font-style: italic;
  letter-spacing: 1px;
}
.submit-btn {
  background-color: #64c29e;
  color: #fff;
  border: solid 1px #64c29e;
  font-weight: 300;
  padding: 25px 50px;
}
section.sign_up {
  padding: 40px 0 110px 0;
}

.bold-16p {
  font-size: 15px;
  font-weight: 600;
}

.twitter-icon {
  background: url(../img/twitter-icon.png);
  height: 34px;
  width: 35px;
  display: block;
  text-indent: -9999px;
}
.facebook-icon {
  background: url(../img/facebook-icon.png);
  height: 34px;
  width: 35px;
  display: block;
  text-indent: -9999px;
}
.pintrest-icon {
  background: url(../img/pintrest-icon.png);
  height: 34px;
  width: 35px;
  display: block;
  text-indent: -9999px;
}
.wp1,
.wp2,
.wp3,
.wp4,
.wp5,
.wp6 {
  visibility: hidden;
}
.bounceInLeft,
.bounceInRight,
.fadeInUp {
  visibility: visible;
}

/* Scroll wrapper provides timeline length */
.egg-wrapper {
  height: 300vh;
  background: #ffffff;
}

.egg-wrapper #residual-vision {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10;
  color: red;
  bottom: 42vh;
  font-size: 2rem;
  text-align: center;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
}

#residual-vision img {
  width: 190px;
  height: auto;
}

/* Pinned viewport-sized box */
.egg-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

/* Animated Gradient Background */
.animated-gradient-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.egg-canvas-container {
  width: 100vw;
  height: 80vh;
  position: relative;
  z-index: 2;
}
#egg-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#spinner-section {
  height: 200vh;
}

/*------------ CARDS SECTION ---------- */
.cards-section {
  height: auto; /* MODIFIED: Was 100vh, now determined by content */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #3a242c;
  perspective: 1000px;
  z-index: 12;
  padding: 4rem 1rem; /* Consider increasing top/bottom padding if needed, e.g., padding: 3rem 1rem; */
  overflow: visible;
}
.viewCount {
  color: white;
  font-weight: bold;
  background-color: #0000006e;
  padding: 5px 10px;
  border-radius: 20px;
}

#shapeShifter {
  position: absolute;
  top: 0;
  right: 0;
  margin-top: -240px;
}

/* Permission Button Styling */
#permission-button {
  background-color: #4a4a4a;
  color: #f0f0f0;
  border: 1px solid #666;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: none;
  transition: background-color 0.2s ease;
}
#permission-button:hover {
  background-color: #5a5a5a;
}
#permission-message {
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 1.5rem;
  text-align: center;
}

.clip-mask-circle {
  overflow: hidden;
  --clip-radius: 60%;
  clip-path: circle(var(--clip-radius) at 50% 50%);
  -webkit-clip-path: circle(var(--clip-radius) at 50% 50%);
}

/* Grid Container - UPDATED FOR NEW RESPONSIVE REQUIREMENTS & CARD ASPECT RATIO */
.cards-grid {
  max-width: 1300px;
  display: grid;
  gap: 1.5rem;
  width: 100%;
  height: auto;
  flex: 0 1 auto;

  /* Default: Single column (implicitly for viewport <= 300px) */
  grid-template-columns: 1fr;
  /* grid-template-rows: repeat(4, 1fr); /* REMOVED - Row height determined by card aspect ratio */
  min-height: 400px; /* Kept as a minimum, actual height may be more due to card aspect ratios */
}

#card1 {
  background-image: url("../img/grandpa_stork_movement.jpg");
  background-position: center;
  background-size: cover;
}
#card3 {
  background-image: url("../img/ice-dragon-scales.png");
  background-position: center;
  background-size: cover;
}
#card4 {
  background-image: url("../img/dragon_class.jpg");
  background-position: center;
  background-size: cover;
}

/* Card Styling */

a.cardWrapper{
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: auto;
  display: flex;
}
.card{
  background-color: #4a4a4a;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: #2c2c2c;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s linear, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  /* touch-action: none; */
  position: relative;
  width: 100%;
  height: 100%;
  /* height: 100%; /* REMOVED/REPLACED by aspect-ratio */
  aspect-ratio: 9 / 16; /* ADDED: Enforces 16:9 aspect ratio */
  height: auto; /* ADDED: Allows aspect-ratio to control height based on width */
  margin: 0 auto;
}
.storyLabel {
  position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    color: white;
    font-weight: bold;
    padding: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
}
.storyLabel span{
  position: absolute;
  left:5px;
  bottom:5px;
  right:5px;
}
#storyGridLabel {
  width: 100%;
  max-width: 1300px;
  margin-bottom: 10px;
  color: white;
  font-size: 1.8rem;
}
#storyGridLabel img{
  height: 50px;
}

/* .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255, 255, 255, 0.2) 45%,
    rgba(255, 255, 255, 0.2) 55%,
    transparent 75%
  );
  background-size: 300% 300%;
  background-position: var(--sheen-pos-x, 150%) var(--sheen-pos-y, 50%);
  opacity: var(--sheen-opacity, 0);
  transition: opacity 0.3s ease, background-position 0.08s linear;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
} */

/* Responsive adjustments from original - .cards-grid layout rules are removed from here */
@media (max-width: 640px) {
  .card {
    font-size: 1.2rem;
  }
  #hilbertCurveCanvas1,
  #hilbertCurveCanvas2 {
    width: 120px;
    height: 120px;
    top: 10px;
    right: 10px;
  }
  #hilbertCurveCanvas2 {
    bottom: 10px;
    left: 10px;
  }
}

@media (max-width: 400px) {
  .card {
    font-size: 1rem;
    padding: 10px; /* This padding will be *inside* the 16:9 box */
    min-height: 80px; /* This card min-height might conflict with aspect-ratio if the
										width becomes too small. Aspect-ratio usually takes precedence.
										Consider if this is still needed or how it should behave.
										If width is very small, 16:9 might make height < 80px. */
  }
  #hilbertCurveCanvas1,
  #hilbertCurveCanvas2 {
    width: 80px;
    height: 80px;
  }
}

.formCard {
  display: block;
  padding: 0px;
  background-image: url("../img/12Countries12Months.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: white;
}

.formCardBackground {
  display: block;
  /* background-color: rgba(0, 128, 153, 0.635); */
  background-color: #012a2ed6;
  padding: 20px;
  border-radius: 8px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.formCardBackground h2 {
  text-align: center;
}

.formCardBackground span {
  font-size: 1rem;
}

.formCard div {
  margin: 20px 0;
}

.formCard input,
.formCard textarea {
  display: block;
  padding: 10px;
  border-radius: 8px;
  font-size: large;
  width: 100%;
  color: black;
}


.formCard input[type="checkbox"] {
  width: 20px;
  height: 20px;
  display: inline;
  font-size: large;
}

.formCard button {
  font-size: large;
  padding: 10px;
  width: 50%;
  margin: 0 auto;
  display: block;
  background-color: #d5883d;
  color: #fff;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  font-size: 1em;
}

/* Base styles needed for positioning and transitions (if not already present) */
.effect-input {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  background-color: #004c60;
  position: relative;
  z-index: 1;
  /* border: 1px solid #cbd5e1; Example border */
  border: none;
  border-radius: 0.375rem; /* Example border radius */
  padding: 0.5rem 1rem; /* Example padding */
  width: 100%; /* Or specific width */
  font-size: 1rem;
  filter: none;
  box-shadow: none;
}

.effect-input:focus {
  outline: none;
  background-color: white;
  border: 1px solid white;
}

/* Keyframes for the electric arc effect */
@keyframes electric-arc {
  0%,
  100% {
    box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.9),
      0 0 3px 2px rgba(255, 200, 0, 0.8), 0 0 6px 4px rgba(255, 140, 0, 0.6),
      2px -3px 8px 5px rgba(255, 80, 0, 0.4),
      -3px 2px 8px 5px rgba(255, 180, 50, 0.4);
    transform: skewX(-1deg);
  }
  25% {
    box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.95),
      0 0 4px 3px rgba(255, 210, 50, 0.85), 0 0 7px 5px rgba(255, 150, 20, 0.65),
      -2px 3px 9px 6px rgba(255, 90, 10, 0.45),
      3px -2px 9px 6px rgba(255, 190, 60, 0.45);
    transform: skewX(0deg);
  }
  50% {
    box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.9),
      0 0 3px 2px rgba(255, 200, 0, 0.8), 0 0 6px 4px rgba(255, 140, 0, 0.6),
      3px 3px 8px 5px rgba(255, 80, 0, 0.4),
      -2px -3px 8px 5px rgba(255, 180, 50, 0.4);
    transform: skewX(1deg);
  }
  75% {
    box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.95),
      0 0 4px 3px rgba(255, 210, 50, 0.85), 0 0 7px 5px rgba(255, 150, 20, 0.65),
      -3px -2px 9px 6px rgba(255, 90, 10, 0.45),
      2px 3px 9px 6px rgba(255, 190, 60, 0.45);
    transform: skewX(0deg);
  }
}

/* Keyframes for the wavy filter animation */
@keyframes wavy-filter-orange-animate {
  0%,
  100% {
    filter: url(#wavy-filter-orange) blur(0.5px);
  }
  25% {
    filter: url(#wavy-filter-orange-2) blur(0.5px);
  }
  50% {
    filter: url(#wavy-filter-orange-3) blur(0.5px);
  }
  75% {
    filter: url(#wavy-filter-orange-4) blur(0.5px);
  }
}

/* NEW Class-based focus rule */
.electric-wavy-orange:focus {
  /* Apply animations using specific properties */
  animation-name: electric-arc, wavy-filter-orange-animate;
  animation-duration: 0.15s, 0.4s;
  animation-iteration-count: infinite, infinite;
  animation-timing-function: linear, steps(4, end);
}

#modalContainer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #2c1019db;
}

#modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  background-image: url("../img/12Countries12Months.jpg");
  background-position: center;
  background-size: cover;
}

.modal-open {
  overflow: hidden;
}

.main-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1300px;
  margin: 40px auto;
  padding: 0 10px;
}

.item {
  background: #38bdf8;
  color: #fff;
  padding: 24px;
  border-radius: 8px;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Items that span two columns */
.span-2 {
  grid-column: span 2;
  background: #0ea5e9;
}

/* Mini grid inside a single column slot */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-item {
  background: #2563eb;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 1rem;
}

.vert-mini-grid {
  display: grid;
  grid-template-rows: 1fr 1fr;
  height: 100%;
  gap: 15px;
  padding: 0;
  background-color: transparent;
}

.vert-mini-grid .mini-item {
  /* Optional: ensures items stretch */
  align-self: stretch;
  justify-self: stretch;
}

.mini-item p, .mini-item h2{
  max-width: 400px;
  display: block;
  margin: 0 auto;
}

.clear {
  background-color: transparent;
}

#schools-of-trust {
  background: url('../img/Schools_Of_Trust.jpg') no-repeat center center;
  background-size: cover;
}
#germany {
  background: url(../img/FB_IMG_1584515101011.jpg) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

#LCF-Circus {
  background: url(../img/LCF_circus_1.jpg) no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}