/*
Theme Name: Mira Design
Theme URI: https://mira.design/
Author: Mira Mayne
Author URI: https://mira.design/
Description: A restrained custom portfolio theme for Mira Design.
Version: 1.1.4
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: mira-design
*/

@font-face {
  font-family: "Neue Haas Grotesk Display Pro 55 Roman";
  font-style: normal;
  font-weight: normal;
  src:
    local("Neue Haas Grotesk Display Pro 55 Roman"),
    url("assets/fonts/NeueHaasDisplayRoman.woff") format("woff");
}

@font-face {
  font-family: "Mira Display";
  font-style: normal;
  font-weight: normal;
  src:
    local("Mira Display"),
    url("assets/fonts/miradisplay.otf") format("opentype");
}

:root {
  --base-font: "Neue Haas Grotesk Display Pro 55 Roman", sans-serif;
  --contrast-font: "Mira Display", sans-serif;
  --p-leading: 1.18;
  --p-font-size: 14px;
  --img-height: 350px;
  --filter-img: none;
  --link-hover: 0.7s;
  --color-text: #000000;
  --color-bg: #f8f9f6;
  --color-contrast: #f4f5f1;
  --color-unexpected:#e1d5be;
  --color-2:#bbbcbe;
  --blur-max: 12px;
  --blur: 3px;
  --spacing: 0.25rem;
}

#fader {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999999;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: white;
  animation-duration: 500ms;
  animation-timing-function: ease-in-out;
}

@keyframes fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#fader.fade-out {
  opacity: 0;
  animation-name: fade-out;
}

#fader.fade-in {
  opacity: 1;
  animation-name: fade-in;
}

html,
body {
  width: 100vw;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  font-family: var(--base-font);
  font-weight: normal !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-bg);
  transition: background 0.5s ease;
}

body {
  z-index: 1000;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-animation: fadein 2s;
  -moz-animation: fadein 2s;
  -ms-animation: fadein 2s;
  -o-animation: fadein 2s;
  animation: fadein 2s;
}

canvas {
  position: absolute;
  top: 0;
  z-index: -1;
  width: 100% !important;
  height: 100% !important;
}

/* Links */

a {
  padding-inline: calc(var(--spacing) * 1.5);
  color: var(--color-text);
  font-size: var(--p-font-size);
  line-height: var(--p-leading);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}

a:focus {
  outline: thin dotted;
}

a:active {
  outline: 0;
}

a:hover {
  outline: 0;
  filter: blur(var(--blur));
}

/* Typography */

h1,
h2,
p {
  margin: 0;
  font-weight: normal;
  letter-spacing: 0.2px;
	cursor:default;
}

h1 {
  font-size: var(--p-font-size);
  line-height: var(--p-leading);
}

p {
  font-size: var(--p-font-size);
  line-height: var(--p-leading);
}

.indent {
  text-indent: calc(var(--spacing) * 6);
}

.contrast-font {
  font-family: var(--contrast-font);
  font-size: 20px;
  letter-spacing: 0.5px;
}

/* Layout */

.site__logo {
  width: 90px;
}

.logo {
	font-size: 40px;
	padding: 0;
}

.flex-container {
  position: relative;
  z-index: 10;
  display: flex;
  height: 100dvh;
  transition:
    filter 0.4s ease,
    opacity 0.4s ease;
}

.left-container,
.right-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 50%;
  padding: calc(var(--spacing)*4) 0;
  color: var(--color-text);
  background: var(--color-bg);
}

.left-container {
  position: relative;
  padding-left: calc(var(--spacing)*4);
  padding-right: calc(var(--spacing)*10);
	
}

.right-container {
  position: relative;
  padding-left: calc(var(--spacing)*4);
  padding-right: calc(var(--spacing)*4);
	
}

.right-inner-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.anchored-bottom {
  position: absolute;
  bottom: 1rem;
  width: 100%;
}

.left-container.hide-content h1,
.left-container.hide-content svg,
.left-container.hide-content .work-toggle {
  opacity: 1;
  filter: blur(var(--blur));
}

.left-container.hide-content,
.right-container.hide-content {
  background-color: var(--color-contrast);
}

.right-container.hide-content h1,
.right-container.hide-content p {
  opacity: 1;
  filter: blur(var(--blur));
}

.left-container .bottom-bar,
.right-container .about-details {
  opacity: 1;
  transition:
    filter 0.3s ease,
    opacity 0.3s ease;
}

.left-container.hide-content .bottom-bar,
.right-container.hide-content .about-details {
  opacity: 1;
  filter: blur(var(--blur));
}

.left-container,
.left-container h1,
.left-container p,
.right-container h1,
.right-container p {
  opacity: 1;
  transition: all 0.3s;
}

.pill-button {
  display: inline-block;
  background-color: var(--color-2);
  border-radius: 3.40282e38px;
  margin-right: calc(var(--spacing) * 1.5);	
}

.pill-button:active {
  background-color: var(--color-unexpected) !important;
  border-radius: 3.40282e38px;	
}

.pill-button[aria-current="page"] {
  background-color: var(--color-unexpected);
}

