:root {
  --side-padding: clamp(12px, 4vw, 42px);
}

/*  */

.perspective-wrapper {
  perspective: 800px;
  perspective-origin: 50% 50%;
}

/*  */

.home-nav {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 64px;
  left: clamp(12ch, 15vw, 15vw);
  width: fit-content;
}

.home-nav a {
  display: block;
  font-size: 14px;
}

.home-nav a:hover {
  text-decoration: underline;
}

.home-nav .nav-left {
  color: var(--cf);
}

.home-nav .nav-left a:hover::before {
  content: "trykala.com/";
  color: var(--tx2);
  position: absolute;
  transform: translateX(-100%);
}

/*  */

.home-kala-logo-container .hover-text {
  top: -10px;
  right: 0;
  transform: translateX(110%);
}

.home-2-kala-vector-wrapper {
  width: fit-content;
}

.home-2-kala-vector-wrapper .hover-text {
  left: -12px;
  top: 0;
  transform: translateX(-100%);
}

/*  */

.home {
  margin-top: 14px;
  position: relative;
}

.home-1 {
  position: relative;
  z-index: 9;
}
.home-kala-logo-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.home-kala-logo {
  height: 120px;
  will-change: filter;
}

/*  */

.home-2 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  gap: var(--side-padding);
}

.tagline {
  font-size: 32px;
  margin-bottom: -0.2em;
}

.home-2-kala-vector {
  height: 134px;
}

/*  */

.home-3 {
  border-top: var(--border);
  border-bottom: var(--border);
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 26px;
  align-items: flex-end;
  font-size: 26px;
  padding: 38px 0;

  max-width: 1700px;
  margin: 0 auto;
}

.home-3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background-image: url(assets/red-lightning.jpg);
  background-size: cover;
  background-position: center;
  z-index: -9;
  animation: thunder 10s ease-in-out infinite;
  animation-delay: 2s;
  opacity: 0;
}

.home-3::before {
  filter: none;
  transition: filter 0.4s ease;
}

.home-3.alt-theme::before {
  filter: hue-rotate(270deg);
}

@keyframes thunder {
  0%, 12%, 42%, 100% {
    opacity: 0;
  }
  4%, 30% {
    opacity: 1;
  }
  8%, 24% {
    opacity: 0.6;
  }
}

.hr-v {
  height: 12px;
  border: none;
  border-left: var(--border);
  position: absolute;
}

.hr-top-left {
  top: 0;
  left: 0;
}
.hr-top-right {
  top: 0;
  right: 0;
}
.hr-bottom-left {
  bottom: 0;
  left: 0;
}
.hr-bottom-right {
  bottom: 0;
  right: 0;
}

/*  */

.home-3-1,
.home-3-2,
.home-3-3 {
  display: flex;
  flex-direction: column;
  gap: 26px;
  transition: transform 150ms ease-out;
  will-change: transform;
}

.home-3-1,
.home-3-3 {
  flex: 2;
}

.home-3-2 {
  flex: 3.5;
  z-index: 99;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.home-3 > div img {
  width: 100%;
}

.home-3-1 {
  align-items: flex-end;
}

.home-3-1 img {
  max-width: 80%;
}

/*  */

@keyframes loopX {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.stripe-wrapper {
  margin: 12px var(--side-padding);
  overflow: hidden;
  position: relative;
  z-index: -99;
}

.stripe-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(to right, var(--bg), transparent);
  z-index: 99;
  pointer-events: none;
  user-select: none;
}

.stripe-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(to left, var(--bg), transparent);
  z-index: 99;
  pointer-events: none;
  user-select: none;
}

.stripe,
.stripe-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
}

.stripe {
  width: max-content;
  display: flex;
  height: 38px;
  min-width: 200vw;
  color: var(--tx2);
  transition: color 150ms ease-out;
}
/* .stripe:hover {
  color: var(--tx);
} */

.stripe-child {
  min-width: 100vw;
  width: fit-content;
  --stripe-gap: 180px;
  gap: var(--stripe-gap);
  padding: 0 calc(var(--stripe-gap) / 2);
  animation: loopX 28s linear infinite;
}

.stripe p a {
  text-wrap: nowrap;
  white-space: nowrap;
}
.stripe p a:hover {
  color: var(--tx);
}

/*  */

@keyframes up-down {
  0%, 10%, 90%, 100% {
    top: 0;
  }
  40%, 60% {
    top: 200px;
  }
}

@keyframes left-right {
  0%, 20%, 100% {
    left: 30vw;
  }
  50%, 70% {
    left: 50vw;
  }
}

.bg-hr {
  border: none;
  --border-bg: 1px solid var(--cf);
  width: 100vw;
  filter: blur(2px);
  position: absolute;
  z-index: -999;
}

.bg-hr-h {
  border-top: var(--border-bg);
}

.bg-hr-v {
  border-left: var(--border-bg);
  height: 68vh;
}

.bg-hr-h-1 {
  top: 0;
  animation: up-down 30s ease infinite;
}

