/* Custom Uploaded Fonts from Webflow CDN */
@font-face {
  font-family: 'Luxia display';
  src: url('https://cdn.prod.website-files.com/624aab5f21e2909283a67638/624b015079721062eaabae8a_Luxia-Display.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Luxia';
  src: url('https://cdn.prod.website-files.com/624aab5f21e2909283a67638/624b0150431bf2b2dd09e6e4_Luxia-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Coves';
  src: url('https://cdn.prod.website-files.com/624aab5f21e2909283a67638/624b00dca2094e5585097ca4_Coves%20Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Coves';
  src: url('https://cdn.prod.website-files.com/624aab5f21e2909283a67638/624b00dcf2caaa3883cf17e1_Coves%20Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Webflow Design Tokens / Variables */
:root {
  --alice-blue: hsla(273, 60.43%, 10.39%, 1.00);
  --snow: hsla(267, 57.62%, 11.42%, 1.00);
  --dark-slate-grey: #69a6c3;
  --light-red: #a565e9;
  --black: hsla(287, 16.60%, 89.61%, 1.00);
  --dim-grey: hsla(289, 5.98%, 53.20%, 1.00);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
}

.body {
  display: block;
  max-height: 100vh;
  background-color: var(--alice-blue);
  font-family: 'Comfortaa', sans-serif;
  color: var(--dim-grey);
  font-size: 14px;
  line-height: 20px;
}

/* Lottie Player Background Hack */
.bg-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
}

/* Force the internal Lottie component to mimic object-fit: cover for a 16:9 ratio */
@media (min-aspect-ratio: 16/9) {
  .background-video {
    height: 56.25vw;
  }
}
@media (max-aspect-ratio: 16/9) {
  .background-video {
    width: 177.78vh;
  }
}

/* Layout Containers */
.viewport {
  display: flex;
  width: 100vw;
  height: 100vh;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto; /* Fix for scrolling */
}

.container-block {
  width: 80vw;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 0; /* Clear space for scrolling */
}

.position-block {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screens & View Switching Transitions */
.screen {
  position: absolute;
  left: 0; 
  right: 0;
  top: 0;
  margin: auto;
  width: 100%;
  
  /* Initial hidden state: completely transparent and slightly dropped */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px);
  filter: blur(4px);
  
  /* The transition rule for when the screen is exiting (slower, fade out) */
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s;
}

.screen.active {
  position: relative; /* Fixes height expansion for parent container so scrolling works */
  
  /* Active visible state: fully opaque and in original position */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  filter: blur(0px);
  
  /* The transition rule for when the screen is entering (snappier, slide in) */
  transition: opacity 0.6s cubic-bezier(0.0, 0, 0.2, 1) 0.1s, 
              transform 0.6s cubic-bezier(0.0, 0, 0.2, 1) 0.1s,
              filter 0.6s cubic-bezier(0.0, 0, 0.2, 1) 0.1s;
}

/* Base layouts for the different screens */
.screen.landing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--dim-grey);
}

.screen.works-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--dim-grey);
}

.screen.about-block {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
  color: var(--dim-grey);
}

.screen.contact-block {
  display: flex;
  flex-direction: column;
  color: var(--dim-grey);
}

/* Typography */
.heading {
  margin-top: 0px;
  margin-bottom: 12px;
  font-family: 'Luxia display', serif;
  color: var(--light-red);
  line-height: 6rem;
  font-weight: 400;
}

.heading.h1 {
  font-size: 5rem;
}

.heading.h2 {
  font-size: 3.7rem;
  margin-bottom: 20px;
}

.heading.h3 {
  font-size: 2rem;
  line-height: 3.5rem;
}

.text {
  font-family: 'Comfortaa', sans-serif;
  font-size: 1.5rem;
  line-height: 1.5rem;
}

.text.textbox {
  max-width: 40vw; /* Restored to Webflow's original 40vw */
  font-family: 'Comfortaa', sans-serif;
  font-size: 1.2rem;
  line-height: 1.55rem;
  font-weight: 300;
}

