/* ===================================
   CONTACT PAGE CHARACTER ANIMATION
   =================================== */

* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.ima {
  font-family: 'Asap', sans-serif;
  font-size: 40px;
  text-transform: uppercase;
  color: #6b52df;
  font-weight: 700;
}

.body, .arm, .head, .eyes, .mug, .steam, .contactme, .arrow, .thoughts, .bubble, .formtoggle {
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/15979/about-character.png) 0 0 no-repeat;
}

.character, .body, .arm, .head, .eyes, .mug, .steam, .contactme, .arrow, .thoughts, .bubble, .formtoggle {
  background-size: 1070px;
  position: absolute;
  display: block;
}

.contactcharacter {
  position: relative;
  display: block;
  overflow: hidden;
  background: #efefef;
  min-height: 750px;
}

.contactcharacter .contentwrapper {
  width: 1280px;
  max-width: 100%;
  height: 750px;
  margin: 10px auto 0;
  position: relative;
  transition: height 1s ease-in-out;
}

/* CHARACTER (stick to bottom) */
.contactcharacter .character {
  width: 100%;
  height: 750px;
  margin: 0 auto;
  bottom: 0px;
  transition: height 1s ease-in-out;
}

/* BODY */
.contactcharacter .body {
  width: 900px;
  height: 425px;
  bottom: -9px;
  left: 0;
  background-position: 0px 0px;
}

/* ARM */
.contactcharacter .arm {
  width: 445px;
  height: 115px;
  bottom: -50px;
  left: 25px;
  background-position: -19px -1094px;
  transform: rotateZ(-58deg);
  transform-origin: 2% 50%;
  transition: all .5s ease-in-out;
}

.contactcharacter .arm.active {
  transform: rotateZ(0deg);
}

/* HEAD */
.contactcharacter .head {
  width: 235px;
  height: 337px;
  bottom: 294px;
  left: 250px;
  background-position: -506px -1093px;
  transform: rotateZ(-24deg);
  transform-origin: 50% 82%;
  transition: all .75s cubic-bezier(0.340, -0.305, 0.000, 1.000);
}

.contactcharacter .head.caffeine {
  animation: twitch 1s ease-in-out infinite;
}

.contactcharacter .head.active {
  transform: rotateZ(0deg);
}

/* EYES */
.contactcharacter .eyes {
  width: 110px;
  height: 25px;
  top: 160px;
  left: 63px;
  background-position: -788px -1246px;
  animation: blink 10s steps(2) infinite;
}

.contactcharacter .caffeine .eyes {
  animation: blink-fast 1s steps(2) infinite;
}

/* MUG */
.contactcharacter .mug {
  width: 184px;
  height: 188px;
  bottom: -3px;
  right: 180px;
  background-position: -732px -857px;
}

.contactcharacter .mug .steam {
  animation: steam 3s ease-in-out infinite alternate;
  opacity: 0.5;
}

.contactcharacter .mug .steam:nth-child(1) {
  width: 34px;
  height: 158px;
  top: -140px;
  left: 30px;
  background-position: -537px -855px;
  animation-delay: 0s;
}

.contactcharacter .mug .steam:nth-child(2) {
  width: 37px;
  height: 194px;
  top: -187px;
  left: 80px;
  background-position: -594px -855px;
  animation-delay: 2s;
}

.contactcharacter .mug .steam:nth-child(3) {
  width: 38px;
  height: 187px;
  top: -170px;
  left: 131px;
  background-position: -658px -855px;
  animation-delay: 1s;
}

/* THOUGHTS */
.contactcharacter .thoughts {
  width: 751px;
  height: 390px;
  top: 0px;
  right: 0px;
  background-position: -321px -459px;
  animation: bob 4s ease-in-out infinite alternate;
  transition: all 1s cubic-bezier(0.760, -0.265, 0.195, 1.260);
  transition-property: left, right, top, bottom;
}

.contactcharacter .thoughts .abouttype {
  text-align: center;
  padding: 90px 80px 60px 100px;
}