.bottom-bar {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.anchored-bottom-left {
  margin: 0;
}



/*Page transitions */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-out 0.55s ease both;
}

::view-transition-new(root) {
  animation: page-in 0.55s ease both;
}

@keyframes page-out {
  from {
    opacity: 1;
    filter: blur(0);
  }

  to {
    opacity: 0;
    filter: blur(12px);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    filter: blur(12px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.01ms;
  }
}

/* Project carousel */

.project-carousel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  width: 100vw;
  overflow: hidden;
  pointer-events: auto;
  transition: filter 0.4s ease;
}

.marquee-track {
  display: flex;
  align-items: flex-start;
  width: max-content;
  will-change: transform;
}

.marquee-track img {
  display: block;
  flex-shrink: 0;
  width: auto;
  height: 150px;
  object-fit: cover;
  cursor: pointer;
  filter: blur(var(--blur-max));
  transition: filter 0.4s ease;
}

.marquee-track img:hover {
  filter: blur(0);
}

.flex-container {
  transition:
    filter 0.4s ease,
    opacity 0.4s ease;
}

body:has(.marquee-track img:hover) .flex-container {
  filter: blur(var(--blur));
}



/* Image modal */

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.05);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.image-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal-image {
  display: block;
  max-width: min(80vw, 1200px);
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 201;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.modal-arrow {
  position: absolute;
  top: 50%;
  z-index: 201;
  padding: calc(var(--spacing)*4);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 24px;
  cursor: pointer;
  transform: translateY(-50%);
}

.modal-previous {
  left: 20px;
}

.modal-next {
  right: 20px;
}

.modal-arrow:hover {
  filter: blur(var(--blur));
}

.modal-metadata {
  position: absolute;
  left: calc(var(--spacing)*4);
  bottom: calc(var(--spacing)*4);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: calc(var(--spacing)*4);
  max-width: calc(100% - 2rem);
	font-size: var(--p-font-size);
}

.modal-services {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.modal-services li:not(:last-child)::after {
  content: ",\00a0";
}

@media (max-width: 700px) {
  .modal-metadata {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }
}

@media (max-width: 700px) {
  .modal-previous {
    left: 0;
  }

  .modal-next {
    right: 0;
  }
}

body.modal-open .project-carousel,
body.modal-open .flex-container {
  filter: blur(var(--blur));
  pointer-events: none;
}

@media (max-width: 700px) {
  .image-modal {
    padding: 20px;
  }

  .modal-image {
    max-width: 90vw;
    max-height: 75vh;
  }
}
/* Mobile */

@media (max-width: 768px) {
  .flex-container {
    position: relative;
    flex-direction: column;
    min-height: 100dvh;
    height: auto;
  }

  .left-container,
  .right-container {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    transition: opacity 0.3s;
  }
	
	.pill-button {
		display:none;
	}

  .right-container {
    z-index: 0;

  }

  .hide-content {
    opacity: 0;
  }

  .anchored-bottom {
    width: 95%;
  }

  .project-carousel,
  #workToggle {
    display: none;
  }
}

/* WordPress integration and stable image loading */

.project-frame {
  --project-ratio: 4 / 5;
  position: relative;
  display: block;
  flex: 0 0 auto;
  height: 150px;
  aspect-ratio: var(--project-ratio);
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #e9e8e4;
  cursor: pointer;
}

.project-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 25%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 75%
  );
  transform: translateX(-100%);
  animation: mira-image-loading 1.4s ease-in-out infinite;
  pointer-events: none;
}

.project-frame > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover;
  opacity: 0;
  transition:
    filter 0.4s ease,
    opacity 240ms ease;
}

.project-frame.is-loaded > img {
  opacity: 1;
}

.project-frame.is-loaded::after,
.project-frame.is-error::after {
  display: none;
}

.project-frame:focus-visible {
  z-index: 2;
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.modal-image {
  background: #e9e8e4;
  transition: opacity 180ms ease;
}

.image-modal.is-loading .modal-image {
  opacity: 0;
}

.about-statement h1,
.page-copy,
.page-copy > p {
  display: inline;
  font: inherit;
}

.about-statement {
  font-size: var(--p-font-size);
  line-height: var(--p-leading);
}

/* Info page layout */

.info-page .left-container,
.info-page .right-container {
  justify-content: space-between;
}

.info-page .bottom-bar,
.info-page .anchored-bottom {
  position: static;
  width: auto;
}

.info-page .about-statement {
  width: 80%;
}

.about-statement,
.right-inner-container,
.anchored-bottom {
  transition: filter 0.3s ease;
}

.left-container.hide-content .about-statement,
.right-container.hide-content .right-inner-container,
.right-container.hide-content .anchored-bottom {
  filter: blur(var(--blur));
}

.fallback-page {
  min-height: 100vh;
  padding: 1rem;
}

body.admin-bar .project-carousel {
  top: 32px;
}

@keyframes mira-image-loading {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 782px) {
  body.admin-bar .project-carousel {
    top: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-frame::after {
    animation: none;
  }

  .project-frame > img,
  .modal-image {
    transition: none;
  }
}