.text.textbox.bold {
  color: var(--dim-grey);
  font-weight: 600;
  margin-bottom: 4px;
}

/* Navigation & Buttons */
.nav-block {
  display: flex;
  align-items: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

.nav-block.in-contact-block {
  margin-top: 0px;
  margin-bottom: 10px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 38px; /* Hardcoded to perfectly match social button height */
  min-width: 120px;
  margin-right: 5px;
  padding: 0 18px; /* Removed top/bottom padding to respect fixed height */
  border: 3px solid var(--light-red);
  background-color: transparent;
  font-family: 'Luxia display', serif;
  color: var(--dim-grey);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 350ms ease, color 350ms ease, transform 250ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.button:hover {
  background-color: var(--light-red);
  color: var(--black);
  transform: translateY(-2px);
}

.button.b1 {
  border-top-left-radius: 50ch;
  border-bottom-left-radius: 50ch;
}

.button.b3 {
  border-top-right-radius: 50ch;
  border-bottom-right-radius: 50ch;
}

.button.b4 {
  margin-right: 0px;
  align-self: flex-end;
  border-radius: 20px;
}

.button.b5 {
  border-radius: 20px;
}

/* Social Buttons */
.div-block-5 {
  display: flex;
  width: 125px; /* Slight bump for wider 38px buttons */
  margin-right: 20px;
  justify-content: space-between;
}

.button.social-button {
  position: relative;
  display: flex;
  width: 38px; /* Matched exactly to text button height */
  height: 38px; 
  min-width: 0px;
  margin-right: 0px;
  padding: 0px;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
}

.social-icon {
  position: absolute;
  height: auto;
  max-width: 70%;
  transition: opacity 250ms ease;
}

.social-icon.dark {
  z-index: 1;
  opacity: 1;
}

.social-icon.light {
  z-index: 0;
  opacity: 0;
}

.button.social-button:hover .social-icon.dark {
  opacity: 0;
}

.button.social-button:hover .social-icon.light {
  opacity: 1;
}

/* Back Button */
.back-button {
  position: absolute;
  left: 0%;
  top: 0%;
  margin-top: 20px;
  background: none;
  border: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  font-family: 'Luxia display', serif;
  color: var(--dim-grey);
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
  transform: translateX(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.back-button.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0px);
}

.back-button:hover {
  color: var(--light-red);
}

/* Works Grid & Cards */
.div-block-2 {
  display: flex;
  width: 100%;
  flex-direction: row;
  justify-content: center; /* Center aligns the grid if cards don't fill a row */
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px; /* Increased from 16px to match original 15px+15px margin layout */
}

.work-card {
  width: 28%;
  min-width: 260px;
  flex: 0 1 auto;
  transition: transform 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 400ms ease;
  border-radius: 10px;
}

.work-card:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.link-box {
  display: block;
  width: 100%;
  height: 100%;
}

.card-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* About Portrait */
.div-block-6 {
  width: 35%; /* Restores responsive scaling rather than hardcoded 320px */
  max-width: 400px;
  flex-shrink: 0;
}

.div-block-6 .image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* Contact Section & Form */
.div-block-8 {
  display: flex;
  margin-top: 12px;
  margin-bottom: 12px;
  font-size: 1rem;
}

.text-block-6 {
  padding-right: 6px;
}

.link {
  color: var(--dim-grey);
  cursor: pointer;
  text-decoration: underline;
  transition: color 250ms ease;
}

.link:hover {
  color: var(--light-red);
}

.text-block-7 {
  font-size: 1rem;
}

/* Contact Form Width Constrained */
.form-block {
  display: block;
  width: 100%;
  max-width: 450px; /* Constrains it from stretching full width */
  min-width: 30vw;
  margin-top: 15px;
}

.form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.div-block-3 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.field-label,
.field-label-2 {
  display: none;
}

.text-field {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--light-red);
  border-radius: 10px;
  background-color: transparent;
  font-family: 'Comfortaa', sans-serif;
  font-size: 0.95rem;
  color: var(--black);
  outline: none;
  transition: box-shadow 250ms ease, border-color 250ms ease, transform 250ms ease;
}

.text-field::placeholder {
  color: var(--dim-grey);
  opacity: 0.75;
}

.text-field:focus {
  box-shadow: 0 0 0 3px rgba(165, 101, 233, 0.25);
  transform: translateY(-1px);
}

.textarea-field {
  resize: vertical;
  min-height: 90px;
}

.success-message {
  padding: 12px 0;
  background-color: transparent;
  font-family: 'Comfortaa', sans-serif;
  animation: fadeIn 0.4s ease-out forwards;
}

.text-block-4 {
  color: var(--black);
}

.error-message {
  margin-top: 8px;
  background-color: transparent;
  color: var(--light-red);
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Breakpoints (Matching Webflow Medium / Small / Tiny) */
@media screen and (max-width: 991px) {
  .container-block {
    width: 90vw;
  }

  .screen.landing {
    align-items: center;
    text-align: center;
  }

  .heading.h1,
  .heading.h2,
  .heading.h3 {
    text-align: center;
  }

  .heading.h2 {
    font-size: 3.5rem;
    line-height: 4.8rem;
  }

  .text.textbox {
    max-width: 75vw; /* Overrides the 40vw for tablets */
    font-size: 1rem;
    line-height: 1.4rem;
    text-align: center;
  }

  .text.textbox.bold {
    font-size: 1.2rem;
    text-align: center;
  }

  .nav-block {
    justify-content: center;
  }

  .work-card {
    width: 45%;
  }

  .screen.about-block {
    flex-direction: column-reverse;
    text-align: center;
  }

  .div-block-6 {
    width: 320px; /* Constrain on tablet stack */
  }

  .div-block-8 {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }

  .text-block-7 {
    text-align: center;
  }

  .form-block {
    min-width: 50vw;
  }
}

@media screen and (max-width: 767px) {
  .heading {
    font-size: 4rem;
    line-height: 4.6rem;
  }

  .heading.h1 {
    line-height: 5.3rem;
  }

  .text.textbox {
    max-width: 100vw;
    padding-right: 5px;
    padding-left: 5px;
    font-size: 1rem;
  }

  .work-card {
    width: 45%;
  }

  .screen.contact-block {
    align-items: center;
  }

  .div-block-5 {
    margin-right: 10px;
    justify-content: space-around;
  }

  .button.b5 {
    margin-right: 0px;
  }
}

@media screen and (max-width: 479px) {
  .container-block {
    width: 94vw;
  }

  .position-block {
    width: 100vw;
  }

  .back-button {
    left: 5%;
  }

  .heading.h1 {
    align-self: center;
    font-size: 3.4rem;
    line-height: 3.8rem;
  }

  .heading.h2 {
    font-size: 2.2rem;
    line-height: 2.9rem;
  }

  .heading.h3 {
    width: 100vw;
    line-height: 2.3rem;
  }

  .text.textbox {
    padding-right: 10px;
    padding-left: 10px;
    align-self: center;
    font-size: 0.85rem;
    line-height: 1.25rem;
    text-align: center;
  }

  .nav-block {
    width: 100%;
    padding-right: 5px;
    padding-left: 5px;
    justify-content: center;
  }

  .button.b1,
  .button.b3 {
    min-width: 95px;
    margin-right: 0px;
  }

  .button.b2 {
    min-width: 95px;
    margin-right: 5px;
    margin-left: 5px;
  }

  .div-block-2 {
    justify-content: center;
    gap: 24px; /* Slightly tighter gap on mobile portrait */
  }

  .work-card {
    width: 100%;
    max-width: 93%;
  }

  .div-block-7 {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .div-block-6 {
    width: 220px; /* Smaller portrait on phones */
  }

  .form-block {
    min-width: 88vw;
  }
}