.bg-hr-v-1 {
  left: 30vw;
  top: -20vh;
  animation: left-right 30s ease infinite;
}

/*  */

.home-bottom-hr {
  position: relative;
  border-bottom: var(--border);
  position: relative;
  z-index: -99;
}

/*  */

.home-4 {
  position: relative;
  font-size: clamp(24px, 8vw, 64px);
  border-top: var(--border);
  border-bottom: var(--border);
  padding: 38px 0;
}

#animated-text hr {
  border: none;
  border-top: var(--border);
  margin: 24px 0;
}

#animated-text .word {
  display: inline-block;
  white-space: pre;
  filter: blur(6px);
  opacity: 0;
  transition: filter 0.6s ease, opacity 0.6s ease;
}

#animated-text .reveal {
  filter: blur(0);
  opacity: 1;
}

.text-indent-hr {
  width: 20%;
  display: inline-flex;
  margin-bottom: .3em;
  margin-right: .6em;
  border: none;
  border-top: var(--border);
}

#cta {
  padding: 8px 12px;
  font-size: 16px;
  display: flex;
  width: fit-content;
  justify-content: space-between;
  align-items: center;
  border: var(--border);
  gap: 12px;
  margin-top: 32px;
  margin-left: auto;
  margin-right: var(--side-padding);
  transition: background-color 200ms ease, gap 200ms ease, border-color 200ms ease;
}

#cta:hover {
  background-color: var(--tx-light);
  gap: 32px;
  border-color: var(--tx);
}

#cta .right-arrow {
  height: .8em;
}

#cta:hover .right-arrow {
  animation: rotate 200ms ease;
}


/*  */

.projects-section .heading {
  font-size: clamp(32px, 12vw, 180px);
  text-transform: uppercase;
  line-height: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 90px;
}

.projects-section .heading span {
  display: block;
}

/*  */

.projects-section,
.projects-container,
.project {
  position: relative;
  display: flex;
  flex-direction: row;
}

.projects-section {
  align-items: flex-start;
  gap: 26px;
  height: 100dvh;
  overflow: hidden;
}

.projects-section * {
  flex-shrink: 0;
}

.project-preview-wrapper,
.projects-container {
  height: 100%;
  position: relative;
  align-items: center;
}

.projects-container-wrapper {
  position: relative;
  height: 100%;
  width: max-content;
}

.projects-container {
  gap: 100px;
  width: max-content;
  padding-right: clamp(var(--side-padding), 12vw, 180px);
}

.project {
  position: relative;
  height: fit-content;
  gap: 22px;
  align-items: flex-end;
  height: 66vh;
}

.project-preview-wrapper {
  border: var(--border);
  padding: var(--side-padding);
  backdrop-filter: blur(4px);
  height: 100%;
}

.project-preview {
  max-width: 120vw;
  max-height: 70vh;
  width: auto;
  height: 100%;
  object-fit: contain;
}


.project > * {
  cursor: none;
}

.project-info {
  width: 260px;
}

.project-info-heading {
  font-size: 24px;
}

.project-info caption {
  font-size: 16px;
}

.project-description {
  color: var(--tx2);
}

.project-location {
  font-size: 14px;
  margin-top: 4px;
}

/*  */

.cursor-circle {
  position: fixed;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: white;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.2;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* mix-blend-mode: multiply; */
  z-index: 9999;
}

/*  */

.contact {
  margin-top: 100px;
  position: relative;
}

.contact .heading {
  font-size: 60px;
  position: relative;
  margin-left: auto;
  overflow: hidden;
  font-style: italic;
  width: fit-content;
}

.contact .heading span {
  position: relative;
  top: 0;
}

.contact-left {
  position: relative;
  
  max-width: 50%;
  padding-right: var(--side-padding);

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 70vh;
  gap: 60px;
  max-height: 700px;
}

.form-link-container {
  position: relative;
  width: fit-content;
  margin-left: 10%;
}

/*  */

.form-kala-title span {
  font-size: 62px;
}

.form-kala-title br {
  display: none;
}

.kala-role {
  font-size: 22px;
}

.form-para {
  text-indent: 40%;
  max-width: 340px;
  font-size: 20px;
  margin-left: auto;
}

/*  */

.kala-form {
  display: flex;
  flex-direction: column;
  padding: var(--side-padding);
  border: 1px dashed var(--tx2);
  gap: 80px;
  max-width: 50%;
  min-width: 600px;
  margin-left: auto;
  margin-top: 160px;
  font-size: 1rem;
  position: relative;
  backdrop-filter: blur(2px);
  z-index: 99;
}

.mini-heading {
  position: absolute;
  top: -8px;
  transform: translateY(-100%);
  right: var(--side-padding);
}

#form-top-email-link {
  display: inline-block;
  position: absolute;
  top: -1.5em;
  color: var(--tx2);
  transition: color 160ms ease;
}

#form-top-email-link {
  left: 0;
}

#form-top-email-link:hover {
  color: var(--tx);
}
#form-top-email-link:hover span {
  color: var(--cf);
}

