/* =========================================================
   BAKI-LEX CONTACT PAGE
   ========================================================= */

.contact-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;

  color: #3f2a1d;

  font-family:
    "Montserrat",
    Arial,
    sans-serif;
}


/* =========================================================
   APPLICATION SHELL
   ========================================================= */

.contact-app-shell {
  min-height: 100vh;

  display: flex;
  flex-direction: column;
}


/* =========================================================
   SIDEBAR LINKS
   ========================================================= */

.contact-sidebar-link {
  color: inherit;
  text-decoration: none;
}


/* =========================================================
   MAIN WOODEN DESK AREA
   ========================================================= */

.contact-main {
  flex: 1;

  display: flex;

  min-height: 0;

  padding: 0 0.45rem;
}

.contact-scene {
  position: relative;

  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  box-sizing: border-box;

   min-height: 72vh;

  padding:
    clamp(2rem, 4vw, 4rem)
    clamp(1rem, 3vw, 2.5rem);

  border:
    clamp(4px, 0.4vw, 8px)
    solid rgba(92, 52, 22, 0.82);

  border-radius:
    clamp(18px, 2vw, 32px);

  background:
    linear-gradient(
      rgba(77, 39, 13, 0.04),
      rgba(77, 39, 13, 0.1)
    ),
    url("../images/contact-background.png")
    center / cover
    no-repeat;

  box-shadow:
    inset 0 10px 25px rgba(53, 25, 8, 0.38),
    inset 0 -8px 18px rgba(53, 25, 8, 0.2);
}


/* =========================================================
   CARD AND BUTTON LAYOUT
   ========================================================= */

.contact-layout {
  display: grid;

 grid-template-columns:
    minmax(0, 860px)
    92px;

  gap: clamp(2.5rem, 5vw, 6rem);

  align-items: center;

  width: min(1250px, 100%);

  /*
   * The layout is moved slightly left to create more room
   * around the three round buttons.
   */
  transform: translateX(-3%);
}


/* =========================================================
   CONTACT CARD
   ========================================================= */

.contact-card {
  width: 100%;
  box-sizing: border-box;

  padding:
     clamp(1.2rem, 2vw, 2rem);

  border:
    1px solid rgba(118, 75, 38, 0.28);

  border-radius: 20px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 252, 242, 0.98),
      rgba(246, 235, 211, 0.97)
    );

  box-shadow:
    0 22px 48px rgba(34, 17, 6, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}


/* =========================================================
   CONTACT HEADING
   ========================================================= */

.contact-heading {
  max-width: 700px;

  margin:
    0 auto
    clamp(1.8rem, 4vw, 3rem);

  text-align: center;
}