.contactcharacter .thoughts .abouttype .imacontainer {
  min-height: 60px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contactcharacter .thoughts .abouttype p {
  font-size: 24px;
  line-height: 1.45em;
  color: #333;
  font-family: 'Quicksand', sans-serif;
}

.contactcharacter .thoughts .abouttype p:nth-child(1) {
  margin-bottom: 0;
}

.contactcharacter .thoughts .abouttype p:nth-child(3) {
  margin-top: 0;
}

.contactcharacter .thoughts .imawhat {
  display: none;
}

.contactcharacter .thoughts .bubble {
  animation: bob 2s ease-in-out infinite alternate;
}

.contactcharacter .thoughts .bubble:nth-child(2) {
  width: 120px;
  height: 116px;
  top: 40px;
  left: -100px;
  background-position: -191px -472px;
  animation-delay: 0s;
  transition: all 1s cubic-bezier(0.760, -0.265, 0.195, 1.260);
  transition-property: left, right, top, bottom;
}

.contactcharacter .thoughts .bubble:nth-child(3) {
  width: 91px;
  height: 86px;
  top: 80px;
  left: -190px;
  background-position: -86px -472px;
  animation-delay: 2s;
  transition: all 1s cubic-bezier(0.760, -0.265, 0.195, 1.260);
  transition-property: left, right, top, bottom;
}

.contactcharacter .thoughts .bubble:nth-child(4) {
  width: 67px;
  height: 65px;
  top: 120px;
  left: -260px;
  background-position: 0px -474px;
  animation-delay: 1s;
  transition: all 1s cubic-bezier(0.760, -0.265, 0.195, 1.260);
  transition-property: left, right, top, bottom;
}

/* CONTACT ME */
.contactcharacter .contactme {
  width: 207px;
  height: 196px;
  bottom: -3px;
  right: 309px;
  background-position: -300px -856px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.contactcharacter .contactme:hover {
  transform: scale(1.05);
}

.contactcharacter .contactme .arrow {
  width: 263px;
  height: 146px;
  top: -95px;
  left: -23px;
  background-position: -17px -856px;
  animation: bob 1s ease-in-out infinite alternate;
  cursor: pointer;
}

/* CONTACT FORM */
.contactcharacter .contact {
  width: 750px;
  max-width: 90%;
  position: absolute;
  left: 50%;
  bottom: -40px;
  transform: translateY(360px);
  margin-left: -375px;
  z-index: 100;
}

.contactcharacter .contact.inactive {
  animation: popout 0.5s forwards linear;
}

.contactcharacter .contact.active {
  animation: popin 0.35s forwards linear;
}

/* Closer X ICON */
.contactcharacter .contact.active .closer {
  background: #333;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  top: -15px;
  left: -15px;
  width: 30px;
  height: 30px;
  position: absolute;
  cursor: pointer;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.contactcharacter .contact.active .closer:hover {
  transform: rotate(90deg);
  background: #ff6b35;
}

.contactcharacter .contact.active .closer:after,
.contactcharacter .contact.active .closer:before {
  content: " ";
  position: absolute;
  top: 11px;
  left: 4px;
  width: 18px;
  height: 4px;
  background: white;
}

.contactcharacter .contact.active .closer:after {
  transform: rotate(45deg);
}

.contactcharacter .contact.active .closer:before {
  transform: rotate(-45deg);
}

/* FORM STYLES */
.contactcharacter form {
  background: #b3c33a;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.contactcharacter input[type="text"],
.contactcharacter input[type="email"],
.contactcharacter textarea {
  padding: 15px;
  margin-bottom: 15px;
  display: block;
  width: 100%;
  border: none;
  background: #9db02d;
  color: #e8f0a8;
  letter-spacing: 1px;
  border-radius: 5px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
}

.contactcharacter input[type="text"]:focus,
.contactcharacter input[type="email"]:focus,
.contactcharacter textarea:focus {
  background: #839121;
  outline: none;
  color: white;
}

.contactcharacter textarea {
  height: 150px;
  resize: none;
}

.contactcharacter .contact .input.error {
  border-left: 5px solid red;
  animation: borderColor .5s ease-in-out infinite alternate;
}

.contactcharacter ::-webkit-input-placeholder {
  color: #b3c33a;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.contactcharacter :-moz-placeholder {
  color: #b3c33a;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.contactcharacter ::-moz-placeholder {
  color: #b3c33a;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.contactcharacter :-ms-input-placeholder {
  color: #b3c33a;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.contactcharacter .submit:hover {
  background: #6b52df !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* ANIMATIONS */
@keyframes blink {
  0%   { background-position: -788px -1246px; }
  90%  { background-position: -788px -1246px; }
  100% { background-position: -788px -1294px; }
}

@keyframes blink-fast {
  0%   { background-position: -788px -1246px; }
  50%  { background-position: -788px -1246px; }
  100% { background-position: -788px -1294px; }
}

@keyframes twitch {
  0%   { transform: rotateZ(-24deg); }
  25%  { transform: rotateZ(-25deg); }
  50%  { transform: rotateZ(-23deg); }
  75%  { transform: rotateZ(-25deg); }
  100% { transform: rotateZ(-24deg); }
}

@keyframes bob {
  0%   { transform: translateY(0); }
  100% { transform: translateY(20px); }
}

@keyframes steam {
  0%   { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes popin {
  0%   { transform: translateY(350px) rotateZ(2.2deg); }
  38%  { transform: translateY(100px) rotateZ(7deg); }
  52%  { transform: translateY(25px) rotateZ(7deg); }
  71%  { transform: translateY(-70px) rotateZ(-0.8deg); }
  86%  { transform: translateY(-65px) rotateZ(-4.1deg); }
  90%  { transform: translateY(-54px) rotateZ(-3.3deg); }
  100% { transform: translateY(-40px) rotateZ(0deg); }
}

@keyframes popout {
  0%   { transform: translateY(-40px) rotateZ(0deg); }
  38%  { transform: translateY(-54px) rotateZ(-3.3deg); }
  52%  { transform: translateY(-65px) rotateZ(-4.1deg); }
  71%  { transform: translateY(-70px) rotateZ(-0.8deg); }
  86%  { transform: translateY(25px) rotateZ(7deg); }
  90%  { transform: translateY(100px) rotateZ(7deg); }
  100% { transform: translateY(360px) rotateZ(0deg); }
}

@keyframes borderColor {
  0%   { border-left-color: red; }
  100% { border-left-color: darkred; }
}

/* ===================================
   CONTACT INFO SECTION
   =================================== */

.contact-info-section {
  padding: 100px 0;
  background: #ffffff;
}

.contact-info-header {
  text-align: center;
  margin-bottom: 60px;
}

.contact-info-badge {
  display: inline-block;
  background: rgba(123, 104, 238, 0.1);
  color: var(--primary-color);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.contact-info-title {
  font-size: 42px;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.contact-info-subtitle {
  font-size: 17px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.contact-info-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.contact-info-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 40px rgba(123, 104, 238, 0.15);
}

.contact-info-icon {
  width: 70px;
  height: 70px;
  background: rgba(123, 104, 238, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary-color);
  margin: 0 auto 20px;
  transition: all 0.3s ease;
}

.contact-info-card:hover .contact-info-icon {
  background: var(--primary-color);
  color: #ffffff;
  transform: scale(1.1) rotate(10deg);
}

.contact-info-card h3 {
  font-size: 22px;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.contact-info-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-light);
}

/* ===================================
   MAP SECTION
   =================================== */

.map-section {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.map-wrapper {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* ===================================
   RESPONSIVE STYLES
   =================================== */

@media (max-width: 1280px) {
  .contactcharacter .contentwrapper {
    width: 100%;
    padding: 0 20px;
  }

  .contactcharacter .body {
    width: 70%;
  }

  .contactcharacter .thoughts {
    width: 60%;
    right: 5%;
  }
}

@media (max-width: 992px) {
  .contactcharacter {
    min-height: 600px;
  }

  .contactcharacter .contentwrapper {
    height: 600px;
  }

  .contactcharacter .character {
    height: 600px;
  }

  .contactcharacter .thoughts {
    width: 50%;
    height: 320px;
  }

  .contactcharacter .thoughts .abouttype {
    padding: 60px 40px 40px 50px;
  }

  .contactcharacter .thoughts .abouttype p {
    font-size: 18px;
  }

  .ima {
    font-size: 28px;
  }

  .contactcharacter .contact {
    width: 90%;
    margin-left: -45%;
  }

  .contact-info-section {
    padding: 60px 0;
  }

  .contact-info-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .contactcharacter {
    min-height: 500px;
  }

  .contactcharacter .contentwrapper {
    height: 500px;
  }

  .contactcharacter .character {
    height: 500px;
  }

  .contactcharacter .body {
    width: 60%;
    transform: scale(0.8);
  }

  .contactcharacter .head {
    bottom: 234px;
    left: 180px;
  }

  .contactcharacter .arm {
    transform: rotateZ(-58deg) scale(0.8);
  }

  .contactcharacter .mug {
    right: 120px;
    transform: scale(0.8);
  }

  .contactcharacter .contactme {
    right: 220px;
    transform: scale(0.8);
  }

  .contactcharacter .thoughts {
    width: 55%;
    height: 280px;
    top: 20px;
  }

  .contactcharacter .thoughts .abouttype {
    padding: 50px 30px 30px 40px;
  }

  .contactcharacter .thoughts .abouttype p {
    font-size: 16px;
  }

  .ima {
    font-size: 24px;
  }

  .contactcharacter .thoughts .bubble:nth-child(2),
  .contactcharacter .thoughts .bubble:nth-child(3),
  .contactcharacter .thoughts .bubble:nth-child(4) {
    display: none;
  }

  .contact-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }

  .contact-info-card {
    padding: 30px 20px;
  }

  .contact-info-title {
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  .contactcharacter {
    min-height: 400px;
  }

  .contactcharacter .contentwrapper {
    height: 400px;
  }

  .contactcharacter .character {
    height: 400px;
  }

  .contactcharacter .body {
    width: 50%;
    transform: scale(0.6);
    left: -50px;
  }

  .contactcharacter .head {
    bottom: 174px;
    left: 100px;
    transform: rotateZ(-24deg) scale(0.7);
  }

  .contactcharacter .arm {
    transform: rotateZ(-58deg) scale(0.6);
    left: -20px;
  }

  .contactcharacter .mug {
    right: 60px;
    transform: scale(0.6);
  }

  .contactcharacter .contactme {
    right: 140px;
    transform: scale(0.7);
  }

  .contactcharacter .thoughts {
    width: 60%;
    height: 240px;
    top: 10px;
    right: 2%;
  }

  .contactcharacter .thoughts .abouttype {
    padding: 40px 20px 20px 30px;
  }

  .contactcharacter .thoughts .abouttype p {
    font-size: 13px;
  }

  .ima {
    font-size: 18px;
  }

  .contactcharacter .contact {
    width: 95%;
    margin-left: -47.5%;
  }

  .contactcharacter form {
    padding: 20px;
  }

  .contactcharacter form h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-title {
    font-size: 24px;
  }

  .contact-info-subtitle {
    font-size: 15px;
  }

  .map-section {
    padding: 40px 0 60px;
  }
}