.kala-form label {
  display: block;
  width: 100%;
  font-size: 14px;
  margin-bottom: 1em;
  line-height: 1.4;
}

.minimal-input {
  border: none;
  border-bottom: var(--border);
  background: transparent;
  width: 100%;
  outline: none;
  padding: 6px 0;
  color: var(--tx);
  font-size: 1rem;
  transition: border-color 160ms ease;
}

input::placeholder,
textarea::placeholder {
  font-family: var(--f-main);
}

.minimal-input:hover,
.minimal-input:focus {
  border-color: var(--tx);
  background-color: var(--tx-light);
}

.options-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option {
  padding: 6px 12px;
  color: var(--tx2);
  cursor: pointer;
  user-select: none;
  transition: color 200ms ease, border-color 300ms ease;
  border-bottom: 1px dashed transparent;
}

.option.selected,
.option:hover {
  color: var(--cf);
  border-color: var(--cf);
}

#submit-btn {
  background: transparent;
  padding: 6px 0;
  cursor: pointer;
  width: fit-content;
  color: var(--cf);
  font-size: 1rem;
  text-underline-offset: 2px;
}

#submit-btn:hover {
  color: var(--cf);
  text-decoration: underline;
}

#response {
  font-weight: normal !important;
  font-size: 14px;
  position: absolute;
  bottom: 0;
  left: 0;
  transform: translateY(1.4em);
}

/*  */



@media (min-width: 1734px) {
  .home-3-1 {
    text-align: right;
  }
}

/* all fine from normal to 1156 */

@media (max-width: 1170px) {
  .home-3 {
    font-size: 22px;
  }
}

@media (max-width: 1156px) {
  .tagline {
    font-size: 32px;
  }
  .home-2-kala-vector {
    height: 114px;
    width: auto;
  }
  .home-nav {
    left: 11ch;
  }
}

@media (max-width: 1080px) {
  .home-1 {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    gap: var(--side-padding);
  }
  .home-nav {
    left: 0;
  }
  .home-kala-logo-container {
    position: relative;
    top: initial;
    left: initial;
    transform: translateX(0);
  }
  .home-2 {
    margin-top: 60px;
  }

  /*  */

  .contact-left,
  .kala-form {
    max-width: 100%;
  }

  .contact-left {
    padding: 0;
  }

  .kala-form {
    max-width: auto;
    width: 100%;
    min-width: auto;
    backdrop-filter: blur(0);
    margin-top: 120px;
  }
}

@media (max-width: 1004px) {
  .home-3 {
    font-size: 18px;
  }
}

@media (max-width: 888px) {
  .home-2-kala-vector {
    height: 100px;
  }
}

@media (max-width: 896px) {
  .contact .heading {
    margin-bottom: 80px;
  }
}

@media (max-width: 794px) {
  .home-3-1 img,
  .home-3-3 img {
    display: none;
  }
}

@media (max-width: 768px) {
  .projects-section,
  .projects-container,
  .project {
    flex-direction: column;
    height: auto;
  }

  .projects-section {
    height: auto;
    margin-top: 32px;
  }
  
  .projects-section .heading {
    padding-top: 0;
  }
  
  .project-preview-wrapper,
  .projects-container {
    height: auto;
  }
  
  .projects-container-wrapper {
    height: auto;
    width: auto;
  }
  
  .projects-container {
    gap: 60px;
    width: auto;
    padding-right: 0;
  }
  
  .project {
    height: auto;
    align-items: flex-start;
  }
  
  .project-preview {
    max-width: auto;
    max-height: auto;
    width: 100%;
  }
  
  .project-info {
    width: 80%;
  }

}

@media (max-width: 676px) {
  .contact .heading {
    font-size: clamp(42px, 10vw, 50px);
    margin-left: auto;
    font-style: italic;
    width: auto;
  }
  
  .contact .heading span {
    top: initial;
  }
}

@media (max-width: 662px) {
  .tagline {
    font-size: 26px;
  }
}
@media (max-width: 640px) {
  .home-3 {
    flex-direction: column;
  }
  .home-3-2 {
    order: 1;
  }
  .home-3-1 {
    order: 2;
  }
  .home-3-3 {
    order: 3;
  }
}

@media (max-width: 596px) {
  .home-2 {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 4px;
  }
  .home-2-kala-vector {
    height: auto;
    width: 100%;
  }
  .home-1 {
    display: none;
  }
  .home-2 {
    margin-top: 0;
  }
  .home-2-kala-vector-wrapper .hover-text {
    display: none;
  }
}

@media (max-width: 586px) {

  .form-kala-title {
    display: none;
  }

  .contact {
    margin-top: 60px;
  }

  .contact-left {
    height: auto;
    max-height: auto;
  }

  .contact .heading {
    margin-bottom: 60px;
  }

}

@media (max-width: 324px) {
  .form-kala-title br {
    display: block;
  }
}
@media (max-width: 321px) {
  .contact .heading {
    margin-bottom: 100px;
  }
}