.contact-label {
  margin: 0 0 0.55rem;

  color: #975222;

  font-size: 0.78rem;
  font-weight: 700;

  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.contact-heading h1 {
  margin: 0;

  color: #4b2919;

  font-family:
    "Cormorant Garamond",
    Georgia,
    serif;

  font-size:
    clamp(2.5rem, 4vw, 3.7rem);

  font-weight: 600;
  line-height: 0.95;
}

.contact-introduction {
  max-width: 610px;

  margin: 1rem auto 0;

  color: #675246;

  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  line-height: 1.7;
}


/* =========================================================
   FORM AND EMAIL PANEL
   ========================================================= */

.contact-content {
  display: grid;

  grid-template-columns:
    minmax(0, 1.55fr)
    minmax(240px, 0.75fr);

  gap: 1.25rem;

  align-items: stretch;
}


/* =========================================================
   FORM
   ========================================================= */

.contact-form {
  display: grid;
  gap: 1.1rem;
}

.contact-row {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 1rem;
}

.contact-field {
  display: grid;
  gap: 0.45rem;
}

.contact-field label {
  color: #3e281b;

  font-size: 0.88rem;
  font-weight: 700;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  box-sizing: border-box;

  padding: 0.85rem 0.95rem;

  color: #352218;

  font: inherit;
  font-size: 0.94rem;

  border:
    1px solid rgba(109, 70, 39, 0.34);

  border-radius: 10px;

  background:
    rgba(255, 253, 247, 0.78);

  box-shadow:
    inset 0 1px 2px rgba(65, 42, 22, 0.06);

  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.contact-field textarea {
  min-height: 155px;

  resize: vertical;
  line-height: 1.55;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: #9a6738;

  background: #fffdf8;

  box-shadow:
    0 0 0 4px rgba(154, 103, 56, 0.12);

  outline: none;
}


/* =========================================================
   SEND BUTTON
   ========================================================= */

.contact-submit-button {
  justify-self: start;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;

  min-width: 190px;

  padding: 0.85rem 1.5rem;

  color: #fffaf0;

  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;

  border: 1px solid #62391f;
  border-radius: 999px;

  background:
    linear-gradient(
      180deg,
      #99561f,
      #713c1b
    );

  box-shadow:
    0 9px 20px rgba(72, 42, 21, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);

  cursor: pointer;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.contact-submit-button:hover {
  filter: brightness(1.08);

  transform: translateY(-2px);

  box-shadow:
    0 13px 26px rgba(72, 42, 21, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.contact-submit-button:active {
  transform: translateY(0);
}

.contact-submit-button:focus-visible {
  outline:
    3px solid rgba(126, 78, 40, 0.4);

  outline-offset: 3px;
}

.contact-form-note {
  margin: -0.35rem 0 0;

  color: #786358;

  font-size: 0.78rem;
  line-height: 1.5;
}


/* =========================================================
   DIRECT EMAIL PANEL
   ========================================================= */

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: center;

  box-sizing: border-box;

  padding:
    clamp(1.3rem, 2.5vw, 2rem);

  text-align: center;

  border:
    1px solid rgba(116, 76, 41, 0.25);

  border-radius: 17px;

  background:
    rgba(235, 218, 184, 0.28);
}

.contact-email-icon {
  display: grid;
  place-items: center;

  width: 68px;
  height: 68px;

  margin-bottom: 1rem;

  color: #fffaf1;
  font-size: 1.7rem;

  border-radius: 50%;

  background:
    linear-gradient(
      145deg,
      #9b581f,
      #703a16
    );

  box-shadow:
    0 9px 20px rgba(72, 42, 21, 0.22);
}

.contact-details h2 {
  margin: 0 0 0.75rem;

  color: #56301d;

  font-family:
    "Cormorant Garamond",
    Georgia,
    serif;

  font-size: 2rem;
  line-height: 1;
}

.contact-details p {
  margin: 0;

  color: #675044;

  font-size: 0.86rem;
  line-height: 1.65;
}

.contact-details a {
  display: inline-block;

  margin-top: 1rem;

  color: #7c421d;

  font-size: 0.83rem;
  font-weight: 700;

  overflow-wrap: anywhere;
}

.contact-details a:hover {
  color: #422515;
}

.contact-divider {
  display: grid;

  grid-template-columns:
    1fr auto 1fr;

  gap: 0.6rem;
  align-items: center;

  width: 100%;

  margin: 1.6rem 0;

  color: #c2935f;
  font-size: 0.5rem;
}

.contact-divider span {
  height: 1px;

  background:
    rgba(126, 78, 40, 0.3);
}

.contact-small-text {
  margin-top: auto !important;

  font-size: 0.8rem !important;
}


/* =========================================================
   THREE ROUND BUTTONS
   ========================================================= */

.contact-action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 1rem;
}

.contact-round-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 64px;
  height: 64px;
  box-sizing: border-box;

  padding: 0;

  color: #17100b;
  font-size: 1.25rem;
  text-decoration: none;

  border:
    2px solid rgba(42, 27, 18, 0.85);

  border-radius: 50%;

  background: #ffffff;

  box-shadow:
    0 5px 12px rgba(35, 19, 8, 0.25);

  cursor: pointer;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.contact-round-button:hover {
  background: #fff9ed;

  transform: translateY(-3px);

  box-shadow:
    0 9px 18px rgba(35, 19, 8, 0.3);
}

.contact-round-button:focus-visible {
  outline:
    4px solid rgba(255, 245, 220, 0.8);

  outline-offset: 3px;
}

.contact-upload-button {
  color: #a36632;

  border:
    3px dashed rgba(255, 255, 255, 0.95);

  outline:
    2px solid rgba(113, 67, 31, 0.85);

  outline-offset: -2px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.contact-footer {
  flex-shrink: 0;
}

.contact-footer a[aria-current="page"] {
  font-weight: 700;

  text-decoration-thickness: 2px;
  text-underline-offset: 0.25rem;
}


/* =========================================================
   SMALLER LAPTOPS
   ========================================================= */

@media (max-width: 1100px) {
  .contact-layout {
    grid-template-columns:
      minmax(0, 820px)
      78px;

    gap: 2rem;

    transform: translateX(-1.5%);
  }

  .contact-round-button {
    width: 64px;
    height: 64px;
  }
}


/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 850px) {
  .contact-main {
    padding: 0 0.3rem;
  }

  .contact-scene {
    padding: 1.5rem 0.8rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;

    gap: 1.5rem;

    transform: none;
  }

  .contact-action-buttons {
    flex-direction: row;
    justify-content: center;

    order: -1;
  }

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

  .contact-details {
    order: -1;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 620px) {
  .contact-scene {
    padding:
      1rem
      0.55rem
      1.5rem;

    border-radius: 16px;
  }

  .contact-card {
    padding:
      1.4rem
      1rem;

    border-radius: 16px;
  }

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

  .contact-heading h1 {
    font-size: 3.1rem;
  }

  .contact-round-button {
    width: 56px;
    height: 56px;

    font-size: 1.05rem;
  }

  .contact-submit-button {
    width: 100%;

    justify-self: stretch;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .contact-round-button,
  .contact-submit-button,
  .contact-field input,
  .contact-field textarea {
    transition: none;
  }
}

/* =========================================================
   FINAL CONTACT PAGE SIZE CORRECTIONS
   Keep the whole page inside one screen
   ========================================================= */

.contact-page {
  height: 100vh;
  overflow: hidden;
}

.contact-app-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}


/* Match the smaller header used elsewhere in the app */

.contact-page .topbar {
  min-height: 76px;
  height: 76px;
  padding: 0.35rem 1.2rem;
  box-sizing: border-box;
}

.contact-page .brand-logo {
  width: auto;
  height: 62px;
  max-height: 62px;
}

.contact-page .menu-button {
  font-size: 1.8rem;
}


/* Main area must use only the space between header and footer */

.contact-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 0.4rem;
}

.contact-scene {
  height: 100%;
  min-height: 0;
  overflow: hidden;

  padding:
    1rem
    1.25rem;

  box-sizing: border-box;
}


/* Smaller overall layout */

.contact-layout {
  width: min(1080px, 96%);
  height: 100%;

  grid-template-columns:
    minmax(0, 790px)
    70px;

  gap: 2.25rem;

  align-items: center;

  transform: translateX(-2%);
}


/* Smaller card that fits without scrolling */

.contact-card {
  max-height: calc(100% - 1rem);
  overflow: auto;

  padding:
    1.25rem
    1.5rem;

  border-radius: 16px;
}


/* Reduce heading space */

.contact-heading {
  margin:
    0 auto
    1.15rem;
}

.contact-label {
  margin-bottom: 0.25rem;
  font-size: 0.68rem;
}

.contact-heading h1 {
  font-size: clamp(2.2rem, 3.4vw, 3.15rem);
  line-height: 0.95;
}

.contact-introduction {
  margin-top: 0.55rem;

  font-size: 0.84rem;
  line-height: 1.45;
}


/* Compact form */

.contact-content {
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(210px, 0.7fr);

  gap: 1.1rem;
}

.contact-form {
  gap: 0.75rem;
}

.contact-row {
  gap: 0.75rem;
}

.contact-field {
  gap: 0.3rem;
}

.contact-field label {
  font-size: 0.78rem;
}

.contact-field input,
.contact-field textarea {
  padding: 0.63rem 0.75rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.contact-field textarea {
  min-height: 105px;
  max-height: 125px;
}

.contact-submit-button {
  min-width: 165px;
  padding: 0.68rem 1.1rem;
  font-size: 0.82rem;
}

.contact-form-note {
  font-size: 0.68rem;
}


/* Compact email panel */

.contact-details {
  padding: 1rem;
}

.contact-email-icon {
  width: 48px;
  height: 48px;

  margin-bottom: 0.65rem;

  font-size: 1.15rem;
}

.contact-details h2 {
  margin-bottom: 0.45rem;
  font-size: 1.55rem;
}

.contact-details p {
  font-size: 0.74rem;
  line-height: 1.45;
}

.contact-details a {
  margin-top: 0.65rem;
  font-size: 0.72rem;
}

.contact-divider {
  margin: 0.9rem 0;
}

.contact-small-text {
  font-size: 0.7rem !important;
}


/* Smaller round buttons */

.contact-action-buttons {
  gap: 0.75rem;
}

.contact-round-button {
  width: 58px;
  height: 58px;
  font-size: 1rem;
}


/* Smaller footer */

.contact-footer {
  min-height: 54px;
  padding: 0.45rem 1rem;
  box-sizing: border-box;
}

.contact-footer p {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
}

.contact-footer .footer-links {
  font-size: 0.7rem;
}


/* Short laptop screens */

@media (max-height: 760px) {
  .contact-page .topbar {
    height: 66px;
    min-height: 66px;
  }

  .contact-page .brand-logo {
    height: 54px;
    max-height: 54px;
  }

  .contact-scene {
    padding: 0.65rem 1rem;
  }

  .contact-card {
    padding: 0.9rem 1.2rem;
  }

  .contact-heading {
    margin-bottom: 0.75rem;
  }

  .contact-heading h1 {
    font-size: 2.45rem;
  }

  .contact-introduction {
    font-size: 0.77rem;
  }

  .contact-field textarea {
    min-height: 82px;
    max-height: 92px;
  }

  .contact-round-button {
    width: 52px;
    height: 52px;
  }

  .contact-footer {
    min-height: 46px;
  }
}


/* Mobile devices can scroll normally */

@media (max-width: 850px) {
  .contact-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .contact-app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .contact-main,
  .contact-scene {
    height: auto;
    overflow: visible;
  }

  .contact-layout {
    height: auto;
    width: 100%;
  }

  .contact-card {
    max-height: none;
    overflow: visible;
  }
}
